randmarcomps 1.218.0 → 1.222.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.d.ts +10 -0
- package/dist/randmarcomps.js +305 -8
- package/dist/randmarcomps.umd.cjs +17 -16
- package/package.json +1 -1
package/dist/randmarcomps.d.ts
CHANGED
|
@@ -469,6 +469,16 @@ declare interface PartnerCardProps {
|
|
|
469
469
|
withVoice?: boolean;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
+
export declare function PartnerRelationshipPage({ applicationId, partnerId, userEmail, shopifyHostName, isSuperAdmin, }: PartnerRelationshipPageProps): JSX.Element;
|
|
473
|
+
|
|
474
|
+
declare interface PartnerRelationshipPageProps {
|
|
475
|
+
applicationId: string;
|
|
476
|
+
partnerId: string;
|
|
477
|
+
userEmail: string;
|
|
478
|
+
shopifyHostName: string | undefined;
|
|
479
|
+
isSuperAdmin: boolean;
|
|
480
|
+
}
|
|
481
|
+
|
|
472
482
|
export declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
|
|
473
483
|
|
|
474
484
|
export declare const PopoverAnchor: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React_2.RefAttributes<HTMLDivElement>>;
|
package/dist/randmarcomps.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var Bn = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var pn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var jn = (e, t, n) => t in e ? Bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var Kt = (e, t, n) => jn(e, typeof t != "symbol" ? t + "" : t, n), Ln = (e, t, n) => t.has(e) ||
|
|
7
|
-
var Xt = (e, t, n) => (Ln(e, t, "read from private field"), n ? n.call(e) : t.get(e)), dr = (e, t, n) => t.has(e) ?
|
|
6
|
+
var Kt = (e, t, n) => jn(e, typeof t != "symbol" ? t + "" : t, n), Ln = (e, t, n) => t.has(e) || pn("Cannot " + n);
|
|
7
|
+
var Xt = (e, t, n) => (Ln(e, t, "read from private field"), n ? n.call(e) : t.get(e)), dr = (e, t, n) => t.has(e) ? pn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
8
8
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import React__default, { forwardRef, createElement, useState, useLayoutEffect, useEffect, createContext, useRef, useContext, useCallback, useDebugValue, useMemo, isValidElement, Children, PureComponent, useImperativeHandle, cloneElement, Component, Fragment as Fragment$1 } from "react";
|
|
@@ -18115,7 +18115,7 @@ const emptySplitApi = createApi2({
|
|
|
18115
18115
|
})
|
|
18116
18116
|
}),
|
|
18117
18117
|
overrideExisting: !1
|
|
18118
|
-
}), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, usePutV4ResellerByRouteResellerIdCommunicationMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, useGetV4PartnerByApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation } = injectedRtkApi;
|
|
18118
|
+
}), { useGetV4PartnerByApplicationIdAccountQuery, useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountLogoQuery, useGetV4PartnerByApplicationIdAccountLogoExistsQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, usePutV4ResellerByRouteResellerIdCommunicationMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation, useGetV4PartnerByApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation, useGetV4PartnerByApplicationIdPartnerAndPartnerIdQuery, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation } = injectedRtkApi;
|
|
18119
18119
|
injectedRtkApi.enhanceEndpoints({
|
|
18120
18120
|
addTagTypes: ["Conversations"],
|
|
18121
18121
|
endpoints: {
|
|
@@ -54296,6 +54296,8 @@ function SkeletonMessage({ botStatus: e }) {
|
|
|
54296
54296
|
] })
|
|
54297
54297
|
] });
|
|
54298
54298
|
}
|
|
54299
|
+
const toHTML = (e) => e.split(`
|
|
54300
|
+
`).map((t) => /* @__PURE__ */ jsx("p", { children: t }));
|
|
54299
54301
|
function ChatMessages({ messages: e, currentUserId: t, botStatus: n, isAssistantChat: o }) {
|
|
54300
54302
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
54301
54303
|
e.map((l) => {
|
|
@@ -54317,7 +54319,7 @@ function ChatMessages({ messages: e, currentUserId: t, botStatus: n, isAssistant
|
|
|
54317
54319
|
"rounded-md p-3 break-words [&_li]:ml-6 [&_li]:list-disc [&_h1]:text-lg [&_h1]:font-bold [&_h1]:mt-4 [&_h2]:font-bold [&_h2]:mt-4 [&_h3]:mt-4 ",
|
|
54318
54320
|
d ? "bg-primary text-white rounded-tr-none" : "bg-white border rounded-tl-none"
|
|
54319
54321
|
),
|
|
54320
|
-
children: l.fromPartnerID === ASSISTANT_ID ? parser(l.content) : l.content
|
|
54322
|
+
children: l.fromPartnerID === ASSISTANT_ID ? parser(l.content) : toHTML(l.content)
|
|
54321
54323
|
}
|
|
54322
54324
|
)
|
|
54323
54325
|
] })
|
|
@@ -58104,10 +58106,10 @@ Defaulting to 2020, but this will stop working in the future.`)), ne.ecmaVersion
|
|
|
58104
58106
|
var O = this.readWord1(), ne = j.name;
|
|
58105
58107
|
return this.keywords.test(O) && (ne = Q[O]), this.finishToken(ne, O);
|
|
58106
58108
|
};
|
|
58107
|
-
var
|
|
58109
|
+
var hn = "8.12.1";
|
|
58108
58110
|
rt.acorn = {
|
|
58109
58111
|
Parser: rt,
|
|
58110
|
-
version:
|
|
58112
|
+
version: hn,
|
|
58111
58113
|
defaultOptions: Xe,
|
|
58112
58114
|
Position: He,
|
|
58113
58115
|
SourceLocation: Ye,
|
|
@@ -58135,7 +58137,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ne.ecmaVersion
|
|
|
58135
58137
|
function Dn(O, ne) {
|
|
58136
58138
|
return rt.tokenizer(O, ne);
|
|
58137
58139
|
}
|
|
58138
|
-
n.Node = _r, n.Parser = rt, n.Position = He, n.SourceLocation = Ye, n.TokContext = rr, n.Token = Mr, n.TokenType = A, n.defaultOptions = Xe, n.getLineInfo = Ze, n.isIdentifierChar = I, n.isIdentifierStart = M, n.isNewLine = ie, n.keywordTypes = Q, n.lineBreak = te, n.lineBreakG = ae, n.nonASCIIwhitespace = oe, n.parse = On, n.parseExpressionAt = Vn, n.tokContexts = Jt, n.tokTypes = j, n.tokenizer = Dn, n.version =
|
|
58140
|
+
n.Node = _r, n.Parser = rt, n.Position = He, n.SourceLocation = Ye, n.TokContext = rr, n.Token = Mr, n.TokenType = A, n.defaultOptions = Xe, n.getLineInfo = Ze, n.isIdentifierChar = I, n.isIdentifierStart = M, n.isNewLine = ie, n.keywordTypes = Q, n.lineBreak = te, n.lineBreakG = ae, n.nonASCIIwhitespace = oe, n.parse = On, n.parseExpressionAt = Vn, n.tokContexts = Jt, n.tokTypes = j, n.tokenizer = Dn, n.version = hn;
|
|
58139
58141
|
});
|
|
58140
58142
|
}), require_acorn_jsx = __commonJS((e, t) => {
|
|
58141
58143
|
var n = require_xhtml(), o = /^[\da-fA-F]+$/, l = /^\d+$/, d = /* @__PURE__ */ new WeakMap();
|
|
@@ -69498,6 +69500,300 @@ function DataTable({ columns: e, data: t, uniqueValues: n }) {
|
|
|
69498
69500
|
] })
|
|
69499
69501
|
] });
|
|
69500
69502
|
}
|
|
69503
|
+
function ManufacturerCategories({ categories: e, activeCategory: t, onSelectCategory: n }) {
|
|
69504
|
+
return /* @__PURE__ */ jsx("div", { className: "grid", children: /* @__PURE__ */ jsx("div", { className: "flex overflow-x-auto small-scrollbar pb-4", children: /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: e.map((o) => /* @__PURE__ */ jsx(
|
|
69505
|
+
Button,
|
|
69506
|
+
{
|
|
69507
|
+
onClick: () => n(o.CategoryCode ?? ""),
|
|
69508
|
+
variant: t === o.CategoryCode ? "default" : "secondary",
|
|
69509
|
+
size: "sm",
|
|
69510
|
+
className: "px-3 py-1.5 text-xs whitespace-nowrap rounded-full",
|
|
69511
|
+
children: o.CategoryName
|
|
69512
|
+
},
|
|
69513
|
+
o.CategoryCode
|
|
69514
|
+
)) }) }) });
|
|
69515
|
+
}
|
|
69516
|
+
function ManufacturerProducts({
|
|
69517
|
+
applicationId: e,
|
|
69518
|
+
manufacturer: t,
|
|
69519
|
+
shopifyHostName: n
|
|
69520
|
+
}) {
|
|
69521
|
+
var Q, F, j, te;
|
|
69522
|
+
const [o] = usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation(), [l] = usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation(), [d, f] = useState(((F = (Q = t.Categories) == null ? void 0 : Q[0]) == null ? void 0 : F.CategoryCode) || ""), [g, b] = useState(null), [_, S] = useState(!1), [C, E] = useState(!1), { toast: R } = useToast(), {
|
|
69523
|
+
data: M,
|
|
69524
|
+
isLoading: I,
|
|
69525
|
+
isFetching: A
|
|
69526
|
+
} = useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery(
|
|
69527
|
+
{
|
|
69528
|
+
routeResellerId: e,
|
|
69529
|
+
manufacturerId: t.ManufacturerId,
|
|
69530
|
+
categoryCode: d ?? ""
|
|
69531
|
+
},
|
|
69532
|
+
{
|
|
69533
|
+
skip: !t.ManufacturerId || !d
|
|
69534
|
+
}
|
|
69535
|
+
), V = async (ae) => {
|
|
69536
|
+
try {
|
|
69537
|
+
b(ae), await o({
|
|
69538
|
+
routeResellerId: e,
|
|
69539
|
+
randmarSku: ae,
|
|
69540
|
+
shopifyHostName: n
|
|
69541
|
+
}).unwrap() && R({
|
|
69542
|
+
title: "Success",
|
|
69543
|
+
description: "Product synced to Shopify successfully",
|
|
69544
|
+
variant: "success"
|
|
69545
|
+
});
|
|
69546
|
+
} catch (ie) {
|
|
69547
|
+
console.error("Error syncing to Shopify:", ie), R({
|
|
69548
|
+
title: "Error",
|
|
69549
|
+
description: "Error syncing product to Shopify.",
|
|
69550
|
+
variant: "destructive"
|
|
69551
|
+
});
|
|
69552
|
+
} finally {
|
|
69553
|
+
b(null);
|
|
69554
|
+
}
|
|
69555
|
+
}, q = async () => {
|
|
69556
|
+
try {
|
|
69557
|
+
S(!0), E(!1), await l({
|
|
69558
|
+
routeResellerId: e,
|
|
69559
|
+
manufacturerId: t.ManufacturerId ?? "",
|
|
69560
|
+
categoryCode: d,
|
|
69561
|
+
shopifyHostName: n
|
|
69562
|
+
}).unwrap() && R({
|
|
69563
|
+
title: "Success",
|
|
69564
|
+
description: "Category synced to Shopify successfully",
|
|
69565
|
+
variant: "success"
|
|
69566
|
+
});
|
|
69567
|
+
} catch (ae) {
|
|
69568
|
+
console.error("Error syncing to Shopify:", ae), R({
|
|
69569
|
+
title: "Error",
|
|
69570
|
+
description: "Error syncing category to Shopify.",
|
|
69571
|
+
variant: "destructive"
|
|
69572
|
+
});
|
|
69573
|
+
} finally {
|
|
69574
|
+
S(!1);
|
|
69575
|
+
}
|
|
69576
|
+
}, z = () => {
|
|
69577
|
+
var ae, ie;
|
|
69578
|
+
return ((ie = (ae = t.Categories) == null ? void 0 : ae.find((se) => se.CategoryCode === d)) == null ? void 0 : ie.CategoryName) || d;
|
|
69579
|
+
};
|
|
69580
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69581
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
69582
|
+
/* @__PURE__ */ jsx(
|
|
69583
|
+
ManufacturerCategories,
|
|
69584
|
+
{
|
|
69585
|
+
categories: t.Categories || [],
|
|
69586
|
+
activeCategory: d,
|
|
69587
|
+
onSelectCategory: f
|
|
69588
|
+
}
|
|
69589
|
+
),
|
|
69590
|
+
n && ((j = t.Categories) == null ? void 0 : j.findIndex((ae) => ae.AvailableToBuy)) !== -1 && /* @__PURE__ */ jsxs(Dialog, { open: C, onOpenChange: E, children: [
|
|
69591
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { className: "bg-green-600 hover:bg-green-700", disabled: _, children: _ ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69592
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
69593
|
+
"Syncing..."
|
|
69594
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69595
|
+
/* @__PURE__ */ jsx(ShoppingCart, { className: "mr-2 h-4 w-4" }),
|
|
69596
|
+
"Sync Category to Shopify"
|
|
69597
|
+
] }) }) }),
|
|
69598
|
+
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
69599
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
69600
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: "Confirm Sync to Shopify" }),
|
|
69601
|
+
/* @__PURE__ */ jsxs(DialogDescription, { children: [
|
|
69602
|
+
'Are you sure you want to sync the category "',
|
|
69603
|
+
z(),
|
|
69604
|
+
'" to Shopify? This will add all products in this category to your Shopify store.'
|
|
69605
|
+
] })
|
|
69606
|
+
] }),
|
|
69607
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
69608
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => E(!1), children: "Cancel" }),
|
|
69609
|
+
/* @__PURE__ */ jsx(
|
|
69610
|
+
Button,
|
|
69611
|
+
{
|
|
69612
|
+
className: "bg-green-600 hover:bg-green-700",
|
|
69613
|
+
onClick: q,
|
|
69614
|
+
disabled: _,
|
|
69615
|
+
children: _ ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69616
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
69617
|
+
"Syncing..."
|
|
69618
|
+
] }) : "Confirm Sync"
|
|
69619
|
+
}
|
|
69620
|
+
)
|
|
69621
|
+
] })
|
|
69622
|
+
] })
|
|
69623
|
+
] })
|
|
69624
|
+
] }),
|
|
69625
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-4 mb-4", children: I || A ? Array.from({ length: 4 }).map((ae, ie) => /* @__PURE__ */ jsx(ProductCard, {}, ie)) : M != null && M.Products && (M == null ? void 0 : M.Products.length) > 0 ? (te = M == null ? void 0 : M.Products) == null ? void 0 : te.map((ae) => /* @__PURE__ */ jsx(
|
|
69626
|
+
ProductCard,
|
|
69627
|
+
{
|
|
69628
|
+
applicationId: e,
|
|
69629
|
+
item: ae,
|
|
69630
|
+
viewProductLink: `/${e}/Product/${ae.RandmarSKU}`,
|
|
69631
|
+
syncToShopify: !!n,
|
|
69632
|
+
isSyncToShopifyActionLoading: g === ae.RandmarSKU,
|
|
69633
|
+
syncToShopifyAction: () => ae.RandmarSKU && V(ae.RandmarSKU)
|
|
69634
|
+
},
|
|
69635
|
+
ae.RandmarSKU
|
|
69636
|
+
)) : /* @__PURE__ */ jsxs(Alert, { variant: "warning", children: [
|
|
69637
|
+
/* @__PURE__ */ jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
69638
|
+
/* @__PURE__ */ jsx(AlertTitle, { children: "Warning" }),
|
|
69639
|
+
/* @__PURE__ */ jsx(AlertDescription, { children: "No products found for this manufacturer category." })
|
|
69640
|
+
] }) })
|
|
69641
|
+
] });
|
|
69642
|
+
}
|
|
69643
|
+
function PartnerRelationshipPage({
|
|
69644
|
+
applicationId: e,
|
|
69645
|
+
partnerId: t,
|
|
69646
|
+
userEmail: n,
|
|
69647
|
+
shopifyHostName: o,
|
|
69648
|
+
isSuperAdmin: l
|
|
69649
|
+
}) {
|
|
69650
|
+
var I, A, V;
|
|
69651
|
+
const { data: d, isLoading: f } = useGetV4PartnerByApplicationIdPartnerAndPartnerIdQuery({
|
|
69652
|
+
applicationId: e,
|
|
69653
|
+
partnerId: t,
|
|
69654
|
+
withSpecification: !0
|
|
69655
|
+
}), { toast: g } = useToast(), [b] = usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation(), [_, S] = useState(!1), [C, E] = useState(!1), R = async () => {
|
|
69656
|
+
try {
|
|
69657
|
+
S(!0), E(!1), await b({
|
|
69658
|
+
routeResellerId: e ?? "",
|
|
69659
|
+
manufacturerId: t ?? "",
|
|
69660
|
+
shopifyHostName: o
|
|
69661
|
+
}).unwrap() && g({
|
|
69662
|
+
title: "Success",
|
|
69663
|
+
description: "Manufacturer synced to Shopify successfully",
|
|
69664
|
+
variant: "success"
|
|
69665
|
+
});
|
|
69666
|
+
} catch (q) {
|
|
69667
|
+
console.error("Error syncing to Shopify:", q), g({
|
|
69668
|
+
title: "Error",
|
|
69669
|
+
description: "Error syncing manufacturer to Shopify.",
|
|
69670
|
+
variant: "destructive"
|
|
69671
|
+
});
|
|
69672
|
+
} finally {
|
|
69673
|
+
S(!1);
|
|
69674
|
+
}
|
|
69675
|
+
}, M = () => d != null && d.Reseller ? "reseller-overview" : d != null && d.Manufacturer ? "manufacturer-overview" : "";
|
|
69676
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69677
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 grid-cols-1 md:grid-cols-2", children: [
|
|
69678
|
+
/* @__PURE__ */ jsx(
|
|
69679
|
+
PartnerCard,
|
|
69680
|
+
{
|
|
69681
|
+
account: d,
|
|
69682
|
+
loading: f,
|
|
69683
|
+
withAbout: !0,
|
|
69684
|
+
withVoice: !1,
|
|
69685
|
+
action: " "
|
|
69686
|
+
}
|
|
69687
|
+
),
|
|
69688
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-4", children: [
|
|
69689
|
+
((d == null ? void 0 : d.Manufacturer) || f) && /* @__PURE__ */ jsx(
|
|
69690
|
+
ManufacturerCard,
|
|
69691
|
+
{
|
|
69692
|
+
manufacturer: d == null ? void 0 : d.Manufacturer,
|
|
69693
|
+
loading: f,
|
|
69694
|
+
mainAction: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69695
|
+
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(
|
|
69696
|
+
ManufacturerGetStartedButton,
|
|
69697
|
+
{
|
|
69698
|
+
applicationId: e,
|
|
69699
|
+
manufacturer: d == null ? void 0 : d.Manufacturer
|
|
69700
|
+
}
|
|
69701
|
+
),
|
|
69702
|
+
o && ((A = (I = d == null ? void 0 : d.Manufacturer) == null ? void 0 : I.Categories) == null ? void 0 : A.findIndex((q) => q.AvailableToBuy)) !== -1 && /* @__PURE__ */ jsxs(Dialog, { open: C, onOpenChange: E, children: [
|
|
69703
|
+
/* @__PURE__ */ jsx(DialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { className: "bg-green-600 hover:bg-green-700 ml-2", disabled: _, children: _ ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69704
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
69705
|
+
"Syncing..."
|
|
69706
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69707
|
+
/* @__PURE__ */ jsx(ShoppingCart, { className: "mr-2 h-4 w-4" }),
|
|
69708
|
+
"Sync Manufacturer to Shopify"
|
|
69709
|
+
] }) }) }),
|
|
69710
|
+
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
69711
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
69712
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: "Confirm Sync to Shopify" }),
|
|
69713
|
+
/* @__PURE__ */ jsxs(DialogDescription, { children: [
|
|
69714
|
+
'Are you sure you want to sync the manufacturer "',
|
|
69715
|
+
(V = d == null ? void 0 : d.Manufacturer) == null ? void 0 : V.PublicName,
|
|
69716
|
+
'" to Shopify? This will add all products from this manufacturer to your Shopify store.'
|
|
69717
|
+
] })
|
|
69718
|
+
] }),
|
|
69719
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
69720
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => E(!1), children: "Cancel" }),
|
|
69721
|
+
/* @__PURE__ */ jsx(
|
|
69722
|
+
Button,
|
|
69723
|
+
{
|
|
69724
|
+
className: "bg-green-600 hover:bg-green-700",
|
|
69725
|
+
onClick: R,
|
|
69726
|
+
disabled: _,
|
|
69727
|
+
children: _ ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69728
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
69729
|
+
"Syncing..."
|
|
69730
|
+
] }) : "Confirm Sync"
|
|
69731
|
+
}
|
|
69732
|
+
)
|
|
69733
|
+
] })
|
|
69734
|
+
] })
|
|
69735
|
+
] })
|
|
69736
|
+
] })
|
|
69737
|
+
}
|
|
69738
|
+
),
|
|
69739
|
+
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(ResellerCard, { reseller: d == null ? void 0 : d.Reseller, loading: f })
|
|
69740
|
+
] })
|
|
69741
|
+
] }),
|
|
69742
|
+
((d == null ? void 0 : d.Reseller) || (d == null ? void 0 : d.Manufacturer)) && !f && /* @__PURE__ */ jsx("div", { className: "max-w-6xl mx-auto p-4", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: M(), className: "w-full", children: [
|
|
69743
|
+
/* @__PURE__ */ jsxs(TabsList, { className: "inline-flex h-auto items-center justify-center rounded-none border-b bg-transparent p-0", children: [
|
|
69744
|
+
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(
|
|
69745
|
+
TabsTrigger,
|
|
69746
|
+
{
|
|
69747
|
+
value: "reseller-overview",
|
|
69748
|
+
className: "reseller-theme relative h-12 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 text-sm font-medium text-muted-foreground shadow-none transition-none hover:text-foreground data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none cursor-pointer",
|
|
69749
|
+
children: "Reseller Overview"
|
|
69750
|
+
}
|
|
69751
|
+
),
|
|
69752
|
+
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(
|
|
69753
|
+
TabsTrigger,
|
|
69754
|
+
{
|
|
69755
|
+
value: "manufacturer-overview",
|
|
69756
|
+
className: "manufacturer-theme relative h-12 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 text-sm font-medium text-muted-foreground shadow-none transition-none hover:text-foreground data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none cursor-pointer",
|
|
69757
|
+
children: "Manufacturer Overview"
|
|
69758
|
+
}
|
|
69759
|
+
),
|
|
69760
|
+
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(
|
|
69761
|
+
TabsTrigger,
|
|
69762
|
+
{
|
|
69763
|
+
value: "products",
|
|
69764
|
+
className: "relative h-12 rounded-none border-b-2 border-b-transparent bg-transparent px-4 pb-3 pt-2 text-sm font-medium text-muted-foreground shadow-none transition-none hover:text-foreground data-[state=active]:border-b-primary data-[state=active]:text-foreground data-[state=active]:shadow-none cursor-pointer",
|
|
69765
|
+
children: "Products"
|
|
69766
|
+
}
|
|
69767
|
+
)
|
|
69768
|
+
] }),
|
|
69769
|
+
(d == null ? void 0 : d.Reseller) && /* @__PURE__ */ jsx(TabsContent, { value: "reseller-overview", children: /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
|
|
69770
|
+
ResellerOverview,
|
|
69771
|
+
{
|
|
69772
|
+
readonly: !0,
|
|
69773
|
+
appID: d.ApplicationId || "",
|
|
69774
|
+
reseller: d == null ? void 0 : d.Reseller,
|
|
69775
|
+
userEmail: n,
|
|
69776
|
+
isSuperAdmin: l,
|
|
69777
|
+
withoutReports: !0
|
|
69778
|
+
}
|
|
69779
|
+
) }) }),
|
|
69780
|
+
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(TabsContent, { value: "manufacturer-overview", children: /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxs(Alert, { variant: "info", children: [
|
|
69781
|
+
/* @__PURE__ */ jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
69782
|
+
/* @__PURE__ */ jsx(AlertTitle, { children: "Information" }),
|
|
69783
|
+
/* @__PURE__ */ jsx(AlertDescription, { children: "This feature is coming soon. Please try again later." })
|
|
69784
|
+
] }) }) }),
|
|
69785
|
+
(d == null ? void 0 : d.Manufacturer) && /* @__PURE__ */ jsx(TabsContent, { value: "products", children: /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(
|
|
69786
|
+
ManufacturerProducts,
|
|
69787
|
+
{
|
|
69788
|
+
applicationId: e,
|
|
69789
|
+
manufacturer: d.Manufacturer,
|
|
69790
|
+
shopifyHostName: o
|
|
69791
|
+
}
|
|
69792
|
+
) }) })
|
|
69793
|
+
] }) }),
|
|
69794
|
+
f && /* @__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" }) })
|
|
69795
|
+
] });
|
|
69796
|
+
}
|
|
69501
69797
|
export {
|
|
69502
69798
|
ActiveOrdersCard,
|
|
69503
69799
|
AiGeneratedContent,
|
|
@@ -69572,6 +69868,7 @@ export {
|
|
|
69572
69868
|
MultiSelect,
|
|
69573
69869
|
Navbar,
|
|
69574
69870
|
PartnerCard,
|
|
69871
|
+
PartnerRelationshipPage,
|
|
69575
69872
|
Popover,
|
|
69576
69873
|
PopoverAnchor,
|
|
69577
69874
|
PopoverContent,
|