omg this is working

This commit is contained in:
Ben Miller
2024-11-13 23:43:32 -07:00
parent fb86c9c96d
commit a5c0a1176d
22 changed files with 2152 additions and 53 deletions

View File

@ -1,4 +1,10 @@
function newSkuHandler(e: GoogleAppsScript.Events.SheetsOnEdit) {
import {
getCellRangeByColumnName,
getCellValueByColumnName,
} from "./sheetUtils"
export function newSkuHandler(e: GoogleAppsScript.Events.SheetsOnEdit) {
var sheet = SpreadsheetApp.getActive().getActiveSheet()
if (sheet.getName() !== "product_inventory") {
console.log("skipping edit on sheet " + sheet.getName())
@ -15,7 +21,7 @@ function newSkuHandler(e: GoogleAppsScript.Events.SheetsOnEdit) {
newSku(row)
}
function newSku(row: number) {
export function newSku(row: number) {
let sheet = SpreadsheetApp.getActive().getSheetByName("product_inventory")
let idCell = getCellRangeByColumnName(sheet, "#", row)
let safeToOverwrite: string[] = ["?", "n", ""]