randmarcomps 1.641.0 → 1.643.0
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/randmarcomps.cjs +1 -1
- package/dist/randmarcomps.js +150 -144
- package/package.json +1 -1
package/dist/randmarcomps.js
CHANGED
|
@@ -776,21 +776,27 @@ function Wc(t) {
|
|
|
776
776
|
function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
777
777
|
const s = (y, C, S = !1, A = !0) => {
|
|
778
778
|
const k = y.WarehouseType === "Fulfillment Center", D = k ? "bg-background" : "bg-background/70 text-muted-foreground", L = A && C > 0 ? "border-t" : "", M = S ? "border-r" : "", I = y.Status ?? "Unknown", $ = I === "Active";
|
|
779
|
-
let
|
|
779
|
+
let q = "bg-secondary text-secondary-foreground ring-1 ring-border";
|
|
780
780
|
switch (y.WarehouseType) {
|
|
781
|
+
case "Fulfillment Center":
|
|
782
|
+
q = "bg-randmar-black text-primary-foreground ring-1 ring-randmar-black/40";
|
|
783
|
+
break;
|
|
781
784
|
case "Last Mile":
|
|
782
|
-
|
|
785
|
+
q = "bg-randmar-blue text-primary-foreground ring-1 ring-randmar-blue/40";
|
|
783
786
|
break;
|
|
784
787
|
case "First Mile":
|
|
785
|
-
|
|
788
|
+
q = "bg-randmar-purple text-primary-foreground ring-1 ring-randmar-purple/40";
|
|
786
789
|
break;
|
|
787
790
|
}
|
|
788
791
|
switch (I) {
|
|
792
|
+
case "Opening":
|
|
793
|
+
q = "bg-success text-success-foreground ring-1 ring-success/40";
|
|
794
|
+
break;
|
|
789
795
|
case "Closing":
|
|
790
|
-
|
|
796
|
+
q = "bg-warning text-warning-foreground ring-1 ring-warning/40";
|
|
791
797
|
break;
|
|
792
798
|
case "Closed":
|
|
793
|
-
|
|
799
|
+
q = "bg-destructive text-destructive-foreground ring-1 ring-destructive/40";
|
|
794
800
|
break;
|
|
795
801
|
}
|
|
796
802
|
return /* @__PURE__ */ a(
|
|
@@ -805,7 +811,7 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
|
805
811
|
/* @__PURE__ */ a(
|
|
806
812
|
"span",
|
|
807
813
|
{
|
|
808
|
-
className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${
|
|
814
|
+
className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${q}`,
|
|
809
815
|
"aria-hidden": "false",
|
|
810
816
|
title: $ ? k ? "Fulfillment Center" : "Satellite Warehouse" : `Status: ${I}`,
|
|
811
817
|
children: [
|
|
@@ -1812,8 +1818,8 @@ function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1812
1818
|
const M = /* @__PURE__ */ new Map();
|
|
1813
1819
|
for (const I of h)
|
|
1814
1820
|
for (const $ of Br(I.Tags)) {
|
|
1815
|
-
const
|
|
1816
|
-
M.has(
|
|
1821
|
+
const q = Js($);
|
|
1822
|
+
M.has(q) || M.set(q, $);
|
|
1817
1823
|
}
|
|
1818
1824
|
return Array.from(M.entries()).map(([I, $]) => ({ key: I, label: $ })).sort((I, $) => I.label.localeCompare($.label, void 0, { sensitivity: "base" }));
|
|
1819
1825
|
}, [h]), S = d.trim().length > 0 || m.length > 0 || g !== "az" || w || b, A = ae(() => {
|
|
@@ -1825,7 +1831,7 @@ function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1825
1831
|
},
|
|
1826
1832
|
[k]
|
|
1827
1833
|
), L = ye(() => {
|
|
1828
|
-
const M = d.trim().toLocaleLowerCase(), I = new Set(m),
|
|
1834
|
+
const M = d.trim().toLocaleLowerCase(), I = new Set(m), q = h.filter((z) => {
|
|
1829
1835
|
if (w && !z.OpenToWork || b && !Od(z)) return !1;
|
|
1830
1836
|
const _ = Td(z);
|
|
1831
1837
|
if (I.size > 0 && !_.some((O) => I.has(O))) return !1;
|
|
@@ -1835,10 +1841,10 @@ function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1835
1841
|
}
|
|
1836
1842
|
return !0;
|
|
1837
1843
|
}).slice();
|
|
1838
|
-
return
|
|
1844
|
+
return q.sort((z, _) => g === "az" ? Va(z).localeCompare(Va(_), void 0, { sensitivity: "base" }) : g === "recent" ? (_.CreationDate ?? 0) - (z.CreationDate ?? 0) : g === "sales30Desc" ? (_.SalesData?.SalesLast30Days ?? 0) - (z.SalesData?.SalesLast30Days ?? 0) : (z.SalesData?.SalesLast30Days ?? 0) - (_.SalesData?.SalesLast30Days ?? 0)), q;
|
|
1839
1845
|
}, [h, b, w, d, m, g]);
|
|
1840
1846
|
return /* @__PURE__ */ a("div", { className: "w-full space-y-6 p-4 sm:p-6", children: [
|
|
1841
|
-
/* @__PURE__ */ e(
|
|
1847
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(G, { className: "p-4 space-y-4", children: [
|
|
1842
1848
|
/* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-3", children: [
|
|
1843
1849
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
1844
1850
|
/* @__PURE__ */ e(X, { htmlFor: "manufacturer-search", children: "Search manufacturers" }),
|
|
@@ -1875,7 +1881,7 @@ function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1875
1881
|
"aria-pressed": $,
|
|
1876
1882
|
onClick: () => {
|
|
1877
1883
|
p(
|
|
1878
|
-
(
|
|
1884
|
+
(q) => q.includes(M) ? q.filter((z) => z !== M) : [...q, M]
|
|
1879
1885
|
);
|
|
1880
1886
|
},
|
|
1881
1887
|
children: I
|
|
@@ -1966,7 +1972,7 @@ function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1966
1972
|
},
|
|
1967
1973
|
M.ManufacturerId ?? `${$}-${I}`
|
|
1968
1974
|
);
|
|
1969
|
-
}) }) : /* @__PURE__ */ e(
|
|
1975
|
+
}) }) : /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(G, { className: "p-8 text-center space-y-3", children: [
|
|
1970
1976
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No manufacturers match your current filters." }),
|
|
1971
1977
|
/* @__PURE__ */ e(E, { type: "button", variant: "outline", onClick: A, disabled: !S, children: "Reset filters" })
|
|
1972
1978
|
] }) })
|
|
@@ -2447,7 +2453,7 @@ function yu({
|
|
|
2447
2453
|
g && g !== A && g.trim() !== "" && D({ fieldName: "Name", newValue: g }).unwrap().then(() => {
|
|
2448
2454
|
y({ title: "Success", description: "Name updated successfully" });
|
|
2449
2455
|
});
|
|
2450
|
-
},
|
|
2456
|
+
}, q = () => {
|
|
2451
2457
|
w && w !== k && w.trim() !== "" && D({ fieldName: "Role", newValue: w }).unwrap().then(() => {
|
|
2452
2458
|
y({ title: "Success", description: "Role updated successfully" });
|
|
2453
2459
|
});
|
|
@@ -2536,7 +2542,7 @@ function yu({
|
|
|
2536
2542
|
{
|
|
2537
2543
|
value: w ?? "",
|
|
2538
2544
|
onChange: (z) => x(z.target.value),
|
|
2539
|
-
onBlur:
|
|
2545
|
+
onBlur: q,
|
|
2540
2546
|
className: "mt-1 h-8 border-0 bg-transparent px-0 text-sm font-medium shadow-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
2541
2547
|
}
|
|
2542
2548
|
)
|
|
@@ -2959,7 +2965,7 @@ const wu = Xa(function({
|
|
|
2959
2965
|
}, [r]), S = l ?? (i ? "assistant" : "dashboard"), A = S === "assistant" ? Su : wu, k = S === "assistant" ? vu : Nu;
|
|
2960
2966
|
return /* @__PURE__ */ a("div", { className: S === "dashboard" ? "py-3" : "", children: [
|
|
2961
2967
|
r.map((D) => {
|
|
2962
|
-
const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N), $ = !!(i && !L && (D.content ?? "").trim().length > 0),
|
|
2968
|
+
const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N), $ = !!(i && !L && (D.content ?? "").trim().length > 0), q = h === D.id;
|
|
2963
2969
|
return /* @__PURE__ */ e(
|
|
2964
2970
|
A,
|
|
2965
2971
|
{
|
|
@@ -2970,8 +2976,8 @@ const wu = Xa(function({
|
|
|
2970
2976
|
canRetry: I,
|
|
2971
2977
|
canCopy: $,
|
|
2972
2978
|
isCopied: w === D.id,
|
|
2973
|
-
isEditing:
|
|
2974
|
-
editValue:
|
|
2979
|
+
isEditing: q,
|
|
2980
|
+
editValue: q ? d : "",
|
|
2975
2981
|
onEditValueChange: c,
|
|
2976
2982
|
onStartEdit: () => m?.(D),
|
|
2977
2983
|
onCancelEdit: () => p?.(),
|
|
@@ -3221,7 +3227,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3221
3227
|
return oe.sort(ha), oe;
|
|
3222
3228
|
}), h(!0), setTimeout(() => Xe.current?.focus(), 50));
|
|
3223
3229
|
}, [l, t]);
|
|
3224
|
-
const [I, $] = T(void 0), [
|
|
3230
|
+
const [I, $] = T(void 0), [q, z] = T(""), [_, O] = T(null), [V, se] = T([]), [me, Ve] = T(null), Re = ce(null), Qe = ce(null), [Ue, We] = T([]), Xe = r || Qe, ie = ce(null), { toast: pe } = Ee(), H = () => V.find((W) => W.partner1 === I?.[0] && W.partner2 === I?.[1]), Y = ae(async () => {
|
|
3225
3231
|
if (d) return;
|
|
3226
3232
|
c(!0);
|
|
3227
3233
|
const W = I;
|
|
@@ -3392,7 +3398,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3392
3398
|
};
|
|
3393
3399
|
Ne(ee), me.invoke("NewMessage", ee).catch((be) => console.error("Error sending message:", be)), z(""), ie.current && (ie.current.value = "");
|
|
3394
3400
|
}, ge = () => {
|
|
3395
|
-
const W =
|
|
3401
|
+
const W = q.trim();
|
|
3396
3402
|
!ht || !W || !I || !me || (ht.unread > 0 && (te(), se((oe) => oe.map((ee) => ee.partner1 === I[0] && ee.partner2 === I[1] ? { ...ee, unread: 0 } : ee))), j(ht, W));
|
|
3397
3403
|
}, Ae = (W, oe) => O([W, oe]);
|
|
3398
3404
|
K(() => {
|
|
@@ -3473,7 +3479,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3473
3479
|
appID: t,
|
|
3474
3480
|
messagesEndRef: Re,
|
|
3475
3481
|
inputRef: Xe,
|
|
3476
|
-
content:
|
|
3482
|
+
content: q,
|
|
3477
3483
|
setContent: z,
|
|
3478
3484
|
handleSendMessage: ge,
|
|
3479
3485
|
isPostBizDevConvoLoading: N,
|
|
@@ -3612,7 +3618,7 @@ function Du({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3612
3618
|
s && s(x());
|
|
3613
3619
|
}, [x, s]), K(() => {
|
|
3614
3620
|
t && (m(h), u(h));
|
|
3615
|
-
}, [t, m, h]), /* @__PURE__ */ a(
|
|
3621
|
+
}, [t, m, h]), /* @__PURE__ */ a(Q, { children: [
|
|
3616
3622
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Billing, Credit, & Rebates" }) }),
|
|
3617
3623
|
/* @__PURE__ */ e(G, { children: n ? (
|
|
3618
3624
|
// Skeleton loading state
|
|
@@ -3762,7 +3768,7 @@ function Mu({ manufacturer: t, readonly: r = !1, isLoading: n }) {
|
|
|
3762
3768
|
console.error("Error updating", c);
|
|
3763
3769
|
}
|
|
3764
3770
|
};
|
|
3765
|
-
return /* @__PURE__ */ a(
|
|
3771
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
3766
3772
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Open to Work with Resellers" }) }),
|
|
3767
3773
|
/* @__PURE__ */ e(G, { children: n ? (
|
|
3768
3774
|
// Skeleton loading state
|
|
@@ -3832,7 +3838,7 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3832
3838
|
{ key: "publicResources", apiKey: "PublicResourcesLink", value: k.publicResources }
|
|
3833
3839
|
];
|
|
3834
3840
|
for (const I of M) {
|
|
3835
|
-
const $ = I.value,
|
|
3841
|
+
const $ = I.value, q = t?.[I.apiKey], z = typeof q == "boolean" ? String(q) : q;
|
|
3836
3842
|
if ($ !== z && $ !== void 0) {
|
|
3837
3843
|
L = !0;
|
|
3838
3844
|
try {
|
|
@@ -3858,7 +3864,7 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3858
3864
|
}, S = (k) => !k || k.trim() === "", A = (k) => {
|
|
3859
3865
|
u(k);
|
|
3860
3866
|
};
|
|
3861
|
-
return /* @__PURE__ */ a(
|
|
3867
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
3862
3868
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Public Information" }) }),
|
|
3863
3869
|
/* @__PURE__ */ e(G, { children: n ? (
|
|
3864
3870
|
// Skeleton loading state
|
|
@@ -4039,7 +4045,7 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
4039
4045
|
variant: "destructive"
|
|
4040
4046
|
});
|
|
4041
4047
|
}, y = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?(\?[^\s#]*)??(#[^\s]*)?$/i;
|
|
4042
|
-
return /* @__PURE__ */ a(
|
|
4048
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
4043
4049
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Qualifications" }) }),
|
|
4044
4050
|
/* @__PURE__ */ e(G, { children: n ? (
|
|
4045
4051
|
// Skeleton loading state
|
|
@@ -4151,7 +4157,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4151
4157
|
}
|
|
4152
4158
|
]
|
|
4153
4159
|
}
|
|
4154
|
-
], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [A, { isLoading: k }] = Ro(), [D, { isLoading: L }] = Po(), [M, { isLoading: I }] = Ao(), $ = x || y || S || k || L || I,
|
|
4160
|
+
], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [A, { isLoading: k }] = Ro(), [D, { isLoading: L }] = Po(), [M, { isLoading: I }] = Ao(), $ = x || y || S || k || L || I, q = (V) => {
|
|
4155
4161
|
l(V), d(!0);
|
|
4156
4162
|
}, z = (V) => {
|
|
4157
4163
|
d(V), V || (m(void 0), g(void 0));
|
|
@@ -4223,7 +4229,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4223
4229
|
return "Enter the email address where you would like to receive the report.";
|
|
4224
4230
|
}
|
|
4225
4231
|
};
|
|
4226
|
-
return /* @__PURE__ */ a(
|
|
4232
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
4227
4233
|
/* @__PURE__ */ a(Z, { children: [
|
|
4228
4234
|
/* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Reports" }),
|
|
4229
4235
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Download essential business reports, from your Open Orders & Sales Report, to your Inventory Reports." })
|
|
@@ -4256,7 +4262,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4256
4262
|
variant: "outline",
|
|
4257
4263
|
size: "sm",
|
|
4258
4264
|
className: "flex items-center gap-1",
|
|
4259
|
-
onClick: () =>
|
|
4265
|
+
onClick: () => q(se),
|
|
4260
4266
|
children: [
|
|
4261
4267
|
/* @__PURE__ */ e(Ca, { className: "h-4 w-4" }),
|
|
4262
4268
|
"Request"
|
|
@@ -4397,27 +4403,27 @@ function Fu(t) {
|
|
|
4397
4403
|
amount: o.delayed.amount
|
|
4398
4404
|
}
|
|
4399
4405
|
];
|
|
4400
|
-
return n || t.isLoading ? /* @__PURE__ */ a(
|
|
4406
|
+
return n || t.isLoading ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
4401
4407
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Reseller Orders" }) }),
|
|
4402
4408
|
/* @__PURE__ */ a(G, { children: [
|
|
4403
4409
|
/* @__PURE__ */ e(f, { className: "h-4 w-40 mb-4" }),
|
|
4404
4410
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: [1, 2, 3, 4].map((h) => /* @__PURE__ */ e(f, { className: "h-32 w-full" }, h)) })
|
|
4405
4411
|
] })
|
|
4406
|
-
] }) : s ? /* @__PURE__ */ a(
|
|
4412
|
+
] }) : s ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
4407
4413
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Reseller Orders" }) }),
|
|
4408
4414
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ a(Tt, { variant: "destructive", children: [
|
|
4409
4415
|
/* @__PURE__ */ e(Nt, { className: "h-4 w-4" }),
|
|
4410
4416
|
/* @__PURE__ */ e(Ot, { children: "Error" }),
|
|
4411
4417
|
/* @__PURE__ */ e(Et, { children: "Failed to load reseller orders. Please try again later." })
|
|
4412
4418
|
] }) })
|
|
4413
|
-
] }) : /* @__PURE__ */ a(
|
|
4419
|
+
] }) : /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
4414
4420
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Reseller Orders" }) }),
|
|
4415
4421
|
/* @__PURE__ */ a(G, { children: [
|
|
4416
4422
|
/* @__PURE__ */ a("div", { className: "flex items-center mb-4", children: [
|
|
4417
4423
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: "Active Orders:" }),
|
|
4418
4424
|
/* @__PURE__ */ e("span", { className: "ml-2 font-bold", children: o.all.orders })
|
|
4419
4425
|
] }),
|
|
4420
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: u.map((h) => /* @__PURE__ */ e(
|
|
4426
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: u.map((h) => /* @__PURE__ */ e(Q, { className: "overflow-hidden rounded-md rounded-b-lg border-0 shadow-md", children: /* @__PURE__ */ a(G, { className: "p-0", children: [
|
|
4421
4427
|
/* @__PURE__ */ e("div", { className: `${h.stripeClass} h-[3px]` }),
|
|
4422
4428
|
/* @__PURE__ */ a("div", { className: "p-6 border border-t-0", children: [
|
|
4423
4429
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-center mb-4", children: [
|
|
@@ -4470,7 +4476,7 @@ function $u(t) {
|
|
|
4470
4476
|
function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
4471
4477
|
const s = r?.SalesLast30Days ?? 0, i = r?.SalesLast3Months ?? 0, l = r?.SalesYearToDay ?? 0, o = $u(t);
|
|
4472
4478
|
return n ? /* @__PURE__ */ a("div", { className: "grid gap-4 @xl:grid-cols-2 @2xl:grid-cols-3 mb-4", children: [
|
|
4473
|
-
/* @__PURE__ */ a(
|
|
4479
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
4474
4480
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4475
4481
|
/* @__PURE__ */ e(f, { className: "h-5 w-24" }),
|
|
4476
4482
|
/* @__PURE__ */ e(f, { className: "h-8 w-8 rounded-full" })
|
|
@@ -4480,7 +4486,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4480
4486
|
/* @__PURE__ */ e(f, { className: "h-4 w-24" })
|
|
4481
4487
|
] })
|
|
4482
4488
|
] }),
|
|
4483
|
-
/* @__PURE__ */ a(
|
|
4489
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
4484
4490
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4485
4491
|
/* @__PURE__ */ e(f, { className: "h-5 w-28" }),
|
|
4486
4492
|
/* @__PURE__ */ e(f, { className: "h-8 w-8 rounded-full" })
|
|
@@ -4490,7 +4496,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4490
4496
|
/* @__PURE__ */ e(f, { className: "h-4 w-24" })
|
|
4491
4497
|
] })
|
|
4492
4498
|
] }),
|
|
4493
|
-
/* @__PURE__ */ a(
|
|
4499
|
+
/* @__PURE__ */ a(Q, { className: "@xl:col-span-2 @2xl:col-span-1", children: [
|
|
4494
4500
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4495
4501
|
/* @__PURE__ */ e(f, { className: "h-5 w-36" }),
|
|
4496
4502
|
/* @__PURE__ */ e(f, { className: "h-8 w-8 rounded-full" })
|
|
@@ -4501,7 +4507,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4501
4507
|
] })
|
|
4502
4508
|
] })
|
|
4503
4509
|
] }) : /* @__PURE__ */ a("div", { className: "grid gap-4 @xl:grid-cols-2 @2xl:grid-cols-3 mb-4", children: [
|
|
4504
|
-
/* @__PURE__ */ a(
|
|
4510
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
4505
4511
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4506
4512
|
/* @__PURE__ */ e(fe, { className: "text-sm font-medium", children: "Last 30 Days" }),
|
|
4507
4513
|
/* @__PURE__ */ e("div", { className: "p-2 rounded-full bg-muted", children: /* @__PURE__ */ e(il, { className: "size-4 shrink-0 text-muted-foreground" }) })
|
|
@@ -4511,7 +4517,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4511
4517
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground" })
|
|
4512
4518
|
] })
|
|
4513
4519
|
] }),
|
|
4514
|
-
/* @__PURE__ */ a(
|
|
4520
|
+
/* @__PURE__ */ a(Q, { children: [
|
|
4515
4521
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4516
4522
|
/* @__PURE__ */ e(fe, { className: "text-sm font-medium", children: "Last 3 Months" }),
|
|
4517
4523
|
/* @__PURE__ */ e("div", { className: "p-2 rounded-full bg-muted", children: /* @__PURE__ */ e(wt, { className: "size-4 shrink-0 text-muted-foreground" }) })
|
|
@@ -4521,7 +4527,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4521
4527
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground" })
|
|
4522
4528
|
] })
|
|
4523
4529
|
] }),
|
|
4524
|
-
o && /* @__PURE__ */ a(
|
|
4530
|
+
o && /* @__PURE__ */ a(Q, { className: "@xl:col-span-2 @2xl:col-span-1", children: [
|
|
4525
4531
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
4526
4532
|
/* @__PURE__ */ a(fe, { className: "text-sm font-medium", children: [
|
|
4527
4533
|
"Year to Date (",
|
|
@@ -4537,7 +4543,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4537
4543
|
] })
|
|
4538
4544
|
] });
|
|
4539
4545
|
}
|
|
4540
|
-
const
|
|
4546
|
+
const Q = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4541
4547
|
"div",
|
|
4542
4548
|
{
|
|
4543
4549
|
ref: n,
|
|
@@ -4548,7 +4554,7 @@ const q = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4548
4554
|
...r
|
|
4549
4555
|
}
|
|
4550
4556
|
));
|
|
4551
|
-
|
|
4557
|
+
Q.displayName = "Card";
|
|
4552
4558
|
const Z = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4553
4559
|
"div",
|
|
4554
4560
|
{
|
|
@@ -4619,7 +4625,7 @@ function Bu({
|
|
|
4619
4625
|
}, {
|
|
4620
4626
|
skip: !t?.ManufacturerId
|
|
4621
4627
|
}), l = t?.DefaultMaxInventoryValue ?? 0, o = n.reduce((d, c) => d + (c.InventoryValue || 0), 0), u = l - o, h = l > 0 ? Math.round(o / l * 100) : 0;
|
|
4622
|
-
return r || s || i ? /* @__PURE__ */ a(
|
|
4628
|
+
return r || s || i ? /* @__PURE__ */ a(Q, { children: [
|
|
4623
4629
|
/* @__PURE__ */ a(Z, { children: [
|
|
4624
4630
|
/* @__PURE__ */ e(f, { className: "h-7 w-3/4" }),
|
|
4625
4631
|
/* @__PURE__ */ e(f, { className: "h-5 w-1/2 mt-2" })
|
|
@@ -4647,7 +4653,7 @@ function Bu({
|
|
|
4647
4653
|
/* @__PURE__ */ e(f, { className: "h-2 w-full" })
|
|
4648
4654
|
] })
|
|
4649
4655
|
] })
|
|
4650
|
-
] }) : /* @__PURE__ */ a(
|
|
4656
|
+
] }) : /* @__PURE__ */ a(Q, { children: [
|
|
4651
4657
|
/* @__PURE__ */ a(Z, { children: [
|
|
4652
4658
|
/* @__PURE__ */ a(fe, { className: "flex items-center gap-2", children: [
|
|
4653
4659
|
/* @__PURE__ */ e(ka, { className: "h-5 w-5 text-muted-foreground" }),
|
|
@@ -4700,7 +4706,7 @@ function zu({
|
|
|
4700
4706
|
isLoading: r
|
|
4701
4707
|
}) {
|
|
4702
4708
|
const n = t?.CreditLimit ?? 0, s = t?.OutstandingBalance ?? 0, i = n - s, l = Math.round(s / n * 100);
|
|
4703
|
-
return r ? /* @__PURE__ */ a(
|
|
4709
|
+
return r ? /* @__PURE__ */ a(Q, { children: [
|
|
4704
4710
|
/* @__PURE__ */ a(Z, { children: [
|
|
4705
4711
|
/* @__PURE__ */ e(f, { className: "h-7 w-3/4" }),
|
|
4706
4712
|
/* @__PURE__ */ e(f, { className: "h-5 w-1/2 mt-2" })
|
|
@@ -4728,7 +4734,7 @@ function zu({
|
|
|
4728
4734
|
/* @__PURE__ */ e(f, { className: "h-2 w-full" })
|
|
4729
4735
|
] })
|
|
4730
4736
|
] })
|
|
4731
|
-
] }) : /* @__PURE__ */ a(
|
|
4737
|
+
] }) : /* @__PURE__ */ a(Q, { children: [
|
|
4732
4738
|
/* @__PURE__ */ a(Z, { children: [
|
|
4733
4739
|
/* @__PURE__ */ a(fe, { className: "flex items-center gap-2", children: [
|
|
4734
4740
|
/* @__PURE__ */ e(Wa, { className: "h-5 w-5 text-muted-foreground" }),
|
|
@@ -4787,7 +4793,7 @@ function on({
|
|
|
4787
4793
|
return r ? (
|
|
4788
4794
|
// --- Loading Skeleton ---
|
|
4789
4795
|
// A simple skeleton representing the chart area and controls.
|
|
4790
|
-
/* @__PURE__ */ a(
|
|
4796
|
+
/* @__PURE__ */ a(Q, { className: v("w-full", i), children: [
|
|
4791
4797
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(f, { className: "h-7 w-48 rounded-md" }) }),
|
|
4792
4798
|
/* @__PURE__ */ a(G, { children: [
|
|
4793
4799
|
/* @__PURE__ */ e("div", { style: { height: s }, children: /* @__PURE__ */ e(f, { className: "h-full w-full rounded-md" }) }),
|
|
@@ -4800,7 +4806,7 @@ function on({
|
|
|
4800
4806
|
) : (
|
|
4801
4807
|
// --- Loaded Chart ---
|
|
4802
4808
|
// Renders the imported SalesChart component with all the necessary props.
|
|
4803
|
-
/* @__PURE__ */ a(
|
|
4809
|
+
/* @__PURE__ */ a(Q, { className: v("w-full", i), children: [
|
|
4804
4810
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: n === "week" ? "Weekly Sales Performance" : "Monthly Sales Performance" }) }),
|
|
4805
4811
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
4806
4812
|
la,
|
|
@@ -4846,7 +4852,7 @@ function Vu({
|
|
|
4846
4852
|
}) : x);
|
|
4847
4853
|
}, []), { NavigationGuardDialog: p } = ii(c), g = s ?? l;
|
|
4848
4854
|
return /* @__PURE__ */ a("div", { className: "@container", children: [
|
|
4849
|
-
u ? /* @__PURE__ */ e(
|
|
4855
|
+
u ? /* @__PURE__ */ e(Q, { className: "p-6", children: /* @__PURE__ */ a(Tt, { variant: "destructive", children: [
|
|
4850
4856
|
/* @__PURE__ */ e(Nt, { className: "h-4 w-4" }),
|
|
4851
4857
|
/* @__PURE__ */ e(Ot, { children: "Error" }),
|
|
4852
4858
|
/* @__PURE__ */ e(Et, { children: "There was an error loading your manufacturer information. Please try again later." })
|
|
@@ -4970,7 +4976,7 @@ function Uu(t) {
|
|
|
4970
4976
|
const { data: r, isLoading: n, isFetching: s } = Ss(
|
|
4971
4977
|
{ routeResellerId: t.appID, manufacturerId: t.manufID, categoryCode: t.categoryCode }
|
|
4972
4978
|
);
|
|
4973
|
-
return /* @__PURE__ */ e(
|
|
4979
|
+
return /* @__PURE__ */ e(Q, { className: "w-full", children: /* @__PURE__ */ e(G, { className: "p-4 space-y-1", children: /* @__PURE__ */ a(U, { children: [
|
|
4974
4980
|
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground mb-2", children: t.categoryName }),
|
|
4975
4981
|
/* @__PURE__ */ e(
|
|
4976
4982
|
la,
|
|
@@ -5042,7 +5048,7 @@ function qu({
|
|
|
5042
5048
|
isLoading: l = !1,
|
|
5043
5049
|
children: o
|
|
5044
5050
|
}) {
|
|
5045
|
-
return l ? /* @__PURE__ */ a(
|
|
5051
|
+
return l ? /* @__PURE__ */ a(Q, { children: [
|
|
5046
5052
|
/* @__PURE__ */ e(Z, { className: "pb-4", children: /* @__PURE__ */ a("div", { className: "flex items-start justify-between", children: [
|
|
5047
5053
|
/* @__PURE__ */ e("div", { className: "space-y-1 flex-1", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
5048
5054
|
/* @__PURE__ */ e("div", { className: "h-3 w-28 bg-muted rounded-md animate-pulse" }),
|
|
@@ -5075,7 +5081,7 @@ function qu({
|
|
|
5075
5081
|
] })
|
|
5076
5082
|
] })
|
|
5077
5083
|
] })
|
|
5078
|
-
] }) : /* @__PURE__ */ e(
|
|
5084
|
+
] }) : /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ a(G, { className: "grid grid-cols-[1fr_auto] items-start gap-4 pt-6", children: [
|
|
5079
5085
|
/* @__PURE__ */ a("div", { className: "flex flex-col items-start gap-4", children: [
|
|
5080
5086
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
5081
5087
|
/* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: "Category Name" }),
|
|
@@ -5620,7 +5626,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
|
|
|
5620
5626
|
variant: "destructive"
|
|
5621
5627
|
});
|
|
5622
5628
|
}, C = (S) => !S || S.trim() === "";
|
|
5623
|
-
return n ? /* @__PURE__ */ a(
|
|
5629
|
+
return n ? /* @__PURE__ */ a(Q, { children: [
|
|
5624
5630
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Public Information" }) }),
|
|
5625
5631
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
5626
5632
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4", children: [
|
|
@@ -5643,7 +5649,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
|
|
|
5643
5649
|
] }),
|
|
5644
5650
|
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e(f, { className: "h-10 w-20" }) })
|
|
5645
5651
|
] }) })
|
|
5646
|
-
] }) : /* @__PURE__ */ a(
|
|
5652
|
+
] }) : /* @__PURE__ */ a(Q, { children: [
|
|
5647
5653
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a(fe, { className: "text-1xl font-bold", children: [
|
|
5648
5654
|
"Public Information ",
|
|
5649
5655
|
s ? "(read only)" : ""
|
|
@@ -5799,7 +5805,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5799
5805
|
} finally {
|
|
5800
5806
|
O ? c(!1) : p(!1);
|
|
5801
5807
|
}
|
|
5802
|
-
}, [
|
|
5808
|
+
}, [q] = ks(), z = async () => {
|
|
5803
5809
|
if (!b || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b)) {
|
|
5804
5810
|
o({
|
|
5805
5811
|
title: "Invalid Email",
|
|
@@ -5810,7 +5816,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5810
5816
|
}
|
|
5811
5817
|
N(!0);
|
|
5812
5818
|
try {
|
|
5813
|
-
await
|
|
5819
|
+
await q({
|
|
5814
5820
|
routeResellerId: t,
|
|
5815
5821
|
emailAddress: b
|
|
5816
5822
|
}).unwrap(), o({
|
|
@@ -5829,7 +5835,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5829
5835
|
}
|
|
5830
5836
|
};
|
|
5831
5837
|
if (n)
|
|
5832
|
-
return /* @__PURE__ */ a(
|
|
5838
|
+
return /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
5833
5839
|
/* @__PURE__ */ e(Z, { className: "border-b p-6 md:p-5", children: /* @__PURE__ */ e(f, { className: "h-6 w-36" }) }),
|
|
5834
5840
|
/* @__PURE__ */ a(G, { className: "p-6 md:p-5", children: [
|
|
5835
5841
|
/* @__PURE__ */ a("div", { className: "grid sm:grid-cols-2 sm:divide-x divide-border", children: [
|
|
@@ -5856,7 +5862,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5856
5862
|
] });
|
|
5857
5863
|
const _ = !s;
|
|
5858
5864
|
return /* @__PURE__ */ a(U, { children: [
|
|
5859
|
-
/* @__PURE__ */ a(
|
|
5865
|
+
/* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
5860
5866
|
/* @__PURE__ */ e(Z, { className: "border-b p-6 md:p-5", children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Billing Overview" }) }),
|
|
5861
5867
|
/* @__PURE__ */ a(G, { className: "p-6 md:p-5", children: [
|
|
5862
5868
|
/* @__PURE__ */ a("div", { className: "grid sm:grid-cols-2 sm:divide-x divide-border", children: [
|
|
@@ -6074,7 +6080,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6074
6080
|
S(O);
|
|
6075
6081
|
const V = D(O);
|
|
6076
6082
|
L("PriceProfile", V, `Pricing profile updated to ${V}`, "Failed to update pricing profile");
|
|
6077
|
-
},
|
|
6083
|
+
}, q = async () => {
|
|
6078
6084
|
try {
|
|
6079
6085
|
const O = await c({ applicationId: s, fieldName: "Tier", newValue: h });
|
|
6080
6086
|
O.error ? l({ title: "Error", description: "Failed to update reseller", variant: "destructive" }) : O.data ? l({ title: "Success", description: `Pricing Tier changed to ${h}`, variant: "success" }) : l({ title: "Considered", description: "Request being considered", variant: "success" });
|
|
@@ -6091,7 +6097,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6091
6097
|
], _ = (O) => {
|
|
6092
6098
|
d(O), u(!0);
|
|
6093
6099
|
};
|
|
6094
|
-
return i ? /* @__PURE__ */ a(
|
|
6100
|
+
return i ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
6095
6101
|
/* @__PURE__ */ e(Z, { className: "pb-2", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
6096
6102
|
/* @__PURE__ */ e(f, { className: "h-6 w-28" }),
|
|
6097
6103
|
/* @__PURE__ */ e(f, { className: "h-6 w-16 rounded-full" })
|
|
@@ -6114,7 +6120,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6114
6120
|
] })
|
|
6115
6121
|
] })
|
|
6116
6122
|
] }) : /* @__PURE__ */ a(U, { children: [
|
|
6117
|
-
/* @__PURE__ */ a(
|
|
6123
|
+
/* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
6118
6124
|
/* @__PURE__ */ a(Z, { className: "pb-2 pt-4 px-4 flex flex-row items-center justify-between", children: [
|
|
6119
6125
|
/* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Account Tier" }),
|
|
6120
6126
|
/* @__PURE__ */ e(xe, { variant: "success", className: "text-xs", children: "Active" })
|
|
@@ -6182,8 +6188,8 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6182
6188
|
] })
|
|
6183
6189
|
] })
|
|
6184
6190
|
] }),
|
|
6185
|
-
/* @__PURE__ */ e(Yu, { isLoading: m, open: o, setOpen: u, tier: h, onTierChange:
|
|
6186
|
-
t && !r && /* @__PURE__ */ a(
|
|
6191
|
+
/* @__PURE__ */ e(Yu, { isLoading: m, open: o, setOpen: u, tier: h, onTierChange: q }),
|
|
6192
|
+
t && !r && /* @__PURE__ */ a(Q, { className: "mt-4", children: [
|
|
6187
6193
|
/* @__PURE__ */ e(Z, { className: "pb-2 pt-3 px-4", children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Admin Configuration" }) }),
|
|
6188
6194
|
/* @__PURE__ */ e(G, { className: "pt-2 px-4 pb-4", children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
6189
6195
|
/* @__PURE__ */ a("div", { className: "bg-muted/30 p-2 rounded-lg", children: [
|
|
@@ -6250,9 +6256,9 @@ function tm({ openOrders: t = [], isLoading: r = !1 }) {
|
|
|
6250
6256
|
amount: d
|
|
6251
6257
|
}
|
|
6252
6258
|
];
|
|
6253
|
-
return r ? /* @__PURE__ */ a(
|
|
6259
|
+
return r ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
6254
6260
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(f, { className: "h-7 w-40" }) }),
|
|
6255
|
-
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: [1, 2, 3, 4].map((w) => /* @__PURE__ */ e(
|
|
6261
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: [1, 2, 3, 4].map((w) => /* @__PURE__ */ e(Q, { className: "overflow-hidden rounded-md rounded-b-lg border-0 shadow-md", children: /* @__PURE__ */ a(G, { className: "p-0", children: [
|
|
6256
6262
|
/* @__PURE__ */ e("div", { className: "bg-border h-[3px]" }),
|
|
6257
6263
|
/* @__PURE__ */ a("div", { className: "p-6 border border-t-0", children: [
|
|
6258
6264
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-center mb-4", children: [
|
|
@@ -6271,9 +6277,9 @@ function tm({ openOrders: t = [], isLoading: r = !1 }) {
|
|
|
6271
6277
|
] })
|
|
6272
6278
|
] })
|
|
6273
6279
|
] }) }, w)) }) })
|
|
6274
|
-
] }) : /* @__PURE__ */ a(
|
|
6280
|
+
] }) : /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
6275
6281
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Order Categories" }) }),
|
|
6276
|
-
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: N.map((w) => /* @__PURE__ */ e(
|
|
6282
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-3.5", children: N.map((w) => /* @__PURE__ */ e(Q, { className: "overflow-hidden rounded-md rounded-b-lg border-0 shadow-md", children: /* @__PURE__ */ a(G, { className: "p-0", children: [
|
|
6277
6283
|
/* @__PURE__ */ e("div", { className: `${w.stripeClass} h-[3px]` }),
|
|
6278
6284
|
/* @__PURE__ */ a("div", { className: "p-6 border border-t-0", children: [
|
|
6279
6285
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-center mb-4", children: [
|
|
@@ -6362,7 +6368,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6362
6368
|
}
|
|
6363
6369
|
], $ = async (_) => {
|
|
6364
6370
|
b(_), _.id === "Products" && D("all"), A(!0);
|
|
6365
|
-
},
|
|
6371
|
+
}, q = async () => {
|
|
6366
6372
|
if (!(!x || !n))
|
|
6367
6373
|
try {
|
|
6368
6374
|
switch (x.id) {
|
|
@@ -6420,7 +6426,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6420
6426
|
});
|
|
6421
6427
|
}
|
|
6422
6428
|
}, z = d || m || u || l || w || g;
|
|
6423
|
-
return /* @__PURE__ */ a(
|
|
6429
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
6424
6430
|
/* @__PURE__ */ a(Z, { children: [
|
|
6425
6431
|
/* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Reports" }),
|
|
6426
6432
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Download essential business reports, from your Product List to your Order Details." })
|
|
@@ -6510,7 +6516,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6510
6516
|
/* @__PURE__ */ e(Ge, { children: "The report will take around 5 minutes to generate." }),
|
|
6511
6517
|
/* @__PURE__ */ a(Ke, { children: [
|
|
6512
6518
|
/* @__PURE__ */ e(E, { variant: "outline", onClick: () => A(!1), children: "Cancel" }),
|
|
6513
|
-
/* @__PURE__ */ e(E, { onClick:
|
|
6519
|
+
/* @__PURE__ */ e(E, { onClick: q, disabled: !y || z, children: z ? /* @__PURE__ */ a(U, { children: [
|
|
6514
6520
|
/* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
6515
6521
|
"Sending..."
|
|
6516
6522
|
] }) : "Send Report" })
|
|
@@ -6678,7 +6684,7 @@ function va({
|
|
|
6678
6684
|
{ skip: !o }
|
|
6679
6685
|
), w = N?.IsReseller;
|
|
6680
6686
|
if (l || !t)
|
|
6681
|
-
return /* @__PURE__ */ a(
|
|
6687
|
+
return /* @__PURE__ */ a(Q, { className: "flex flex-col h-full", children: [
|
|
6682
6688
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: [
|
|
6683
6689
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
6684
6690
|
/* @__PURE__ */ e(f, { className: "h-12 w-12 rounded-md" }),
|
|
@@ -6737,7 +6743,7 @@ function va({
|
|
|
6737
6743
|
});
|
|
6738
6744
|
}
|
|
6739
6745
|
};
|
|
6740
|
-
return /* @__PURE__ */ a(
|
|
6746
|
+
return /* @__PURE__ */ a(Q, { className: "flex flex-col h-full", children: [
|
|
6741
6747
|
/* @__PURE__ */ e(
|
|
6742
6748
|
cn,
|
|
6743
6749
|
{
|
|
@@ -6900,8 +6906,8 @@ function ui({
|
|
|
6900
6906
|
const { inventoryQuantity: k, totalIncomingQuantity: D } = ye(() => {
|
|
6901
6907
|
if (!A || A.length === 0)
|
|
6902
6908
|
return { inventoryQuantity: 0, totalIncomingQuantity: 0 };
|
|
6903
|
-
const $ = A.reduce((z, _) => z + (_.AvailableQuantity || 0), 0),
|
|
6904
|
-
return { inventoryQuantity: $, totalIncomingQuantity:
|
|
6909
|
+
const $ = A.reduce((z, _) => z + (_.AvailableQuantity || 0), 0), q = A.reduce((z, _) => z + (_.PurchaseOrderQuantity || 0), 0);
|
|
6910
|
+
return { inventoryQuantity: $, totalIncomingQuantity: q };
|
|
6905
6911
|
}, [A]);
|
|
6906
6912
|
if (w || x || y || C)
|
|
6907
6913
|
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ e(f, { className: v("h-10 w-36 rounded-md", i) }) });
|
|
@@ -7110,7 +7116,7 @@ function Za({
|
|
|
7110
7116
|
}
|
|
7111
7117
|
return u;
|
|
7112
7118
|
}, [r]), o = r || [];
|
|
7113
|
-
return n ? /* @__PURE__ */ a(
|
|
7119
|
+
return n ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
7114
7120
|
/* @__PURE__ */ a(Z, { children: [
|
|
7115
7121
|
" ",
|
|
7116
7122
|
/* @__PURE__ */ e(f, { className: "h-7 w-48" }),
|
|
@@ -7131,7 +7137,7 @@ function Za({
|
|
|
7131
7137
|
] })
|
|
7132
7138
|
] })
|
|
7133
7139
|
] })
|
|
7134
|
-
] }) : /* @__PURE__ */ a(
|
|
7140
|
+
] }) : /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
7135
7141
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: s }) }),
|
|
7136
7142
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: i, data: o, uniqueValues: l }) })
|
|
7137
7143
|
] });
|
|
@@ -7164,13 +7170,13 @@ function rm({
|
|
|
7164
7170
|
}, { skip: !t || !m }), [w, x] = T({
|
|
7165
7171
|
publicInfo: { hasUnsavedChanges: !1 }
|
|
7166
7172
|
}), b = ae(() => n ? !1 : w.publicInfo.hasUnsavedChanges, [n, w]), y = ae((I, $) => {
|
|
7167
|
-
x((
|
|
7168
|
-
...
|
|
7173
|
+
x((q) => q[I]?.hasUnsavedChanges !== $.hasUnsavedChanges ? {
|
|
7174
|
+
...q,
|
|
7169
7175
|
[I]: $
|
|
7170
|
-
} :
|
|
7176
|
+
} : q);
|
|
7171
7177
|
}, []), { NavigationGuardDialog: C } = ii(b), S = p ?? r, A = g && !S, k = N && !S, D = !n || !!S?.Statement && (S.Statement.Total ?? 0) !== 0, L = S?.QualifiedManufacturers ?? [], M = S?.Qualifications ?? [];
|
|
7172
7178
|
return /* @__PURE__ */ a("div", { className: "@container", children: [
|
|
7173
|
-
k ? /* @__PURE__ */ e(
|
|
7179
|
+
k ? /* @__PURE__ */ e(Q, { className: "p-6", children: /* @__PURE__ */ a(Tt, { variant: "destructive", children: [
|
|
7174
7180
|
/* @__PURE__ */ e(Nt, { className: "h-4 w-4" }),
|
|
7175
7181
|
/* @__PURE__ */ e(Ot, { children: "Error" }),
|
|
7176
7182
|
/* @__PURE__ */ e(Et, { children: "There was an error loading your reseller information. Please try again later." })
|
|
@@ -7223,7 +7229,7 @@ function rm({
|
|
|
7223
7229
|
isLoading: A
|
|
7224
7230
|
}
|
|
7225
7231
|
),
|
|
7226
|
-
A || L.length > 0 ? /* @__PURE__ */ a(
|
|
7232
|
+
A || L.length > 0 ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
7227
7233
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Manufacturers you are qualified for" }) }),
|
|
7228
7234
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid @lg:grid-cols-2 gap-4", children: A ? Array.from({ length: 2 }).map((I, $) => /* @__PURE__ */ e(va, { loading: !0 }, $)) : L.map((I) => /* @__PURE__ */ e(
|
|
7229
7235
|
va,
|
|
@@ -7542,7 +7548,7 @@ function sm({
|
|
|
7542
7548
|
className: s,
|
|
7543
7549
|
withAbout: i = !1
|
|
7544
7550
|
}) {
|
|
7545
|
-
return n || !t ? /* @__PURE__ */ a(
|
|
7551
|
+
return n || !t ? /* @__PURE__ */ a(Q, { className: `flex flex-col h-full ${s}`, children: [
|
|
7546
7552
|
/* @__PURE__ */ e(Z, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
7547
7553
|
/* @__PURE__ */ e(f, { className: "h-12 w-12 rounded-md" }),
|
|
7548
7554
|
/* @__PURE__ */ a("div", { children: [
|
|
@@ -7569,7 +7575,7 @@ function sm({
|
|
|
7569
7575
|
/* @__PURE__ */ e(f, { className: "h-9 w-32" }),
|
|
7570
7576
|
/* @__PURE__ */ e(f, { className: "h-9 w-48" })
|
|
7571
7577
|
] })
|
|
7572
|
-
] }) : /* @__PURE__ */ a(
|
|
7578
|
+
] }) : /* @__PURE__ */ a(Q, { className: `flex flex-col h-full ${s}`, children: [
|
|
7573
7579
|
/* @__PURE__ */ e(
|
|
7574
7580
|
cn,
|
|
7575
7581
|
{
|
|
@@ -7609,7 +7615,7 @@ function im({
|
|
|
7609
7615
|
loading: l = !1
|
|
7610
7616
|
}) {
|
|
7611
7617
|
if (l || !t)
|
|
7612
|
-
return /* @__PURE__ */ a(
|
|
7618
|
+
return /* @__PURE__ */ a(Q, { className: "flex flex-col h-full", children: [
|
|
7613
7619
|
/* @__PURE__ */ e(Z, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
7614
7620
|
/* @__PURE__ */ e(f, { className: "h-12 w-12 rounded-md" }),
|
|
7615
7621
|
/* @__PURE__ */ a("div", { children: [
|
|
@@ -7649,7 +7655,7 @@ function im({
|
|
|
7649
7655
|
const N = g.toLowerCase();
|
|
7650
7656
|
return N.includes("starter") || N.includes("basic") ? "secondary" : N.includes("exclusive") || N.includes("jean coutu") || N.includes("novexco") || N.includes("coopsco") ? "success" : "info";
|
|
7651
7657
|
};
|
|
7652
|
-
return /* @__PURE__ */ a(
|
|
7658
|
+
return /* @__PURE__ */ a(Q, { className: "flex flex-col h-full", children: [
|
|
7653
7659
|
/* @__PURE__ */ e(
|
|
7654
7660
|
cn,
|
|
7655
7661
|
{
|
|
@@ -7936,7 +7942,7 @@ function um({ orders: t, loading: r = !1 }) {
|
|
|
7936
7942
|
amount: n.delayed.amount
|
|
7937
7943
|
}
|
|
7938
7944
|
];
|
|
7939
|
-
return r ? /* @__PURE__ */ a(
|
|
7945
|
+
return r ? /* @__PURE__ */ a(Q, { className: "@container", children: [
|
|
7940
7946
|
/* @__PURE__ */ e(Z, { className: "pb-0", children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Active Orders" }) }),
|
|
7941
7947
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ a("div", { className: "overflow-hidden rounded-md border", children: [
|
|
7942
7948
|
/* @__PURE__ */ e("div", { className: "bg-border h-[3px]" }),
|
|
@@ -7957,7 +7963,7 @@ function um({ orders: t, loading: r = !1 }) {
|
|
|
7957
7963
|
] })
|
|
7958
7964
|
] })
|
|
7959
7965
|
] }, i)) })
|
|
7960
|
-
] }) : /* @__PURE__ */ a(
|
|
7966
|
+
] }) : /* @__PURE__ */ a(Q, { className: "@container", children: [
|
|
7961
7967
|
/* @__PURE__ */ e(Z, { className: "pb-0", children: /* @__PURE__ */ e(fe, { className: "text-base font-medium text-foreground", children: "Active Orders" }) }),
|
|
7962
7968
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4", children: s.map((i) => /* @__PURE__ */ a("div", { className: "overflow-hidden rounded-md border", children: [
|
|
7963
7969
|
/* @__PURE__ */ e("div", { className: `${i.stripeClass} h-[3px]` }),
|
|
@@ -8279,7 +8285,7 @@ async function Sm(t) {
|
|
|
8279
8285
|
if ((c === "post" || c === "put") && m.requestBody) {
|
|
8280
8286
|
const M = wm(m.requestBody), I = m.requestBody.description || bm;
|
|
8281
8287
|
if (M && Nm(M) && M.$ref.startsWith("#/components/schemas/")) {
|
|
8282
|
-
const $ = M.$ref.substring(21),
|
|
8288
|
+
const $ = M.$ref.substring(21), q = l.components.schemas[$], z = vm(q) ? q.properties : void 0, _ = z ? JSON.stringify(z) : "Refer to API schema for details.";
|
|
8283
8289
|
x[_a] = {
|
|
8284
8290
|
type: "string",
|
|
8285
8291
|
description: `${I}. Must be a JSON string with these properties: ${_}`
|
|
@@ -8308,10 +8314,10 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
|
|
|
8308
8314
|
const Qe = `{${Re}}`, We = M[Re];
|
|
8309
8315
|
We != null && (I = I.replace(Qe, encodeURIComponent(String(We))));
|
|
8310
8316
|
});
|
|
8311
|
-
const $ = At(I, n),
|
|
8317
|
+
const $ = At(I, n), q = localStorage.getItem("access_token"), z = {
|
|
8312
8318
|
method: c.toUpperCase(),
|
|
8313
8319
|
headers: {
|
|
8314
|
-
Authorization:
|
|
8320
|
+
Authorization: q ? `Bearer ${q}` : "",
|
|
8315
8321
|
"Content-Type": "application/json"
|
|
8316
8322
|
}
|
|
8317
8323
|
}, _ = new URLSearchParams();
|
|
@@ -8393,7 +8399,7 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8393
8399
|
}, [s, d]), K(() => {
|
|
8394
8400
|
D.current = w;
|
|
8395
8401
|
}, [w]);
|
|
8396
|
-
const
|
|
8402
|
+
const q = (H) => {
|
|
8397
8403
|
if (!H) return !1;
|
|
8398
8404
|
const Y = H, J = typeof Y.name == "string" ? Y.name : "", te = typeof Y.message == "string" ? Y.message : "", Ne = typeof Y.error == "string" ? Y.error : "";
|
|
8399
8405
|
return J === "AbortError" || Ne === "AbortError" || te.toLowerCase().includes("abort") || te.toLowerCase().includes("canceled");
|
|
@@ -8520,7 +8526,7 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8520
8526
|
}
|
|
8521
8527
|
i("");
|
|
8522
8528
|
} catch (J) {
|
|
8523
|
-
if (S.current = null, console.error("Error during AI interaction:", J), C.current ||
|
|
8529
|
+
if (S.current = null, console.error("Error during AI interaction:", J), C.current || q(J)) {
|
|
8524
8530
|
i("");
|
|
8525
8531
|
return;
|
|
8526
8532
|
}
|
|
@@ -8568,7 +8574,7 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8568
8574
|
const Me = { Role: "user", Parts: te }, Pe = [...D.current, Me];
|
|
8569
8575
|
x(Pe), D.current = Pe, J && L.current.set(J, Pe.length - 1), await me(Pe, 100);
|
|
8570
8576
|
} catch (te) {
|
|
8571
|
-
if (A.current = null, console.error("Error processing user request:", te), C.current ||
|
|
8577
|
+
if (A.current = null, console.error("Error processing user request:", te), C.current || q(te)) {
|
|
8572
8578
|
i("");
|
|
8573
8579
|
return;
|
|
8574
8580
|
}
|
|
@@ -8686,7 +8692,7 @@ ${B}`;
|
|
|
8686
8692
|
botMessages: M,
|
|
8687
8693
|
clearBotMessages: I,
|
|
8688
8694
|
botReady: $,
|
|
8689
|
-
debugMessages:
|
|
8695
|
+
debugMessages: q,
|
|
8690
8696
|
botStatus: z,
|
|
8691
8697
|
reset: _,
|
|
8692
8698
|
stop: O,
|
|
@@ -9110,7 +9116,7 @@ ${de}`
|
|
|
9110
9116
|
}, Ui = () => {
|
|
9111
9117
|
const F = {
|
|
9112
9118
|
messages: ua(),
|
|
9113
|
-
debug:
|
|
9119
|
+
debug: q
|
|
9114
9120
|
};
|
|
9115
9121
|
h(!0), m({
|
|
9116
9122
|
applicationId: t,
|
|
@@ -9187,7 +9193,7 @@ ${de}`
|
|
|
9187
9193
|
const Tn = ce(null);
|
|
9188
9194
|
K(() => {
|
|
9189
9195
|
Tn.current?.scrollIntoView({ behavior: "smooth" });
|
|
9190
|
-
}, [
|
|
9196
|
+
}, [q]);
|
|
9191
9197
|
const Fa = (() => {
|
|
9192
9198
|
if (!kt) return "Attach files";
|
|
9193
9199
|
const R = ee.slice(0, 5).map((B) => B.name).join(", "), F = $t > 5 ? ` +${$t - 5} more` : "";
|
|
@@ -9503,7 +9509,7 @@ ${de}`
|
|
|
9503
9509
|
"Developer Log"
|
|
9504
9510
|
] }),
|
|
9505
9511
|
/* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-xs font-mono", children: [
|
|
9506
|
-
/* @__PURE__ */ e(km, { debugMessages:
|
|
9512
|
+
/* @__PURE__ */ e(km, { debugMessages: q }),
|
|
9507
9513
|
/* @__PURE__ */ e("div", { ref: Tn })
|
|
9508
9514
|
] }) })
|
|
9509
9515
|
] }) : /* @__PURE__ */ a("div", { className: "flex-1 flex flex-col min-h-0", children: [
|
|
@@ -9799,10 +9805,10 @@ const Xn = [
|
|
|
9799
9805
|
{ id: "other-market", label: "Other (please specify)" }
|
|
9800
9806
|
];
|
|
9801
9807
|
function yi({ applicationId: t, manufacturer: r }) {
|
|
9802
|
-
const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [A, k] = T(""), [D, L] = T(""), [M, I] = T([]), [$,
|
|
9808
|
+
const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [A, k] = T(""), [D, L] = T(""), [M, I] = T([]), [$, q] = T(""), [z, _] = T(""), [O] = Ka(), V = () => {
|
|
9803
9809
|
c(""), p("");
|
|
9804
9810
|
}, se = () => {
|
|
9805
|
-
x(""), y(""), S([]), k(""), L(""), I([]),
|
|
9811
|
+
x(""), y(""), S([]), k(""), L(""), I([]), q(""), _("");
|
|
9806
9812
|
}, me = () => {
|
|
9807
9813
|
r.PartnerRegistrationLink ? i(!0) : r.OpenToWork && o(!0);
|
|
9808
9814
|
}, Ve = (ie) => {
|
|
@@ -9829,9 +9835,9 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9829
9835
|
}
|
|
9830
9836
|
}, Re = (ie) => {
|
|
9831
9837
|
if (ie.preventDefault(), g) return;
|
|
9832
|
-
y(""), k(""),
|
|
9838
|
+
y(""), k(""), q("");
|
|
9833
9839
|
let pe = !1;
|
|
9834
|
-
if (w.trim().length < 10 && (y("Please provide a brief description of your business (minimum 10 characters)"), pe = !0), C.length === 0 && (k("Please select at least one sales channel"), pe = !0), M.length === 0 && (
|
|
9840
|
+
if (w.trim().length < 10 && (y("Please provide a brief description of your business (minimum 10 characters)"), pe = !0), C.length === 0 && (k("Please select at least one sales channel"), pe = !0), M.length === 0 && (q("Please select at least one market"), pe = !0), pe) return;
|
|
9835
9841
|
const H = Xn.filter((te) => C.includes(te.id)).map((te) => te.label);
|
|
9836
9842
|
D && H.push(`Other: ${D}`);
|
|
9837
9843
|
const Y = es.filter((te) => M.includes(te.id)).map((te) => te.label);
|
|
@@ -9862,7 +9868,7 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9862
9868
|
}, Qe = (ie, pe) => {
|
|
9863
9869
|
S((H) => pe ? [...H, ie] : H.filter((Y) => Y !== ie)), k("");
|
|
9864
9870
|
}, Ue = (ie, pe) => {
|
|
9865
|
-
I((H) => pe ? [...H, ie] : H.filter((Y) => Y !== ie)),
|
|
9871
|
+
I((H) => pe ? [...H, ie] : H.filter((Y) => Y !== ie)), q("");
|
|
9866
9872
|
}, We = C.includes("other-channel"), Xe = M.includes("other-market");
|
|
9867
9873
|
return /* @__PURE__ */ a(U, { children: [
|
|
9868
9874
|
!r.Qualification && /* @__PURE__ */ a(E, { onClick: me, disabled: !r.PartnerRegistrationLink && !r.OpenToWork, children: [
|
|
@@ -10039,7 +10045,7 @@ function Lm({
|
|
|
10039
10045
|
Object.keys(b).length > 0 && r(b);
|
|
10040
10046
|
}
|
|
10041
10047
|
}, N = (b) => b === -1 ? "ASAP" : b === void 0 || b < 0 || b > 6 ? "Sunday" : Cr[b], w = (b) => b === "ASAP" ? -1 : Cr.indexOf(b), x = Object.keys(p()).length > 0;
|
|
10042
|
-
return /* @__PURE__ */ a(
|
|
10048
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
10043
10049
|
/* @__PURE__ */ a(Z, { children: [
|
|
10044
10050
|
n ? /* @__PURE__ */ e(f, { className: "h-8 w-32" }) : /* @__PURE__ */ e(fe, { className: "text-lg font-bold", children: "Reordering" }),
|
|
10045
10051
|
n ? /* @__PURE__ */ e(f, { className: "h-4 w-full mt-2" }) : /* @__PURE__ */ e(Ia, { className: "text-sm", children: "Adjust your reordering settings to control lead times, stocking weeks, minimum orders, and reorder dates, enhancing efficiency in restocking processes." })
|
|
@@ -10422,7 +10428,7 @@ function Vm({
|
|
|
10422
10428
|
N(V);
|
|
10423
10429
|
},
|
|
10424
10430
|
[A]
|
|
10425
|
-
), $ = P.useCallback(() => I(g - 1), [g, I]),
|
|
10431
|
+
), $ = P.useCallback(() => I(g - 1), [g, I]), q = P.useCallback(() => I(g + 1), [g, I]), z = P.useCallback(
|
|
10426
10432
|
(O) => {
|
|
10427
10433
|
if (!(A <= 1))
|
|
10428
10434
|
switch (O.key) {
|
|
@@ -10430,7 +10436,7 @@ function Vm({
|
|
|
10430
10436
|
O.preventDefault(), $();
|
|
10431
10437
|
break;
|
|
10432
10438
|
case "ArrowRight":
|
|
10433
|
-
O.preventDefault(),
|
|
10439
|
+
O.preventDefault(), q();
|
|
10434
10440
|
break;
|
|
10435
10441
|
case "Home":
|
|
10436
10442
|
O.preventDefault(), I(0);
|
|
@@ -10440,7 +10446,7 @@ function Vm({
|
|
|
10440
10446
|
break;
|
|
10441
10447
|
}
|
|
10442
10448
|
},
|
|
10443
|
-
[
|
|
10449
|
+
[q, $, I, A]
|
|
10444
10450
|
);
|
|
10445
10451
|
if (P.useEffect(() => {
|
|
10446
10452
|
if (!C?.length || A <= 1) return;
|
|
@@ -10535,7 +10541,7 @@ function Vm({
|
|
|
10535
10541
|
variant: "secondary",
|
|
10536
10542
|
size: "icon",
|
|
10537
10543
|
className: "absolute right-2 top-1/2 -translate-y-1/2 bg-background/80 text-foreground shadow-sm ring-1 ring-border/50 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",
|
|
10538
|
-
onClick:
|
|
10544
|
+
onClick: q,
|
|
10539
10545
|
"aria-label": "Next image",
|
|
10540
10546
|
children: /* @__PURE__ */ e(tr, { className: "h-4 w-4" })
|
|
10541
10547
|
}
|
|
@@ -10578,7 +10584,7 @@ function Wr({
|
|
|
10578
10584
|
customAction: u = /* @__PURE__ */ e(U, {}),
|
|
10579
10585
|
showUsdLabelOnCost: h = !1
|
|
10580
10586
|
}) {
|
|
10581
|
-
const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S, A] = T(!1), [k, D] = T(null), [L, M] = T("idle"), [I, $] = T(null), [
|
|
10587
|
+
const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S, A] = T(!1), [k, D] = T(null), [L, M] = T("idle"), [I, $] = T(null), [q] = Yo(), z = r?.Distribution?.Cost || 0, _ = r?.Distribution?.RegularPrice || 0, O = r?.Distribution?.Price || 0, V = !!(t && r?.RandmarSKU);
|
|
10582
10588
|
K(() => {
|
|
10583
10589
|
p(1), N(null), x(0);
|
|
10584
10590
|
}, [r?.RandmarSKU]), K(() => {
|
|
@@ -10606,7 +10612,7 @@ function Wr({
|
|
|
10606
10612
|
return (async () => {
|
|
10607
10613
|
M("summary"), $(null);
|
|
10608
10614
|
try {
|
|
10609
|
-
const Ie = await
|
|
10615
|
+
const Ie = await q({
|
|
10610
10616
|
routeApplicationId: t,
|
|
10611
10617
|
randmarSku: ge,
|
|
10612
10618
|
withSpecification: !1
|
|
@@ -10615,7 +10621,7 @@ function Wr({
|
|
|
10615
10621
|
if ("error" in Ie && Ie.error)
|
|
10616
10622
|
throw Ie.error;
|
|
10617
10623
|
D(Ie.data ?? null), M("detailed");
|
|
10618
|
-
const _e = await
|
|
10624
|
+
const _e = await q({
|
|
10619
10625
|
routeApplicationId: t,
|
|
10620
10626
|
randmarSku: ge,
|
|
10621
10627
|
withSpecification: !0
|
|
@@ -10631,10 +10637,10 @@ function Wr({
|
|
|
10631
10637
|
})(), () => {
|
|
10632
10638
|
j = !0;
|
|
10633
10639
|
};
|
|
10634
|
-
}, [t,
|
|
10640
|
+
}, [t, q, S, r?.RandmarSKU]);
|
|
10635
10641
|
const se = (j) => j >= 90 ? { label: "Top 10% Bestseller", color: "text-primary", bgColor: "bg-primary/10" } : j >= 75 ? { label: "Bestseller", color: "text-info", bgColor: "bg-info/10" } : j >= 33 ? { label: "Popular", color: "text-success", bgColor: "bg-success/10" } : { label: "Rising", color: "text-muted-foreground", bgColor: "bg-muted/30" }, me = L !== "complete" && L !== "error", Ve = L === "summary" ? 40 : L === "detailed" ? 80 : 10, Re = k?.SalesStatistics ?? [], Qe = me ? [] : Re, Ue = k?.RandmarTitle ?? r?.RandmarTitle ?? r?.RandmarSKU ?? "this product", We = k?.RandmarSKU ?? r?.RandmarSKU, Xe = t && r?.ManufacturerId ? `/${encodeURIComponent(t)}/Partner/${encodeURIComponent(r.ManufacturerId)}?tab=manufacturer-overview` : null;
|
|
10636
10642
|
if (!r)
|
|
10637
|
-
return /* @__PURE__ */ e(
|
|
10643
|
+
return /* @__PURE__ */ e(Q, { className: "flex h-full w-full flex-col", children: /* @__PURE__ */ a(G, { className: "flex h-full flex-col p-6", children: [
|
|
10638
10644
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-start mb-3", children: [
|
|
10639
10645
|
/* @__PURE__ */ e(f, { className: "h-7 w-3/4" }),
|
|
10640
10646
|
/* @__PURE__ */ e("div", { className: "h-10 w-24 flex items-center justify-end ml-4", children: /* @__PURE__ */ e(f, { className: "h-10 w-24 rounded-md" }) })
|
|
@@ -10752,7 +10758,7 @@ function Wr({
|
|
|
10752
10758
|
}));
|
|
10753
10759
|
};
|
|
10754
10760
|
return /* @__PURE__ */ a(U, { children: [
|
|
10755
|
-
/* @__PURE__ */ e(
|
|
10761
|
+
/* @__PURE__ */ e(Q, { className: "flex h-full w-full flex-col hover:shadow-lg transition-shadow @container", children: /* @__PURE__ */ a(G, { className: "flex h-full flex-col p-6", children: [
|
|
10756
10762
|
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-4", children: [
|
|
10757
10763
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-start mb-3", children: [
|
|
10758
10764
|
/* @__PURE__ */ e("h3", { className: "font-semibold text-xl", children: r.Title || r.RandmarTitle }),
|
|
@@ -11352,7 +11358,7 @@ function Ff({ reseller: t, actions: r, loading: n = !1 }) {
|
|
|
11352
11358
|
return n || !t ? /* @__PURE__ */ e(Qm, {}) : /* @__PURE__ */ e(Hm, { reseller: t, actions: r });
|
|
11353
11359
|
}
|
|
11354
11360
|
function Qm() {
|
|
11355
|
-
return /* @__PURE__ */ a(
|
|
11361
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
11356
11362
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: /* @__PURE__ */ e(f, { className: "h-6 w-40" }) }) }),
|
|
11357
11363
|
/* @__PURE__ */ a(G, { children: [
|
|
11358
11364
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4", children: [
|
|
@@ -11415,7 +11421,7 @@ function Hm({ reseller: t, actions: r }) {
|
|
|
11415
11421
|
color: "bg-info"
|
|
11416
11422
|
}
|
|
11417
11423
|
];
|
|
11418
|
-
return /* @__PURE__ */ a(
|
|
11424
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
11419
11425
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Billing Overview" }) }),
|
|
11420
11426
|
/* @__PURE__ */ a(G, { children: [
|
|
11421
11427
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4", children: [
|
|
@@ -11439,13 +11445,13 @@ function Hm({ reseller: t, actions: r }) {
|
|
|
11439
11445
|
] });
|
|
11440
11446
|
}
|
|
11441
11447
|
function Wm({ qualifications: t = [], loading: r = !1 }) {
|
|
11442
|
-
return r ? /* @__PURE__ */ a(
|
|
11448
|
+
return r ? /* @__PURE__ */ a(Q, { children: [
|
|
11443
11449
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Qualifications" }) }),
|
|
11444
11450
|
/* @__PURE__ */ e(G, { className: "p-6", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-2 @sm:grid-cols-3 @md:grid-cols-4 @lg:grid-cols-5 gap-4 gap-y-8", children: Array.from({ length: 10 }).map((n, s) => /* @__PURE__ */ a("div", { className: "flex flex-col items-center", children: [
|
|
11445
11451
|
/* @__PURE__ */ e(f, { className: "h-12 w-24 rounded-md mb-2" }),
|
|
11446
11452
|
/* @__PURE__ */ e(f, { className: "h-5 w-16 rounded-full" })
|
|
11447
11453
|
] }, s)) }) })
|
|
11448
|
-
] }) : /* @__PURE__ */ a(
|
|
11454
|
+
] }) : /* @__PURE__ */ a(Q, { children: [
|
|
11449
11455
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Qualifications" }) }),
|
|
11450
11456
|
/* @__PURE__ */ e(G, { children: t && t.length > 0 ? /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ e("div", { className: "flex grid grid-cols-2 @sm:grid-cols-3 @md:grid-cols-4 @lg:grid-cols-5 gap-4 gap-y-8", children: t.map((n, s) => /* @__PURE__ */ e(
|
|
11451
11457
|
Gm,
|
|
@@ -11467,7 +11473,7 @@ function $f({ salesData: t, salesStatistics: r = [], loading: n = !1 }) {
|
|
|
11467
11473
|
return n || !t ? /* @__PURE__ */ e(Km, {}) : /* @__PURE__ */ e(Ym, { salesData: t, salesStatistics: r });
|
|
11468
11474
|
}
|
|
11469
11475
|
function Km() {
|
|
11470
|
-
return /* @__PURE__ */ a(
|
|
11476
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
11471
11477
|
/* @__PURE__ */ e(Z, { className: "pb-0", children: /* @__PURE__ */ e(fe, { className: "text-lg @sm:text-xl", children: /* @__PURE__ */ e(f, { className: "h-7 w-40" }) }) }),
|
|
11472
11478
|
/* @__PURE__ */ a(G, { className: "pt-4 px-3 @sm:px-6", children: [
|
|
11473
11479
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3 gap-4", children: Array(3).fill(0).map((t, r) => /* @__PURE__ */ a("div", { className: "border rounded-lg p-4", children: [
|
|
@@ -11511,7 +11517,7 @@ function Ym({
|
|
|
11511
11517
|
color: "bg-success"
|
|
11512
11518
|
}
|
|
11513
11519
|
];
|
|
11514
|
-
return /* @__PURE__ */ a(
|
|
11520
|
+
return /* @__PURE__ */ a(Q, { children: [
|
|
11515
11521
|
/* @__PURE__ */ e(Z, { className: "pb-0", children: /* @__PURE__ */ e(fe, { className: "text-lg @sm:text-xl", children: "Sales Overview" }) }),
|
|
11516
11522
|
/* @__PURE__ */ a(G, { className: "pt-4 px-3 @sm:px-6", children: [
|
|
11517
11523
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3 gap-4", children: n.map((s, i) => /* @__PURE__ */ a("div", { className: "border rounded-lg p-4", children: [
|
|
@@ -11550,7 +11556,7 @@ function Bf({
|
|
|
11550
11556
|
...h
|
|
11551
11557
|
}) {
|
|
11552
11558
|
const d = P.Children.toArray(l).filter(Boolean);
|
|
11553
|
-
return /* @__PURE__ */ a(
|
|
11559
|
+
return /* @__PURE__ */ a(Q, { className: v("flex flex-col h-full overflow-hidden", u), ...h, children: [
|
|
11554
11560
|
/* @__PURE__ */ e(
|
|
11555
11561
|
"header",
|
|
11556
11562
|
{
|
|
@@ -12345,7 +12351,7 @@ function ki({
|
|
|
12345
12351
|
}
|
|
12346
12352
|
return o;
|
|
12347
12353
|
}, [r]), l = ye(() => r ? [...r].sort((u, h) => (h.ReturnNumber1 || h.ReturnNumber || "").localeCompare(u.ReturnNumber1 || u.ReturnNumber || "")) : [], [r]);
|
|
12348
|
-
return n ? /* @__PURE__ */ a(
|
|
12354
|
+
return n ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
12349
12355
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(f, { className: "h-7 w-48" }) }),
|
|
12350
12356
|
/* @__PURE__ */ a(G, { className: "space-y-4", children: [
|
|
12351
12357
|
/* @__PURE__ */ e(f, { className: "h-12 w-full rounded-md border" }),
|
|
@@ -12360,7 +12366,7 @@ function ki({
|
|
|
12360
12366
|
] })
|
|
12361
12367
|
] })
|
|
12362
12368
|
] })
|
|
12363
|
-
] }) : /* @__PURE__ */ a(
|
|
12369
|
+
] }) : /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
12364
12370
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-xl font-semibold text-foreground", children: "Returns" }) }),
|
|
12365
12371
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: s, data: l, uniqueValues: i }) })
|
|
12366
12372
|
] });
|
|
@@ -12871,10 +12877,10 @@ function qf({
|
|
|
12871
12877
|
O && x(O);
|
|
12872
12878
|
}
|
|
12873
12879
|
}, [m, p, n, w, g?.IsManufacturer]);
|
|
12874
|
-
const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product", A = p?.VoiceoverCaption || "", k = typeof p?.MAP == "number" && p.MAP > 0 ? p.MAP : typeof p?.Distribution?.MAP == "number" && p.Distribution.MAP > 0 ? p.Distribution.MAP : null, D = typeof p?.MSRP == "number" && p.MSRP > 0 ? p.MSRP : typeof p?.Distribution?.MSRP == "number" && p.Distribution.MSRP > 0 ? p.Distribution.MSRP : null, L = s ? p?.Opportunities?.find((z) => z.BidNumber === s)?.Price : null, M = typeof L == "number" && L > 0 ? L : typeof p?.Distribution?.Price == "number" && p.Distribution.Price > 0 ? p.Distribution.Price : null, I = C || typeof M == "number", $ = typeof k == "number" && typeof M == "number" ? k - M : null,
|
|
12880
|
+
const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product", A = p?.VoiceoverCaption || "", k = typeof p?.MAP == "number" && p.MAP > 0 ? p.MAP : typeof p?.Distribution?.MAP == "number" && p.Distribution.MAP > 0 ? p.Distribution.MAP : null, D = typeof p?.MSRP == "number" && p.MSRP > 0 ? p.MSRP : typeof p?.Distribution?.MSRP == "number" && p.Distribution.MSRP > 0 ? p.Distribution.MSRP : null, L = s ? p?.Opportunities?.find((z) => z.BidNumber === s)?.Price : null, M = typeof L == "number" && L > 0 ? L : typeof p?.Distribution?.Price == "number" && p.Distribution.Price > 0 ? p.Distribution.Price : null, I = C || typeof M == "number", $ = typeof k == "number" && typeof M == "number" ? k - M : null, q = typeof $ == "number" && typeof k == "number" && k > 0 ? Math.round($ / k * 100) : null;
|
|
12875
12881
|
return /* @__PURE__ */ a("div", { className: "@container", children: [
|
|
12876
12882
|
/* @__PURE__ */ a("div", { className: "grid gap-4 grid-cols-1 @md:grid-cols-3", children: [
|
|
12877
|
-
/* @__PURE__ */ a(
|
|
12883
|
+
/* @__PURE__ */ a(Q, { className: "@md:col-span-2", children: [
|
|
12878
12884
|
/* @__PURE__ */ a(Z, { className: "space-y-2", children: [
|
|
12879
12885
|
/* @__PURE__ */ e(fe, { className: "text-2xl font-semibold leading-tight", children: C && !p ? /* @__PURE__ */ e(f, { className: "h-7 w-2/3" }) : S }),
|
|
12880
12886
|
A ? /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: A }) : C && !p ? /* @__PURE__ */ e(f, { className: "h-4 w-4/5" }) : null
|
|
@@ -12886,7 +12892,7 @@ function qf({
|
|
|
12886
12892
|
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "Your Price" }),
|
|
12887
12893
|
/* @__PURE__ */ e("div", { className: "mt-1 text-3xl font-semibold tracking-tight", children: typeof M == "number" ? ue(M) : C ? /* @__PURE__ */ e(f, { className: "h-9 w-40" }) : null })
|
|
12888
12894
|
] }),
|
|
12889
|
-
typeof $ == "number" && typeof
|
|
12895
|
+
typeof $ == "number" && typeof q == "number" ? /* @__PURE__ */ a("div", { className: "flex flex-col items-start @sm:items-end", children: [
|
|
12890
12896
|
/* @__PURE__ */ a(
|
|
12891
12897
|
xe,
|
|
12892
12898
|
{
|
|
@@ -12899,7 +12905,7 @@ function qf({
|
|
|
12899
12905
|
]
|
|
12900
12906
|
}
|
|
12901
12907
|
),
|
|
12902
|
-
/* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: $ >= 0 ? `${
|
|
12908
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: $ >= 0 ? `${q}% margin vs MAP` : `${Math.abs(q)}% under MAP` })
|
|
12903
12909
|
] }) : null
|
|
12904
12910
|
] }) : null,
|
|
12905
12911
|
/* @__PURE__ */ e(ke, { children: /* @__PURE__ */ a("div", { className: `${I ? "mt-5" : "mt-0"} grid grid-cols-1 gap-4 @sm:grid-cols-2`, children: [
|
|
@@ -13104,7 +13110,7 @@ function qf({
|
|
|
13104
13110
|
}
|
|
13105
13111
|
) }) }),
|
|
13106
13112
|
/* @__PURE__ */ a(lt, { value: "purchase-orders-tab", children: [
|
|
13107
|
-
(p?.PurchaseOrders?.length ?? 0) > 0 && /* @__PURE__ */ a(
|
|
13113
|
+
(p?.PurchaseOrders?.length ?? 0) > 0 && /* @__PURE__ */ a(Q, { className: "mt-4 w-full", children: [
|
|
13108
13114
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Purchase Orders" }) }),
|
|
13109
13115
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
13110
13116
|
hh,
|
|
@@ -13115,7 +13121,7 @@ function qf({
|
|
|
13115
13121
|
}
|
|
13116
13122
|
) })
|
|
13117
13123
|
] }),
|
|
13118
|
-
(p?.Requisitions?.length ?? 0) > 0 && /* @__PURE__ */ a(
|
|
13124
|
+
(p?.Requisitions?.length ?? 0) > 0 && /* @__PURE__ */ a(Q, { className: "mt-4 w-full", children: [
|
|
13119
13125
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Draft Purchases" }) }),
|
|
13120
13126
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
13121
13127
|
fh,
|
|
@@ -13127,7 +13133,7 @@ function qf({
|
|
|
13127
13133
|
) })
|
|
13128
13134
|
] })
|
|
13129
13135
|
] }),
|
|
13130
|
-
/* @__PURE__ */ e(lt, { value: "warehouse-tab", children: (p?.Receipts?.length ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ a(
|
|
13136
|
+
/* @__PURE__ */ e(lt, { value: "warehouse-tab", children: (p?.Receipts?.length ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ a(Q, { className: "mt-4 w-full", children: [
|
|
13131
13137
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Receipts" }) }),
|
|
13132
13138
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
|
|
13133
13139
|
uh,
|
|
@@ -13138,7 +13144,7 @@ function qf({
|
|
|
13138
13144
|
}
|
|
13139
13145
|
) })
|
|
13140
13146
|
] }) }) }),
|
|
13141
|
-
/* @__PURE__ */ e(lt, { value: "logs-tab", children: (p?.Logs?.length ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ a(
|
|
13147
|
+
/* @__PURE__ */ e(lt, { value: "logs-tab", children: (p?.Logs?.length ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "mt-4", children: /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
13142
13148
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Logs" }) }),
|
|
13143
13149
|
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(bh, { logs: p?.Logs, loading: m }) })
|
|
13144
13150
|
] }) }) })
|
|
@@ -13195,7 +13201,7 @@ function Nh({
|
|
|
13195
13201
|
className: h
|
|
13196
13202
|
}) {
|
|
13197
13203
|
const c = `No Results "${t.trim()}"`, m = n.length > 0;
|
|
13198
|
-
return /* @__PURE__ */ a(
|
|
13204
|
+
return /* @__PURE__ */ a(Q, { className: v("w-full border-border bg-card", h), children: [
|
|
13199
13205
|
/* @__PURE__ */ a(Z, { className: "space-y-3", children: [
|
|
13200
13206
|
/* @__PURE__ */ e("div", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-muted text-muted-foreground", children: u ?? /* @__PURE__ */ e(Kl, { className: "h-5 w-5", "aria-hidden": "true" }) }),
|
|
13201
13207
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
@@ -13227,7 +13233,7 @@ function Hf({
|
|
|
13227
13233
|
contentClassName: o
|
|
13228
13234
|
}) {
|
|
13229
13235
|
const u = s ?? i;
|
|
13230
|
-
return /* @__PURE__ */ e("header", { className: v("w-full", l), children: /* @__PURE__ */ e(
|
|
13236
|
+
return /* @__PURE__ */ e("header", { className: v("w-full", l), children: /* @__PURE__ */ e(Q, { className: "rounded-2xl border-border shadow-sm", children: /* @__PURE__ */ a(
|
|
13231
13237
|
"div",
|
|
13232
13238
|
{
|
|
13233
13239
|
className: v(
|
|
@@ -13245,7 +13251,7 @@ function Hf({
|
|
|
13245
13251
|
) }) });
|
|
13246
13252
|
}
|
|
13247
13253
|
function wh() {
|
|
13248
|
-
return /* @__PURE__ */ a(
|
|
13254
|
+
return /* @__PURE__ */ a(Q, { className: "h-full border-border bg-card", children: [
|
|
13249
13255
|
/* @__PURE__ */ a("div", { className: "space-y-4 p-6", children: [
|
|
13250
13256
|
/* @__PURE__ */ e(f, { className: "h-5 w-3/5 bg-muted" }),
|
|
13251
13257
|
/* @__PURE__ */ e(f, { className: "h-4 w-full bg-muted" }),
|
|
@@ -13263,7 +13269,7 @@ function ss({ cardCount: t }) {
|
|
|
13263
13269
|
function is({ tableRows: t }) {
|
|
13264
13270
|
return /* @__PURE__ */ a("section", { className: "space-y-4", children: [
|
|
13265
13271
|
/* @__PURE__ */ e(f, { className: "h-6 w-56 bg-muted" }),
|
|
13266
|
-
/* @__PURE__ */ e(
|
|
13272
|
+
/* @__PURE__ */ e(Q, { className: "border-border bg-card p-4 sm:p-6", children: /* @__PURE__ */ a("div", { className: "overflow-hidden rounded-md border border-border", children: [
|
|
13267
13273
|
/* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-4 border-b border-border bg-muted/40 px-4 py-3", children: [
|
|
13268
13274
|
/* @__PURE__ */ e(f, { className: "col-span-4 h-4 w-3/4 bg-muted" }),
|
|
13269
13275
|
/* @__PURE__ */ e(f, { className: "col-span-3 h-4 w-2/3 bg-muted" }),
|
|
@@ -13518,7 +13524,7 @@ function Ah({
|
|
|
13518
13524
|
);
|
|
13519
13525
|
}
|
|
13520
13526
|
function Kf(t) {
|
|
13521
|
-
return /* @__PURE__ */ e(
|
|
13527
|
+
return /* @__PURE__ */ e(Q, { className: "max-w-6xl", children: /* @__PURE__ */ e(un, { className: "h-[40em]", userId: t.userId, userName: t.userName, initialPrompt: t.initialPrompt }) });
|
|
13522
13528
|
}
|
|
13523
13529
|
function Rr(t) {
|
|
13524
13530
|
if (!t || !Kr(t))
|
|
@@ -13606,7 +13612,7 @@ function Yf({
|
|
|
13606
13612
|
product: t,
|
|
13607
13613
|
viewProductLink: r
|
|
13608
13614
|
}) {
|
|
13609
|
-
return t ? /* @__PURE__ */ e(
|
|
13615
|
+
return t ? /* @__PURE__ */ e(Q, { className: "@container border-dashed border-2 hover:shadow-md transition-shadow h-full", children: /* @__PURE__ */ a(G, { className: "p-6 flex flex-col h-full", children: [
|
|
13610
13616
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-start mb-4 @[36rem]:hidden", children: [
|
|
13611
13617
|
/* @__PURE__ */ e("h3", { className: "font-semibold text-lg pr-4 text-center w-full", children: t.Title || t.RandmarTitle }),
|
|
13612
13618
|
/* @__PURE__ */ e("div", { className: "w-24 h-10 flex-shrink-0", children: /* @__PURE__ */ e(
|
|
@@ -13687,7 +13693,7 @@ function Yf({
|
|
|
13687
13693
|
] }) }) })
|
|
13688
13694
|
] })
|
|
13689
13695
|
] })
|
|
13690
|
-
] }) }) : /* @__PURE__ */ e(
|
|
13696
|
+
] }) }) : /* @__PURE__ */ e(Q, { className: "@container border-dashed border-2 h-full", children: /* @__PURE__ */ e(G, { className: "p-6 flex flex-col h-full", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-6 flex-grow @[36rem]:flex-row", children: [
|
|
13691
13697
|
/* @__PURE__ */ e("div", { className: "flex-shrink-0 @[36rem]:w-48", children: /* @__PURE__ */ e(f, { className: "aspect-square w-full h-auto" }) }),
|
|
13692
13698
|
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-4", children: [
|
|
13693
13699
|
/* @__PURE__ */ a("div", { className: "flex justify-between items-start", children: [
|
|
@@ -13844,10 +13850,10 @@ function Ri({
|
|
|
13844
13850
|
id: "statusInfo",
|
|
13845
13851
|
header: "Status",
|
|
13846
13852
|
cell: ({ row: D }) => {
|
|
13847
|
-
const L = D.original, M = L.Active === !0, I = Ih(L.EndDate), $ = M ? "success" : "secondary",
|
|
13853
|
+
const L = D.original, M = L.Active === !0, I = Ih(L.EndDate), $ = M ? "success" : "secondary", q = I.variant === "destructive" ? "destructive" : I.variant === "warning" ? "warning" : "secondary";
|
|
13848
13854
|
return /* @__PURE__ */ a("div", { className: "flex items-center space-x-2 min-w-[200px]", children: [
|
|
13849
13855
|
/* @__PURE__ */ e(xe, { variant: $, className: "font-medium", children: M ? "Active" : "Inactive" }),
|
|
13850
|
-
L.EndDate && /* @__PURE__ */ e(xe, { variant:
|
|
13856
|
+
L.EndDate && /* @__PURE__ */ e(xe, { variant: q, className: "font-medium", children: I.text }),
|
|
13851
13857
|
/* @__PURE__ */ e(ke, { delayDuration: 100, children: /* @__PURE__ */ a(we, { children: [
|
|
13852
13858
|
/* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(E, { variant: "ghost", size: "icon", className: "h-6 w-6 p-0 data-[state=delayed-open]:bg-accent data-[state=instant-open]:bg-accent", children: /* @__PURE__ */ e(ys, { className: "h-4 w-4 text-muted-foreground" }) }) }),
|
|
13853
13859
|
/* @__PURE__ */ e(ve, { side: "top", align: "center", className: "bg-popover text-popover-foreground p-2 rounded shadow-lg", children: /* @__PURE__ */ a("div", { className: "text-sm space-y-1", children: [
|
|
@@ -13879,18 +13885,18 @@ function Ri({
|
|
|
13879
13885
|
const L = D.original;
|
|
13880
13886
|
if (!L.BidNumber)
|
|
13881
13887
|
return /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Actions unavailable" });
|
|
13882
|
-
const M = L.BidNumber, I = i[M]?.isSettingDefault, $ = c?.BidNumber === M && i[M]?.isSendingReport,
|
|
13888
|
+
const M = L.BidNumber, I = i[M]?.isSettingDefault, $ = c?.BidNumber === M && i[M]?.isSendingReport, q = I || $, z = L.CanBeSetAsDefault === !0, _ = p?.IsManufacturer ? `/${t}/Opportunity/${L.BidNumber}` : `/${t}/Opportunity/${L.ManufacturerId}/${L.BidNumber}`;
|
|
13883
13889
|
return /* @__PURE__ */ a("div", { className: "flex space-x-2", children: [
|
|
13884
13890
|
/* @__PURE__ */ e(Te, { to: _, children: /* @__PURE__ */ a(E, { variant: "outline", size: "sm", className: "flex items-center", children: [
|
|
13885
13891
|
/* @__PURE__ */ e(Ga, { className: "mr-2 h-4 w-4" }),
|
|
13886
13892
|
" View"
|
|
13887
13893
|
] }) }),
|
|
13888
13894
|
p?.IsReseller && /* @__PURE__ */ a(U, { children: [
|
|
13889
|
-
/* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => w(L), disabled:
|
|
13895
|
+
/* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => w(L), disabled: q || !z, title: z ? "Set as default" : "This opportunity cannot be set as default", className: "flex items-center", children: [
|
|
13890
13896
|
I ? /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Ga, { className: "mr-2 h-4 w-4" }),
|
|
13891
13897
|
" Set Default"
|
|
13892
13898
|
] }),
|
|
13893
|
-
/* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => b(L), disabled:
|
|
13899
|
+
/* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => b(L), disabled: q, title: "Send report by email", className: "flex items-center", children: [
|
|
13894
13900
|
$ ? /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Xt, { className: "mr-2 h-4 w-4" }),
|
|
13895
13901
|
" Send Report"
|
|
13896
13902
|
] })
|
|
@@ -13921,7 +13927,7 @@ function Ri({
|
|
|
13921
13927
|
}
|
|
13922
13928
|
return D;
|
|
13923
13929
|
}, [r]), A = r || [], k = c?.BidNumber ? i[c.BidNumber]?.isSendingReport : !1;
|
|
13924
|
-
return n ? /* @__PURE__ */ a(
|
|
13930
|
+
return n ? /* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
13925
13931
|
/* @__PURE__ */ a(Z, { children: [
|
|
13926
13932
|
" ",
|
|
13927
13933
|
/* @__PURE__ */ e(f, { className: "h-7 w-48" }),
|
|
@@ -13944,7 +13950,7 @@ function Ri({
|
|
|
13944
13950
|
] })
|
|
13945
13951
|
] })
|
|
13946
13952
|
] }) : /* @__PURE__ */ a(U, { children: [
|
|
13947
|
-
/* @__PURE__ */ a(
|
|
13953
|
+
/* @__PURE__ */ a(Q, { className: "w-full", children: [
|
|
13948
13954
|
/* @__PURE__ */ a(Z, { children: [
|
|
13949
13955
|
" ",
|
|
13950
13956
|
/* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Opportunities" }),
|
|
@@ -14301,7 +14307,7 @@ export {
|
|
|
14301
14307
|
xe as Badge,
|
|
14302
14308
|
E as Button,
|
|
14303
14309
|
Ph as Calendar,
|
|
14304
|
-
|
|
14310
|
+
Q as Card,
|
|
14305
14311
|
G as CardContent,
|
|
14306
14312
|
Ia as CardDescription,
|
|
14307
14313
|
St as CardFooter,
|