feat: implement status automation and router pattern

- Implemented modular status automation system (statusHandlers.ts).
- Added handlers for 'Published' (Active/Qty 1), 'Sold' (Active/Qty 0), and 'Drafted'.
- Refactored onEdit triggers into a central Router pattern in OnEditHandler.ts.
- Updated Product.ts to support explicit quantity setting (fixed 0 value bug).
- Updated shopifyApi.ts to implement SetInventoryItemQuantity (using ignoreCompareQuantity).
- Consolidated triggers into single onEditHandler.
- Updated project documentation.
This commit is contained in:
2025-12-24 23:55:28 -07:00
parent 2d43c07546
commit 85cdfe1443
9 changed files with 158 additions and 15 deletions

View File

@ -13,6 +13,7 @@ The system allows you to:
- Monitor and troubleshoot background processes via a custom side panel.
- **Automated Sales Sync**: Periodically check Shopify for recent sales and mark items as "sold" in the sheet.
- **Manual Reconciliation**: Backfill sales data for a specific time range via menu command.
- **Status Workflow Automation**: Automatically update Shopify status and inventory based on the sheet's "status" column (e.g., "Sold" -> Active, 0 Qty).
## Prerequisites