@mercurjs/vendor 2.2.0-canary.39 → 2.2.0-canary.41
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/{[id]-XLUKGPLL.js → [id]-5OOWGWHL.js} +52 -17
- package/dist/{[id]-J5UPTFQM.js → [id]-5RQ7NFL7.js} +102 -27
- package/dist/{[id]-5P5LTATX.js → [id]-ARHFE7ID.js} +28 -10
- package/dist/{[id]-DVFWG6XZ.js → [id]-BGOV2BKI.js} +124 -30
- package/dist/{[id]-TGP6MMMJ.js → [id]-KUVSIFMW.js} +6 -6
- package/dist/{[id]-3PB4ZW3D.js → [id]-LFYUX6ON.js} +41 -19
- package/dist/{[id]-KSROQUIC.js → [id]-M6DVHCGK.js} +32 -15
- package/dist/{[id]-OG4D44M4.js → [id]-MFEOWOHY.js} +246 -156
- package/dist/{[id]-Q5C2MVHS.js → [id]-TF35KIFE.js} +123 -41
- package/dist/{[id]-O22LRQBI.js → [id]-WG6ZEK3I.js} +62 -25
- package/dist/{[id]-ESWNTTKU.js → [id]-YDR5VTPB.js} +6 -6
- package/dist/{[id]-ISKSMHND.js → [id]-ZV36X6E6.js} +52 -17
- package/dist/{add-C3MXH64T.js → add-PUXNN6CE.js} +15 -12
- package/dist/{add-JWIJVAMY.js → add-TCNRAUZF.js} +2 -2
- package/dist/{add-customer-groups-IPYD62GM.js → add-customer-groups-FB5T6PQN.js} +1 -1
- package/dist/{add-products-PEG6AWCO.js → add-products-DGJ6LFWC.js} +6 -6
- package/dist/{add-promotions-EGJYH3N6.js → add-promotions-TJDK7HLW.js} +4 -4
- package/dist/{areas-KGUPDMWG.js → areas-IYGBRCRH.js} +2 -2
- package/dist/{campaigns-BQBUZDPP.js → campaigns-OVHA6HH2.js} +2 -2
- package/dist/{categories-WKSXPHX6.js → categories-XVD4SWIS.js} +2 -2
- package/dist/{chunk-442JMKOJ.js → chunk-2K3RNFEC.js} +2 -2
- package/dist/{chunk-LRGMWXWW.js → chunk-3EF326ZJ.js} +16 -5
- package/dist/{chunk-6YE7WQLK.js → chunk-3F4MUPGR.js} +1 -1
- package/dist/{chunk-UFJQ7D4A.js → chunk-3N3K55NN.js} +34 -13
- package/dist/{chunk-XJSF7HIV.js → chunk-4TGDYJMA.js} +19 -8
- package/dist/{chunk-3ALBZK4M.js → chunk-4YM7N6OQ.js} +4 -1
- package/dist/{chunk-WADTVVSQ.js → chunk-5CHFC47S.js} +42 -11
- package/dist/{chunk-BAVE4NRL.js → chunk-7HLAOLG7.js} +1 -1
- package/dist/{chunk-X3ZH4SMS.js → chunk-BUQXFADV.js} +27 -6
- package/dist/{chunk-EGEC3BY2.js → chunk-CSZ6RV7N.js} +13 -6
- package/dist/{chunk-JAKAZ3ZY.js → chunk-D76WZZSB.js} +1 -1
- package/dist/{chunk-2UPEWY5I.js → chunk-E5BSLZR5.js} +10 -4
- package/dist/{chunk-FRYZRBLA.js → chunk-INYLPVCG.js} +2 -2
- package/dist/{chunk-MI7PXP7H.js → chunk-JY2XON7H.js} +1 -1
- package/dist/{chunk-2QEFRSKJ.js → chunk-KZQFIPY2.js} +37 -3
- package/dist/{chunk-CAE5333U.js → chunk-MAW6ZT3D.js} +1 -1
- package/dist/{chunk-H6LZ77GX.js → chunk-QGZH3D2P.js} +4 -1
- package/dist/{chunk-ZG6T4LG6.js → chunk-T7OX3EOG.js} +58 -29
- package/dist/{chunk-MUGQQY6P.js → chunk-TB3B7NEX.js} +48 -10
- package/dist/{chunk-EIEPLZ7H.js → chunk-TJKZ5QCJ.js} +1 -1
- package/dist/{chunk-BNR46M4J.js → chunk-TPGIMZLI.js} +1 -1
- package/dist/{chunk-KSVCLDMO.js → chunk-TRUC5GIG.js} +15 -4
- package/dist/{chunk-MGV65SKV.js → chunk-UEJJFJVX.js} +15 -5
- package/dist/{chunk-YMICE6QS.js → chunk-UWZVAW6K.js} +5 -3
- package/dist/{chunk-Q4W6OMSR.js → chunk-VD27SL7H.js} +1 -1
- package/dist/{chunk-NMPZRRHM.js → chunk-VMHLOWKL.js} +16 -6
- package/dist/{chunk-YZBEJ3CY.js → chunk-VYSB4CTB.js} +1500 -1370
- package/dist/{chunk-XRLRKSND.js → chunk-W3UHAQCV.js} +3 -2
- package/dist/{chunk-Q57UH7FE.js → chunk-WQQMCV7M.js} +1 -1
- package/dist/{chunk-IGVP55PK.js → chunk-WTYASKLY.js} +4 -4
- package/dist/{chunk-EAK75O26.js → chunk-Y4PM3IDZ.js} +1 -1
- package/dist/{chunk-2434FG47.js → chunk-YD43PVVT.js} +15 -4
- package/dist/{chunk-5KCDUBPF.js → chunk-ZOJP2DHA.js} +1 -1
- package/dist/{chunk-Y3WDFB7J.js → chunk-ZZUJHLFM.js} +1 -1
- package/dist/{collections-3N6NHNO3.js → collections-PRMRAQSQ.js} +5 -5
- package/dist/{create-2YMKREP2.js → create-2RGNAVVY.js} +1 -1
- package/dist/{create-RA6NUBNO.js → create-5S3GWAUX.js} +2 -2
- package/dist/{create-Q7PD6MKG.js → create-EAIGKLSC.js} +1 -1
- package/dist/{create-52MHLRAU.js → create-HEZYB7RF.js} +1 -1
- package/dist/{create-6JFEKPWB.js → create-KM5HXMYT.js} +7 -7
- package/dist/{create-XIZQBWH5.js → create-N534JQPH.js} +2 -2
- package/dist/{create-3NGK5I6L.js → create-NEK6JCKR.js} +1 -1
- package/dist/{create-FPIFC5TE.js → create-QU45XB4S.js} +12 -8
- package/dist/{create-QO72DNYF.js → create-QZDRRIB6.js} +5 -5
- package/dist/{create-OQX3EUET.js → create-RPBHXU32.js} +1 -1
- package/dist/{create-QMEQGDUS.js → create-VL7LDTVE.js} +1 -1
- package/dist/{customer-group-add-customers-3C2XPMSD.js → customer-group-add-customers-2C53NFBJ.js} +1 -1
- package/dist/{customer-group-detail-LUVO4MX6.js → customer-group-detail-3UR5AUY3.js} +2 -2
- package/dist/{customer-group-edit-N77RCW6I.js → customer-group-edit-WMGWG2OH.js} +40 -25
- package/dist/{customer-groups-FO6XVXFI.js → customer-groups-2T2HEYQ6.js} +25 -8
- package/dist/{customers-OQP7WC2G.js → customers-NVTX4FK2.js} +2 -2
- package/dist/{edit-ZNFDORB5.js → edit-4PMUQMTL.js} +2 -2
- package/dist/{edit-2BJHCU5E.js → edit-4PWAJ7A3.js} +1 -1
- package/dist/{edit-OZFW3BBS.js → edit-GE2UOMBI.js} +7 -7
- package/dist/{edit-UNN3QTEJ.js → edit-HK6HAYZW.js} +18 -5
- package/dist/{edit-T4IFCD3F.js → edit-IRH2IGXB.js} +3 -3
- package/dist/{edit-IJ6DCBUU.js → edit-JDYB3U7H.js} +21 -7
- package/dist/{edit-7SBPHN6P.js → edit-KEUVWNLU.js} +18 -5
- package/dist/{edit-WO4A636W.js → edit-NHQJLCAK.js} +1 -1
- package/dist/{edit-YCM5FRGL.js → edit-NR3WDBFF.js} +29 -13
- package/dist/{edit-XBOZLGI2.js → edit-TD7QFM4Z.js} +1 -1
- package/dist/{edit-TBT3QGGW.js → edit-WEUFBORT.js} +4 -5
- package/dist/{edit-ZJKNYVCO.js → edit-ZGAOUZYP.js} +4 -5
- package/dist/{edit-inventory-item-QMYWEBZ3.js → edit-inventory-item-UKBKVTYI.js} +18 -5
- package/dist/extension-targets.d.ts +206 -0
- package/dist/extension-targets.js +1 -0
- package/dist/{fulfillment-providers-XWFKXOUX.js → fulfillment-providers-SJRXA3EC.js} +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +155 -128
- package/dist/{inventory-ZGGENULY.js → inventory-MFA4C6TO.js} +2 -2
- package/dist/{invite-AXTW6P6L.js → invite-WTFQ6UV2.js} +3 -3
- package/dist/{login-YUWOWICV.js → login-2CQ6RYIE.js} +1 -1
- package/dist/{media-JVYMNE2Z.js → media-QIWRWMSV.js} +4 -4
- package/dist/{media-3ZLEAL6U.js → media-XFZNEQCY.js} +1 -1
- package/dist/{metadata-K6WS5S5Z.js → metadata-5Q6FLVX4.js} +1 -1
- package/dist/{metadata-NRYGXCD3.js → metadata-6OYHLPLA.js} +1 -1
- package/dist/{metadata-GTSYILV2.js → metadata-ADXGD4Y6.js} +1 -1
- package/dist/{metadata-O7TWMZNX.js → metadata-J447GEBP.js} +1 -1
- package/dist/{metadata-4LYZ5AJ2.js → metadata-VTQ2CGZX.js} +1 -1
- package/dist/{offer-create-page-PHG2PDUQ.js → offer-create-page-JP5Z2CAG.js} +18 -10
- package/dist/{offer-detail-page-RN4WECNF.js → offer-detail-page-FF7SJX7E.js} +70 -16
- package/dist/{offer-variant-detail-page-YQXETIWY.js → offer-variant-detail-page-KURNVWYU.js} +13 -5
- package/dist/{offers-4A6TNOBW.js → offers-XDLT2AEJ.js} +5 -5
- package/dist/{onboarding-TUGXFOA6.js → onboarding-BXFZZHIW.js} +31 -16
- package/dist/{orders-2RXDIAWC.js → orders-ML36IAEE.js} +4 -4
- package/dist/{organization-TBNIRH7N.js → organization-2BZGUGLM.js} +1 -1
- package/dist/pages/index.d.ts +81 -66
- package/dist/pages/index.js +31 -29
- package/dist/{payouts-TRFBXEDP.js → payouts-WFLYAMEU.js} +2 -2
- package/dist/{price-lists-2TEBUG7S.js → price-lists-PG33QKVZ.js} +2 -2
- package/dist/{product-tags-CSM2HUMF.js → product-tags-WBERDKIH.js} +7 -7
- package/dist/{product-types-CQ7OCF42.js → product-types-4PTJW5DE.js} +2 -2
- package/dist/{product-variant-edit-3CVSKGZ6.js → product-variant-edit-TUIVXPXO.js} +2 -2
- package/dist/{products-OE6AYPFI.js → products-CZMAHOE3.js} +6 -6
- package/dist/{products-I7XBRIVQ.js → products-ZFB35IHK.js} +15 -13
- package/dist/{promotions-CYAMHAJQ.js → promotions-APUOIWRR.js} +5 -5
- package/dist/{register-376SEOMZ.js → register-MQDAUF64.js} +2 -2
- package/dist/{reset-password-46WJA4HT.js → reset-password-SKUJJLSV.js} +1 -1
- package/dist/{return-reasons-2F2U6NEY.js → return-reasons-ZX7KIFTS.js} +5 -5
- package/dist/{settings-U7CM7PNQ.js → settings-AYPJWXFO.js} +9 -9
- package/dist/{shipping-profiles-HZFZ4HEU.js → shipping-profiles-4TJ4IH6U.js} +2 -2
- package/dist/{store-FQD3OYBF.js → store-FK643K5M.js} +52 -25
- package/dist/{store-select-S55SW3BP.js → store-select-IWYWXESC.js} +20 -2
- package/dist/{team-GHRVM6RK.js → team-DZHLNPCO.js} +3 -3
- package/package.json +23 -18
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-BWGPN6XV.js";
|
|
7
7
|
import {
|
|
8
8
|
StatusCell
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y4PM3IDZ.js";
|
|
10
10
|
import "./chunk-FMFVTERD.js";
|
|
11
11
|
import "./chunk-DB6ANJBO.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KZQFIPY2.js";
|
|
13
13
|
import {
|
|
14
14
|
NoRecords
|
|
15
15
|
} from "./chunk-634XVU3D.js";
|
|
@@ -57,12 +57,14 @@ var loader = async ({ params }) => {
|
|
|
57
57
|
// src/pages/promotions/[id]/promotion-detail-page.tsx
|
|
58
58
|
import { Children } from "react";
|
|
59
59
|
import { useLoaderData, useParams as useParams2 } from "react-router-dom";
|
|
60
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
60
61
|
|
|
61
62
|
// src/pages/promotions/[id]/_components/campaign-section/campaign-section.tsx
|
|
62
63
|
import { ArrowUpRightOnBox, PencilSquare } from "@medusajs/icons";
|
|
63
64
|
import { Container, Heading, Text } from "@medusajs/ui";
|
|
64
65
|
import { useTranslation } from "react-i18next";
|
|
65
66
|
import { useParams } from "react-router-dom";
|
|
67
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
66
68
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
67
69
|
var CampaignDetailSection = ({
|
|
68
70
|
campaign
|
|
@@ -120,15 +122,16 @@ var CampaignSection = ({
|
|
|
120
122
|
NoRecords,
|
|
121
123
|
{
|
|
122
124
|
className: "h-[180px] pt-4 text-center",
|
|
123
|
-
title: "
|
|
124
|
-
message: "
|
|
125
|
+
title: t("promotions.campaignSection.noRecordsTitle"),
|
|
126
|
+
message: t("promotions.campaignSection.noRecordsMessage"),
|
|
125
127
|
action: {
|
|
126
128
|
to: `/promotions/${id}/add-to-campaign`,
|
|
127
|
-
label: "
|
|
129
|
+
label: t("promotions.campaignSection.addToCampaign")
|
|
128
130
|
},
|
|
129
131
|
buttonVariant: "transparentIconLeft"
|
|
130
132
|
}
|
|
131
|
-
)
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ jsx(DisplayExtensionZone, { model: "promotion", zone: "campaign", data: campaign })
|
|
132
135
|
] });
|
|
133
136
|
};
|
|
134
137
|
|
|
@@ -136,6 +139,7 @@ var CampaignSection = ({
|
|
|
136
139
|
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
137
140
|
import { Badge as Badge2, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
|
|
138
141
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
142
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
139
143
|
|
|
140
144
|
// src/components/common/badge-list-summary/badge-list-summary.tsx
|
|
141
145
|
import { Badge, Tooltip, clx } from "@medusajs/ui";
|
|
@@ -258,7 +262,15 @@ var PromotionConditionsSection = ({
|
|
|
258
262
|
}
|
|
259
263
|
),
|
|
260
264
|
rules.map((rule) => /* @__PURE__ */ jsx3(RuleBlock, { rule }, `${rule.id}-${rule.attribute}`))
|
|
261
|
-
] })
|
|
265
|
+
] }),
|
|
266
|
+
/* @__PURE__ */ jsx3(
|
|
267
|
+
DisplayExtensionZone2,
|
|
268
|
+
{
|
|
269
|
+
model: "promotion",
|
|
270
|
+
zone: `conditions-${ruleType}`,
|
|
271
|
+
data: rules
|
|
272
|
+
}
|
|
273
|
+
)
|
|
262
274
|
] });
|
|
263
275
|
};
|
|
264
276
|
|
|
@@ -267,6 +279,7 @@ import { PencilSquare as PencilSquare3, Trash } from "@medusajs/icons";
|
|
|
267
279
|
import { Badge as Badge3, Container as Container3, Copy, Heading as Heading3, Text as Text2, usePrompt } from "@medusajs/ui";
|
|
268
280
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
269
281
|
import { useNavigate } from "react-router-dom";
|
|
282
|
+
import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
|
|
270
283
|
|
|
271
284
|
// src/lib/format-currency.ts
|
|
272
285
|
var formatCurrency = (amount, currency) => {
|
|
@@ -325,9 +338,18 @@ var PromotionGeneralSection = ({
|
|
|
325
338
|
const displayValue = getDisplayValue(promotion);
|
|
326
339
|
return /* @__PURE__ */ jsxs4(Container3, { className: "divide-y p-0", children: [
|
|
327
340
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
328
|
-
/* @__PURE__ */ jsx4("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx4(Heading3, { children: promotion.code }) }),
|
|
341
|
+
/* @__PURE__ */ jsx4("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx4(DisplayField, { model: "promotion", zone: "general", id: "code", data: promotion, children: /* @__PURE__ */ jsx4(Heading3, { children: promotion.code }) }) }),
|
|
329
342
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
|
|
330
|
-
/* @__PURE__ */ jsx4(
|
|
343
|
+
/* @__PURE__ */ jsx4(
|
|
344
|
+
DisplayField,
|
|
345
|
+
{
|
|
346
|
+
model: "promotion",
|
|
347
|
+
zone: "general",
|
|
348
|
+
id: "status",
|
|
349
|
+
data: promotion,
|
|
350
|
+
children: /* @__PURE__ */ jsx4(StatusCell, { promotion })
|
|
351
|
+
}
|
|
352
|
+
),
|
|
331
353
|
/* @__PURE__ */ jsx4(
|
|
332
354
|
ActionMenu,
|
|
333
355
|
{
|
|
@@ -355,45 +377,105 @@ var PromotionGeneralSection = ({
|
|
|
355
377
|
)
|
|
356
378
|
] })
|
|
357
379
|
] }),
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
380
|
+
/* @__PURE__ */ jsx4(
|
|
381
|
+
DisplayField,
|
|
382
|
+
{
|
|
383
|
+
model: "promotion",
|
|
384
|
+
zone: "general",
|
|
385
|
+
id: "is_automatic",
|
|
386
|
+
data: promotion,
|
|
387
|
+
children: /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
388
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.method") }),
|
|
389
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "text-pretty", children: promotion.is_automatic ? t("promotions.form.method.automatic.title") : t("promotions.form.method.code.title") })
|
|
390
|
+
] })
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ jsx4(
|
|
394
|
+
DisplayField,
|
|
395
|
+
{
|
|
396
|
+
model: "promotion",
|
|
397
|
+
zone: "general",
|
|
398
|
+
id: "code_value",
|
|
399
|
+
data: promotion,
|
|
400
|
+
children: /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
401
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("fields.code") }),
|
|
402
|
+
/* @__PURE__ */ jsx4(
|
|
403
|
+
Copy,
|
|
372
404
|
{
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
children:
|
|
405
|
+
content: promotion.code,
|
|
406
|
+
className: "text-ui-tag-neutral-text",
|
|
407
|
+
asChild: true,
|
|
408
|
+
children: /* @__PURE__ */ jsx4(
|
|
409
|
+
Badge3,
|
|
410
|
+
{
|
|
411
|
+
size: "2xsmall",
|
|
412
|
+
rounded: "full",
|
|
413
|
+
className: "cursor-pointer text-pretty",
|
|
414
|
+
children: promotion.code
|
|
415
|
+
}
|
|
416
|
+
)
|
|
377
417
|
}
|
|
378
418
|
)
|
|
419
|
+
] })
|
|
420
|
+
}
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ jsx4(DisplayField, { model: "promotion", zone: "general", id: "type", data: promotion, children: /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
423
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.type") }),
|
|
424
|
+
/* @__PURE__ */ jsx4(
|
|
425
|
+
Text2,
|
|
426
|
+
{
|
|
427
|
+
size: "small",
|
|
428
|
+
leading: "compact",
|
|
429
|
+
className: "text-pretty capitalize",
|
|
430
|
+
children: promotion.type
|
|
379
431
|
}
|
|
380
432
|
)
|
|
381
|
-
] }),
|
|
382
|
-
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
383
|
-
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.type") }),
|
|
384
|
-
/* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "text-pretty capitalize", children: promotion.type })
|
|
385
|
-
] }),
|
|
386
|
-
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
433
|
+
] }) }),
|
|
434
|
+
/* @__PURE__ */ jsx4(DisplayField, { model: "promotion", zone: "general", id: "value", data: promotion, children: /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
387
435
|
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.value") }),
|
|
388
436
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
|
|
389
437
|
/* @__PURE__ */ jsx4(Text2, { className: "inline", size: "small", leading: "compact", children: displayValue || "-" }),
|
|
390
438
|
promotion?.application_method?.type === "fixed" && /* @__PURE__ */ jsx4(Badge3, { size: "2xsmall", rounded: "full", children: promotion?.application_method?.currency_code?.toUpperCase() })
|
|
391
439
|
] })
|
|
392
|
-
] }),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
440
|
+
] }) }),
|
|
441
|
+
/* @__PURE__ */ jsx4(
|
|
442
|
+
DisplayField,
|
|
443
|
+
{
|
|
444
|
+
model: "promotion",
|
|
445
|
+
zone: "general",
|
|
446
|
+
id: "allocation",
|
|
447
|
+
data: promotion,
|
|
448
|
+
children: /* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
449
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", children: t("promotions.fields.allocation") }),
|
|
450
|
+
/* @__PURE__ */ jsx4(
|
|
451
|
+
Text2,
|
|
452
|
+
{
|
|
453
|
+
size: "small",
|
|
454
|
+
leading: "compact",
|
|
455
|
+
className: "text-pretty capitalize",
|
|
456
|
+
children: promotion.application_method?.allocation
|
|
457
|
+
}
|
|
458
|
+
)
|
|
459
|
+
] })
|
|
460
|
+
}
|
|
461
|
+
),
|
|
462
|
+
/* @__PURE__ */ jsx4(
|
|
463
|
+
DisplayExtensionZone3,
|
|
464
|
+
{
|
|
465
|
+
model: "promotion",
|
|
466
|
+
zone: "general",
|
|
467
|
+
data: promotion,
|
|
468
|
+
builtInFieldIds: [
|
|
469
|
+
"code",
|
|
470
|
+
"status",
|
|
471
|
+
"is_automatic",
|
|
472
|
+
"code_value",
|
|
473
|
+
"type",
|
|
474
|
+
"value",
|
|
475
|
+
"allocation"
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
)
|
|
397
479
|
] });
|
|
398
480
|
};
|
|
399
481
|
|
|
@@ -411,7 +493,7 @@ var Root = ({ children }) => {
|
|
|
411
493
|
if (isLoading || !promotion)
|
|
412
494
|
return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1, showJSON: true });
|
|
413
495
|
return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: promotion, hasOutlet: true, children: [
|
|
414
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "promotions.detail.main", data: promotion, children: [
|
|
415
497
|
/* @__PURE__ */ jsx5(PromotionGeneralSection, { promotion }),
|
|
416
498
|
/* @__PURE__ */ jsx5(PromotionConditionsSection, { rules: rules || [], ruleType: "rules" }),
|
|
417
499
|
/* @__PURE__ */ jsx5(
|
|
@@ -428,8 +510,8 @@ var Root = ({ children }) => {
|
|
|
428
510
|
ruleType: "buy-rules"
|
|
429
511
|
}
|
|
430
512
|
)
|
|
431
|
-
] }),
|
|
432
|
-
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(CampaignSection, { campaign: promotion.campaign }) })
|
|
513
|
+
] }) }),
|
|
514
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(WidgetZone, { id: "promotions.detail.side", data: promotion, children: /* @__PURE__ */ jsx5(CampaignSection, { campaign: promotion.campaign }) }) })
|
|
433
515
|
] }) });
|
|
434
516
|
};
|
|
435
517
|
var PromotionDetailPage = Object.assign(Root, {
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-LYYM7H7H.js";
|
|
10
10
|
import {
|
|
11
11
|
useProductTableColumns
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-WQQMCV7M.js";
|
|
13
|
+
import "./chunk-7HLAOLG7.js";
|
|
14
14
|
import {
|
|
15
15
|
useProductTableQuery
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QGZH3D2P.js";
|
|
17
17
|
import "./chunk-FWPGOIFA.js";
|
|
18
18
|
import "./chunk-DB6ANJBO.js";
|
|
19
19
|
import "./chunk-PHOCVOZ5.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
21
21
|
import {
|
|
22
22
|
_DataTable,
|
|
23
23
|
useDataTable
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-W3UHAQCV.js";
|
|
25
25
|
import "./chunk-YN3FGNJM.js";
|
|
26
26
|
import "./chunk-KCHYLLVG.js";
|
|
27
27
|
import "./chunk-634XVU3D.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-YV6MK4PZ.js";
|
|
31
31
|
import "./chunk-THHRRYRS.js";
|
|
32
32
|
import "./chunk-LRD242C7.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-VYSB4CTB.js";
|
|
34
34
|
import "./chunk-WIYFXWRI.js";
|
|
35
35
|
import {
|
|
36
36
|
Skeleton,
|
|
@@ -91,33 +91,64 @@ var loader = async ({ params }) => {
|
|
|
91
91
|
// src/pages/categories/[id]/category-detail-page.tsx
|
|
92
92
|
import { Children } from "react";
|
|
93
93
|
import { useParams } from "react-router-dom";
|
|
94
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
94
95
|
|
|
95
96
|
// src/pages/categories/[id]/_components/category-general-section/category-general-section.tsx
|
|
96
97
|
import { Container, Heading, Text } from "@medusajs/ui";
|
|
98
|
+
import { DisplayExtensionZone, DisplayField } from "@mercurjs/dashboard-shared";
|
|
97
99
|
import { useTranslation } from "react-i18next";
|
|
98
100
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
101
|
+
var GENERAL_FIELD_IDS = ["name", "description", "handle"];
|
|
99
102
|
var CategoryGeneralSection = ({
|
|
100
103
|
category
|
|
101
104
|
}) => {
|
|
102
105
|
const { t } = useTranslation();
|
|
103
106
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
104
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { children: category.name }) }),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
/* @__PURE__ */ jsx(DisplayField, { model: "category", zone: "general", id: "name", data: category, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { children: category.name }) }) }),
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
DisplayField,
|
|
110
|
+
{
|
|
111
|
+
model: "category",
|
|
112
|
+
zone: "general",
|
|
113
|
+
id: "description",
|
|
114
|
+
data: category,
|
|
115
|
+
children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 gap-3 px-6 py-4", children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.description") }),
|
|
117
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: category.description || "-" })
|
|
118
|
+
] })
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsx(
|
|
122
|
+
DisplayField,
|
|
123
|
+
{
|
|
124
|
+
model: "category",
|
|
125
|
+
zone: "general",
|
|
126
|
+
id: "handle",
|
|
127
|
+
data: category,
|
|
128
|
+
children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 gap-3 px-6 py-4", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.handle") }),
|
|
130
|
+
/* @__PURE__ */ jsxs(Text, { size: "small", leading: "compact", children: [
|
|
131
|
+
"/",
|
|
132
|
+
category.handle
|
|
133
|
+
] })
|
|
134
|
+
] })
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
DisplayExtensionZone,
|
|
139
|
+
{
|
|
140
|
+
model: "category",
|
|
141
|
+
zone: "general",
|
|
142
|
+
data: category,
|
|
143
|
+
builtInFieldIds: GENERAL_FIELD_IDS
|
|
144
|
+
}
|
|
145
|
+
)
|
|
116
146
|
] });
|
|
117
147
|
};
|
|
118
148
|
|
|
119
149
|
// src/pages/categories/[id]/_components/category-icon-section/category-icon-section.tsx
|
|
120
150
|
import { Container as Container2, Heading as Heading2, Text as Text2 } from "@medusajs/ui";
|
|
151
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
121
152
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
122
153
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
123
154
|
var CategoryIconSection = ({
|
|
@@ -147,13 +178,14 @@ var CategoryIconSection = ({
|
|
|
147
178
|
}
|
|
148
179
|
),
|
|
149
180
|
/* @__PURE__ */ jsx2(Text2, { size: "small", className: "text-ui-fg-muted", children: t("categories.icon.empty.description") })
|
|
150
|
-
] }) })
|
|
181
|
+
] }) }),
|
|
182
|
+
/* @__PURE__ */ jsx2(DisplayExtensionZone2, { model: "category", zone: "icon", data: category })
|
|
151
183
|
] });
|
|
152
184
|
};
|
|
153
185
|
|
|
154
186
|
// src/pages/categories/[id]/_components/category-media-section/category-media-section.tsx
|
|
155
187
|
import { ThumbnailBadge } from "@medusajs/icons";
|
|
156
|
-
import { ListBadge } from "@mercurjs/dashboard-shared";
|
|
188
|
+
import { DisplayExtensionZone as DisplayExtensionZone3, ListBadge } from "@mercurjs/dashboard-shared";
|
|
157
189
|
import { Container as Container3, Heading as Heading3, Text as Text3, Tooltip } from "@medusajs/ui";
|
|
158
190
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
159
191
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -197,13 +229,15 @@ var CategoryMediaSection = ({
|
|
|
197
229
|
}
|
|
198
230
|
),
|
|
199
231
|
/* @__PURE__ */ jsx3(Text3, { size: "small", className: "text-ui-fg-muted", children: t("categories.media.empty.description") })
|
|
200
|
-
] }) })
|
|
232
|
+
] }) }),
|
|
233
|
+
/* @__PURE__ */ jsx3(DisplayExtensionZone3, { model: "category", zone: "media", data: category })
|
|
201
234
|
] });
|
|
202
235
|
};
|
|
203
236
|
|
|
204
237
|
// src/pages/categories/[id]/_components/category-organize-section/category-organize-section.tsx
|
|
205
238
|
import { FolderIllustration, TriangleRightMini } from "@medusajs/icons";
|
|
206
239
|
import { Badge, Container as Container4, Heading as Heading4, Text as Text4, Tooltip as Tooltip2 } from "@medusajs/ui";
|
|
240
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
207
241
|
import { useMemo, useState } from "react";
|
|
208
242
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
209
243
|
import { Link } from "react-router-dom";
|
|
@@ -221,7 +255,8 @@ var CategoryOrganizeSection = ({
|
|
|
221
255
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start gap-3 px-6 py-4", children: [
|
|
222
256
|
/* @__PURE__ */ jsx4(Text4, { size: "small", leading: "compact", weight: "plus", children: t("categories.fields.children.label") }),
|
|
223
257
|
/* @__PURE__ */ jsx4(ChildrenDisplay, { category })
|
|
224
|
-
] })
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ jsx4(DisplayExtensionZone4, { model: "category", zone: "organize", data: category })
|
|
225
260
|
] });
|
|
226
261
|
};
|
|
227
262
|
var PathDisplay = ({
|
|
@@ -313,6 +348,7 @@ var ChildrenDisplay = ({
|
|
|
313
348
|
|
|
314
349
|
// src/pages/categories/[id]/_components/category-product-section/category-product-section.tsx
|
|
315
350
|
import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
|
|
351
|
+
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
316
352
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
317
353
|
import { useMemo as useMemo2, useState as useState2 } from "react";
|
|
318
354
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
@@ -382,7 +418,8 @@ var CategoryProductSection = ({
|
|
|
382
418
|
message: t("categories.products.list.noRecordsMessage")
|
|
383
419
|
}
|
|
384
420
|
}
|
|
385
|
-
)
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ jsx5(DisplayExtensionZone5, { model: "category", zone: "products", data: category })
|
|
386
423
|
] });
|
|
387
424
|
};
|
|
388
425
|
var useColumns = () => {
|
|
@@ -450,13 +487,13 @@ var Root = ({ children }) => {
|
|
|
450
487
|
throw error;
|
|
451
488
|
}
|
|
452
489
|
return /* @__PURE__ */ jsx6(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs6(TwoColumnPage, { data: product_category, children: [
|
|
453
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs6(WidgetZone, { id: "categories.detail.main", data: product_category, children: [
|
|
454
491
|
/* @__PURE__ */ jsx6(CategoryGeneralSection, { category: product_category }),
|
|
455
492
|
/* @__PURE__ */ jsx6(CategoryMediaSection, { category: product_category }),
|
|
456
493
|
/* @__PURE__ */ jsx6(CategoryIconSection, { category: product_category }),
|
|
457
494
|
/* @__PURE__ */ jsx6(CategoryProductSection, { category: product_category })
|
|
458
|
-
] }),
|
|
459
|
-
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(CategoryOrganizeSection, { category: product_category }) })
|
|
495
|
+
] }) }),
|
|
496
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(WidgetZone, { id: "categories.detail.side", data: product_category, children: /* @__PURE__ */ jsx6(CategoryOrganizeSection, { category: product_category }) }) })
|
|
460
497
|
] }) });
|
|
461
498
|
};
|
|
462
499
|
var CategoryDetailPage = Object.assign(Root, {
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
} from "./chunk-MAVQ636Y.js";
|
|
4
4
|
import {
|
|
5
5
|
useProductTableColumns
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-WQQMCV7M.js";
|
|
7
|
+
import "./chunk-7HLAOLG7.js";
|
|
8
8
|
import {
|
|
9
9
|
useProductTableQuery
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QGZH3D2P.js";
|
|
11
11
|
import "./chunk-FWPGOIFA.js";
|
|
12
12
|
import {
|
|
13
13
|
useProductTableFilters
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZZUJHLFM.js";
|
|
15
15
|
import "./chunk-DB6ANJBO.js";
|
|
16
16
|
import "./chunk-PHOCVOZ5.js";
|
|
17
17
|
import "./chunk-FQERBIVS.js";
|
|
18
18
|
import {
|
|
19
19
|
_DataTable,
|
|
20
20
|
useDataTable
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-W3UHAQCV.js";
|
|
22
22
|
import "./chunk-YN3FGNJM.js";
|
|
23
23
|
import "./chunk-KCHYLLVG.js";
|
|
24
24
|
import "./chunk-634XVU3D.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-YV6MK4PZ.js";
|
|
28
28
|
import "./chunk-THHRRYRS.js";
|
|
29
29
|
import "./chunk-LRD242C7.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-VYSB4CTB.js";
|
|
31
31
|
import "./chunk-WIYFXWRI.js";
|
|
32
32
|
import {
|
|
33
33
|
SingleColumnPageSkeleton
|
|
@@ -32,7 +32,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
32
32
|
import {
|
|
33
33
|
_DataTable,
|
|
34
34
|
useDataTable
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-W3UHAQCV.js";
|
|
36
36
|
import "./chunk-YN3FGNJM.js";
|
|
37
37
|
import "./chunk-KCHYLLVG.js";
|
|
38
38
|
import {
|
|
@@ -110,9 +110,11 @@ var loader = async ({ params }) => {
|
|
|
110
110
|
// src/pages/customers/[id]/customer-detail-page.tsx
|
|
111
111
|
import { Children } from "react";
|
|
112
112
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
113
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
113
114
|
|
|
114
115
|
// src/pages/customers/[id]/_components/customer-address-section/customer-address-section.tsx
|
|
115
116
|
import { Container, Heading, Text } from "@medusajs/ui";
|
|
117
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
116
118
|
import { useTranslation } from "react-i18next";
|
|
117
119
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
118
120
|
var getAddressLabel = (address) => {
|
|
@@ -194,12 +196,14 @@ var CustomerAddressSection = ({
|
|
|
194
196
|
},
|
|
195
197
|
address.id
|
|
196
198
|
);
|
|
197
|
-
}) })
|
|
199
|
+
}) }),
|
|
200
|
+
/* @__PURE__ */ jsx(DisplayExtensionZone, { model: "customer", zone: "addresses", data: customer })
|
|
198
201
|
] });
|
|
199
202
|
};
|
|
200
203
|
|
|
201
204
|
// src/pages/customers/[id]/_components/customer-general-section/customer-general-section.tsx
|
|
202
205
|
import { Container as Container2, Heading as Heading2, StatusBadge, Text as Text2 } from "@medusajs/ui";
|
|
206
|
+
import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
|
|
203
207
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
204
208
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
205
209
|
var CustomerGeneralSection = ({
|
|
@@ -211,25 +215,53 @@ var CustomerGeneralSection = ({
|
|
|
211
215
|
const statusText = customer.has_account ? t2("customers.fields.registered") : t2("customers.fields.guest");
|
|
212
216
|
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
213
217
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
214
|
-
/* @__PURE__ */ jsx2(Heading2, { children: customer.email }),
|
|
215
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ jsx2(
|
|
218
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "customer", zone: "general", id: "email", data: customer, children: /* @__PURE__ */ jsx2(Heading2, { children: customer.email }) }),
|
|
219
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ jsx2(
|
|
220
|
+
DisplayField,
|
|
221
|
+
{
|
|
222
|
+
model: "customer",
|
|
223
|
+
zone: "general",
|
|
224
|
+
id: "status",
|
|
225
|
+
data: customer,
|
|
226
|
+
children: /* @__PURE__ */ jsx2(StatusBadge, { color: statusColor, children: statusText })
|
|
227
|
+
}
|
|
228
|
+
) })
|
|
216
229
|
] }),
|
|
217
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
230
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "customer", zone: "general", id: "name", data: customer, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
218
231
|
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.name") }),
|
|
219
232
|
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: name || "-" })
|
|
220
|
-
] }),
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
233
|
+
] }) }),
|
|
234
|
+
/* @__PURE__ */ jsx2(
|
|
235
|
+
DisplayField,
|
|
236
|
+
{
|
|
237
|
+
model: "customer",
|
|
238
|
+
zone: "general",
|
|
239
|
+
id: "company_name",
|
|
240
|
+
data: customer,
|
|
241
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
242
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.company") }),
|
|
243
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: customer.company_name || "-" })
|
|
244
|
+
] })
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "customer", zone: "general", id: "phone", data: customer, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
226
248
|
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t2("fields.phone") }),
|
|
227
249
|
/* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", children: customer.phone || "-" })
|
|
228
|
-
] })
|
|
250
|
+
] }) }),
|
|
251
|
+
/* @__PURE__ */ jsx2(
|
|
252
|
+
DisplayExtensionZone2,
|
|
253
|
+
{
|
|
254
|
+
model: "customer",
|
|
255
|
+
zone: "general",
|
|
256
|
+
data: customer,
|
|
257
|
+
builtInFieldIds: ["email", "status", "name", "company_name", "phone"]
|
|
258
|
+
}
|
|
259
|
+
)
|
|
229
260
|
] });
|
|
230
261
|
};
|
|
231
262
|
|
|
232
263
|
// src/pages/customers/[id]/_components/customer-group-section/customer-group-section.tsx
|
|
264
|
+
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
233
265
|
import {
|
|
234
266
|
Button,
|
|
235
267
|
Checkbox,
|
|
@@ -376,7 +408,8 @@ var CustomerGroupSection = ({
|
|
|
376
408
|
icon: null
|
|
377
409
|
}
|
|
378
410
|
}
|
|
379
|
-
)
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ jsx3(DisplayExtensionZone3, { model: "customer", zone: "groups", data: customer })
|
|
380
413
|
] });
|
|
381
414
|
};
|
|
382
415
|
var CustomerGroupRowActions = ({
|
|
@@ -490,6 +523,7 @@ var useColumns = (customerId, customerCountByGroup = {}) => {
|
|
|
490
523
|
|
|
491
524
|
// src/pages/customers/[id]/_components/customer-order-section/customer-order-section.tsx
|
|
492
525
|
import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
|
|
526
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
493
527
|
import { useMemo as useMemo2 } from "react";
|
|
494
528
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
495
529
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -555,7 +589,8 @@ var CustomerOrderSection = ({
|
|
|
555
589
|
queryObject: raw,
|
|
556
590
|
prefix: PREFIX2
|
|
557
591
|
}
|
|
558
|
-
)
|
|
592
|
+
),
|
|
593
|
+
/* @__PURE__ */ jsx4(DisplayExtensionZone4, { model: "customer", zone: "orders", data: customer })
|
|
559
594
|
] });
|
|
560
595
|
};
|
|
561
596
|
var useColumns2 = () => {
|
|
@@ -580,12 +615,12 @@ var Root = ({ children }) => {
|
|
|
580
615
|
}
|
|
581
616
|
if (isError) throw error;
|
|
582
617
|
return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: customer, showJSON: true, hasOutlet: true, children: [
|
|
583
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "customers.detail.main", data: customer, children: [
|
|
584
619
|
/* @__PURE__ */ jsx5(CustomerGeneralSection, { customer }),
|
|
585
620
|
/* @__PURE__ */ jsx5(CustomerOrderSection, { customer }),
|
|
586
621
|
/* @__PURE__ */ jsx5(CustomerGroupSection, { customer })
|
|
587
|
-
] }),
|
|
588
|
-
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(CustomerAddressSection, { customer }) })
|
|
622
|
+
] }) }),
|
|
623
|
+
/* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(WidgetZone, { id: "customers.detail.side", data: customer, children: /* @__PURE__ */ jsx5(CustomerAddressSection, { customer }) }) })
|
|
589
624
|
] }) });
|
|
590
625
|
};
|
|
591
626
|
var CustomerDetailPage = Object.assign(Root, {
|