randmarcomps 1.303.0 → 1.305.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.js +74 -36
- package/dist/randmarcomps.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/randmarcomps.js
CHANGED
|
@@ -16882,7 +16882,7 @@ const emptySplitApi = createApi({
|
|
|
16882
16882
|
})
|
|
16883
16883
|
}),
|
|
16884
16884
|
overrideExisting: !1
|
|
16885
|
-
}), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountManufacturerQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation,
|
|
16885
|
+
}), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountManufacturerQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation, useGetV4PartnerByRouteApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation } = injectedRtkApi;
|
|
16886
16886
|
injectedRtkApi.enhanceEndpoints({
|
|
16887
16887
|
addTagTypes: ["Cart", "Conversation", "Account", "Unread", "Warehouse", "WarehouseList", "Users", "Integration", "Shopify", "Logs", "Manufacturer"],
|
|
16888
16888
|
endpoints: {
|
|
@@ -62583,10 +62583,7 @@ function ManufacturerQualificationsSection({ manufacturer: t, readonly: e = !1,
|
|
|
62583
62583
|
] });
|
|
62584
62584
|
}
|
|
62585
62585
|
function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading: n }) {
|
|
62586
|
-
const { toast: o } = useToast(), [
|
|
62587
|
-
l,
|
|
62588
|
-
{ isLoading: d }
|
|
62589
|
-
] = usePostV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberEmailMutation(), [f, g] = useState(null), [b, S] = useState(e), [_, C] = useState(!1), E = [
|
|
62586
|
+
const { toast: o } = useToast(), [l, d] = useState(null), [f, g] = useState(e), [b, S] = useState(!1), _ = [
|
|
62590
62587
|
{
|
|
62591
62588
|
name: "Orders & Sales",
|
|
62592
62589
|
reports: [
|
|
@@ -62638,22 +62635,61 @@ function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading
|
|
|
62638
62635
|
}
|
|
62639
62636
|
]
|
|
62640
62637
|
}
|
|
62641
|
-
], R = async (
|
|
62642
|
-
|
|
62643
|
-
},
|
|
62644
|
-
if (!(!
|
|
62638
|
+
], [C, { isLoading: E }] = usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation(), [R, { isLoading: A }] = usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation(), [I, { isLoading: M }] = usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation(), [O, { isLoading: q }] = usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation(), [z, { isLoading: Q }] = usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation(), [j, { isLoading: F }] = usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation(), te = E || A || M || q || Q || F, ne = async (ge) => {
|
|
62639
|
+
d(ge), S(!0);
|
|
62640
|
+
}, oe = async () => {
|
|
62641
|
+
if (!(!l || !t))
|
|
62645
62642
|
try {
|
|
62646
|
-
|
|
62647
|
-
|
|
62648
|
-
|
|
62649
|
-
|
|
62650
|
-
|
|
62643
|
+
switch (l.id) {
|
|
62644
|
+
case "OpenOrders":
|
|
62645
|
+
await C({
|
|
62646
|
+
routeManufacturerId: t,
|
|
62647
|
+
emailAddress: f
|
|
62648
|
+
}).unwrap();
|
|
62649
|
+
break;
|
|
62650
|
+
case "Sales":
|
|
62651
|
+
await R({
|
|
62652
|
+
routeManufacturerId: t,
|
|
62653
|
+
emailAddress: f
|
|
62654
|
+
//startDate: "", //TODO?
|
|
62655
|
+
//endDate: "" //TODO?
|
|
62656
|
+
}).unwrap();
|
|
62657
|
+
break;
|
|
62658
|
+
case "PurchasedOrders":
|
|
62659
|
+
await I({
|
|
62660
|
+
routeManufacturerId: t,
|
|
62661
|
+
emailAddress: f
|
|
62662
|
+
}).unwrap();
|
|
62663
|
+
break;
|
|
62664
|
+
case "Reorder":
|
|
62665
|
+
O({
|
|
62666
|
+
routeManufacturerId: t,
|
|
62667
|
+
emailAddress: f
|
|
62668
|
+
}).unwrap();
|
|
62669
|
+
break;
|
|
62670
|
+
case "Inventory":
|
|
62671
|
+
z({
|
|
62672
|
+
routeManufacturerId: t,
|
|
62673
|
+
emailAddress: f
|
|
62674
|
+
//inventoryDate: "" //TODO?
|
|
62675
|
+
}).unwrap();
|
|
62676
|
+
break;
|
|
62677
|
+
case "Products":
|
|
62678
|
+
j({
|
|
62679
|
+
routeManufacturerId: t,
|
|
62680
|
+
emailAddress: f
|
|
62681
|
+
}).unwrap();
|
|
62682
|
+
break;
|
|
62683
|
+
default:
|
|
62684
|
+
throw new Error("invalid report id");
|
|
62685
|
+
}
|
|
62686
|
+
o({
|
|
62651
62687
|
title: "Report requested",
|
|
62652
|
-
description: `The ${
|
|
62688
|
+
description: `The ${l.title} will be sent to ${f} shortly.`,
|
|
62653
62689
|
variant: "success"
|
|
62654
|
-
}),
|
|
62655
|
-
} catch (
|
|
62656
|
-
console.error("Error requesting report:",
|
|
62690
|
+
}), S(!1);
|
|
62691
|
+
} catch (ge) {
|
|
62692
|
+
console.error("Error requesting report:", ge), o({
|
|
62657
62693
|
title: "Error",
|
|
62658
62694
|
description: "Failed to request report. Please try again.",
|
|
62659
62695
|
variant: "destructive"
|
|
@@ -62665,27 +62701,27 @@ function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading
|
|
|
62665
62701
|
/* @__PURE__ */ jsx(CardTitle, { className: "text-1xl font-bold", children: "Reports" }),
|
|
62666
62702
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Download essential business reports, from your Open Orders & Sales Report, to your Inventory Reports." })
|
|
62667
62703
|
] }),
|
|
62668
|
-
/* @__PURE__ */ jsx(CardContent, { className: "space-y-6", children: n ? /* @__PURE__ */ jsx(Fragment$1, { children: [1, 2, 3].map((
|
|
62704
|
+
/* @__PURE__ */ jsx(CardContent, { className: "space-y-6", children: n ? /* @__PURE__ */ jsx(Fragment$1, { children: [1, 2, 3].map((ge) => /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
62669
62705
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-48" }),
|
|
62670
|
-
[1, 2].map((
|
|
62706
|
+
[1, 2].map((se) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 p-4 border rounded-lg", children: [
|
|
62671
62707
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 rounded-full" }),
|
|
62672
62708
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
62673
62709
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-40 mb-2" }),
|
|
62674
62710
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" })
|
|
62675
62711
|
] }),
|
|
62676
62712
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-24" })
|
|
62677
|
-
] },
|
|
62678
|
-
] },
|
|
62679
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children:
|
|
62680
|
-
|
|
62713
|
+
] }, se))
|
|
62714
|
+
] }, ge)) }) : /* @__PURE__ */ jsx(Fragment$1, { children: _.map((ge) => /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
62715
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children: ge.name }),
|
|
62716
|
+
ge.reports.map((se) => /* @__PURE__ */ jsxs(
|
|
62681
62717
|
"div",
|
|
62682
62718
|
{
|
|
62683
62719
|
className: "flex items-start gap-4 p-4 border rounded-lg hover:bg-gray-100 transition-colors",
|
|
62684
62720
|
children: [
|
|
62685
|
-
/* @__PURE__ */ jsx("div", { className: "bg-primary/10 p-2 rounded-full", children: /* @__PURE__ */ jsx(
|
|
62721
|
+
/* @__PURE__ */ jsx("div", { className: "bg-primary/10 p-2 rounded-full", children: /* @__PURE__ */ jsx(se.icon, { className: "h-5 w-5 text-primary" }) }),
|
|
62686
62722
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
62687
|
-
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children:
|
|
62688
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children:
|
|
62723
|
+
/* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm", children: se.title }),
|
|
62724
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: se.description })
|
|
62689
62725
|
] }),
|
|
62690
62726
|
/* @__PURE__ */ jsxs(
|
|
62691
62727
|
Button,
|
|
@@ -62693,7 +62729,7 @@ function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading
|
|
|
62693
62729
|
variant: "outline",
|
|
62694
62730
|
size: "sm",
|
|
62695
62731
|
className: "flex items-center gap-1",
|
|
62696
|
-
onClick: () =>
|
|
62732
|
+
onClick: () => ne(se),
|
|
62697
62733
|
children: [
|
|
62698
62734
|
/* @__PURE__ */ jsx(Download, { className: "h-4 w-4" }),
|
|
62699
62735
|
"Request"
|
|
@@ -62702,14 +62738,14 @@ function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading
|
|
|
62702
62738
|
)
|
|
62703
62739
|
]
|
|
62704
62740
|
},
|
|
62705
|
-
|
|
62741
|
+
se.id
|
|
62706
62742
|
))
|
|
62707
|
-
] },
|
|
62708
|
-
/* @__PURE__ */ jsx(Dialog, { open:
|
|
62743
|
+
] }, ge.name)) }) }),
|
|
62744
|
+
/* @__PURE__ */ jsx(Dialog, { open: b, onOpenChange: S, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
62709
62745
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
62710
62746
|
/* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
62711
62747
|
"Request ",
|
|
62712
|
-
|
|
62748
|
+
l == null ? void 0 : l.title
|
|
62713
62749
|
] }),
|
|
62714
62750
|
/* @__PURE__ */ jsx(DialogDescription, { children: "Enter the email address where you would like to receive the report." })
|
|
62715
62751
|
] }),
|
|
@@ -62719,16 +62755,16 @@ function ManufacturerReportsSection({ manufacturerId: t, userEmail: e, isLoading
|
|
|
62719
62755
|
Input,
|
|
62720
62756
|
{
|
|
62721
62757
|
id: "email",
|
|
62722
|
-
value:
|
|
62723
|
-
onChange: (
|
|
62758
|
+
value: f,
|
|
62759
|
+
onChange: (ge) => g(ge.target.value),
|
|
62724
62760
|
placeholder: "your@email.com",
|
|
62725
62761
|
className: "mt-2"
|
|
62726
62762
|
}
|
|
62727
62763
|
)
|
|
62728
62764
|
] }),
|
|
62729
62765
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
62730
|
-
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () =>
|
|
62731
|
-
/* @__PURE__ */ jsx(Button, { onClick:
|
|
62766
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => S(!1), children: "Cancel" }),
|
|
62767
|
+
/* @__PURE__ */ jsx(Button, { onClick: oe, disabled: !f || te, children: te ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
62732
62768
|
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
62733
62769
|
"Sending..."
|
|
62734
62770
|
] }) : "Send Report" })
|
|
@@ -64882,6 +64918,7 @@ function ResellerOverview({
|
|
|
64882
64918
|
OrdersTable,
|
|
64883
64919
|
{
|
|
64884
64920
|
title: "Completed Orders",
|
|
64921
|
+
orders: A == null ? void 0 : A.CompletedOrderDetails,
|
|
64885
64922
|
loading: g
|
|
64886
64923
|
}
|
|
64887
64924
|
),
|
|
@@ -64889,6 +64926,7 @@ function ResellerOverview({
|
|
|
64889
64926
|
ReturnsTable,
|
|
64890
64927
|
{
|
|
64891
64928
|
applicationId: t,
|
|
64929
|
+
returns: A == null ? void 0 : A.Returns,
|
|
64892
64930
|
loading: g
|
|
64893
64931
|
}
|
|
64894
64932
|
),
|