feat: the menu snapshot carries a price per sales point; pulled orders keep the cloud's sales point and table (platform-v2 3S, S.2)
- services/cloud_sync.menu_snapshot(db) (split out of the push, tested): sold_at + prices per customer-app sales point from the pricing engine; digital_price = the QR menu's. - store_online_orders: sales_point from the cloud (older clouds: from the type), takeaway orders typed takeaway, the QR menu's table in front of the customer's note. - manager e2e: waits for the live connection (html[data-live]) instead of a fixed 1.5 s, and for the server to record "read" (two timing races seen in a full run). - Tests: +2 in test_sales_points.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,10 +27,16 @@ export default function LiveProvider({ children }) {
|
||||
url: () => wsUrlFor(`/api/ws/connect?token=${encodeURIComponent(token)}`),
|
||||
cursor: { load: () => seq, save: s => { seq = s } },
|
||||
onEvent: emit,
|
||||
onReady: () => emit('ready', null),
|
||||
onReady: () => {
|
||||
document.documentElement.dataset.live = 'ready' // tests wait for this instead of a fixed sleep
|
||||
emit('ready', null)
|
||||
},
|
||||
})
|
||||
live.start()
|
||||
return () => live.stop()
|
||||
return () => {
|
||||
live.stop()
|
||||
delete document.documentElement.dataset.live
|
||||
}
|
||||
}, [token])
|
||||
|
||||
return <LiveContext.Provider value={value}>{children}</LiveContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user