From ecea71c533f51fa32182e12d9e3060b14cdced05 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Wed, 31 Dec 2025 16:07:09 -0800 Subject: [PATCH] Implement polling-based order status notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend changes: - New API endpoint: checkStatusUpdate.cfm - polls order status and detects changes - Updated admin.html: added test section for manually updating order status - Status flow: 1(submitted) → 2(preparing) → 3(ready) → 4(completed) - Human-readable status messages for each state Testing interface: - Order ID input field - Status dropdown selector - Direct integration with existing updateStatus.cfm endpoint This enables real-time status notifications for customer orders with 30-second polling interval (Option 2 approach, with planned migration to self-hosted push). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- api/orders/checkStatusUpdate.cfm | 105 +++++++++++++++++++++++++++++++ kds/admin.html | 63 +++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 api/orders/checkStatusUpdate.cfm diff --git a/api/orders/checkStatusUpdate.cfm b/api/orders/checkStatusUpdate.cfm new file mode 100644 index 0000000..0f8ee5b --- /dev/null +++ b/api/orders/checkStatusUpdate.cfm @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + SELECT + OrderID, + OrderStatusID, + OrderLastEditedOn, + OrderServicePointID, + OrderBusinessID, + OrderUserID + FROM Orders + WHERE OrderID = + AND OrderIsDeleted = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#serializeJSON(payload)# diff --git a/kds/admin.html b/kds/admin.html index 9550beb..fbdf73e 100644 --- a/kds/admin.html +++ b/kds/admin.html @@ -219,6 +219,29 @@ + + +
+

Test Order Status Updates

+

Manually update order status to test push notifications

+ +
+ + +
+ +
+ + +
+ + +