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