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