@burdenoff/microfe-adaptercloud 2026.625.1 → 2026.625.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.
- package/dist/adaptercloud/components/PageLayout.js +24 -17
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +18 -16
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +70 -44
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +60 -55
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +97 -92
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +59 -57
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +118 -104
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +145 -140
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +152 -147
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +87 -81
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +179 -165
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +95 -93
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +110 -107
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +293 -299
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +218 -224
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +122 -128
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +248 -244
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +96 -91
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +754 -736
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +110 -108
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +221 -217
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +89 -87
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +410 -381
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +120 -118
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +86 -81
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +53 -51
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +114 -109
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +60 -58
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +87 -72
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +65 -63
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +68 -53
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +86 -84
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +57 -55
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +341 -308
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +34 -32
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +48 -46
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +383 -381
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +348 -319
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +84 -59
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +73 -71
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +76 -74
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +70 -68
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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 } from "@burdenoff/fe-libs/ui";
|
|
9
11
|
//#region src/adaptercloud/pages/cart-owner/OrderManagementPage.tsx
|
|
10
|
-
var
|
|
11
|
-
...
|
|
12
|
+
var w = [
|
|
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
|
-
],
|
|
245
|
+
], T = {
|
|
244
246
|
pending: {
|
|
245
247
|
color: "bg-status-warning-bg-subtle/20 text-status-warning-text",
|
|
246
248
|
label: "New Order"
|
|
@@ -269,54 +271,54 @@ var S = [
|
|
|
269
271
|
color: "bg-status-error-bg-subtle/20 text-status-error-text",
|
|
270
272
|
label: "Cancelled"
|
|
271
273
|
}
|
|
272
|
-
},
|
|
274
|
+
}, E = {
|
|
273
275
|
delivery: {
|
|
274
|
-
icon:
|
|
276
|
+
icon: _,
|
|
275
277
|
label: "Delivery",
|
|
276
278
|
color: "bg-accent-purple-subtle/20 text-accent-purple"
|
|
277
279
|
},
|
|
278
280
|
pickup: {
|
|
279
|
-
icon:
|
|
281
|
+
icon: g,
|
|
280
282
|
label: "Pickup",
|
|
281
283
|
color: "bg-accent-blue-subtle/20 text-accent-blue"
|
|
282
284
|
},
|
|
283
285
|
cart_dispatch: {
|
|
284
|
-
icon:
|
|
286
|
+
icon: d,
|
|
285
287
|
label: "Cart Dispatch",
|
|
286
288
|
color: "bg-bg-sunken text-text-secondary"
|
|
287
289
|
}
|
|
288
|
-
},
|
|
290
|
+
}, D = (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
|
-
},
|
|
296
|
+
}, O = (e) => new Date(e).toLocaleTimeString("en-IN", {
|
|
295
297
|
hour: "numeric",
|
|
296
298
|
minute: "2-digit",
|
|
297
299
|
hour12: !0
|
|
298
|
-
}),
|
|
300
|
+
}), k = (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-border/50 bg-status-error-bg-subtle/5" : e.status === "preparing" && t > 30 ? "border-status-warning-border/50 bg-status-warning-bg-subtle/5" : "border-border-subtle";
|
|
301
|
-
},
|
|
302
|
-
let { navigateTo:
|
|
303
|
+
}, A = () => {
|
|
304
|
+
let { navigateTo: a } = e(), [g, _] = s(w), [A, j] = s({
|
|
303
305
|
status: "",
|
|
304
306
|
dateRange: "all",
|
|
305
307
|
searchQuery: "",
|
|
306
308
|
sortBy: "recent",
|
|
307
309
|
fulfillmentType: ""
|
|
308
|
-
}), [
|
|
309
|
-
|
|
310
|
+
}), [M, N] = s(null), [P, F] = s(!1), [I, L] = s(null), R = (e, t) => {
|
|
311
|
+
L({
|
|
310
312
|
text: e,
|
|
311
313
|
type: t
|
|
312
|
-
}), setTimeout(() =>
|
|
313
|
-
},
|
|
314
|
-
let e =
|
|
314
|
+
}), setTimeout(() => L(null), 3e3);
|
|
315
|
+
}, z = 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 =
|
|
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
|
-
}, [
|
|
329
|
-
let e = [...
|
|
330
|
-
if (
|
|
331
|
-
let t =
|
|
330
|
+
}, [g]), B = o(() => {
|
|
331
|
+
let e = [...g];
|
|
332
|
+
if (A.status && (e = e.filter((e) => e.status === A.status)), A.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === A.fulfillmentType)), A.searchQuery) {
|
|
333
|
+
let t = A.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 (
|
|
336
|
+
if (A.dateRange !== "all") {
|
|
335
337
|
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
336
|
-
|
|
338
|
+
A.dateRange === "today" ? n.setHours(0, 0, 0, 0) : A.dateRange === "7days" ? n.setDate(t.getDate() - 7) : A.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
|
|
337
339
|
}
|
|
338
|
-
switch (
|
|
340
|
+
switch (A.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,236 +352,237 @@ var S = [
|
|
|
350
352
|
break;
|
|
351
353
|
}
|
|
352
354
|
return e;
|
|
353
|
-
}, [
|
|
355
|
+
}, [g, A]), V = (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
|
-
|
|
362
|
+
_((r) => r.map((r) => r.id === e ? {
|
|
361
363
|
...r,
|
|
362
364
|
status: n[t]
|
|
363
|
-
} : r)),
|
|
365
|
+
} : r)), R({
|
|
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"),
|
|
370
|
+
}[t], "success"), P && M?.id === e && F(!1);
|
|
369
371
|
};
|
|
370
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ S(n, {
|
|
371
373
|
title: "Order Management",
|
|
372
374
|
description: "Manage incoming and active orders",
|
|
373
|
-
|
|
375
|
+
purpose: "Your live order queue — accept new orders, move them through preparing, ready, and out-for-delivery, and assign staff. Keep this open during business hours so nothing slips and customers stay informed.",
|
|
376
|
+
actions: /* @__PURE__ */ S("button", {
|
|
374
377
|
type: "button",
|
|
375
|
-
onClick: () =>
|
|
378
|
+
onClick: () => R("Orders refreshed", "success"),
|
|
376
379
|
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__ */
|
|
380
|
+
children: [/* @__PURE__ */ x(m, { className: "h-4 w-4" }), "Refresh"]
|
|
378
381
|
}),
|
|
379
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ S("div", {
|
|
380
383
|
className: "space-y-4",
|
|
381
384
|
children: [
|
|
382
|
-
|
|
383
|
-
className: t("flex items-center gap-2 rounded-lg border p-3",
|
|
384
|
-
children: [
|
|
385
|
-
className: t("text-sm font-medium",
|
|
386
|
-
children:
|
|
385
|
+
I && /* @__PURE__ */ S("div", {
|
|
386
|
+
className: t("flex items-center gap-2 rounded-lg border p-3", I.type === "success" ? "border-status-success-border/30 bg-status-success-bg-subtle/10" : "border-status-error-border/30 bg-status-error-bg-subtle/10"),
|
|
387
|
+
children: [I.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", {
|
|
388
|
+
className: t("text-sm font-medium", I.type === "success" ? "text-status-success-text" : "text-status-error-text"),
|
|
389
|
+
children: I.text
|
|
387
390
|
})]
|
|
388
391
|
}),
|
|
389
|
-
/* @__PURE__ */ x("div", {
|
|
392
|
+
/* @__PURE__ */ x(C, { children: /* @__PURE__ */ S("div", {
|
|
390
393
|
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
|
|
391
394
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ S("div", {
|
|
393
396
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ x("p", {
|
|
395
398
|
className: "text-xs text-text-secondary",
|
|
396
399
|
children: "Total Orders"
|
|
397
|
-
}), /* @__PURE__ */
|
|
400
|
+
}), /* @__PURE__ */ x("p", {
|
|
398
401
|
className: "text-2xl font-bold text-text-primary",
|
|
399
|
-
children:
|
|
402
|
+
children: z.total
|
|
400
403
|
})]
|
|
401
404
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ S("div", {
|
|
403
406
|
className: "rounded-lg border border-status-warning-border/30 bg-status-warning-bg-subtle/5 p-4 shadow-sm",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ x("p", {
|
|
405
408
|
className: "text-xs text-status-warning-text",
|
|
406
409
|
children: "Pending"
|
|
407
|
-
}), /* @__PURE__ */
|
|
410
|
+
}), /* @__PURE__ */ x("p", {
|
|
408
411
|
className: "text-2xl font-bold text-status-warning-text",
|
|
409
|
-
children:
|
|
412
|
+
children: z.pending
|
|
410
413
|
})]
|
|
411
414
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ S("div", {
|
|
413
416
|
className: "rounded-lg border border-accent-blue-subtle/30 bg-accent-blue-subtle/5 p-4 shadow-sm",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ x("p", {
|
|
415
418
|
className: "text-xs text-accent-blue",
|
|
416
419
|
children: "Active"
|
|
417
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ x("p", {
|
|
418
421
|
className: "text-2xl font-bold text-accent-blue",
|
|
419
|
-
children:
|
|
422
|
+
children: z.active
|
|
420
423
|
})]
|
|
421
424
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ S("div", {
|
|
423
426
|
className: "rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/5 p-4 shadow-sm",
|
|
424
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ x("p", {
|
|
425
428
|
className: "text-xs text-status-success-text",
|
|
426
429
|
children: "Completed"
|
|
427
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ x("p", {
|
|
428
431
|
className: "text-2xl font-bold text-status-success-text",
|
|
429
|
-
children:
|
|
432
|
+
children: z.completed
|
|
430
433
|
})]
|
|
431
434
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ S("div", {
|
|
433
436
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ x("p", {
|
|
435
438
|
className: "text-xs text-text-secondary",
|
|
436
439
|
children: "Total Revenue"
|
|
437
|
-
}), /* @__PURE__ */
|
|
440
|
+
}), /* @__PURE__ */ x("p", {
|
|
438
441
|
className: "text-2xl font-bold text-text-primary",
|
|
439
|
-
children:
|
|
442
|
+
children: i(z.totalRevenue, { minimumFractionDigits: 0 })
|
|
440
443
|
})]
|
|
441
444
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ S("div", {
|
|
443
446
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ x("p", {
|
|
445
448
|
className: "text-xs text-text-secondary",
|
|
446
449
|
children: "Avg Order"
|
|
447
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ x("p", {
|
|
448
451
|
className: "text-2xl font-bold text-text-primary",
|
|
449
|
-
children:
|
|
452
|
+
children: i(z.avgOrder, { minimumFractionDigits: 0 })
|
|
450
453
|
})]
|
|
451
454
|
})
|
|
452
455
|
]
|
|
453
|
-
}),
|
|
454
|
-
/* @__PURE__ */
|
|
456
|
+
}) }),
|
|
457
|
+
/* @__PURE__ */ x("div", {
|
|
455
458
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
456
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ S("div", {
|
|
457
460
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
|
|
458
461
|
children: [
|
|
459
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ S("div", {
|
|
460
463
|
className: "relative sm:col-span-2 lg:col-span-1",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
464
|
+
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", {
|
|
462
465
|
type: "text",
|
|
463
466
|
placeholder: "Search orders...",
|
|
464
|
-
value:
|
|
465
|
-
onChange: (e) =>
|
|
467
|
+
value: A.searchQuery,
|
|
468
|
+
onChange: (e) => j((t) => ({
|
|
466
469
|
...t,
|
|
467
470
|
searchQuery: e.target.value
|
|
468
471
|
})),
|
|
469
472
|
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)]"
|
|
470
473
|
})]
|
|
471
474
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
value:
|
|
474
|
-
onChange: (e) =>
|
|
475
|
+
/* @__PURE__ */ S("select", {
|
|
476
|
+
value: A.status,
|
|
477
|
+
onChange: (e) => j((t) => ({
|
|
475
478
|
...t,
|
|
476
479
|
status: e.target.value
|
|
477
480
|
})),
|
|
478
481
|
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
479
482
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ x("option", {
|
|
481
484
|
value: "",
|
|
482
485
|
children: "All Orders"
|
|
483
486
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ x("option", {
|
|
485
488
|
value: "pending",
|
|
486
489
|
children: "New Orders"
|
|
487
490
|
}),
|
|
488
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ x("option", {
|
|
489
492
|
value: "confirmed",
|
|
490
493
|
children: "Confirmed"
|
|
491
494
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ x("option", {
|
|
493
496
|
value: "preparing",
|
|
494
497
|
children: "Preparing"
|
|
495
498
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ x("option", {
|
|
497
500
|
value: "ready",
|
|
498
501
|
children: "Ready"
|
|
499
502
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ x("option", {
|
|
501
504
|
value: "delivered",
|
|
502
505
|
children: "Completed"
|
|
503
506
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ x("option", {
|
|
505
508
|
value: "cancelled",
|
|
506
509
|
children: "Cancelled"
|
|
507
510
|
})
|
|
508
511
|
]
|
|
509
512
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
value:
|
|
512
|
-
onChange: (e) =>
|
|
513
|
+
/* @__PURE__ */ S("select", {
|
|
514
|
+
value: A.fulfillmentType,
|
|
515
|
+
onChange: (e) => j((t) => ({
|
|
513
516
|
...t,
|
|
514
517
|
fulfillmentType: e.target.value
|
|
515
518
|
})),
|
|
516
519
|
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
517
520
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ x("option", {
|
|
519
522
|
value: "",
|
|
520
523
|
children: "All Types"
|
|
521
524
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ x("option", {
|
|
523
526
|
value: "pickup",
|
|
524
527
|
children: "Pickup"
|
|
525
528
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ x("option", {
|
|
527
530
|
value: "delivery",
|
|
528
531
|
children: "Delivery"
|
|
529
532
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ x("option", {
|
|
531
534
|
value: "cart_dispatch",
|
|
532
535
|
children: "Cart Dispatch"
|
|
533
536
|
})
|
|
534
537
|
]
|
|
535
538
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
value:
|
|
538
|
-
onChange: (e) =>
|
|
539
|
+
/* @__PURE__ */ S("select", {
|
|
540
|
+
value: A.dateRange,
|
|
541
|
+
onChange: (e) => j((t) => ({
|
|
539
542
|
...t,
|
|
540
543
|
dateRange: e.target.value
|
|
541
544
|
})),
|
|
542
545
|
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
543
546
|
children: [
|
|
544
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ x("option", {
|
|
545
548
|
value: "today",
|
|
546
549
|
children: "Today"
|
|
547
550
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ x("option", {
|
|
549
552
|
value: "7days",
|
|
550
553
|
children: "Last 7 Days"
|
|
551
554
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ x("option", {
|
|
553
556
|
value: "30days",
|
|
554
557
|
children: "Last 30 Days"
|
|
555
558
|
}),
|
|
556
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ x("option", {
|
|
557
560
|
value: "all",
|
|
558
561
|
children: "All Time"
|
|
559
562
|
})
|
|
560
563
|
]
|
|
561
564
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
value:
|
|
564
|
-
onChange: (e) =>
|
|
565
|
+
/* @__PURE__ */ S("select", {
|
|
566
|
+
value: A.sortBy,
|
|
567
|
+
onChange: (e) => j((t) => ({
|
|
565
568
|
...t,
|
|
566
569
|
sortBy: e.target.value
|
|
567
570
|
})),
|
|
568
571
|
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
569
572
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ x("option", {
|
|
571
574
|
value: "recent",
|
|
572
575
|
children: "Most Recent"
|
|
573
576
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ x("option", {
|
|
575
578
|
value: "oldest",
|
|
576
579
|
children: "Oldest First"
|
|
577
580
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ x("option", {
|
|
579
582
|
value: "amount_high",
|
|
580
583
|
children: "Amount: High to Low"
|
|
581
584
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ x("option", {
|
|
583
586
|
value: "amount_low",
|
|
584
587
|
children: "Amount: Low to High"
|
|
585
588
|
})
|
|
@@ -588,79 +591,70 @@ var S = [
|
|
|
588
591
|
]
|
|
589
592
|
})
|
|
590
593
|
}),
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
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"
|
|
602
|
-
})
|
|
603
|
-
]
|
|
604
|
-
}) : /* @__PURE__ */ b("div", {
|
|
594
|
+
B.length === 0 ? /* @__PURE__ */ x(r, {
|
|
595
|
+
illustration: A.searchQuery || A.status ? "empty-search" : "empty-data",
|
|
596
|
+
title: "No orders found",
|
|
597
|
+
description: A.searchQuery || A.status ? "Try adjusting your filters" : "New orders will appear here as customers place them."
|
|
598
|
+
}) : /* @__PURE__ */ x("div", {
|
|
605
599
|
className: "space-y-4",
|
|
606
|
-
children:
|
|
607
|
-
let n =
|
|
600
|
+
children: B.map((e) => {
|
|
601
|
+
let n = T[e.status] || {
|
|
608
602
|
color: "bg-bg-sunken text-text-secondary",
|
|
609
603
|
label: e.status
|
|
610
|
-
},
|
|
611
|
-
return /* @__PURE__ */
|
|
612
|
-
className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md",
|
|
613
|
-
children: /* @__PURE__ */
|
|
604
|
+
}, r = E[e.fulfillmentType || "delivery"] || E.delivery, a = r.icon;
|
|
605
|
+
return /* @__PURE__ */ x("div", {
|
|
606
|
+
className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", k(e)),
|
|
607
|
+
children: /* @__PURE__ */ S("div", {
|
|
614
608
|
className: "p-4 sm:p-5",
|
|
615
609
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ S("div", {
|
|
617
611
|
className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ S("div", {
|
|
619
613
|
className: "min-w-0 flex-1",
|
|
620
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ S("div", {
|
|
621
615
|
className: "flex flex-wrap items-center gap-2 mb-1",
|
|
622
616
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ S("h3", {
|
|
624
618
|
className: "text-sm sm:text-base font-semibold text-text-primary",
|
|
625
619
|
children: ["Order #", e.id]
|
|
626
620
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ x("span", {
|
|
628
622
|
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
|
|
629
623
|
children: n.label
|
|
630
624
|
}),
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium",
|
|
633
|
-
children: [/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ S("span", {
|
|
626
|
+
className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", r.color),
|
|
627
|
+
children: [/* @__PURE__ */ x(a, { className: "h-3 w-3" }), r.label]
|
|
634
628
|
})
|
|
635
629
|
]
|
|
636
|
-
}), /* @__PURE__ */
|
|
630
|
+
}), /* @__PURE__ */ S("p", {
|
|
637
631
|
className: "text-xs text-text-secondary",
|
|
638
632
|
children: [
|
|
639
633
|
e.customerName || "Customer",
|
|
640
634
|
" | ",
|
|
641
|
-
|
|
635
|
+
D(e.orderDate)
|
|
642
636
|
]
|
|
643
637
|
})]
|
|
644
|
-
}), /* @__PURE__ */
|
|
638
|
+
}), /* @__PURE__ */ S("div", {
|
|
645
639
|
className: "flex items-center gap-3",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ x("p", {
|
|
647
641
|
className: "text-lg font-bold text-text-primary",
|
|
648
|
-
children:
|
|
649
|
-
}), /* @__PURE__ */
|
|
642
|
+
children: i(e.total, { minimumFractionDigits: 0 })
|
|
643
|
+
}), /* @__PURE__ */ x("button", {
|
|
650
644
|
type: "button",
|
|
651
645
|
onClick: () => {
|
|
652
|
-
|
|
646
|
+
N(e), F(!0);
|
|
653
647
|
},
|
|
654
648
|
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
649
|
children: "View Details"
|
|
656
650
|
})]
|
|
657
651
|
})]
|
|
658
652
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ x("div", {
|
|
660
654
|
className: "border-t border-border-subtle pt-3 mb-3",
|
|
661
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ x("div", {
|
|
662
656
|
className: "flex flex-wrap gap-2",
|
|
663
|
-
children: e.items.map((e, t) => /* @__PURE__ */
|
|
657
|
+
children: e.items.map((e, t) => /* @__PURE__ */ S("span", {
|
|
664
658
|
className: "inline-flex items-center rounded bg-bg-sunken px-2 py-1 text-xs text-text-primary",
|
|
665
659
|
children: [
|
|
666
660
|
e.quantity,
|
|
@@ -670,56 +664,56 @@ var S = [
|
|
|
670
664
|
}, t))
|
|
671
665
|
})
|
|
672
666
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
667
|
+
/* @__PURE__ */ S("div", {
|
|
674
668
|
className: "flex flex-wrap gap-2",
|
|
675
669
|
children: [
|
|
676
|
-
e.status === "pending" && /* @__PURE__ */
|
|
670
|
+
e.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("button", {
|
|
677
671
|
type: "button",
|
|
678
|
-
onClick: () =>
|
|
672
|
+
onClick: () => V(e.id, "accept"),
|
|
679
673
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
|
|
680
|
-
children: [/* @__PURE__ */
|
|
681
|
-
}), /* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Accept Order"]
|
|
675
|
+
}), /* @__PURE__ */ S("button", {
|
|
682
676
|
type: "button",
|
|
683
|
-
onClick: () =>
|
|
677
|
+
onClick: () => V(e.id, "reject"),
|
|
684
678
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
|
|
685
|
-
children: [/* @__PURE__ */
|
|
679
|
+
children: [/* @__PURE__ */ x(y, { className: "h-3.5 w-3.5" }), "Reject"]
|
|
686
680
|
})] }),
|
|
687
|
-
e.status === "confirmed" && /* @__PURE__ */
|
|
681
|
+
e.status === "confirmed" && /* @__PURE__ */ S("button", {
|
|
688
682
|
type: "button",
|
|
689
|
-
onClick: () =>
|
|
683
|
+
onClick: () => V(e.id, "ready"),
|
|
690
684
|
className: "inline-flex items-center gap-1.5 rounded-md bg-accent-orange-subtle/10 px-3 py-2 text-xs font-medium text-accent-orange hover:bg-accent-orange-subtle/20 transition-colors",
|
|
691
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ x(u, { className: "h-3.5 w-3.5" }), "Start Preparing"]
|
|
692
686
|
}),
|
|
693
|
-
e.status === "preparing" && /* @__PURE__ */
|
|
687
|
+
e.status === "preparing" && /* @__PURE__ */ S("button", {
|
|
694
688
|
type: "button",
|
|
695
|
-
onClick: () =>
|
|
689
|
+
onClick: () => V(e.id, "ready"),
|
|
696
690
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
|
|
697
|
-
children: [/* @__PURE__ */
|
|
691
|
+
children: [/* @__PURE__ */ x(f, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
|
|
698
692
|
}),
|
|
699
|
-
e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */
|
|
693
|
+
e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ S("button", {
|
|
700
694
|
type: "button",
|
|
701
|
-
onClick: () =>
|
|
695
|
+
onClick: () => V(e.id, "complete"),
|
|
702
696
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
|
|
703
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Complete Order"]
|
|
704
698
|
}),
|
|
705
699
|
[
|
|
706
700
|
"confirmed",
|
|
707
701
|
"preparing",
|
|
708
702
|
"ready"
|
|
709
|
-
].includes(e.status) && /* @__PURE__ */
|
|
703
|
+
].includes(e.status) && /* @__PURE__ */ S("button", {
|
|
710
704
|
type: "button",
|
|
711
705
|
onClick: () => alert("Contact feature coming soon!"),
|
|
712
706
|
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__ */
|
|
707
|
+
children: [/* @__PURE__ */ x(p, { className: "h-3.5 w-3.5" }), "Contact Customer"]
|
|
714
708
|
})
|
|
715
709
|
]
|
|
716
710
|
}),
|
|
717
|
-
e.specialInstructions && /* @__PURE__ */
|
|
711
|
+
e.specialInstructions && /* @__PURE__ */ S("div", {
|
|
718
712
|
className: "mt-3 rounded-md border border-status-warning-border/30 bg-status-warning-bg-subtle/10 p-3",
|
|
719
|
-
children: [/* @__PURE__ */
|
|
713
|
+
children: [/* @__PURE__ */ x("p", {
|
|
720
714
|
className: "text-xs font-medium text-status-warning-text",
|
|
721
715
|
children: "Special Instructions:"
|
|
722
|
-
}), /* @__PURE__ */
|
|
716
|
+
}), /* @__PURE__ */ x("p", {
|
|
723
717
|
className: "text-xs text-status-warning-text mt-0.5",
|
|
724
718
|
children: e.specialInstructions
|
|
725
719
|
})]
|
|
@@ -730,140 +724,140 @@ var S = [
|
|
|
730
724
|
})
|
|
731
725
|
})
|
|
732
726
|
]
|
|
733
|
-
}),
|
|
727
|
+
}), P && M && /* @__PURE__ */ x("div", {
|
|
734
728
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
735
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ x("div", {
|
|
736
730
|
className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
|
|
737
|
-
children: /* @__PURE__ */
|
|
731
|
+
children: /* @__PURE__ */ S("div", {
|
|
738
732
|
className: "p-6",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ S("div", {
|
|
740
734
|
className: "flex items-center justify-between mb-4",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
735
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
742
736
|
className: "text-lg font-semibold text-text-primary",
|
|
743
737
|
children: "Order Details"
|
|
744
|
-
}), /* @__PURE__ */
|
|
738
|
+
}), /* @__PURE__ */ x("button", {
|
|
745
739
|
type: "button",
|
|
746
|
-
onClick: () =>
|
|
740
|
+
onClick: () => F(!1),
|
|
747
741
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
|
|
748
|
-
children: /* @__PURE__ */
|
|
742
|
+
children: /* @__PURE__ */ x(v, { className: "h-5 w-5" })
|
|
749
743
|
})]
|
|
750
|
-
}), /* @__PURE__ */
|
|
744
|
+
}), /* @__PURE__ */ S("div", {
|
|
751
745
|
className: "space-y-4",
|
|
752
746
|
children: [
|
|
753
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ S("div", {
|
|
754
748
|
className: "grid grid-cols-2 gap-4",
|
|
755
749
|
children: [
|
|
756
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
757
751
|
className: "text-xs text-text-secondary",
|
|
758
752
|
children: "Order ID"
|
|
759
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ S("p", {
|
|
760
754
|
className: "text-sm font-medium text-text-primary",
|
|
761
|
-
children: ["#",
|
|
755
|
+
children: ["#", M.id]
|
|
762
756
|
})] }),
|
|
763
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
764
758
|
className: "text-xs text-text-secondary",
|
|
765
759
|
children: "Status"
|
|
766
|
-
}), /* @__PURE__ */
|
|
767
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (
|
|
768
|
-
children: (
|
|
760
|
+
}), /* @__PURE__ */ x("span", {
|
|
761
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (T[M.status] || T.pending).color),
|
|
762
|
+
children: (T[M.status] || T.pending).label
|
|
769
763
|
})] }),
|
|
770
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
771
765
|
className: "text-xs text-text-secondary",
|
|
772
766
|
children: "Customer"
|
|
773
|
-
}), /* @__PURE__ */
|
|
767
|
+
}), /* @__PURE__ */ x("p", {
|
|
774
768
|
className: "text-sm font-medium text-text-primary",
|
|
775
|
-
children:
|
|
769
|
+
children: M.customerName || "N/A"
|
|
776
770
|
})] }),
|
|
777
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
778
772
|
className: "text-xs text-text-secondary",
|
|
779
773
|
children: "Order Time"
|
|
780
|
-
}), /* @__PURE__ */
|
|
774
|
+
}), /* @__PURE__ */ x("p", {
|
|
781
775
|
className: "text-sm font-medium text-text-primary",
|
|
782
|
-
children:
|
|
776
|
+
children: O(M.orderDate)
|
|
783
777
|
})] })
|
|
784
778
|
]
|
|
785
779
|
}),
|
|
786
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ S("div", {
|
|
787
781
|
className: "border-t border-border-subtle pt-4",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
782
|
+
children: [/* @__PURE__ */ x("h4", {
|
|
789
783
|
className: "text-sm font-medium text-text-primary mb-3",
|
|
790
784
|
children: "Order Items"
|
|
791
|
-
}), /* @__PURE__ */
|
|
785
|
+
}), /* @__PURE__ */ x("div", {
|
|
792
786
|
className: "space-y-2",
|
|
793
|
-
children:
|
|
787
|
+
children: M.items.map((e, t) => /* @__PURE__ */ S("div", {
|
|
794
788
|
className: "flex justify-between items-start",
|
|
795
|
-
children: [/* @__PURE__ */
|
|
789
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
796
790
|
className: "text-sm font-medium text-text-primary",
|
|
797
791
|
children: e.name
|
|
798
|
-
}), /* @__PURE__ */
|
|
792
|
+
}), /* @__PURE__ */ S("p", {
|
|
799
793
|
className: "text-xs text-text-secondary",
|
|
800
794
|
children: [
|
|
801
|
-
|
|
795
|
+
i(e.price, { minimumFractionDigits: 0 }),
|
|
802
796
|
" x",
|
|
803
797
|
" ",
|
|
804
798
|
e.quantity
|
|
805
799
|
]
|
|
806
|
-
})] }), /* @__PURE__ */
|
|
800
|
+
})] }), /* @__PURE__ */ x("p", {
|
|
807
801
|
className: "text-sm font-medium text-text-primary",
|
|
808
|
-
children:
|
|
802
|
+
children: i(e.price * e.quantity, { minimumFractionDigits: 0 })
|
|
809
803
|
})]
|
|
810
804
|
}, t))
|
|
811
805
|
})]
|
|
812
806
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ S("div", {
|
|
814
808
|
className: "border-t border-border-subtle pt-4 space-y-2",
|
|
815
809
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ S("div", {
|
|
817
811
|
className: "flex justify-between text-sm text-text-secondary",
|
|
818
|
-
children: [/* @__PURE__ */
|
|
812
|
+
children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: i(M.subtotal, { minimumFractionDigits: 0 }) })]
|
|
819
813
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ S("div", {
|
|
821
815
|
className: "flex justify-between text-sm text-text-secondary",
|
|
822
|
-
children: [/* @__PURE__ */
|
|
816
|
+
children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: i(M.deliveryFee, { minimumFractionDigits: 0 }) })]
|
|
823
817
|
}),
|
|
824
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ S("div", {
|
|
825
819
|
className: "flex justify-between text-sm text-text-secondary",
|
|
826
|
-
children: [/* @__PURE__ */
|
|
820
|
+
children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: i(M.taxes, { minimumFractionDigits: 0 }) })]
|
|
827
821
|
}),
|
|
828
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ S("div", {
|
|
829
823
|
className: "flex justify-between font-semibold text-text-primary pt-2 border-t border-border-subtle",
|
|
830
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: i(M.total, { minimumFractionDigits: 0 }) })]
|
|
831
825
|
})
|
|
832
826
|
]
|
|
833
827
|
}),
|
|
834
|
-
|
|
828
|
+
M.fulfillmentType === "delivery" && M.deliveryAddress && /* @__PURE__ */ S("div", {
|
|
835
829
|
className: "border-t border-border-subtle pt-4",
|
|
836
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ S("h4", {
|
|
837
831
|
className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-1.5",
|
|
838
|
-
children: [/* @__PURE__ */
|
|
839
|
-
}), /* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ x(d, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
|
|
833
|
+
}), /* @__PURE__ */ S("p", {
|
|
840
834
|
className: "text-sm text-text-secondary",
|
|
841
835
|
children: [
|
|
842
|
-
|
|
836
|
+
M.deliveryAddress.street,
|
|
843
837
|
", ",
|
|
844
|
-
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
|
|
838
|
+
M.deliveryAddress.area,
|
|
839
|
+
/* @__PURE__ */ x("br", {}),
|
|
840
|
+
M.deliveryAddress.city,
|
|
847
841
|
" - ",
|
|
848
|
-
|
|
842
|
+
M.deliveryAddress.pincode
|
|
849
843
|
]
|
|
850
844
|
})]
|
|
851
845
|
}),
|
|
852
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ S("div", {
|
|
853
847
|
className: "flex gap-3 mt-6",
|
|
854
|
-
children: [/* @__PURE__ */
|
|
848
|
+
children: [/* @__PURE__ */ x("button", {
|
|
855
849
|
type: "button",
|
|
856
|
-
onClick: () =>
|
|
850
|
+
onClick: () => F(!1),
|
|
857
851
|
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
852
|
children: "Close"
|
|
859
|
-
}),
|
|
853
|
+
}), M.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
|
|
860
854
|
type: "button",
|
|
861
|
-
onClick: () =>
|
|
855
|
+
onClick: () => V(M.id, "accept"),
|
|
862
856
|
className: "flex-1 rounded-md bg-status-success-bg-subtle/10 px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
|
|
863
857
|
children: "Accept Order"
|
|
864
|
-
}), /* @__PURE__ */
|
|
858
|
+
}), /* @__PURE__ */ x("button", {
|
|
865
859
|
type: "button",
|
|
866
|
-
onClick: () =>
|
|
860
|
+
onClick: () => V(M.id, "reject"),
|
|
867
861
|
className: "flex-1 rounded-md bg-status-error-bg-subtle/10 px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
|
|
868
862
|
children: "Reject Order"
|
|
869
863
|
})] })]
|
|
@@ -876,6 +870,6 @@ var S = [
|
|
|
876
870
|
});
|
|
877
871
|
};
|
|
878
872
|
//#endregion
|
|
879
|
-
export {
|
|
873
|
+
export { A as OrderManagementPage };
|
|
880
874
|
|
|
881
875
|
//# sourceMappingURL=OrderManagementPage.js.map
|