feat: delivery areas drawn on a map: the customer pins the address (plan 6R.G)
- services/fees.py: the site's engine (shapes matched by the pin), shared cases - checkout: price_cart(pin=), delivery_areas with kind (+ geometry for shapes), venue_point in the public menu (postcodes and rules stay on the cloud) - orders: quote / create take lat / lng; online_orders.lat / lng (Alembic 0007), sent to the site with the pending orders - order app: PinMap (Leaflet + OpenStreetMap tiles), 'Pin it on the map' first when the venue drew areas, the browser's location offered; lat / lng sent - tests: cloud test_fees (pinned quote and order), order-app logic Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ If the cloud is down, restaurants must keep taking orders (global Rule 8). Don't
|
||||
|
||||
**CL-10. Table QR tokens are the site's secret.** The cloud only receives their sha256 (`qr.tables[].token_hash`) and compares in constant time (`services/qr.py`). Never store or log a token the cloud receives, and never return `qr` from a public endpoint.
|
||||
|
||||
**CL-8. The fee engine has two copies.** `cloud_backend/services/fees.py` is byte-identical to the site's `local_backend/services/fees.py` (the cloud charges what the manager's "test an order" shows). Change both, and `tests/fixtures/fee_cases.json` in both repos; the site's `tests/test_fees.py` compares them.
|
||||
**CL-8. The fee engine has two copies.** (6R.G: areas drawn on a map are matched by the customer's pin `lat` / `lng`: `price_cart(pin=)`, `online_orders.lat` / `lng` (Alembic 0007), the order app's `PinMap.jsx` on Leaflet + OpenStreetMap tiles.) `cloud_backend/services/fees.py` is byte-identical to the site's `local_backend/services/fees.py` (the cloud charges what the manager's "test an order" shows). Change both, and `tests/fixtures/fee_cases.json` in both repos; the site's `tests/test_fees.py` compares them.
|
||||
|
||||
**CL-5. Frontend URLs are baked in at build time.**
|
||||
`VITE_CLOUD_URL` is a build arg, so changing it means rebuilding the image, not restarting it.
|
||||
|
||||
Reference in New Issue
Block a user