@burdenoff/microfe-kadaikodi 2026.625.1 → 2026.626.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/kadaikodi/pages/HomePage.js +19 -14
  2. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +118 -83
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +75 -46
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +144 -128
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +255 -237
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +129 -128
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +178 -150
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js +182 -159
  16. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/admin/UserManagementPage.js +325 -303
  18. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +500 -469
  20. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +534 -503
  22. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +73 -48
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +103 -96
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +130 -129
  28. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +673 -670
  30. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +517 -514
  32. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +140 -125
  34. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/HelpSupportPage.js +302 -311
  36. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +102 -91
  38. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/SettingsPage.js +766 -734
  40. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +366 -356
  42. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/CartDetailPage.js +243 -213
  44. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +200 -195
  46. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/CheckoutPage.js +95 -89
  48. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +430 -387
  50. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +488 -478
  52. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +523 -512
  54. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/FavoritesPage.js +83 -75
  56. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +116 -108
  58. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +67 -61
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  61. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +90 -73
  62. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  63. package/dist/kadaikodi/pages/customer/ReviewsPage.js +80 -72
  64. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +70 -53
  66. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +289 -255
  68. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +92 -84
  70. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  71. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +63 -55
  72. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +339 -311
  74. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  75. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +40 -32
  76. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  77. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +174 -150
  78. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  79. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +385 -381
  80. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  81. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +302 -273
  82. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  83. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +87 -59
  84. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  85. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +82 -75
  86. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  87. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +81 -77
  88. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  89. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +78 -71
  90. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  91. package/package.json +2 -2
@@ -1,14 +1,16 @@
1
1
  import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { formatCurrency as r } from "../../utils/formatters.js";
5
- import { mockOrders as i } from "../../mocks/data.js";
6
- import { useMemo as a, useState as o } from "react";
7
- import { AlertCircle as s, CheckCircle2 as c, ChefHat as l, MapPin as u, PackageCheck as d, Phone as f, RefreshCw as p, Search as m, ShoppingBag as h, Truck as g, X as _, XCircle as v } from "lucide-react";
8
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
4
+ import { EmptyState as r } from "../../components/EmptyState.js";
5
+ import { formatCurrency as i } from "../../utils/formatters.js";
6
+ import { mockOrders as a } from "../../mocks/data.js";
7
+ import { useMemo as o, useState as s } from "react";
8
+ import { AlertCircle as c, CheckCircle2 as l, ChefHat as u, MapPin as d, PackageCheck as f, Phone as p, RefreshCw as m, Search as h, ShoppingBag as g, Truck as _, X as v, XCircle as y } from "lucide-react";
9
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
10
+ import { EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
9
11
  //#region src/kadaikodi/pages/cart-owner/OrderManagementPage.tsx
10
- var S = [
11
- ...i,
12
+ var T = [
13
+ ...a,
12
14
  {
13
15
  id: "ORD-010",
14
16
  cartId: "FOOD-001",
@@ -240,7 +242,7 @@ var S = [
240
242
  customerPhone: "+91-9876543224",
241
243
  fulfillmentType: "delivery"
242
244
  }
243
- ], C = {
245
+ ], E = {
244
246
  pending: {
245
247
  color: "bg-status-warning-bg-subtle text-status-warning-text",
246
248
  label: "New Order"
@@ -269,54 +271,54 @@ var S = [
269
271
  color: "bg-status-error-bg-subtle text-status-error-text",
270
272
  label: "Cancelled"
271
273
  }
272
- }, w = {
274
+ }, D = {
273
275
  delivery: {
274
- icon: g,
276
+ icon: _,
275
277
  label: "Delivery",
276
278
  color: "bg-accent-purple-subtle text-text-primary"
277
279
  },
278
280
  pickup: {
279
- icon: h,
281
+ icon: g,
280
282
  label: "Pickup",
281
283
  color: "bg-[var(--color-accent-soft)] text-text-primary"
282
284
  },
283
285
  cart_dispatch: {
284
- icon: u,
286
+ icon: d,
285
287
  label: "Cart Dispatch",
286
288
  color: "bg-bg-sunken text-text-secondary"
287
289
  }
288
- }, T = (e) => {
290
+ }, O = (e) => {
289
291
  let t = new Date(e), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / (1e3 * 60));
290
292
  return n < 1 ? "Just now" : n < 60 ? `${n} min ago` : n < 1440 ? `${Math.floor(n / 60)} hours ago` : t.toLocaleDateString("en-IN", {
291
293
  day: "2-digit",
292
294
  month: "short"
293
295
  });
294
- }, E = (e) => new Date(e).toLocaleTimeString("en-IN", {
296
+ }, k = (e) => new Date(e).toLocaleTimeString("en-IN", {
295
297
  hour: "numeric",
296
298
  minute: "2-digit",
297
299
  hour12: !0
298
- }), D = (e) => {
300
+ }), A = (e) => {
299
301
  let t = ((/* @__PURE__ */ new Date()).getTime() - new Date(e.orderDate).getTime()) / (1e3 * 60);
300
302
  return e.status === "pending" && t > 10 ? "border-status-error-text/50 bg-status-error-bg-subtle" : e.status === "preparing" && t > 30 ? "border-status-warning-text/50 bg-status-warning-bg-subtle" : "border-border-subtle";
301
- }, O = () => {
302
- let { navigateTo: i } = e(), [h, g] = o(S), [O, k] = o({
303
+ }, j = () => {
304
+ let { navigateTo: a } = e(), [g, _] = s(T), [j, M] = s({
303
305
  status: "",
304
306
  dateRange: "all",
305
307
  searchQuery: "",
306
308
  sortBy: "recent",
307
309
  fulfillmentType: ""
308
- }), [A, j] = o(null), [M, N] = o(!1), [P, F] = o(null), I = (e, t) => {
309
- F({
310
+ }), [N, P] = s(null), [F, I] = s(!1), [L, R] = s(null), z = (e, t) => {
311
+ R({
310
312
  text: e,
311
313
  type: t
312
- }), setTimeout(() => F(null), 3e3);
313
- }, L = a(() => {
314
- let e = h.length, t = h.filter((e) => e.status === "pending").length, n = h.filter((e) => [
314
+ }), setTimeout(() => R(null), 3e3);
315
+ }, B = o(() => {
316
+ let e = g.length, t = g.filter((e) => e.status === "pending").length, n = g.filter((e) => [
315
317
  "confirmed",
316
318
  "preparing",
317
319
  "ready",
318
320
  "out_for_delivery"
319
- ].includes(e.status)).length, r = h.filter((e) => e.status === "delivered").length, i = h.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
321
+ ].includes(e.status)).length, r = g.filter((e) => e.status === "delivered").length, i = g.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
320
322
  return {
321
323
  total: e,
322
324
  pending: t,
@@ -325,17 +327,17 @@ var S = [
325
327
  totalRevenue: i,
326
328
  avgOrder: r > 0 ? Math.round(i / r) : 0
327
329
  };
328
- }, [h]), R = a(() => {
329
- let e = [...h];
330
- if (O.status && (e = e.filter((e) => e.status === O.status)), O.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === O.fulfillmentType)), O.searchQuery) {
331
- let t = O.searchQuery.toLowerCase();
330
+ }, [g]), V = o(() => {
331
+ let e = [...g];
332
+ if (j.status && (e = e.filter((e) => e.status === j.status)), j.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === j.fulfillmentType)), j.searchQuery) {
333
+ let t = j.searchQuery.toLowerCase();
332
334
  e = e.filter((e) => e.id.toLowerCase().includes(t) || (e.customerName || "").toLowerCase().includes(t) || e.items.some((e) => e.name.toLowerCase().includes(t)));
333
335
  }
334
- if (O.dateRange !== "all") {
336
+ if (j.dateRange !== "all") {
335
337
  let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
336
- O.dateRange === "today" ? n.setHours(0, 0, 0, 0) : O.dateRange === "7days" ? n.setDate(t.getDate() - 7) : O.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
338
+ j.dateRange === "today" ? n.setHours(0, 0, 0, 0) : j.dateRange === "7days" ? n.setDate(t.getDate() - 7) : j.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
337
339
  }
338
- switch (O.sortBy) {
340
+ switch (j.sortBy) {
339
341
  case "recent":
340
342
  e.sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime());
341
343
  break;
@@ -350,532 +352,533 @@ var S = [
350
352
  break;
351
353
  }
352
354
  return e;
353
- }, [h, O]), z = (e, t) => {
355
+ }, [g, j]), H = (e, t) => {
354
356
  let n = {
355
357
  accept: "confirmed",
356
358
  reject: "cancelled",
357
359
  ready: "ready",
358
360
  complete: "delivered"
359
361
  };
360
- g((r) => r.map((r) => r.id === e ? {
362
+ _((r) => r.map((r) => r.id === e ? {
361
363
  ...r,
362
364
  status: n[t]
363
- } : r)), I({
365
+ } : r)), z({
364
366
  accept: "Order accepted",
365
367
  reject: "Order rejected",
366
368
  ready: "Order marked as ready",
367
369
  complete: "Order completed"
368
- }[t], "success"), M && A?.id === e && N(!1);
370
+ }[t], "success"), F && N?.id === e && I(!1);
369
371
  };
370
- return /* @__PURE__ */ x(n, {
372
+ return /* @__PURE__ */ S(n, {
371
373
  title: "Order Management",
372
374
  description: "Manage incoming and active orders",
373
- actions: /* @__PURE__ */ x("button", {
375
+ actions: /* @__PURE__ */ S("button", {
374
376
  type: "button",
375
- onClick: () => I("Orders refreshed", "success"),
377
+ onClick: () => z("Orders refreshed", "success"),
376
378
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
377
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), "Refresh"]
379
+ children: [/* @__PURE__ */ x(m, { className: "h-4 w-4" }), "Refresh"]
378
380
  }),
379
- children: [/* @__PURE__ */ x("div", {
380
- className: "space-y-4",
381
- children: [
382
- P && /* @__PURE__ */ x("div", {
383
- className: t("flex items-center gap-2 rounded-lg border p-3", P.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
384
- children: [P.type === "success" ? /* @__PURE__ */ b(c, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ b(s, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ b("span", {
385
- className: t("text-sm font-medium", P.type === "success" ? "text-status-success-text" : "text-status-error-text"),
386
- children: P.text
387
- })]
388
- }),
389
- /* @__PURE__ */ x("div", {
390
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
391
- children: [
392
- /* @__PURE__ */ x("div", {
393
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
394
- children: [/* @__PURE__ */ b("p", {
395
- className: "text-xs text-text-secondary",
396
- children: "Total Orders"
397
- }), /* @__PURE__ */ b("p", {
398
- className: "text-2xl font-bold text-text-primary",
399
- children: L.total
400
- })]
401
- }),
402
- /* @__PURE__ */ x("div", {
403
- className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4 shadow-sm",
404
- children: [/* @__PURE__ */ b("p", {
405
- className: "text-xs text-status-warning-text",
406
- children: "Pending"
407
- }), /* @__PURE__ */ b("p", {
408
- className: "text-2xl font-bold text-status-warning-text",
409
- children: L.pending
410
- })]
411
- }),
412
- /* @__PURE__ */ x("div", {
413
- className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-4 shadow-sm",
414
- children: [/* @__PURE__ */ b("p", {
415
- className: "text-xs text-text-primary",
416
- children: "Active"
417
- }), /* @__PURE__ */ b("p", {
418
- className: "text-2xl font-bold text-text-primary",
419
- children: L.active
420
- })]
421
- }),
422
- /* @__PURE__ */ x("div", {
423
- className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4 shadow-sm",
424
- children: [/* @__PURE__ */ b("p", {
425
- className: "text-xs text-status-success-text",
426
- children: "Completed"
427
- }), /* @__PURE__ */ b("p", {
428
- className: "text-2xl font-bold text-status-success-text",
429
- children: L.completed
430
- })]
431
- }),
432
- /* @__PURE__ */ x("div", {
433
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
434
- children: [/* @__PURE__ */ b("p", {
435
- className: "text-xs text-text-secondary",
436
- children: "Total Revenue"
437
- }), /* @__PURE__ */ b("p", {
438
- className: "text-2xl font-bold text-text-primary",
439
- children: r(L.totalRevenue, { minimumFractionDigits: 0 })
440
- })]
441
- }),
442
- /* @__PURE__ */ x("div", {
443
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
444
- children: [/* @__PURE__ */ b("p", {
445
- className: "text-xs text-text-secondary",
446
- children: "Avg Order"
447
- }), /* @__PURE__ */ b("p", {
448
- className: "text-2xl font-bold text-text-primary",
449
- children: r(L.avgOrder, { minimumFractionDigits: 0 })
450
- })]
451
- })
452
- ]
453
- }),
454
- /* @__PURE__ */ b("div", {
455
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
456
- children: /* @__PURE__ */ x("div", {
457
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
381
+ children: [
382
+ /* @__PURE__ */ x(w, {
383
+ className: "mb-6",
384
+ children: "Your live order queue. Use this page to run service as it happens — accept new orders, move them through preparing and ready, hand off for pickup, delivery or cart dispatch, and keep customers updated. Filter by status or type to focus on what needs doing right now, and watch today's totals so you know how the day is going."
385
+ }),
386
+ /* @__PURE__ */ S("div", {
387
+ className: "space-y-4",
388
+ children: [
389
+ L && /* @__PURE__ */ S("div", {
390
+ className: t("flex items-center gap-2 rounded-lg border p-3", L.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
391
+ children: [L.type === "success" ? /* @__PURE__ */ x(l, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ x(c, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ x("span", {
392
+ className: t("text-sm font-medium", L.type === "success" ? "text-status-success-text" : "text-status-error-text"),
393
+ children: L.text
394
+ })]
395
+ }),
396
+ /* @__PURE__ */ S(C, { children: [/* @__PURE__ */ x("h2", {
397
+ className: "mb-4 text-base font-semibold text-text-primary",
398
+ children: "Today's Orders"
399
+ }), /* @__PURE__ */ S("div", {
400
+ className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
458
401
  children: [
459
- /* @__PURE__ */ x("div", {
460
- className: "relative sm:col-span-2 lg:col-span-1",
461
- children: [/* @__PURE__ */ b(m, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ b("input", {
462
- type: "text",
463
- placeholder: "Search orders...",
464
- value: O.searchQuery,
465
- onChange: (e) => k((t) => ({
466
- ...t,
467
- searchQuery: e.target.value
468
- })),
469
- className: "w-full rounded-md border border-border-subtle bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
402
+ /* @__PURE__ */ S("div", {
403
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
404
+ children: [/* @__PURE__ */ x("p", {
405
+ className: "text-xs text-text-secondary",
406
+ children: "Total Orders"
407
+ }), /* @__PURE__ */ x("p", {
408
+ className: "text-2xl font-bold text-text-primary",
409
+ children: B.total
470
410
  })]
471
411
  }),
472
- /* @__PURE__ */ x("select", {
473
- value: O.status,
474
- onChange: (e) => k((t) => ({
475
- ...t,
476
- status: e.target.value
477
- })),
478
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
479
- children: [
480
- /* @__PURE__ */ b("option", {
481
- value: "",
482
- children: "All Orders"
483
- }),
484
- /* @__PURE__ */ b("option", {
485
- value: "pending",
486
- children: "New Orders"
487
- }),
488
- /* @__PURE__ */ b("option", {
489
- value: "confirmed",
490
- children: "Confirmed"
491
- }),
492
- /* @__PURE__ */ b("option", {
493
- value: "preparing",
494
- children: "Preparing"
495
- }),
496
- /* @__PURE__ */ b("option", {
497
- value: "ready",
498
- children: "Ready"
499
- }),
500
- /* @__PURE__ */ b("option", {
501
- value: "delivered",
502
- children: "Completed"
503
- }),
504
- /* @__PURE__ */ b("option", {
505
- value: "cancelled",
506
- children: "Cancelled"
507
- })
508
- ]
412
+ /* @__PURE__ */ S("div", {
413
+ className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4 shadow-sm",
414
+ children: [/* @__PURE__ */ x("p", {
415
+ className: "text-xs text-status-warning-text",
416
+ children: "Pending"
417
+ }), /* @__PURE__ */ x("p", {
418
+ className: "text-2xl font-bold text-status-warning-text",
419
+ children: B.pending
420
+ })]
421
+ }),
422
+ /* @__PURE__ */ S("div", {
423
+ className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-4 shadow-sm",
424
+ children: [/* @__PURE__ */ x("p", {
425
+ className: "text-xs text-text-primary",
426
+ children: "Active"
427
+ }), /* @__PURE__ */ x("p", {
428
+ className: "text-2xl font-bold text-text-primary",
429
+ children: B.active
430
+ })]
509
431
  }),
510
- /* @__PURE__ */ x("select", {
511
- value: O.fulfillmentType,
512
- onChange: (e) => k((t) => ({
513
- ...t,
514
- fulfillmentType: e.target.value
515
- })),
516
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
517
- children: [
518
- /* @__PURE__ */ b("option", {
519
- value: "",
520
- children: "All Types"
521
- }),
522
- /* @__PURE__ */ b("option", {
523
- value: "pickup",
524
- children: "Pickup"
525
- }),
526
- /* @__PURE__ */ b("option", {
527
- value: "delivery",
528
- children: "Delivery"
529
- }),
530
- /* @__PURE__ */ b("option", {
531
- value: "cart_dispatch",
532
- children: "Cart Dispatch"
533
- })
534
- ]
432
+ /* @__PURE__ */ S("div", {
433
+ className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4 shadow-sm",
434
+ children: [/* @__PURE__ */ x("p", {
435
+ className: "text-xs text-status-success-text",
436
+ children: "Completed"
437
+ }), /* @__PURE__ */ x("p", {
438
+ className: "text-2xl font-bold text-status-success-text",
439
+ children: B.completed
440
+ })]
535
441
  }),
536
- /* @__PURE__ */ x("select", {
537
- value: O.dateRange,
538
- onChange: (e) => k((t) => ({
539
- ...t,
540
- dateRange: e.target.value
541
- })),
542
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
543
- children: [
544
- /* @__PURE__ */ b("option", {
545
- value: "today",
546
- children: "Today"
547
- }),
548
- /* @__PURE__ */ b("option", {
549
- value: "7days",
550
- children: "Last 7 Days"
551
- }),
552
- /* @__PURE__ */ b("option", {
553
- value: "30days",
554
- children: "Last 30 Days"
555
- }),
556
- /* @__PURE__ */ b("option", {
557
- value: "all",
558
- children: "All Time"
559
- })
560
- ]
442
+ /* @__PURE__ */ S("div", {
443
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
444
+ children: [/* @__PURE__ */ x("p", {
445
+ className: "text-xs text-text-secondary",
446
+ children: "Total Revenue"
447
+ }), /* @__PURE__ */ x("p", {
448
+ className: "text-2xl font-bold text-text-primary",
449
+ children: i(B.totalRevenue, { minimumFractionDigits: 0 })
450
+ })]
561
451
  }),
562
- /* @__PURE__ */ x("select", {
563
- value: O.sortBy,
564
- onChange: (e) => k((t) => ({
565
- ...t,
566
- sortBy: e.target.value
567
- })),
568
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
569
- children: [
570
- /* @__PURE__ */ b("option", {
571
- value: "recent",
572
- children: "Most Recent"
573
- }),
574
- /* @__PURE__ */ b("option", {
575
- value: "oldest",
576
- children: "Oldest First"
577
- }),
578
- /* @__PURE__ */ b("option", {
579
- value: "amount_high",
580
- children: "Amount: High to Low"
581
- }),
582
- /* @__PURE__ */ b("option", {
583
- value: "amount_low",
584
- children: "Amount: Low to High"
585
- })
586
- ]
452
+ /* @__PURE__ */ S("div", {
453
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
454
+ children: [/* @__PURE__ */ x("p", {
455
+ className: "text-xs text-text-secondary",
456
+ children: "Avg Order"
457
+ }), /* @__PURE__ */ x("p", {
458
+ className: "text-2xl font-bold text-text-primary",
459
+ children: i(B.avgOrder, { minimumFractionDigits: 0 })
460
+ })]
587
461
  })
588
462
  ]
589
- })
590
- }),
591
- R.length === 0 ? /* @__PURE__ */ x("div", {
592
- className: "flex flex-col items-center justify-center py-16 rounded-lg border border-border-subtle bg-bg-surface shadow-sm text-center",
593
- children: [
594
- /* @__PURE__ */ b(d, { className: "h-12 w-12 text-text-secondary opacity-40 mb-3" }),
595
- /* @__PURE__ */ b("h3", {
596
- className: "text-lg font-semibold text-text-primary mb-1",
597
- children: "No orders found"
598
- }),
599
- /* @__PURE__ */ b("p", {
600
- className: "text-sm text-text-secondary",
601
- children: O.searchQuery || O.status ? "Try adjusting your filters" : "No orders to display"
463
+ })] }),
464
+ /* @__PURE__ */ x("div", {
465
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
466
+ children: /* @__PURE__ */ S("div", {
467
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
468
+ children: [
469
+ /* @__PURE__ */ S("div", {
470
+ className: "relative sm:col-span-2 lg:col-span-1",
471
+ children: [/* @__PURE__ */ x(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ x("input", {
472
+ type: "text",
473
+ placeholder: "Search orders...",
474
+ value: j.searchQuery,
475
+ onChange: (e) => M((t) => ({
476
+ ...t,
477
+ searchQuery: e.target.value
478
+ })),
479
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
480
+ })]
481
+ }),
482
+ /* @__PURE__ */ S("select", {
483
+ value: j.status,
484
+ onChange: (e) => M((t) => ({
485
+ ...t,
486
+ status: e.target.value
487
+ })),
488
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
489
+ children: [
490
+ /* @__PURE__ */ x("option", {
491
+ value: "",
492
+ children: "All Orders"
493
+ }),
494
+ /* @__PURE__ */ x("option", {
495
+ value: "pending",
496
+ children: "New Orders"
497
+ }),
498
+ /* @__PURE__ */ x("option", {
499
+ value: "confirmed",
500
+ children: "Confirmed"
501
+ }),
502
+ /* @__PURE__ */ x("option", {
503
+ value: "preparing",
504
+ children: "Preparing"
505
+ }),
506
+ /* @__PURE__ */ x("option", {
507
+ value: "ready",
508
+ children: "Ready"
509
+ }),
510
+ /* @__PURE__ */ x("option", {
511
+ value: "delivered",
512
+ children: "Completed"
513
+ }),
514
+ /* @__PURE__ */ x("option", {
515
+ value: "cancelled",
516
+ children: "Cancelled"
517
+ })
518
+ ]
519
+ }),
520
+ /* @__PURE__ */ S("select", {
521
+ value: j.fulfillmentType,
522
+ onChange: (e) => M((t) => ({
523
+ ...t,
524
+ fulfillmentType: e.target.value
525
+ })),
526
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
527
+ children: [
528
+ /* @__PURE__ */ x("option", {
529
+ value: "",
530
+ children: "All Types"
531
+ }),
532
+ /* @__PURE__ */ x("option", {
533
+ value: "pickup",
534
+ children: "Pickup"
535
+ }),
536
+ /* @__PURE__ */ x("option", {
537
+ value: "delivery",
538
+ children: "Delivery"
539
+ }),
540
+ /* @__PURE__ */ x("option", {
541
+ value: "cart_dispatch",
542
+ children: "Cart Dispatch"
543
+ })
544
+ ]
545
+ }),
546
+ /* @__PURE__ */ S("select", {
547
+ value: j.dateRange,
548
+ onChange: (e) => M((t) => ({
549
+ ...t,
550
+ dateRange: e.target.value
551
+ })),
552
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
553
+ children: [
554
+ /* @__PURE__ */ x("option", {
555
+ value: "today",
556
+ children: "Today"
557
+ }),
558
+ /* @__PURE__ */ x("option", {
559
+ value: "7days",
560
+ children: "Last 7 Days"
561
+ }),
562
+ /* @__PURE__ */ x("option", {
563
+ value: "30days",
564
+ children: "Last 30 Days"
565
+ }),
566
+ /* @__PURE__ */ x("option", {
567
+ value: "all",
568
+ children: "All Time"
569
+ })
570
+ ]
571
+ }),
572
+ /* @__PURE__ */ S("select", {
573
+ value: j.sortBy,
574
+ onChange: (e) => M((t) => ({
575
+ ...t,
576
+ sortBy: e.target.value
577
+ })),
578
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
579
+ children: [
580
+ /* @__PURE__ */ x("option", {
581
+ value: "recent",
582
+ children: "Most Recent"
583
+ }),
584
+ /* @__PURE__ */ x("option", {
585
+ value: "oldest",
586
+ children: "Oldest First"
587
+ }),
588
+ /* @__PURE__ */ x("option", {
589
+ value: "amount_high",
590
+ children: "Amount: High to Low"
591
+ }),
592
+ /* @__PURE__ */ x("option", {
593
+ value: "amount_low",
594
+ children: "Amount: Low to High"
595
+ })
596
+ ]
597
+ })
598
+ ]
602
599
  })
603
- ]
604
- }) : /* @__PURE__ */ b("div", {
605
- className: "space-y-4",
606
- children: R.map((e) => {
607
- let n = C[e.status] || {
608
- color: "bg-bg-sunken text-text-secondary",
609
- label: e.status
610
- }, i = w[e.fulfillmentType || "delivery"] || w.delivery, a = i.icon;
611
- return /* @__PURE__ */ b("div", {
612
- className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", D(e)),
613
- children: /* @__PURE__ */ x("div", {
614
- className: "p-4 sm:p-5",
615
- children: [
616
- /* @__PURE__ */ x("div", {
617
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
618
- children: [/* @__PURE__ */ x("div", {
619
- className: "min-w-0 flex-1",
620
- children: [/* @__PURE__ */ x("div", {
621
- className: "flex flex-wrap items-center gap-2 mb-1",
622
- children: [
623
- /* @__PURE__ */ x("h3", {
624
- className: "text-sm sm:text-base font-semibold text-text-primary",
625
- children: ["Order #", e.id]
626
- }),
627
- /* @__PURE__ */ b("span", {
628
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
629
- children: n.label
630
- }),
631
- /* @__PURE__ */ x("span", {
632
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", i.color),
633
- children: [/* @__PURE__ */ b(a, { className: "h-3 w-3" }), i.label]
634
- })
635
- ]
636
- }), /* @__PURE__ */ x("p", {
637
- className: "text-xs text-text-secondary",
638
- children: [
639
- e.customerName || "Customer",
640
- " | ",
641
- T(e.orderDate)
642
- ]
643
- })]
644
- }), /* @__PURE__ */ x("div", {
645
- className: "flex items-center gap-3",
646
- children: [/* @__PURE__ */ b("p", {
647
- className: "text-lg font-bold text-text-primary",
648
- children: r(e.total, { minimumFractionDigits: 0 })
649
- }), /* @__PURE__ */ b("button", {
650
- type: "button",
651
- onClick: () => {
652
- j(e), N(!0);
653
- },
654
- className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
655
- children: "View Details"
600
+ }),
601
+ V.length === 0 ? /* @__PURE__ */ x(r, {
602
+ illustration: j.searchQuery || j.status ? "empty-search" : "empty-data",
603
+ title: "No orders found",
604
+ description: j.searchQuery || j.status ? "No orders match your current filters. Try adjusting the status, type or date range." : "New orders from customers will appear here in real time. Make sure your cart is open and accepting orders."
605
+ }) : /* @__PURE__ */ x("div", {
606
+ className: "space-y-4",
607
+ children: V.map((e) => {
608
+ let n = E[e.status] || {
609
+ color: "bg-bg-sunken text-text-secondary",
610
+ label: e.status
611
+ }, r = D[e.fulfillmentType || "delivery"] || D.delivery, a = r.icon;
612
+ return /* @__PURE__ */ x("div", {
613
+ className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", A(e)),
614
+ children: /* @__PURE__ */ S("div", {
615
+ className: "p-4 sm:p-5",
616
+ children: [
617
+ /* @__PURE__ */ S("div", {
618
+ className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
619
+ children: [/* @__PURE__ */ S("div", {
620
+ className: "min-w-0 flex-1",
621
+ children: [/* @__PURE__ */ S("div", {
622
+ className: "flex flex-wrap items-center gap-2 mb-1",
623
+ children: [
624
+ /* @__PURE__ */ S("h3", {
625
+ className: "text-sm sm:text-base font-semibold text-text-primary",
626
+ children: ["Order #", e.id]
627
+ }),
628
+ /* @__PURE__ */ x("span", {
629
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
630
+ children: n.label
631
+ }),
632
+ /* @__PURE__ */ S("span", {
633
+ className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", r.color),
634
+ children: [/* @__PURE__ */ x(a, { className: "h-3 w-3" }), r.label]
635
+ })
636
+ ]
637
+ }), /* @__PURE__ */ S("p", {
638
+ className: "text-xs text-text-secondary",
639
+ children: [
640
+ e.customerName || "Customer",
641
+ " | ",
642
+ O(e.orderDate)
643
+ ]
644
+ })]
645
+ }), /* @__PURE__ */ S("div", {
646
+ className: "flex items-center gap-3",
647
+ children: [/* @__PURE__ */ x("p", {
648
+ className: "text-lg font-bold text-text-primary",
649
+ children: i(e.total, { minimumFractionDigits: 0 })
650
+ }), /* @__PURE__ */ x("button", {
651
+ type: "button",
652
+ onClick: () => {
653
+ P(e), I(!0);
654
+ },
655
+ className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
656
+ children: "View Details"
657
+ })]
656
658
  })]
657
- })]
658
- }),
659
- /* @__PURE__ */ b("div", {
660
- className: "border-t border-border-subtle pt-3 mb-3",
661
- children: /* @__PURE__ */ b("div", {
659
+ }),
660
+ /* @__PURE__ */ x("div", {
661
+ className: "border-t border-border-subtle pt-3 mb-3",
662
+ children: /* @__PURE__ */ x("div", {
663
+ className: "flex flex-wrap gap-2",
664
+ children: e.items.map((e, t) => /* @__PURE__ */ S("span", {
665
+ className: "inline-flex items-center rounded bg-bg-sunken px-2 py-1 text-xs text-text-primary",
666
+ children: [
667
+ e.quantity,
668
+ "x ",
669
+ e.name
670
+ ]
671
+ }, t))
672
+ })
673
+ }),
674
+ /* @__PURE__ */ S("div", {
662
675
  className: "flex flex-wrap gap-2",
663
- children: e.items.map((e, t) => /* @__PURE__ */ x("span", {
664
- className: "inline-flex items-center rounded bg-bg-sunken px-2 py-1 text-xs text-text-primary",
665
- children: [
666
- e.quantity,
667
- "x ",
668
- e.name
669
- ]
670
- }, t))
676
+ children: [
677
+ e.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("button", {
678
+ type: "button",
679
+ onClick: () => H(e.id, "accept"),
680
+ className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
681
+ children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Accept Order"]
682
+ }), /* @__PURE__ */ S("button", {
683
+ type: "button",
684
+ onClick: () => H(e.id, "reject"),
685
+ className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
686
+ children: [/* @__PURE__ */ x(y, { className: "h-3.5 w-3.5" }), "Reject"]
687
+ })] }),
688
+ e.status === "confirmed" && /* @__PURE__ */ S("button", {
689
+ type: "button",
690
+ onClick: () => H(e.id, "ready"),
691
+ className: "inline-flex items-center gap-1.5 rounded-md bg-status-warning-bg-subtle px-3 py-2 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors",
692
+ children: [/* @__PURE__ */ x(u, { className: "h-3.5 w-3.5" }), "Start Preparing"]
693
+ }),
694
+ e.status === "preparing" && /* @__PURE__ */ S("button", {
695
+ type: "button",
696
+ onClick: () => H(e.id, "ready"),
697
+ className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
698
+ children: [/* @__PURE__ */ x(f, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
699
+ }),
700
+ e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ S("button", {
701
+ type: "button",
702
+ onClick: () => H(e.id, "complete"),
703
+ className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
704
+ children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Complete Order"]
705
+ }),
706
+ [
707
+ "confirmed",
708
+ "preparing",
709
+ "ready"
710
+ ].includes(e.status) && /* @__PURE__ */ S("button", {
711
+ type: "button",
712
+ onClick: () => alert("Contact feature coming soon!"),
713
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
714
+ children: [/* @__PURE__ */ x(p, { className: "h-3.5 w-3.5" }), "Contact Customer"]
715
+ })
716
+ ]
717
+ }),
718
+ e.specialInstructions && /* @__PURE__ */ S("div", {
719
+ className: "mt-3 rounded-md border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
720
+ children: [/* @__PURE__ */ x("p", {
721
+ className: "text-xs font-medium text-status-warning-text",
722
+ children: "Special Instructions:"
723
+ }), /* @__PURE__ */ x("p", {
724
+ className: "text-xs text-status-warning-text mt-0.5",
725
+ children: e.specialInstructions
726
+ })]
671
727
  })
672
- }),
673
- /* @__PURE__ */ x("div", {
674
- className: "flex flex-wrap gap-2",
675
- children: [
676
- e.status === "pending" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("button", {
677
- type: "button",
678
- onClick: () => z(e.id, "accept"),
679
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
680
- children: [/* @__PURE__ */ b(c, { className: "h-3.5 w-3.5" }), "Accept Order"]
681
- }), /* @__PURE__ */ x("button", {
682
- type: "button",
683
- onClick: () => z(e.id, "reject"),
684
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
685
- children: [/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5" }), "Reject"]
686
- })] }),
687
- e.status === "confirmed" && /* @__PURE__ */ x("button", {
688
- type: "button",
689
- onClick: () => z(e.id, "ready"),
690
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-warning-bg-subtle px-3 py-2 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors",
691
- children: [/* @__PURE__ */ b(l, { className: "h-3.5 w-3.5" }), "Start Preparing"]
692
- }),
693
- e.status === "preparing" && /* @__PURE__ */ x("button", {
694
- type: "button",
695
- onClick: () => z(e.id, "ready"),
696
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
697
- children: [/* @__PURE__ */ b(d, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
698
- }),
699
- e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ x("button", {
700
- type: "button",
701
- onClick: () => z(e.id, "complete"),
702
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
703
- children: [/* @__PURE__ */ b(c, { className: "h-3.5 w-3.5" }), "Complete Order"]
704
- }),
705
- [
706
- "confirmed",
707
- "preparing",
708
- "ready"
709
- ].includes(e.status) && /* @__PURE__ */ x("button", {
710
- type: "button",
711
- onClick: () => alert("Contact feature coming soon!"),
712
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
713
- children: [/* @__PURE__ */ b(f, { className: "h-3.5 w-3.5" }), "Contact Customer"]
714
- })
715
- ]
716
- }),
717
- e.specialInstructions && /* @__PURE__ */ x("div", {
718
- className: "mt-3 rounded-md border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
719
- children: [/* @__PURE__ */ b("p", {
720
- className: "text-xs font-medium text-status-warning-text",
721
- children: "Special Instructions:"
722
- }), /* @__PURE__ */ b("p", {
723
- className: "text-xs text-status-warning-text mt-0.5",
724
- children: e.specialInstructions
725
- })]
726
- })
727
- ]
728
- })
729
- }, e.id);
728
+ ]
729
+ })
730
+ }, e.id);
731
+ })
730
732
  })
731
- })
732
- ]
733
- }), M && A && /* @__PURE__ */ b("div", {
734
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
735
- children: /* @__PURE__ */ b("div", {
736
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
733
+ ]
734
+ }),
735
+ F && N && /* @__PURE__ */ x("div", {
736
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
737
737
  children: /* @__PURE__ */ x("div", {
738
- className: "p-6",
739
- children: [/* @__PURE__ */ x("div", {
740
- className: "flex items-center justify-between mb-4",
741
- children: [/* @__PURE__ */ b("h3", {
742
- className: "text-lg font-semibold text-text-primary",
743
- children: "Order Details"
744
- }), /* @__PURE__ */ b("button", {
745
- type: "button",
746
- onClick: () => N(!1),
747
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
748
- children: /* @__PURE__ */ b(_, { className: "h-5 w-5" })
749
- })]
750
- }), /* @__PURE__ */ x("div", {
751
- className: "space-y-4",
752
- children: [
753
- /* @__PURE__ */ x("div", {
754
- className: "grid grid-cols-2 gap-4",
755
- children: [
756
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
757
- className: "text-xs text-text-secondary",
758
- children: "Order ID"
759
- }), /* @__PURE__ */ x("p", {
760
- className: "text-sm font-medium text-text-primary",
761
- children: ["#", A.id]
762
- })] }),
763
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
764
- className: "text-xs text-text-secondary",
765
- children: "Status"
766
- }), /* @__PURE__ */ b("span", {
767
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (C[A.status] || C.pending).color),
768
- children: (C[A.status] || C.pending).label
769
- })] }),
770
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
771
- className: "text-xs text-text-secondary",
772
- children: "Customer"
773
- }), /* @__PURE__ */ b("p", {
774
- className: "text-sm font-medium text-text-primary",
775
- children: A.customerName || "N/A"
776
- })] }),
777
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
778
- className: "text-xs text-text-secondary",
779
- children: "Order Time"
780
- }), /* @__PURE__ */ b("p", {
781
- className: "text-sm font-medium text-text-primary",
782
- children: E(A.orderDate)
783
- })] })
784
- ]
785
- }),
786
- /* @__PURE__ */ x("div", {
787
- className: "border-t border-border-subtle pt-4",
788
- children: [/* @__PURE__ */ b("h4", {
789
- className: "text-sm font-medium text-text-primary mb-3",
790
- children: "Order Items"
791
- }), /* @__PURE__ */ b("div", {
792
- className: "space-y-2",
793
- children: A.items.map((e, t) => /* @__PURE__ */ x("div", {
794
- className: "flex justify-between items-start",
795
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
738
+ className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
739
+ children: /* @__PURE__ */ S("div", {
740
+ className: "p-6",
741
+ children: [/* @__PURE__ */ S("div", {
742
+ className: "flex items-center justify-between mb-4",
743
+ children: [/* @__PURE__ */ x("h3", {
744
+ className: "text-lg font-semibold text-text-primary",
745
+ children: "Order Details"
746
+ }), /* @__PURE__ */ x("button", {
747
+ type: "button",
748
+ onClick: () => I(!1),
749
+ className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
750
+ children: /* @__PURE__ */ x(v, { className: "h-5 w-5" })
751
+ })]
752
+ }), /* @__PURE__ */ S("div", {
753
+ className: "space-y-4",
754
+ children: [
755
+ /* @__PURE__ */ S("div", {
756
+ className: "grid grid-cols-2 gap-4",
757
+ children: [
758
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
759
+ className: "text-xs text-text-secondary",
760
+ children: "Order ID"
761
+ }), /* @__PURE__ */ S("p", {
796
762
  className: "text-sm font-medium text-text-primary",
797
- children: e.name
763
+ children: ["#", N.id]
764
+ })] }),
765
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
766
+ className: "text-xs text-text-secondary",
767
+ children: "Status"
768
+ }), /* @__PURE__ */ x("span", {
769
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (E[N.status] || E.pending).color),
770
+ children: (E[N.status] || E.pending).label
771
+ })] }),
772
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
773
+ className: "text-xs text-text-secondary",
774
+ children: "Customer"
798
775
  }), /* @__PURE__ */ x("p", {
776
+ className: "text-sm font-medium text-text-primary",
777
+ children: N.customerName || "N/A"
778
+ })] }),
779
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
799
780
  className: "text-xs text-text-secondary",
800
- children: [
801
- r(e.price, { minimumFractionDigits: 0 }),
802
- " x",
803
- " ",
804
- e.quantity
805
- ]
806
- })] }), /* @__PURE__ */ b("p", {
781
+ children: "Order Time"
782
+ }), /* @__PURE__ */ x("p", {
807
783
  className: "text-sm font-medium text-text-primary",
808
- children: r(e.price * e.quantity, { minimumFractionDigits: 0 })
809
- })]
810
- }, t))
811
- })]
812
- }),
813
- /* @__PURE__ */ x("div", {
814
- className: "border-t border-border-subtle pt-4 space-y-2",
815
- children: [
816
- /* @__PURE__ */ x("div", {
817
- className: "flex justify-between text-sm text-text-secondary",
818
- children: [/* @__PURE__ */ b("span", { children: "Subtotal" }), /* @__PURE__ */ b("span", { children: r(A.subtotal, { minimumFractionDigits: 0 }) })]
819
- }),
820
- /* @__PURE__ */ x("div", {
821
- className: "flex justify-between text-sm text-text-secondary",
822
- children: [/* @__PURE__ */ b("span", { children: "Delivery Fee" }), /* @__PURE__ */ b("span", { children: r(A.deliveryFee, { minimumFractionDigits: 0 }) })]
823
- }),
824
- /* @__PURE__ */ x("div", {
825
- className: "flex justify-between text-sm text-text-secondary",
826
- children: [/* @__PURE__ */ b("span", { children: "Tax" }), /* @__PURE__ */ b("span", { children: r(A.taxes, { minimumFractionDigits: 0 }) })]
827
- }),
828
- /* @__PURE__ */ x("div", {
829
- className: "flex justify-between font-semibold text-text-primary pt-2 border-t border-border-subtle",
830
- children: [/* @__PURE__ */ b("span", { children: "Total" }), /* @__PURE__ */ b("span", { children: r(A.total, { minimumFractionDigits: 0 }) })]
831
- })
832
- ]
833
- }),
834
- A.fulfillmentType === "delivery" && A.deliveryAddress && /* @__PURE__ */ x("div", {
835
- className: "border-t border-border-subtle pt-4",
836
- children: [/* @__PURE__ */ x("h4", {
837
- className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-1.5",
838
- children: [/* @__PURE__ */ b(u, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
839
- }), /* @__PURE__ */ x("p", {
840
- className: "text-sm text-text-secondary",
784
+ children: k(N.orderDate)
785
+ })] })
786
+ ]
787
+ }),
788
+ /* @__PURE__ */ S("div", {
789
+ className: "border-t border-border-subtle pt-4",
790
+ children: [/* @__PURE__ */ x("h4", {
791
+ className: "text-sm font-medium text-text-primary mb-3",
792
+ children: "Order Items"
793
+ }), /* @__PURE__ */ x("div", {
794
+ className: "space-y-2",
795
+ children: N.items.map((e, t) => /* @__PURE__ */ S("div", {
796
+ className: "flex justify-between items-start",
797
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
798
+ className: "text-sm font-medium text-text-primary",
799
+ children: e.name
800
+ }), /* @__PURE__ */ S("p", {
801
+ className: "text-xs text-text-secondary",
802
+ children: [
803
+ i(e.price, { minimumFractionDigits: 0 }),
804
+ " x",
805
+ " ",
806
+ e.quantity
807
+ ]
808
+ })] }), /* @__PURE__ */ x("p", {
809
+ className: "text-sm font-medium text-text-primary",
810
+ children: i(e.price * e.quantity, { minimumFractionDigits: 0 })
811
+ })]
812
+ }, t))
813
+ })]
814
+ }),
815
+ /* @__PURE__ */ S("div", {
816
+ className: "border-t border-border-subtle pt-4 space-y-2",
841
817
  children: [
842
- A.deliveryAddress.street,
843
- ", ",
844
- A.deliveryAddress.area,
845
- /* @__PURE__ */ b("br", {}),
846
- A.deliveryAddress.city,
847
- " - ",
848
- A.deliveryAddress.pincode
818
+ /* @__PURE__ */ S("div", {
819
+ className: "flex justify-between text-sm text-text-secondary",
820
+ children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: i(N.subtotal, { minimumFractionDigits: 0 }) })]
821
+ }),
822
+ /* @__PURE__ */ S("div", {
823
+ className: "flex justify-between text-sm text-text-secondary",
824
+ children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: i(N.deliveryFee, { minimumFractionDigits: 0 }) })]
825
+ }),
826
+ /* @__PURE__ */ S("div", {
827
+ className: "flex justify-between text-sm text-text-secondary",
828
+ children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: i(N.taxes, { minimumFractionDigits: 0 }) })]
829
+ }),
830
+ /* @__PURE__ */ S("div", {
831
+ className: "flex justify-between font-semibold text-text-primary pt-2 border-t border-border-subtle",
832
+ children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: i(N.total, { minimumFractionDigits: 0 }) })]
833
+ })
849
834
  ]
850
- })]
851
- }),
852
- /* @__PURE__ */ x("div", {
853
- className: "flex gap-3 mt-6",
854
- children: [/* @__PURE__ */ b("button", {
855
- type: "button",
856
- onClick: () => N(!1),
857
- className: "flex-1 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
858
- children: "Close"
859
- }), A.status === "pending" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
860
- type: "button",
861
- onClick: () => z(A.id, "accept"),
862
- className: "flex-1 rounded-md bg-status-success-bg-subtle px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
863
- children: "Accept Order"
864
- }), /* @__PURE__ */ b("button", {
865
- type: "button",
866
- onClick: () => z(A.id, "reject"),
867
- className: "flex-1 rounded-md bg-status-error-bg-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
868
- children: "Reject Order"
869
- })] })]
870
- })
871
- ]
872
- })]
835
+ }),
836
+ N.fulfillmentType === "delivery" && N.deliveryAddress && /* @__PURE__ */ S("div", {
837
+ className: "border-t border-border-subtle pt-4",
838
+ children: [/* @__PURE__ */ S("h4", {
839
+ className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-1.5",
840
+ children: [/* @__PURE__ */ x(d, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
841
+ }), /* @__PURE__ */ S("p", {
842
+ className: "text-sm text-text-secondary",
843
+ children: [
844
+ N.deliveryAddress.street,
845
+ ", ",
846
+ N.deliveryAddress.area,
847
+ /* @__PURE__ */ x("br", {}),
848
+ N.deliveryAddress.city,
849
+ " - ",
850
+ N.deliveryAddress.pincode
851
+ ]
852
+ })]
853
+ }),
854
+ /* @__PURE__ */ S("div", {
855
+ className: "flex gap-3 mt-6",
856
+ children: [/* @__PURE__ */ x("button", {
857
+ type: "button",
858
+ onClick: () => I(!1),
859
+ className: "flex-1 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
860
+ children: "Close"
861
+ }), N.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
862
+ type: "button",
863
+ onClick: () => H(N.id, "accept"),
864
+ className: "flex-1 rounded-md bg-status-success-bg-subtle px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
865
+ children: "Accept Order"
866
+ }), /* @__PURE__ */ x("button", {
867
+ type: "button",
868
+ onClick: () => H(N.id, "reject"),
869
+ className: "flex-1 rounded-md bg-status-error-bg-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
870
+ children: "Reject Order"
871
+ })] })]
872
+ })
873
+ ]
874
+ })]
875
+ })
873
876
  })
874
877
  })
875
- })]
878
+ ]
876
879
  });
877
880
  };
878
881
  //#endregion
879
- export { O as OrderManagementPage };
882
+ export { j as OrderManagementPage };
880
883
 
881
884
  //# sourceMappingURL=OrderManagementPage.js.map