@medusajs/dashboard 2.10.4-preview-20250924090158 → 2.10.4-preview-20250924120212
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/{add-campaign-promotions-62IIOR5K.mjs → add-campaign-promotions-APV4J7Z2.mjs} +4 -4
- package/dist/{api-key-management-detail-TEW653QF.mjs → api-key-management-detail-P2CXWYQG.mjs} +1 -1
- package/dist/app.js +43 -63
- package/dist/app.mjs +3 -3
- package/dist/{campaign-budget-edit-OXNTSPGE.mjs → campaign-budget-edit-UWGCET5Z.mjs} +1 -1
- package/dist/{campaign-configuration-Z5HA2DG3.mjs → campaign-configuration-WWCCFNYQ.mjs} +1 -1
- package/dist/{campaign-create-GRKYQY5D.mjs → campaign-create-CQ3XBHSY.mjs} +2 -2
- package/dist/{campaign-detail-XYLU3HF4.mjs → campaign-detail-CBO7PBOR.mjs} +4 -4
- package/dist/{campaign-edit-3TDW52BO.mjs → campaign-edit-R43GXNET.mjs} +1 -1
- package/dist/{campaign-list-IDPRC2MD.mjs → campaign-list-CDO5PRTL.mjs} +1 -1
- package/dist/{categories-metadata-JFNWZA5D.mjs → categories-metadata-HNABPXTE.mjs} +1 -1
- package/dist/{category-detail-CL3XCV7E.mjs → category-detail-JUKMFR4W.mjs} +1 -1
- package/dist/{category-products-UZEG63WY.mjs → category-products-CWLUKUVK.mjs} +1 -1
- package/dist/{chunk-NDNUJ2UK.mjs → chunk-3S523T5F.mjs} +1 -1
- package/dist/{chunk-FUQ27NT5.mjs → chunk-5FAWKUSU.mjs} +1 -1
- package/dist/{chunk-LJDVFJK7.mjs → chunk-AXXGAOQL.mjs} +1 -1
- package/dist/{chunk-NKM6CHK6.mjs → chunk-FGF5B6J4.mjs} +105 -105
- package/dist/{chunk-4CGHNQP2.mjs → chunk-G3VGLFVH.mjs} +47 -47
- package/dist/{chunk-HEBATBOH.mjs → chunk-KTBA6OOV.mjs} +1 -1
- package/dist/{chunk-6W7OL4TX.mjs → chunk-NUA3JO5E.mjs} +1 -1
- package/dist/{chunk-ZODJNBAV.mjs → chunk-R2G2B47Y.mjs} +1 -0
- package/dist/{chunk-UOEALCPZ.mjs → chunk-TEMN4ESF.mjs} +1 -1
- package/dist/{chunk-TWP4GTKM.mjs → chunk-ZWWM2OU2.mjs} +1 -1
- package/dist/{collection-add-products-QTFBLLND.mjs → collection-add-products-E22XLIP7.mjs} +1 -1
- package/dist/{collection-detail-ZEAUSZBJ.mjs → collection-detail-LOJ6WZLT.mjs} +1 -1
- package/dist/{collection-list-V27JHDAD.mjs → collection-list-KKEZLFLJ.mjs} +1 -1
- package/dist/{collection-metadata-JAEMZMU6.mjs → collection-metadata-MEA56JQC.mjs} +1 -1
- package/dist/{customer-detail-YBOM6KGC.mjs → customer-detail-Z5TU254N.mjs} +1 -1
- package/dist/{customer-group-detail-72VFORGF.mjs → customer-group-detail-VCRUQIYD.mjs} +1 -1
- package/dist/{customer-group-list-6XY7YF5E.mjs → customer-group-list-MCQ4AUJF.mjs} +1 -1
- package/dist/{customers-add-customer-group-ZUCFXW2U.mjs → customers-add-customer-group-X3VHASZ6.mjs} +1 -1
- package/dist/{edit-rules-RY7JMYLR.mjs → edit-rules-SVG7IOSY.mjs} +2 -2
- package/dist/{inventory-create-F5PSTEN2.mjs → inventory-create-DR5LNYQB.mjs} +1 -1
- package/dist/{inventory-detail-WI5T47QL.mjs → inventory-detail-D4MBCFS2.mjs} +1 -1
- package/dist/{inventory-metadata-QGPVSAUI.mjs → inventory-metadata-T22JZF4O.mjs} +1 -1
- package/dist/{inventory-stock-VQNXCIOA.mjs → inventory-stock-CPNDJYBD.mjs} +1 -1
- package/dist/{location-detail-M4CYDTSY.mjs → location-detail-SG4X4HBT.mjs} +1 -1
- package/dist/{location-fulfillment-providers-XVEQZCUD.mjs → location-fulfillment-providers-YNKCL3FV.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-create-I3HAEEFA.mjs → location-service-zone-shipping-option-create-PF7YJSC3.mjs} +1 -1
- package/dist/{login-QOENXTB7.mjs → login-23RIW4IY.mjs} +1 -1
- package/dist/{order-create-claim-MOBLO4YM.mjs → order-create-claim-LBA6UTTF.mjs} +1 -1
- package/dist/{order-create-edit-C75GUZJE.mjs → order-create-edit-7GLQP5CD.mjs} +1 -1
- package/dist/{order-create-exchange-RCUALEXO.mjs → order-create-exchange-IXPHBHKP.mjs} +1 -1
- package/dist/{order-create-fulfillment-EZTEZ4CF.mjs → order-create-fulfillment-5UJQFERR.mjs} +1 -1
- package/dist/{order-create-refund-4FAIESAN.mjs → order-create-refund-QZRNHK2D.mjs} +1 -1
- package/dist/{order-create-shipment-PTUJKVWK.mjs → order-create-shipment-TQJHHC7T.mjs} +1 -1
- package/dist/{order-detail-CNQ7HP32.mjs → order-detail-NERZLT7X.mjs} +1 -1
- package/dist/{order-edit-billing-address-46CFUZGL.mjs → order-edit-billing-address-BMUX3GJL.mjs} +1 -1
- package/dist/{order-edit-email-FOK5GQW2.mjs → order-edit-email-CS4AIJZS.mjs} +1 -1
- package/dist/{order-edit-shipping-address-WFN2SVKM.mjs → order-edit-shipping-address-GXSNNDBC.mjs} +1 -1
- package/dist/{order-metadata-COJNFRPZ.mjs → order-metadata-KWZX64YP.mjs} +1 -1
- package/dist/{order-receive-return-P4OPVOPM.mjs → order-receive-return-EXZAUMCI.mjs} +1 -1
- package/dist/{order-request-transfer-HRPCEL5L.mjs → order-request-transfer-RLU2TK44.mjs} +1 -1
- package/dist/{price-list-create-FJ2FM6GL.mjs → price-list-create-RHSKBROB.mjs} +1 -1
- package/dist/{price-list-detail-VNZ3Q426.mjs → price-list-detail-7E2SZNKI.mjs} +1 -1
- package/dist/{price-list-prices-add-FMZKGOHD.mjs → price-list-prices-add-RM5FDABU.mjs} +1 -1
- package/dist/{product-attributes-6ELSX5OH.mjs → product-attributes-K5EMRHFS.mjs} +4 -4
- package/dist/{product-create-6NWXJ7AY.mjs → product-create-5KQFXFJF.mjs} +4 -4
- package/dist/{product-create-variant-KGBSFIKQ.mjs → product-create-variant-37CVX4QI.mjs} +1 -1
- package/dist/{product-detail-G53SUBEP.mjs → product-detail-UM6PIKWQ.mjs} +4 -4
- package/dist/{product-edit-ZYUXMIZP.mjs → product-edit-QSCZEH74.mjs} +4 -4
- package/dist/{product-export-XA5POQKT.mjs → product-export-JNLDMDUS.mjs} +1 -1
- package/dist/{product-import-DYTT4YDA.mjs → product-import-CA75XMEH.mjs} +1 -1
- package/dist/{product-list-R6IDCNRV.mjs → product-list-XA5SJLXF.mjs} +1 -1
- package/dist/{product-media-AKHSFDJQ.mjs → product-media-36YW62IO.mjs} +2 -2
- package/dist/{product-metadata-44VYAXZD.mjs → product-metadata-JKWIAMVB.mjs} +1 -1
- package/dist/{product-organization-J2UYHJ6I.mjs → product-organization-YL4ZUCC4.mjs} +4 -4
- package/dist/{product-shipping-profile-FN7L2V4X.mjs → product-shipping-profile-PEIUF5AK.mjs} +4 -4
- package/dist/{product-stock-PX5NAHH6.mjs → product-stock-4XECV73O.mjs} +1 -1
- package/dist/{product-tag-create-R4YSSXD6.mjs → product-tag-create-U5DAEOBS.mjs} +1 -1
- package/dist/{product-tag-detail-XJEGQD7U.mjs → product-tag-detail-YB44E6JT.mjs} +1 -1
- package/dist/{product-tag-edit-7JXF42HY.mjs → product-tag-edit-J3OPHCDJ.mjs} +1 -1
- package/dist/{product-tag-list-GTUMQQ6V.mjs → product-tag-list-6TGDOAMD.mjs} +1 -1
- package/dist/{product-tag-metadata-5QV3HMXJ.mjs → product-tag-metadata-VAHEGSFJ.mjs} +1 -1
- package/dist/{product-type-detail-CN74BB3Y.mjs → product-type-detail-EN3WAIVO.mjs} +1 -1
- package/dist/{product-type-metadata-JPFREADV.mjs → product-type-metadata-R3YLZGY5.mjs} +1 -1
- package/dist/{product-variant-detail-BSLEUW5J.mjs → product-variant-detail-TYV4BYNG.mjs} +1 -1
- package/dist/{product-variant-edit-VOW5633S.mjs → product-variant-edit-YPQDVG5C.mjs} +1 -1
- package/dist/{product-variant-metadata-KDSV47PE.mjs → product-variant-metadata-DII5YHIK.mjs} +1 -1
- package/dist/{promotion-add-campaign-JXBRCUXL.mjs → promotion-add-campaign-YREHV6TQ.mjs} +7 -20
- package/dist/{promotion-create-YPX2R3ZB.mjs → promotion-create-TLW6T5IO.mjs} +4 -4
- package/dist/{promotion-detail-RISSMGU5.mjs → promotion-detail-BYA66IL7.mjs} +3 -3
- package/dist/{promotion-edit-details-I5DYHQUM.mjs → promotion-edit-details-A2UUSAZA.mjs} +1 -1
- package/dist/{promotion-list-UPVSOD6R.mjs → promotion-list-TOYJAQ4D.mjs} +4 -4
- package/dist/{refund-reason-create-CYHPXX2O.mjs → refund-reason-create-D5DJVOXP.mjs} +1 -1
- package/dist/{refund-reason-list-RGRFZ5DU.mjs → refund-reason-list-V7UO2NAY.mjs} +1 -1
- package/dist/{region-metadata-NXD563F4.mjs → region-metadata-23FQEWQ7.mjs} +1 -1
- package/dist/{reservation-detail-64MMXK7D.mjs → reservation-detail-USSX2THW.mjs} +1 -1
- package/dist/{reservation-metadata-4GZCEGM7.mjs → reservation-metadata-PKWRLWNT.mjs} +1 -1
- package/dist/{reset-password-AYCPBCKE.mjs → reset-password-EKZEJXQU.mjs} +1 -1
- package/dist/{sales-channel-add-products-EAWW7ADY.mjs → sales-channel-add-products-DKDV65UU.mjs} +1 -1
- package/dist/{sales-channel-detail-3F3HFTD2.mjs → sales-channel-detail-JKJLEM4C.mjs} +1 -1
- package/dist/{sales-channel-list-KNLMJ67Q.mjs → sales-channel-list-FOAVTG7H.mjs} +1 -1
- package/dist/{sales-channel-metadata-LAHTTRLQ.mjs → sales-channel-metadata-3RXYX7U2.mjs} +1 -1
- package/dist/{shipping-option-type-create-IPKK5MRS.mjs → shipping-option-type-create-ZLYFQFYI.mjs} +1 -1
- package/dist/{shipping-option-type-detail-NEQ4RA5F.mjs → shipping-option-type-detail-OMVJZSOI.mjs} +1 -1
- package/dist/{shipping-option-type-edit-CC64TWSB.mjs → shipping-option-type-edit-5XHFIDEZ.mjs} +1 -1
- package/dist/{shipping-option-type-list-3GTGTBK7.mjs → shipping-option-type-list-SGTTVHWK.mjs} +1 -1
- package/dist/{shipping-profile-metadata-EPVLPEEM.mjs → shipping-profile-metadata-3TZDQ27Z.mjs} +1 -1
- package/dist/{store-detail-PUOKMK4K.mjs → store-detail-72GMDFY7.mjs} +1 -1
- package/dist/{store-metadata-JYIVRRLW.mjs → store-metadata-TXSRTL6B.mjs} +1 -1
- package/dist/{tax-region-create-SP46RW2E.mjs → tax-region-create-U6XXHBMJ.mjs} +2 -2
- package/dist/{tax-region-detail-MQKBEBOZ.mjs → tax-region-detail-V4E63XUI.mjs} +1 -1
- package/dist/{tax-region-edit-2H5ACSFG.mjs → tax-region-edit-2DQPKIJG.mjs} +1 -1
- package/dist/{tax-region-province-detail-HNK2ZJWL.mjs → tax-region-province-detail-P6LPVSQJ.mjs} +1 -1
- package/dist/{tax-region-tax-override-create-XZJ3EIFJ.mjs → tax-region-tax-override-create-BPZKBPN6.mjs} +1 -1
- package/dist/{tax-region-tax-override-edit-QHQHFI2Y.mjs → tax-region-tax-override-edit-O7LUBRQN.mjs} +1 -1
- package/dist/{user-metadata-F6KRFYDW.mjs → user-metadata-TM3FFLIR.mjs} +1 -1
- package/dist/{workflow-execution-detail-JRJZATNU.mjs → workflow-execution-detail-3IBZZVRE.mjs} +1 -1
- package/package.json +9 -9
- package/src/hooks/api/campaigns.tsx +1 -0
- package/src/i18n/translations/en.json +1 -1
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +45 -52
- package/src/routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +4 -21
@@ -1,8 +1,8 @@
|
|
1
1
|
import {
|
2
2
|
usePromotionTableColumns,
|
3
3
|
usePromotionTableQuery
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
4
|
+
} from "./chunk-TEMN4ESF.mjs";
|
5
|
+
import "./chunk-NUA3JO5E.mjs";
|
6
6
|
import "./chunk-MSDRGCRR.mjs";
|
7
7
|
import "./chunk-ADOCJB6L.mjs";
|
8
8
|
import "./chunk-LQTHYS2Z.mjs";
|
@@ -30,7 +30,7 @@ import {
|
|
30
30
|
useRouteModal
|
31
31
|
} from "./chunk-4TC5YS65.mjs";
|
32
32
|
import "./chunk-4GQOUCX6.mjs";
|
33
|
-
import "./chunk-
|
33
|
+
import "./chunk-KTBA6OOV.mjs";
|
34
34
|
import "./chunk-LPEUYMRK.mjs";
|
35
35
|
import "./chunk-OC7BQLYI.mjs";
|
36
36
|
import "./chunk-S4DMV3ZT.mjs";
|
@@ -40,7 +40,7 @@ import {
|
|
40
40
|
useAddOrRemoveCampaignPromotions,
|
41
41
|
useCampaign,
|
42
42
|
usePromotions
|
43
|
-
} from "./chunk-
|
43
|
+
} from "./chunk-R2G2B47Y.mjs";
|
44
44
|
import "./chunk-FXYH54JP.mjs";
|
45
45
|
import "./chunk-774WSTCC.mjs";
|
46
46
|
import "./chunk-DEQUVHHE.mjs";
|
package/dist/{api-key-management-detail-TEW653QF.mjs → api-key-management-detail-P2CXWYQG.mjs}
RENAMED
@@ -63,7 +63,7 @@ import "./chunk-ZCZL3STK.mjs";
|
|
63
63
|
import "./chunk-OHSRRFGN.mjs";
|
64
64
|
import "./chunk-F6PXCY3N.mjs";
|
65
65
|
import "./chunk-NCR5UWRI.mjs";
|
66
|
-
import "./chunk-
|
66
|
+
import "./chunk-R2G2B47Y.mjs";
|
67
67
|
import "./chunk-GRT22PE5.mjs";
|
68
68
|
import "./chunk-32IQRUVY.mjs";
|
69
69
|
import "./chunk-KSRI5LOF.mjs";
|
package/dist/app.js
CHANGED
@@ -11034,7 +11034,7 @@ var init_en = __esm({
|
|
11034
11034
|
total_used: "Budget used",
|
11035
11035
|
budget_limit: "Budget limit",
|
11036
11036
|
campaign_id: {
|
11037
|
-
hint: "
|
11037
|
+
hint: "Disabled campaigns have budget in a different currency than the promotion."
|
11038
11038
|
}
|
11039
11039
|
},
|
11040
11040
|
budget: {
|
@@ -88009,6 +88009,7 @@ var init_campaigns = __esm({
|
|
88009
88009
|
onSuccess: (data, variables, context) => {
|
88010
88010
|
queryClient.invalidateQueries({ queryKey: campaignsQueryKeys.details() });
|
88011
88011
|
queryClient.invalidateQueries({ queryKey: promotionsQueryKeys.lists() });
|
88012
|
+
queryClient.invalidateQueries({ queryKey: promotionsQueryKeys.details() });
|
88012
88013
|
options?.onSuccess?.(data, variables, context);
|
88013
88014
|
},
|
88014
88015
|
...options
|
@@ -139546,6 +139547,10 @@ var init_add_campaign_promotion_form = __esm({
|
|
139546
139547
|
init_promotions();
|
139547
139548
|
init_create_campaign_form_fields2();
|
139548
139549
|
init_campaign_details();
|
139550
|
+
init_client2();
|
139551
|
+
init_use_combobox_data();
|
139552
|
+
init_combobox2();
|
139553
|
+
init_campaigns();
|
139549
139554
|
init_use_document_direction();
|
139550
139555
|
import_jsx_runtime297 = require("react/jsx-runtime");
|
139551
139556
|
EditPromotionSchema = zod15.object({
|
@@ -139554,10 +139559,11 @@ var init_add_campaign_promotion_form = __esm({
|
|
139554
139559
|
});
|
139555
139560
|
AddCampaignPromotionFields = ({
|
139556
139561
|
form,
|
139557
|
-
|
139558
|
-
|
139562
|
+
withNewCampaign = true,
|
139563
|
+
promotionCurrencyCode
|
139559
139564
|
}) => {
|
139560
139565
|
const { t: t5 } = (0, import_react_i18next221.useTranslation)();
|
139566
|
+
const direction = useDocumentDirection();
|
139561
139567
|
const watchCampaignId = (0, import_react_hook_form58.useWatch)({
|
139562
139568
|
control: form.control,
|
139563
139569
|
name: "campaign_id"
|
@@ -139566,8 +139572,25 @@ var init_add_campaign_promotion_form = __esm({
|
|
139566
139572
|
control: form.control,
|
139567
139573
|
name: "campaign_choice"
|
139568
139574
|
});
|
139569
|
-
const
|
139570
|
-
|
139575
|
+
const campaignsCombobox = useComboboxData({
|
139576
|
+
queryFn: (params2) => sdk.admin.campaign.list({
|
139577
|
+
...params2
|
139578
|
+
}),
|
139579
|
+
queryKey: ["campaigns"],
|
139580
|
+
getOptions: (data) => data.campaigns.map((campaign) => ({
|
139581
|
+
label: campaign.name.toUpperCase(),
|
139582
|
+
value: campaign.id,
|
139583
|
+
disabled: campaign.budget?.currency_code && campaign.budget?.currency_code?.toLowerCase() !== promotionCurrencyCode?.toLowerCase()
|
139584
|
+
// also cannot add promotion which doesn't have currency defined to a campaign with a currency amount budget
|
139585
|
+
}))
|
139586
|
+
});
|
139587
|
+
const { campaign: selectedCampaign } = useCampaign(
|
139588
|
+
watchCampaignId,
|
139589
|
+
void 0,
|
139590
|
+
{
|
139591
|
+
enabled: !!watchCampaignId
|
139592
|
+
}
|
139593
|
+
);
|
139571
139594
|
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { className: "flex flex-col gap-y-8", children: [
|
139572
139595
|
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
139573
139596
|
Form.Field,
|
@@ -139627,47 +139650,20 @@ var init_add_campaign_promotion_form = __esm({
|
|
139627
139650
|
{
|
139628
139651
|
control: form.control,
|
139629
139652
|
name: "campaign_id",
|
139630
|
-
render: ({ field: { onChange,
|
139653
|
+
render: ({ field: { onChange, ...field } }) => {
|
139631
139654
|
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(Form.Item, { children: [
|
139632
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Form.Label, { children: t5("promotions.form.campaign.existing.title") }),
|
139633
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime297.
|
139634
|
-
|
139655
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Form.Label, { tooltip: t5("campaigns.fields.campaign_id.hint"), children: t5("promotions.form.campaign.existing.title") }),
|
139656
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
139657
|
+
Combobox,
|
139635
139658
|
{
|
139636
139659
|
dir: direction,
|
139637
|
-
|
139638
|
-
|
139639
|
-
|
139640
|
-
|
139641
|
-
|
139642
|
-
!campaigns.length && /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { className: "flex h-[120px] flex-col items-center justify-center gap-2 p-2", children: [
|
139643
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)("span", { className: "txt-small text-ui-fg-subtle font-medium", children: t5(
|
139644
|
-
"promotions.form.campaign.existing.placeholder.title"
|
139645
|
-
) }),
|
139646
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)("span", { className: "txt-small text-ui-fg-muted", children: t5(
|
139647
|
-
"promotions.form.campaign.existing.placeholder.desc"
|
139648
|
-
) })
|
139649
|
-
] }),
|
139650
|
-
campaigns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_ui216.Select.Item, { value: c.id, children: c.name?.toUpperCase() }, c.id))
|
139651
|
-
] })
|
139652
|
-
]
|
139660
|
+
options: campaignsCombobox.options,
|
139661
|
+
searchValue: campaignsCombobox.searchValue,
|
139662
|
+
onSearchValueChange: campaignsCombobox.onSearchValueChange,
|
139663
|
+
onChange,
|
139664
|
+
...field
|
139653
139665
|
}
|
139654
139666
|
) }),
|
139655
|
-
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
139656
|
-
import_ui216.Text,
|
139657
|
-
{
|
139658
|
-
size: "small",
|
139659
|
-
leading: "compact",
|
139660
|
-
className: "text-ui-fg-subtle",
|
139661
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
139662
|
-
import_react_i18next221.Trans,
|
139663
|
-
{
|
139664
|
-
t: t5,
|
139665
|
-
i18nKey: "campaigns.fields.campaign_id.hint",
|
139666
|
-
components: [/* @__PURE__ */ (0, import_jsx_runtime297.jsx)("br", {}, "break")]
|
139667
|
-
}
|
139668
|
-
)
|
139669
|
-
}
|
139670
|
-
),
|
139671
139667
|
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Form.ErrorMessage, {})
|
139672
139668
|
] });
|
139673
139669
|
}
|
@@ -139678,8 +139674,7 @@ var init_add_campaign_promotion_form = __esm({
|
|
139678
139674
|
] });
|
139679
139675
|
};
|
139680
139676
|
AddCampaignPromotionForm = ({
|
139681
|
-
promotion
|
139682
|
-
campaigns
|
139677
|
+
promotion
|
139683
139678
|
}) => {
|
139684
139679
|
const { t: t5 } = (0, import_react_i18next221.useTranslation)();
|
139685
139680
|
const { handleSuccess } = useRouteModal();
|
@@ -139730,8 +139725,8 @@ var init_add_campaign_promotion_form = __esm({
|
|
139730
139725
|
AddCampaignPromotionFields,
|
139731
139726
|
{
|
139732
139727
|
form,
|
139733
|
-
|
139734
|
-
|
139728
|
+
withNewCampaign: false,
|
139729
|
+
promotionCurrencyCode: promotion.application_method?.currency_code
|
139735
139730
|
}
|
139736
139731
|
) }),
|
139737
139732
|
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(RouteDrawer.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { className: "flex items-center justify-end gap-x-2", children: [
|
@@ -142021,7 +142016,6 @@ var init_promotion_add_campaign = __esm({
|
|
142021
142016
|
import_react_i18next231 = require("react-i18next");
|
142022
142017
|
import_react_router_dom100 = require("react-router-dom");
|
142023
142018
|
init_modals();
|
142024
|
-
init_campaigns();
|
142025
142019
|
init_promotions();
|
142026
142020
|
init_add_campaign_promotion_form2();
|
142027
142021
|
import_jsx_runtime311 = require("react/jsx-runtime");
|
@@ -142029,26 +142023,12 @@ var init_promotion_add_campaign = __esm({
|
|
142029
142023
|
const { id: id2 } = (0, import_react_router_dom100.useParams)();
|
142030
142024
|
const { t: t5 } = (0, import_react_i18next231.useTranslation)();
|
142031
142025
|
const { promotion, isPending, isError, error } = usePromotion(id2);
|
142032
|
-
|
142033
|
-
|
142034
|
-
campaignQuery = {
|
142035
|
-
budget: {
|
142036
|
-
currency_code: promotion?.application_method?.currency_code
|
142037
|
-
}
|
142038
|
-
};
|
142039
|
-
}
|
142040
|
-
const {
|
142041
|
-
campaigns,
|
142042
|
-
isPending: areCampaignsLoading,
|
142043
|
-
isError: isCampaignError,
|
142044
|
-
error: campaignError
|
142045
|
-
} = useCampaigns(campaignQuery);
|
142046
|
-
if (isError || isCampaignError) {
|
142047
|
-
throw error || campaignError;
|
142026
|
+
if (isError) {
|
142027
|
+
throw error;
|
142048
142028
|
}
|
142049
142029
|
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(RouteDrawer, { children: [
|
142050
142030
|
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(RouteDrawer.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_ui226.Heading, { children: t5("promotions.campaign.edit.header") }) }),
|
142051
|
-
!isPending &&
|
142031
|
+
!isPending && promotion && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(AddCampaignPromotionForm, { promotion })
|
142052
142032
|
] });
|
142053
142033
|
};
|
142054
142034
|
}
|
package/dist/app.mjs
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import {
|
2
2
|
DashboardApp
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-FGF5B6J4.mjs";
|
4
4
|
import "./chunk-NQIC7ZFS.mjs";
|
5
5
|
import "./chunk-ONB3JEHR.mjs";
|
6
6
|
import "./chunk-4GQOUCX6.mjs";
|
7
7
|
import "./chunk-2VTICXJR.mjs";
|
8
8
|
import "./chunk-D3YQN7HV.mjs";
|
9
|
-
import "./chunk-
|
9
|
+
import "./chunk-KTBA6OOV.mjs";
|
10
10
|
import "./chunk-MNXC6Q4F.mjs";
|
11
11
|
import "./chunk-C5P5PL3E.mjs";
|
12
12
|
import "./chunk-DG7J63J2.mjs";
|
@@ -35,7 +35,7 @@ import "./chunk-ZCZL3STK.mjs";
|
|
35
35
|
import "./chunk-OHSRRFGN.mjs";
|
36
36
|
import "./chunk-F6PXCY3N.mjs";
|
37
37
|
import "./chunk-NCR5UWRI.mjs";
|
38
|
-
import "./chunk-
|
38
|
+
import "./chunk-R2G2B47Y.mjs";
|
39
39
|
import "./chunk-GRT22PE5.mjs";
|
40
40
|
import "./chunk-32IQRUVY.mjs";
|
41
41
|
import "./chunk-KSRI5LOF.mjs";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
CreateCampaignForm
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-AXXGAOQL.mjs";
|
4
4
|
import "./chunk-CY33DS7K.mjs";
|
5
5
|
import "./chunk-F6ZOHZVB.mjs";
|
6
6
|
import "./chunk-DK4WIVY6.mjs";
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
} from "./chunk-4TC5YS65.mjs";
|
12
12
|
import "./chunk-S4DMV3ZT.mjs";
|
13
13
|
import "./chunk-OBQI23QM.mjs";
|
14
|
-
import "./chunk-
|
14
|
+
import "./chunk-R2G2B47Y.mjs";
|
15
15
|
import "./chunk-V2LANK5S.mjs";
|
16
16
|
import "./chunk-QL4XKIVL.mjs";
|
17
17
|
import "./chunk-FXYH54JP.mjs";
|
@@ -4,8 +4,8 @@ import {
|
|
4
4
|
import {
|
5
5
|
usePromotionTableColumns,
|
6
6
|
usePromotionTableQuery
|
7
|
-
} from "./chunk-
|
8
|
-
import "./chunk-
|
7
|
+
} from "./chunk-TEMN4ESF.mjs";
|
8
|
+
import "./chunk-NUA3JO5E.mjs";
|
9
9
|
import "./chunk-MSDRGCRR.mjs";
|
10
10
|
import "./chunk-ADOCJB6L.mjs";
|
11
11
|
import "./chunk-LQTHYS2Z.mjs";
|
@@ -31,7 +31,7 @@ import {
|
|
31
31
|
import "./chunk-C76H5USB.mjs";
|
32
32
|
import "./chunk-PFKKVLZX.mjs";
|
33
33
|
import "./chunk-4GQOUCX6.mjs";
|
34
|
-
import "./chunk-
|
34
|
+
import "./chunk-KTBA6OOV.mjs";
|
35
35
|
import {
|
36
36
|
useExtension
|
37
37
|
} from "./chunk-C5P5PL3E.mjs";
|
@@ -67,7 +67,7 @@ import {
|
|
67
67
|
useCampaign,
|
68
68
|
useDeleteCampaign,
|
69
69
|
usePromotions
|
70
|
-
} from "./chunk-
|
70
|
+
} from "./chunk-R2G2B47Y.mjs";
|
71
71
|
import "./chunk-GRT22PE5.mjs";
|
72
72
|
import "./chunk-32IQRUVY.mjs";
|
73
73
|
import "./chunk-KSRI5LOF.mjs";
|
@@ -28,7 +28,7 @@ import "./chunk-ZCZL3STK.mjs";
|
|
28
28
|
import "./chunk-OHSRRFGN.mjs";
|
29
29
|
import "./chunk-F6PXCY3N.mjs";
|
30
30
|
import "./chunk-NCR5UWRI.mjs";
|
31
|
-
import "./chunk-
|
31
|
+
import "./chunk-R2G2B47Y.mjs";
|
32
32
|
import "./chunk-GRT22PE5.mjs";
|
33
33
|
import "./chunk-32IQRUVY.mjs";
|
34
34
|
import "./chunk-KSRI5LOF.mjs";
|
@@ -69,7 +69,7 @@ import "./chunk-ZCZL3STK.mjs";
|
|
69
69
|
import "./chunk-OHSRRFGN.mjs";
|
70
70
|
import "./chunk-F6PXCY3N.mjs";
|
71
71
|
import "./chunk-NCR5UWRI.mjs";
|
72
|
-
import "./chunk-
|
72
|
+
import "./chunk-R2G2B47Y.mjs";
|
73
73
|
import "./chunk-GRT22PE5.mjs";
|
74
74
|
import "./chunk-32IQRUVY.mjs";
|
75
75
|
import "./chunk-KSRI5LOF.mjs";
|
@@ -53,7 +53,7 @@ import "./chunk-ZCZL3STK.mjs";
|
|
53
53
|
import "./chunk-OHSRRFGN.mjs";
|
54
54
|
import "./chunk-F6PXCY3N.mjs";
|
55
55
|
import "./chunk-NCR5UWRI.mjs";
|
56
|
-
import "./chunk-
|
56
|
+
import "./chunk-R2G2B47Y.mjs";
|
57
57
|
import "./chunk-GRT22PE5.mjs";
|
58
58
|
import "./chunk-32IQRUVY.mjs";
|
59
59
|
import "./chunk-KSRI5LOF.mjs";
|
@@ -13,7 +13,7 @@ import {
|
|
13
13
|
} from "./chunk-4TC5YS65.mjs";
|
14
14
|
import {
|
15
15
|
useCreateCampaign
|
16
|
-
} from "./chunk-
|
16
|
+
} from "./chunk-R2G2B47Y.mjs";
|
17
17
|
|
18
18
|
// src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx
|
19
19
|
import { zodResolver } from "@hookform/resolvers/zod";
|