randmarcomps 1.288.0 → 1.290.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 +30 -24
- package/dist/randmarcomps.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/randmarcomps.js
CHANGED
|
@@ -16884,8 +16884,14 @@ const emptySplitApi = createApi({
|
|
|
16884
16884
|
overrideExisting: !1
|
|
16885
16885
|
}), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountManufacturerQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, usePostV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberEmailMutation, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation, useGetV4PartnerByRouteApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation } = injectedRtkApi;
|
|
16886
16886
|
injectedRtkApi.enhanceEndpoints({
|
|
16887
|
-
addTagTypes: ["Cart", "Conversation", "Account", "Warehouse", "WarehouseList", "Users", "Integration", "Shopify", "Logs", "Manufacturer"],
|
|
16887
|
+
addTagTypes: ["Cart", "Conversation", "Account", "Unread", "Warehouse", "WarehouseList", "Users", "Integration", "Shopify", "Logs", "Manufacturer"],
|
|
16888
16888
|
endpoints: {
|
|
16889
|
+
getV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreads: {
|
|
16890
|
+
providesTags: ["Unread"]
|
|
16891
|
+
},
|
|
16892
|
+
postV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdRead: {
|
|
16893
|
+
invalidatesTags: ["Unread"]
|
|
16894
|
+
},
|
|
16889
16895
|
getV4PartnerByRouteApplicationIdBusinessDevelopmentConversations: {
|
|
16890
16896
|
providesTags: ["Conversation"]
|
|
16891
16897
|
},
|
|
@@ -60603,7 +60609,7 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60603
60609
|
] })
|
|
60604
60610
|
] }) })
|
|
60605
60611
|
] }),
|
|
60606
|
-
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: qe.findIndex((Ct) => Ct.partner1 === "2" || Ct.partner2 === "2") < 0 ? /* @__PURE__ */ jsx(Button, { className: "w-full", ref: A, onClick: () => Yt(), children: "Chat with Randmar" }, "b1") : /* @__PURE__ */ jsx("a", { target: "_blank", href: `https://dashboard.randmar.io/${t}/ExploreManufacturers`, children: /* @__PURE__ */ jsx(Button, { className: "w-full", children: "Explore manufacturers" }, "b2") }) }),
|
|
60612
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: qe.findIndex((Ct) => Ct.partner1 === "2" || Ct.partner2 === "2") < 0 ? /* @__PURE__ */ jsx(Button, { className: "w-full", ref: A, onClick: () => Yt(), children: "Chat with Randmar" }, "b1") : ge === "approved" && qe.length >= 5 ? null : /* @__PURE__ */ jsx("a", { target: "_blank", href: `https://dashboard.randmar.io/${t}/ExploreManufacturers`, children: /* @__PURE__ */ jsx(Button, { className: "w-full", children: "Explore manufacturers" }, "b2") }) }),
|
|
60607
60613
|
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: qe.length && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(ChatList, { userId: t, chats: Ht.filter((Ct) => Ct.partner1 != ASSISTANT_ID && Ct.partner2 != ASSISTANT_ID), activeChat: mt ?? null, onSelectChat: $e, assistantChat: qe.find((Ct) => Ct.partner1 == ASSISTANT_ID || Ct.partner2 == ASSISTANT_ID) }) }) })
|
|
60608
60614
|
] }) }),
|
|
60609
60615
|
/* @__PURE__ */ jsx("div", { className: "flex-5 flex flex-col", children: Ae ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -63499,50 +63505,50 @@ function PartnerRelationshipPage({
|
|
|
63499
63505
|
shopifyHostName: o,
|
|
63500
63506
|
isSuperAdmin: l
|
|
63501
63507
|
}) {
|
|
63502
|
-
var
|
|
63503
|
-
const { data: d, isLoading: f } = useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery({
|
|
63508
|
+
var O, q, z;
|
|
63509
|
+
const { data: d, isLoading: f, isFetching: g } = useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery({
|
|
63504
63510
|
routeApplicationId: t,
|
|
63505
63511
|
partnerId: e,
|
|
63506
63512
|
withSpecification: !0
|
|
63507
|
-
}), { toast:
|
|
63513
|
+
}), b = f || g, { toast: S } = useToast(), [_] = usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation(), [C, E] = useState(!1), [R, A] = useState(!1), I = async () => {
|
|
63508
63514
|
try {
|
|
63509
|
-
|
|
63515
|
+
E(!0), A(!1), await _({
|
|
63510
63516
|
routeResellerId: t ?? "",
|
|
63511
63517
|
manufacturerId: e ?? "",
|
|
63512
63518
|
shopifyHostName: o
|
|
63513
|
-
}).unwrap() &&
|
|
63519
|
+
}).unwrap() && S({
|
|
63514
63520
|
title: "Success",
|
|
63515
63521
|
description: "Manufacturer synced to Shopify successfully",
|
|
63516
63522
|
variant: "success"
|
|
63517
63523
|
});
|
|
63518
|
-
} catch (
|
|
63519
|
-
console.error("Error syncing to Shopify:",
|
|
63524
|
+
} catch (Q) {
|
|
63525
|
+
console.error("Error syncing to Shopify:", Q), S({
|
|
63520
63526
|
title: "Error",
|
|
63521
63527
|
description: "Error syncing manufacturer to Shopify.",
|
|
63522
63528
|
variant: "destructive"
|
|
63523
63529
|
});
|
|
63524
63530
|
} finally {
|
|
63525
|
-
|
|
63531
|
+
E(!1);
|
|
63526
63532
|
}
|
|
63527
|
-
},
|
|
63533
|
+
}, M = () => d != null && d.Reseller ? "reseller-overview" : d != null && d.Manufacturer ? "manufacturer-overview" : "";
|
|
63528
63534
|
return /* @__PURE__ */ jsxs("div", { className: "@container", children: [
|
|
63529
63535
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 @2xl:grid-cols-2", children: [
|
|
63530
63536
|
/* @__PURE__ */ jsx(
|
|
63531
63537
|
PartnerCard,
|
|
63532
63538
|
{
|
|
63533
63539
|
account: d,
|
|
63534
|
-
loading:
|
|
63540
|
+
loading: b,
|
|
63535
63541
|
withAbout: !0,
|
|
63536
63542
|
withVoice: !1,
|
|
63537
63543
|
action: " "
|
|
63538
63544
|
}
|
|
63539
63545
|
),
|
|
63540
63546
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-4", children: [
|
|
63541
|
-
((d == null ? void 0 : d.Manufacturer) ||
|
|
63547
|
+
((d == null ? void 0 : d.Manufacturer) || b) && /* @__PURE__ */ jsx(
|
|
63542
63548
|
ManufacturerCard,
|
|
63543
63549
|
{
|
|
63544
63550
|
manufacturer: d == null ? void 0 : d.Manufacturer,
|
|
63545
|
-
loading:
|
|
63551
|
+
loading: b,
|
|
63546
63552
|
mainAction: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
63547
63553
|
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(
|
|
63548
63554
|
ManufacturerGetStartedButton,
|
|
@@ -63551,8 +63557,8 @@ function PartnerRelationshipPage({
|
|
|
63551
63557
|
manufacturer: d == null ? void 0 : d.Manufacturer
|
|
63552
63558
|
}
|
|
63553
63559
|
),
|
|
63554
|
-
o && ((
|
|
63555
|
-
/* @__PURE__ */ jsx(DialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { className: "bg-green-600 hover:bg-green-700 ml-2", disabled:
|
|
63560
|
+
o && ((q = (O = d == null ? void 0 : d.Manufacturer) == null ? void 0 : O.Categories) == null ? void 0 : q.findIndex((Q) => Q.AvailableToBuy)) !== -1 && /* @__PURE__ */ jsxs(Dialog, { open: R, onOpenChange: A, children: [
|
|
63561
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { className: "bg-green-600 hover:bg-green-700 ml-2", disabled: C, children: C ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
63556
63562
|
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
63557
63563
|
"Syncing..."
|
|
63558
63564
|
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -63564,19 +63570,19 @@ function PartnerRelationshipPage({
|
|
|
63564
63570
|
/* @__PURE__ */ jsx(DialogTitle, { children: "Confirm Sync to Shopify" }),
|
|
63565
63571
|
/* @__PURE__ */ jsxs(DialogDescription, { children: [
|
|
63566
63572
|
'Are you sure you want to sync the manufacturer "',
|
|
63567
|
-
(
|
|
63573
|
+
(z = d == null ? void 0 : d.Manufacturer) == null ? void 0 : z.PublicName,
|
|
63568
63574
|
'" to Shopify? This will add all products from this manufacturer to your Shopify store.'
|
|
63569
63575
|
] })
|
|
63570
63576
|
] }),
|
|
63571
63577
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
63572
|
-
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () =>
|
|
63578
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => A(!1), children: "Cancel" }),
|
|
63573
63579
|
/* @__PURE__ */ jsx(
|
|
63574
63580
|
Button,
|
|
63575
63581
|
{
|
|
63576
63582
|
className: "bg-green-600 hover:bg-green-700",
|
|
63577
|
-
onClick:
|
|
63578
|
-
disabled:
|
|
63579
|
-
children:
|
|
63583
|
+
onClick: I,
|
|
63584
|
+
disabled: C,
|
|
63585
|
+
children: C ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
63580
63586
|
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
63581
63587
|
"Syncing..."
|
|
63582
63588
|
] }) : "Confirm Sync"
|
|
@@ -63588,10 +63594,10 @@ function PartnerRelationshipPage({
|
|
|
63588
63594
|
] })
|
|
63589
63595
|
}
|
|
63590
63596
|
),
|
|
63591
|
-
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(ResellerCard, { reseller: d == null ? void 0 : d.Reseller, loading:
|
|
63597
|
+
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(ResellerCard, { reseller: d == null ? void 0 : d.Reseller, loading: b })
|
|
63592
63598
|
] })
|
|
63593
63599
|
] }),
|
|
63594
|
-
((d == null ? void 0 : d.Reseller) || (d == null ? void 0 : d.Manufacturer)) && !
|
|
63600
|
+
((d == null ? void 0 : d.Reseller) || (d == null ? void 0 : d.Manufacturer)) && !b && /* @__PURE__ */ jsx("div", { className: "max-w-6xl mx-auto p-4", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: M(), className: "w-full", children: [
|
|
63595
63601
|
/* @__PURE__ */ jsxs(TabsList, { className: "inline-flex h-auto items-center justify-center rounded-none border-b bg-transparent p-0", children: [
|
|
63596
63602
|
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(
|
|
63597
63603
|
TabsTrigger,
|
|
@@ -63647,7 +63653,7 @@ function PartnerRelationshipPage({
|
|
|
63647
63653
|
}
|
|
63648
63654
|
) }) })
|
|
63649
63655
|
] }) }),
|
|
63650
|
-
|
|
63656
|
+
b && /* @__PURE__ */ jsx("div", { className: "max-w-6xl mx-auto p-4 mt-4 flex justify-center items-center h-32", children: /* @__PURE__ */ jsx(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" }) })
|
|
63651
63657
|
] });
|
|
63652
63658
|
}
|
|
63653
63659
|
const PublicInfo = ({ reseller: t, appID: e, isLoading: n, readonly: o, onUnsavedChanges: l }) => {
|