feat: delivery areas and fee rules with "test an order" (platform-v2 3S, S.3)
- models/fees.py + Alembic 0018: delivery_areas, fee_rules; key connect_orders.fees (owner, store manager; existing ones get it). - services/fees.py: the pure engine (set / add / % / free / minimum, conditions: sales points, areas, products total, item count, days, time incl. past midnight, stop), the same file as the cloud's; tests/fixtures/fee_cases.json shared, plus a test that the cloud copy is identical. - routers/fees.py at /api/connect/fees: areas and rules CRUD (validated), order, preview. - Snapshot carries fees + the venue's time zone; a change to products, pricing or fees pushes the menu within ~5 s (middleware -> cloud_sync.request_menu_push). - Manager: Online -> Delivery fees page (@xenia/ui): rules in order with words for each, areas with postcodes, "Test an order"; en/el texts; feesLogic.js unit-tested. - Tests: test_fees.py (39), manager unit +5, manager.mjs +7 on the real page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import DashboardPage from './pages/DashboardPage'
|
||||
import TablesPage from './pages/TablesPage'
|
||||
import OrderDetailPage from './pages/OrderDetailPage'
|
||||
import OnlineOrdersPage from './pages/OnlineOrdersPage'
|
||||
import FeesPage from './pages/online/FeesPage'
|
||||
|
||||
// CRM
|
||||
import ContactsPage from './pages/crm/ContactsPage'
|
||||
@@ -145,6 +146,7 @@ export default function App() {
|
||||
<Route path="dashboard" element={<DashboardPage />} />
|
||||
<Route path="tables" element={<TablesPage />} />
|
||||
<Route path="online-orders" element={<OnlineOrdersPage />} />
|
||||
<Route path="online/fees" element={<FeesPage />} />
|
||||
<Route path="orders/:orderId" element={<OrderDetailPage />} />
|
||||
|
||||
{/* ── CRM ── */}
|
||||
|
||||
Reference in New Issue
Block a user