@medusajs/dashboard 2.10.4-snapshot-20250930123356 → 2.10.4-snapshot-20251001130744
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-YATCZFPA.mjs → add-campaign-promotions-TFNUPW6A.mjs} +3 -3
- package/dist/app.js +69 -70
- package/dist/app.mjs +2 -2
- package/dist/{campaign-create-SGLXQU2F.mjs → campaign-create-CQ3XBHSY.mjs} +2 -3
- package/dist/{campaign-detail-6WW6QFB2.mjs → campaign-detail-6TPA4ERV.mjs} +4 -4
- package/dist/{chunk-HGAQ6CRN.mjs → chunk-6IQV6XRM.mjs} +1 -1
- package/dist/{chunk-ASFB7W5A.mjs → chunk-AHHACBNF.mjs} +1 -1
- package/dist/{chunk-ENN7KGKR.mjs → chunk-AXXGAOQL.mjs} +4 -9
- package/dist/{chunk-GOJZH5OP.mjs → chunk-CY33DS7K.mjs} +1 -52
- package/dist/{chunk-TR3FWQXE.mjs → chunk-EES6O4ND.mjs} +1 -1
- package/dist/{chunk-55PVXDDC.mjs → chunk-FLPX3C4H.mjs} +1 -1
- package/dist/{chunk-CLIAKOWC.mjs → chunk-H4ASVW4A.mjs} +2 -6
- package/dist/{chunk-W4JWOYEI.mjs → chunk-RBDAWRFF.mjs} +1 -1
- package/dist/{chunk-7PAOPX4A.mjs → chunk-RVHD6PIL.mjs} +21 -21
- package/dist/{order-create-refund-MGNKZZU7.mjs → order-create-refund-2JJJVK5A.mjs} +73 -3
- package/dist/{product-attributes-XSMFVMPL.mjs → product-attributes-TLXB4J7A.mjs} +3 -3
- package/dist/{product-create-IGZFHXVZ.mjs → product-create-7HOLP36D.mjs} +3 -3
- package/dist/{product-detail-CW42KVKT.mjs → product-detail-76PYSS7T.mjs} +3 -3
- package/dist/{product-edit-EXLC7FN7.mjs → product-edit-2QP6R36U.mjs} +3 -3
- package/dist/{product-media-NJZ6JSA7.mjs → product-media-OEV3BHUK.mjs} +2 -2
- package/dist/{product-organization-V2LE3CYO.mjs → product-organization-6FNRPZOP.mjs} +3 -3
- package/dist/{product-shipping-profile-K4FB5YNC.mjs → product-shipping-profile-LVR2XRIN.mjs} +3 -3
- package/dist/{promotion-add-campaign-SOGZKDNX.mjs → promotion-add-campaign-YOUUM6RB.mjs} +2 -2
- package/dist/{promotion-create-DRWLH3CY.mjs → promotion-create-SWL2YAZR.mjs} +3 -7
- package/dist/{promotion-detail-VHNQCTRH.mjs → promotion-detail-T5Y3LGZN.mjs} +2 -2
- package/dist/{promotion-list-6KMDX6OB.mjs → promotion-list-4YQXF4JL.mjs} +3 -3
- package/dist/{reset-password-AOR576NC.mjs → reset-password-IRRCZOIH.mjs} +1 -1
- package/dist/{tax-region-create-EFDLXWCS.mjs → tax-region-create-GCKJ6LII.mjs} +1 -1
- package/package.json +9 -9
- package/src/i18n/translations/$schema.json +1 -22
- package/src/i18n/translations/en.json +2 -6
- package/src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +2 -7
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +1 -5
- package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +1 -50
- package/src/routes/campaigns/common/constants.ts +0 -1
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +92 -13
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +0 -7
- package/dist/{order-detail-G3IQFZ4U.mjs → order-detail-XZKV6VOY.mjs} +3 -3
- package/dist/{tax-region-detail-S5R5D4KY.mjs → tax-region-detail-HNTTGBII.mjs} +1 -1
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
} from "./chunk-D3YQN7HV.mjs";
|
17
17
|
import {
|
18
18
|
I18n
|
19
|
-
} from "./chunk-
|
19
|
+
} from "./chunk-H4ASVW4A.mjs";
|
20
20
|
import {
|
21
21
|
Thumbnail
|
22
22
|
} from "./chunk-MNXC6Q4F.mjs";
|
@@ -3248,7 +3248,7 @@ function getRouteMap({
|
|
3248
3248
|
children: [
|
3249
3249
|
{
|
3250
3250
|
path: "create",
|
3251
|
-
lazy: () => import("./product-create-
|
3251
|
+
lazy: () => import("./product-create-7HOLP36D.mjs")
|
3252
3252
|
},
|
3253
3253
|
{
|
3254
3254
|
path: "import",
|
@@ -3264,7 +3264,7 @@ function getRouteMap({
|
|
3264
3264
|
path: ":id",
|
3265
3265
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
3266
3266
|
lazy: async () => {
|
3267
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
3267
|
+
const { Breadcrumb, loader } = await import("./product-detail-76PYSS7T.mjs");
|
3268
3268
|
return {
|
3269
3269
|
Component: Outlet4,
|
3270
3270
|
loader,
|
@@ -3276,11 +3276,11 @@ function getRouteMap({
|
|
3276
3276
|
children: [
|
3277
3277
|
{
|
3278
3278
|
path: "",
|
3279
|
-
lazy: () => import("./product-detail-
|
3279
|
+
lazy: () => import("./product-detail-76PYSS7T.mjs"),
|
3280
3280
|
children: [
|
3281
3281
|
{
|
3282
3282
|
path: "edit",
|
3283
|
-
lazy: () => import("./product-edit-
|
3283
|
+
lazy: () => import("./product-edit-2QP6R36U.mjs")
|
3284
3284
|
},
|
3285
3285
|
{
|
3286
3286
|
path: "edit-variant",
|
@@ -3292,19 +3292,19 @@ function getRouteMap({
|
|
3292
3292
|
},
|
3293
3293
|
{
|
3294
3294
|
path: "attributes",
|
3295
|
-
lazy: () => import("./product-attributes-
|
3295
|
+
lazy: () => import("./product-attributes-TLXB4J7A.mjs")
|
3296
3296
|
},
|
3297
3297
|
{
|
3298
3298
|
path: "organization",
|
3299
|
-
lazy: () => import("./product-organization-
|
3299
|
+
lazy: () => import("./product-organization-6FNRPZOP.mjs")
|
3300
3300
|
},
|
3301
3301
|
{
|
3302
3302
|
path: "shipping-profile",
|
3303
|
-
lazy: () => import("./product-shipping-profile-
|
3303
|
+
lazy: () => import("./product-shipping-profile-LVR2XRIN.mjs")
|
3304
3304
|
},
|
3305
3305
|
{
|
3306
3306
|
path: "media",
|
3307
|
-
lazy: () => import("./product-media-
|
3307
|
+
lazy: () => import("./product-media-OEV3BHUK.mjs")
|
3308
3308
|
},
|
3309
3309
|
{
|
3310
3310
|
path: "prices",
|
@@ -3435,7 +3435,7 @@ function getRouteMap({
|
|
3435
3435
|
{
|
3436
3436
|
path: ":id",
|
3437
3437
|
lazy: async () => {
|
3438
|
-
const { Component, Breadcrumb, loader } = await import("./order-detail-
|
3438
|
+
const { Component, Breadcrumb, loader } = await import("./order-detail-XZKV6VOY.mjs");
|
3439
3439
|
return {
|
3440
3440
|
Component,
|
3441
3441
|
loader,
|
@@ -3479,7 +3479,7 @@ function getRouteMap({
|
|
3479
3479
|
},
|
3480
3480
|
{
|
3481
3481
|
path: "refund",
|
3482
|
-
lazy: () => import("./order-create-refund-
|
3482
|
+
lazy: () => import("./order-create-refund-2JJJVK5A.mjs")
|
3483
3483
|
},
|
3484
3484
|
{
|
3485
3485
|
path: "transfer",
|
@@ -3514,16 +3514,16 @@ function getRouteMap({
|
|
3514
3514
|
children: [
|
3515
3515
|
{
|
3516
3516
|
path: "",
|
3517
|
-
lazy: () => import("./promotion-list-
|
3517
|
+
lazy: () => import("./promotion-list-4YQXF4JL.mjs")
|
3518
3518
|
},
|
3519
3519
|
{
|
3520
3520
|
path: "create",
|
3521
|
-
lazy: () => import("./promotion-create-
|
3521
|
+
lazy: () => import("./promotion-create-SWL2YAZR.mjs")
|
3522
3522
|
},
|
3523
3523
|
{
|
3524
3524
|
path: ":id",
|
3525
3525
|
lazy: async () => {
|
3526
|
-
const { Component, Breadcrumb, loader } = await import("./promotion-detail-
|
3526
|
+
const { Component, Breadcrumb, loader } = await import("./promotion-detail-T5Y3LGZN.mjs");
|
3527
3527
|
return {
|
3528
3528
|
Component,
|
3529
3529
|
loader,
|
@@ -3539,7 +3539,7 @@ function getRouteMap({
|
|
3539
3539
|
},
|
3540
3540
|
{
|
3541
3541
|
path: "add-to-campaign",
|
3542
|
-
lazy: () => import("./promotion-add-campaign-
|
3542
|
+
lazy: () => import("./promotion-add-campaign-YOUUM6RB.mjs")
|
3543
3543
|
},
|
3544
3544
|
{
|
3545
3545
|
path: ":ruleType/edit",
|
@@ -3563,12 +3563,12 @@ function getRouteMap({
|
|
3563
3563
|
},
|
3564
3564
|
{
|
3565
3565
|
path: "create",
|
3566
|
-
lazy: () => import("./campaign-create-
|
3566
|
+
lazy: () => import("./campaign-create-CQ3XBHSY.mjs")
|
3567
3567
|
},
|
3568
3568
|
{
|
3569
3569
|
path: ":id",
|
3570
3570
|
lazy: async () => {
|
3571
|
-
const { Component, Breadcrumb, loader } = await import("./campaign-detail-
|
3571
|
+
const { Component, Breadcrumb, loader } = await import("./campaign-detail-6TPA4ERV.mjs");
|
3572
3572
|
return {
|
3573
3573
|
Component,
|
3574
3574
|
loader,
|
@@ -3592,7 +3592,7 @@ function getRouteMap({
|
|
3592
3592
|
},
|
3593
3593
|
{
|
3594
3594
|
path: "add-promotions",
|
3595
|
-
lazy: () => import("./add-campaign-promotions-
|
3595
|
+
lazy: () => import("./add-campaign-promotions-TFNUPW6A.mjs")
|
3596
3596
|
}
|
3597
3597
|
]
|
3598
3598
|
}
|
@@ -4472,7 +4472,7 @@ function getRouteMap({
|
|
4472
4472
|
children: [
|
4473
4473
|
{
|
4474
4474
|
path: "create",
|
4475
|
-
lazy: () => import("./tax-region-create-
|
4475
|
+
lazy: () => import("./tax-region-create-GCKJ6LII.mjs")
|
4476
4476
|
}
|
4477
4477
|
]
|
4478
4478
|
},
|
@@ -4487,7 +4487,7 @@ function getRouteMap({
|
|
4487
4487
|
{
|
4488
4488
|
path: "",
|
4489
4489
|
lazy: async () => {
|
4490
|
-
const { Component } = await import("./tax-region-detail-
|
4490
|
+
const { Component } = await import("./tax-region-detail-HNTTGBII.mjs");
|
4491
4491
|
return {
|
4492
4492
|
Component
|
4493
4493
|
};
|
@@ -4627,7 +4627,7 @@ function getRouteMap({
|
|
4627
4627
|
},
|
4628
4628
|
{
|
4629
4629
|
path: "/reset-password",
|
4630
|
-
lazy: () => import("./reset-password-
|
4630
|
+
lazy: () => import("./reset-password-IRRCZOIH.mjs")
|
4631
4631
|
},
|
4632
4632
|
{
|
4633
4633
|
path: "/invite",
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
getLoyaltyPlugin
|
3
3
|
} from "./chunk-AMRS4CSX.mjs";
|
4
|
+
import {
|
5
|
+
formatProvider
|
6
|
+
} from "./chunk-IR5DHEKS.mjs";
|
4
7
|
import {
|
5
8
|
formatCurrency
|
6
9
|
} from "./chunk-WATKBUHQ.mjs";
|
@@ -412,8 +415,15 @@ var OrderBalanceSettlementForm = ({
|
|
412
415
|
|
413
416
|
// src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx
|
414
417
|
import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
415
|
-
import {
|
416
|
-
|
418
|
+
import {
|
419
|
+
Button as Button2,
|
420
|
+
CurrencyInput as CurrencyInput2,
|
421
|
+
Label as Label2,
|
422
|
+
Select as Select2,
|
423
|
+
Textarea as Textarea2,
|
424
|
+
toast as toast2
|
425
|
+
} from "@medusajs/ui";
|
426
|
+
import { useEffect as useEffect2, useMemo as useMemo2, useState as useState2 } from "react";
|
417
427
|
import { formatValue as formatValue2 } from "react-currency-input-field";
|
418
428
|
import { useForm as useForm2 } from "react-hook-form";
|
419
429
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
@@ -433,6 +443,7 @@ var CreateRefundForm = ({ order }) => {
|
|
433
443
|
const { handleSuccess } = useRouteModal();
|
434
444
|
const { refund_reasons } = useRefundReasons();
|
435
445
|
const [searchParams] = useSearchParams2();
|
446
|
+
const hasPaymentIdInSearchParams = !!searchParams.get("paymentId");
|
436
447
|
const [paymentId, setPaymentId] = useState2(
|
437
448
|
searchParams.get("paymentId") || void 0
|
438
449
|
);
|
@@ -453,6 +464,16 @@ var CreateRefundForm = ({ order }) => {
|
|
453
464
|
},
|
454
465
|
resolver: zodResolver2(CreateRefundSchema)
|
455
466
|
});
|
467
|
+
useEffect2(() => {
|
468
|
+
const pendingDifference = order.summary.pending_difference;
|
469
|
+
const paymentAmount2 = payment?.amount || 0;
|
470
|
+
const pendingAmount = pendingDifference < 0 ? Math.min(Math.abs(pendingDifference), paymentAmount2) : paymentAmount2;
|
471
|
+
const normalizedAmount = pendingAmount < 0 ? pendingAmount * -1 : pendingAmount;
|
472
|
+
form.setValue("amount", {
|
473
|
+
value: normalizedAmount.toFixed(currency.decimal_digits),
|
474
|
+
float: normalizedAmount
|
475
|
+
});
|
476
|
+
}, [payment?.id || ""]);
|
456
477
|
const { mutateAsync, isPending } = useRefundPayment(order.id, payment?.id);
|
457
478
|
const handleSubmit = form.handleSubmit(async (data) => {
|
458
479
|
await mutateAsync(
|
@@ -486,7 +507,56 @@ var CreateRefundForm = ({ order }) => {
|
|
486
507
|
className: "flex size-full flex-col overflow-hidden",
|
487
508
|
children: [
|
488
509
|
/* @__PURE__ */ jsx2(RouteDrawer.Body, { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-y-4", children: [
|
489
|
-
/* @__PURE__ */ jsxs2(
|
510
|
+
!hasPaymentIdInSearchParams && /* @__PURE__ */ jsxs2(
|
511
|
+
Select2,
|
512
|
+
{
|
513
|
+
dir: direction,
|
514
|
+
value: paymentId,
|
515
|
+
onValueChange: (value) => {
|
516
|
+
setPaymentId(value);
|
517
|
+
},
|
518
|
+
children: [
|
519
|
+
/* @__PURE__ */ jsx2(Label2, { className: "txt-compact-small mb-[-6px] font-sans font-medium", children: t("orders.payment.selectPaymentToRefund") }),
|
520
|
+
/* @__PURE__ */ jsx2(Select2.Trigger, { children: /* @__PURE__ */ jsx2(
|
521
|
+
Select2.Value,
|
522
|
+
{
|
523
|
+
placeholder: t("orders.payment.selectPaymentToRefund")
|
524
|
+
}
|
525
|
+
) }),
|
526
|
+
/* @__PURE__ */ jsx2(Select2.Content, { children: payments.map((payment2) => {
|
527
|
+
const totalRefunded = payment2.refunds?.reduce(
|
528
|
+
(acc, next) => next.amount + acc,
|
529
|
+
0
|
530
|
+
) || 0;
|
531
|
+
return /* @__PURE__ */ jsxs2(
|
532
|
+
Select2.Item,
|
533
|
+
{
|
534
|
+
value: payment2.id,
|
535
|
+
disabled: !!payment2.canceled_at || totalRefunded >= payment2.amount,
|
536
|
+
className: "flex items-center justify-center",
|
537
|
+
children: [
|
538
|
+
/* @__PURE__ */ jsxs2("span", { children: [
|
539
|
+
getLocaleAmount(
|
540
|
+
payment2.amount,
|
541
|
+
payment2.currency_code
|
542
|
+
),
|
543
|
+
" - "
|
544
|
+
] }),
|
545
|
+
/* @__PURE__ */ jsx2("span", { children: formatProvider(payment2.provider_id) }),
|
546
|
+
/* @__PURE__ */ jsxs2("span", { children: [
|
547
|
+
" - (#",
|
548
|
+
payment2.id.substring(23),
|
549
|
+
")"
|
550
|
+
] })
|
551
|
+
]
|
552
|
+
},
|
553
|
+
payment2.id
|
554
|
+
);
|
555
|
+
}) })
|
556
|
+
]
|
557
|
+
}
|
558
|
+
),
|
559
|
+
hasPaymentIdInSearchParams && /* @__PURE__ */ jsxs2("div", { className: "flex items-center", children: [
|
490
560
|
/* @__PURE__ */ jsx2("span", { children: getLocaleAmount(
|
491
561
|
payment.amount,
|
492
562
|
payment.currency_code
|
@@ -11,18 +11,18 @@ import {
|
|
11
11
|
} from "./chunk-4TC5YS65.mjs";
|
12
12
|
import {
|
13
13
|
PRODUCT_DETAIL_FIELDS
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-EES6O4ND.mjs";
|
15
15
|
import {
|
16
16
|
FormExtensionZone,
|
17
17
|
useExtendableForm
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-RVHD6PIL.mjs";
|
19
19
|
import "./chunk-NQIC7ZFS.mjs";
|
20
20
|
import "./chunk-ONB3JEHR.mjs";
|
21
21
|
import "./chunk-VLOA5XAC.mjs";
|
22
22
|
import "./chunk-4GQOUCX6.mjs";
|
23
23
|
import "./chunk-2VTICXJR.mjs";
|
24
24
|
import "./chunk-D3YQN7HV.mjs";
|
25
|
-
import "./chunk-
|
25
|
+
import "./chunk-H4ASVW4A.mjs";
|
26
26
|
import "./chunk-MNXC6Q4F.mjs";
|
27
27
|
import {
|
28
28
|
useExtension
|
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
UploadMediaFormItem,
|
26
26
|
decorateVariantsWithDefaultValues,
|
27
27
|
normalizeProductFormValues
|
28
|
-
} from "./chunk-
|
28
|
+
} from "./chunk-FLPX3C4H.mjs";
|
29
29
|
import "./chunk-ZQRKUG6J.mjs";
|
30
30
|
import {
|
31
31
|
DataGrid,
|
@@ -61,14 +61,14 @@ import {
|
|
61
61
|
import {
|
62
62
|
FormExtensionZone,
|
63
63
|
useExtendableForm
|
64
|
-
} from "./chunk-
|
64
|
+
} from "./chunk-RVHD6PIL.mjs";
|
65
65
|
import "./chunk-NQIC7ZFS.mjs";
|
66
66
|
import "./chunk-ONB3JEHR.mjs";
|
67
67
|
import "./chunk-VLOA5XAC.mjs";
|
68
68
|
import "./chunk-4GQOUCX6.mjs";
|
69
69
|
import "./chunk-2VTICXJR.mjs";
|
70
70
|
import "./chunk-D3YQN7HV.mjs";
|
71
|
-
import "./chunk-
|
71
|
+
import "./chunk-H4ASVW4A.mjs";
|
72
72
|
import "./chunk-MNXC6Q4F.mjs";
|
73
73
|
import {
|
74
74
|
useExtension
|
@@ -30,15 +30,15 @@ import {
|
|
30
30
|
import "./chunk-PFKKVLZX.mjs";
|
31
31
|
import {
|
32
32
|
PRODUCT_DETAIL_FIELDS
|
33
|
-
} from "./chunk-
|
34
|
-
import "./chunk-
|
33
|
+
} from "./chunk-EES6O4ND.mjs";
|
34
|
+
import "./chunk-RVHD6PIL.mjs";
|
35
35
|
import "./chunk-NQIC7ZFS.mjs";
|
36
36
|
import "./chunk-ONB3JEHR.mjs";
|
37
37
|
import "./chunk-VLOA5XAC.mjs";
|
38
38
|
import "./chunk-4GQOUCX6.mjs";
|
39
39
|
import "./chunk-2VTICXJR.mjs";
|
40
40
|
import "./chunk-D3YQN7HV.mjs";
|
41
|
-
import "./chunk-
|
41
|
+
import "./chunk-H4ASVW4A.mjs";
|
42
42
|
import "./chunk-MNXC6Q4F.mjs";
|
43
43
|
import {
|
44
44
|
useExtension
|
@@ -15,18 +15,18 @@ import {
|
|
15
15
|
} from "./chunk-4TC5YS65.mjs";
|
16
16
|
import {
|
17
17
|
PRODUCT_DETAIL_FIELDS
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-EES6O4ND.mjs";
|
19
19
|
import {
|
20
20
|
FormExtensionZone,
|
21
21
|
useExtendableForm
|
22
|
-
} from "./chunk-
|
22
|
+
} from "./chunk-RVHD6PIL.mjs";
|
23
23
|
import "./chunk-NQIC7ZFS.mjs";
|
24
24
|
import "./chunk-ONB3JEHR.mjs";
|
25
25
|
import "./chunk-VLOA5XAC.mjs";
|
26
26
|
import "./chunk-4GQOUCX6.mjs";
|
27
27
|
import "./chunk-2VTICXJR.mjs";
|
28
28
|
import "./chunk-D3YQN7HV.mjs";
|
29
|
-
import "./chunk-
|
29
|
+
import "./chunk-H4ASVW4A.mjs";
|
30
30
|
import "./chunk-MNXC6Q4F.mjs";
|
31
31
|
import {
|
32
32
|
useExtension
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
EditProductMediaSchema,
|
3
3
|
UploadMediaFormItem
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-FLPX3C4H.mjs";
|
5
5
|
import "./chunk-ZQRKUG6J.mjs";
|
6
6
|
import "./chunk-TYTNUPXB.mjs";
|
7
7
|
import "./chunk-6GU6IDUA.mjs";
|
@@ -13,7 +13,7 @@ import {
|
|
13
13
|
RouteFocusModal,
|
14
14
|
useRouteModal
|
15
15
|
} from "./chunk-4TC5YS65.mjs";
|
16
|
-
import "./chunk-
|
16
|
+
import "./chunk-H4ASVW4A.mjs";
|
17
17
|
import "./chunk-OBQI23QM.mjs";
|
18
18
|
import {
|
19
19
|
useProduct,
|
@@ -17,18 +17,18 @@ import {
|
|
17
17
|
} from "./chunk-4TC5YS65.mjs";
|
18
18
|
import {
|
19
19
|
PRODUCT_DETAIL_FIELDS
|
20
|
-
} from "./chunk-
|
20
|
+
} from "./chunk-EES6O4ND.mjs";
|
21
21
|
import {
|
22
22
|
FormExtensionZone,
|
23
23
|
useExtendableForm
|
24
|
-
} from "./chunk-
|
24
|
+
} from "./chunk-RVHD6PIL.mjs";
|
25
25
|
import "./chunk-NQIC7ZFS.mjs";
|
26
26
|
import "./chunk-ONB3JEHR.mjs";
|
27
27
|
import "./chunk-VLOA5XAC.mjs";
|
28
28
|
import "./chunk-4GQOUCX6.mjs";
|
29
29
|
import "./chunk-2VTICXJR.mjs";
|
30
30
|
import "./chunk-D3YQN7HV.mjs";
|
31
|
-
import "./chunk-
|
31
|
+
import "./chunk-H4ASVW4A.mjs";
|
32
32
|
import "./chunk-MNXC6Q4F.mjs";
|
33
33
|
import {
|
34
34
|
useExtension
|
package/dist/{product-shipping-profile-K4FB5YNC.mjs → product-shipping-profile-LVR2XRIN.mjs}
RENAMED
@@ -14,15 +14,15 @@ import {
|
|
14
14
|
} from "./chunk-4TC5YS65.mjs";
|
15
15
|
import {
|
16
16
|
PRODUCT_DETAIL_FIELDS
|
17
|
-
} from "./chunk-
|
18
|
-
import "./chunk-
|
17
|
+
} from "./chunk-EES6O4ND.mjs";
|
18
|
+
import "./chunk-RVHD6PIL.mjs";
|
19
19
|
import "./chunk-NQIC7ZFS.mjs";
|
20
20
|
import "./chunk-ONB3JEHR.mjs";
|
21
21
|
import "./chunk-VLOA5XAC.mjs";
|
22
22
|
import "./chunk-4GQOUCX6.mjs";
|
23
23
|
import "./chunk-2VTICXJR.mjs";
|
24
24
|
import "./chunk-D3YQN7HV.mjs";
|
25
|
-
import "./chunk-
|
25
|
+
import "./chunk-H4ASVW4A.mjs";
|
26
26
|
import "./chunk-MNXC6Q4F.mjs";
|
27
27
|
import "./chunk-C5P5PL3E.mjs";
|
28
28
|
import "./chunk-DG7J63J2.mjs";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
AddCampaignPromotionForm
|
3
|
-
} from "./chunk-
|
4
|
-
import "./chunk-
|
3
|
+
} from "./chunk-RBDAWRFF.mjs";
|
4
|
+
import "./chunk-CY33DS7K.mjs";
|
5
5
|
import "./chunk-HFB3OQXI.mjs";
|
6
6
|
import "./chunk-OFN7DIZA.mjs";
|
7
7
|
import "./chunk-DK4WIVY6.mjs";
|
@@ -3,15 +3,15 @@ import {
|
|
3
3
|
} from "./chunk-KEQOAJC2.mjs";
|
4
4
|
import {
|
5
5
|
AddCampaignPromotionFields
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-RBDAWRFF.mjs";
|
7
7
|
import {
|
8
8
|
RulesFormField
|
9
9
|
} from "./chunk-VI7MI3US.mjs";
|
10
10
|
import {
|
11
11
|
CreateCampaignSchema,
|
12
12
|
DEFAULT_CAMPAIGN_VALUES
|
13
|
-
} from "./chunk-
|
14
|
-
import "./chunk-
|
13
|
+
} from "./chunk-AXXGAOQL.mjs";
|
14
|
+
import "./chunk-CY33DS7K.mjs";
|
15
15
|
import "./chunk-F6ZOHZVB.mjs";
|
16
16
|
import "./chunk-HFB3OQXI.mjs";
|
17
17
|
import "./chunk-OFN7DIZA.mjs";
|
@@ -337,10 +337,6 @@ var CreatePromotionForm = () => {
|
|
337
337
|
values: rule.values
|
338
338
|
}));
|
339
339
|
};
|
340
|
-
if (data.campaign) {
|
341
|
-
data.campaign.budget.attribute = data.campaign.budget.attribute || null;
|
342
|
-
data.campaign.budget.type = data.campaign.budget.attribute ? "use_by_attribute" : data.campaign.budget.type;
|
343
|
-
}
|
344
340
|
createPromotion(
|
345
341
|
{
|
346
342
|
...promotionData,
|
@@ -3,7 +3,7 @@ import {
|
|
3
3
|
} from "./chunk-VAIHVNV6.mjs";
|
4
4
|
import {
|
5
5
|
getPromotionStatus
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-6IQV6XRM.mjs";
|
7
7
|
import {
|
8
8
|
formatPercentage
|
9
9
|
} from "./chunk-4FM6S5CX.mjs";
|
@@ -18,7 +18,7 @@ import {
|
|
18
18
|
} from "./chunk-GIZFNLKK.mjs";
|
19
19
|
import "./chunk-PFKKVLZX.mjs";
|
20
20
|
import "./chunk-4GQOUCX6.mjs";
|
21
|
-
import "./chunk-
|
21
|
+
import "./chunk-H4ASVW4A.mjs";
|
22
22
|
import {
|
23
23
|
useExtension
|
24
24
|
} from "./chunk-C5P5PL3E.mjs";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import {
|
2
2
|
usePromotionTableColumns,
|
3
3
|
usePromotionTableQuery
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
4
|
+
} from "./chunk-AHHACBNF.mjs";
|
5
|
+
import "./chunk-6IQV6XRM.mjs";
|
6
6
|
import "./chunk-MSDRGCRR.mjs";
|
7
7
|
import "./chunk-ADOCJB6L.mjs";
|
8
8
|
import "./chunk-LQTHYS2Z.mjs";
|
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
import "./chunk-C76H5USB.mjs";
|
26
26
|
import "./chunk-PFKKVLZX.mjs";
|
27
27
|
import "./chunk-4GQOUCX6.mjs";
|
28
|
-
import "./chunk-
|
28
|
+
import "./chunk-H4ASVW4A.mjs";
|
29
29
|
import {
|
30
30
|
useExtension
|
31
31
|
} from "./chunk-C5P5PL3E.mjs";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/dashboard",
|
3
|
-
"version": "2.10.4-snapshot-
|
3
|
+
"version": "2.10.4-snapshot-20251001130744",
|
4
4
|
"scripts": {
|
5
5
|
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
|
6
6
|
"dev": "vite",
|
@@ -45,10 +45,10 @@
|
|
45
45
|
"@dnd-kit/utilities": "^3.2.2",
|
46
46
|
"@hookform/error-message": "^2.0.1",
|
47
47
|
"@hookform/resolvers": "3.4.2",
|
48
|
-
"@medusajs/admin-shared": "2.10.4-snapshot-
|
49
|
-
"@medusajs/icons": "2.10.4-snapshot-
|
50
|
-
"@medusajs/js-sdk": "2.10.4-snapshot-
|
51
|
-
"@medusajs/ui": "4.0.24-snapshot-
|
48
|
+
"@medusajs/admin-shared": "2.10.4-snapshot-20251001130744",
|
49
|
+
"@medusajs/icons": "2.10.4-snapshot-20251001130744",
|
50
|
+
"@medusajs/js-sdk": "2.10.4-snapshot-20251001130744",
|
51
|
+
"@medusajs/ui": "4.0.24-snapshot-20251001130744",
|
52
52
|
"@radix-ui/react-dialog": "1.1.4",
|
53
53
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
54
54
|
"@tanstack/react-query": "5.64.2",
|
@@ -78,10 +78,10 @@
|
|
78
78
|
"zod": "3.25.76"
|
79
79
|
},
|
80
80
|
"devDependencies": {
|
81
|
-
"@medusajs/admin-shared": "2.10.4-snapshot-
|
82
|
-
"@medusajs/admin-vite-plugin": "2.10.4-snapshot-
|
83
|
-
"@medusajs/types": "2.10.4-snapshot-
|
84
|
-
"@medusajs/ui-preset": "2.10.4-snapshot-
|
81
|
+
"@medusajs/admin-shared": "2.10.4-snapshot-20251001130744",
|
82
|
+
"@medusajs/admin-vite-plugin": "2.10.4-snapshot-20251001130744",
|
83
|
+
"@medusajs/types": "2.10.4-snapshot-20251001130744",
|
84
|
+
"@medusajs/ui-preset": "2.10.4-snapshot-20251001130744",
|
85
85
|
"@types/node": "^20.11.15",
|
86
86
|
"@types/react": "^18.2.79",
|
87
87
|
"@types/react-dom": "^18.2.25",
|
@@ -8371,30 +8371,9 @@
|
|
8371
8371
|
},
|
8372
8372
|
"used": {
|
8373
8373
|
"type": "string"
|
8374
|
-
},
|
8375
|
-
"budgetAttribute": {
|
8376
|
-
"type": "string"
|
8377
|
-
},
|
8378
|
-
"budgetAttributeTooltip": {
|
8379
|
-
"type": "string"
|
8380
|
-
},
|
8381
|
-
"limitBudgetAttributeCustomer": {
|
8382
|
-
"type": "string"
|
8383
|
-
},
|
8384
|
-
"limitBudgetAttributeEmail": {
|
8385
|
-
"type": "string"
|
8386
8374
|
}
|
8387
8375
|
},
|
8388
|
-
"required": [
|
8389
|
-
"type",
|
8390
|
-
"currency",
|
8391
|
-
"limit",
|
8392
|
-
"used",
|
8393
|
-
"budgetAttribute",
|
8394
|
-
"budgetAttributeTooltip",
|
8395
|
-
"limitBudgetAttributeCustomer",
|
8396
|
-
"limitBudgetAttributeEmail"
|
8397
|
-
],
|
8376
|
+
"required": ["type", "currency", "limit", "used"],
|
8398
8377
|
"additionalProperties": false
|
8399
8378
|
},
|
8400
8379
|
"type": {
|
@@ -2204,7 +2204,7 @@
|
|
2204
2204
|
"delete": {
|
2205
2205
|
"title": "Are you sure?",
|
2206
2206
|
"description": "You are about to delete the campaign '{{name}}'. This action cannot be undone.",
|
2207
|
-
"successToast": "Campaign '{{name}}' was successfully
|
2207
|
+
"successToast": "Campaign '{{name}}' was successfully created."
|
2208
2208
|
},
|
2209
2209
|
"edit": {
|
2210
2210
|
"header": "Edit Campaign",
|
@@ -2248,11 +2248,7 @@
|
|
2248
2248
|
"type": "Type",
|
2249
2249
|
"currency": "Currency",
|
2250
2250
|
"limit": "Limit",
|
2251
|
-
"used": "Used"
|
2252
|
-
"budgetAttribute": "Limit usage per",
|
2253
|
-
"budgetAttributeTooltip": "Define how many times the promotion can be used by a specific customer or email.",
|
2254
|
-
"limitBudgetAttributeCustomer": "Budget limit per customer",
|
2255
|
-
"limitBudgetAttributeEmail": "Budget limit per email"
|
2251
|
+
"used": "Used"
|
2256
2252
|
},
|
2257
2253
|
"type": {
|
2258
2254
|
"spend": {
|
@@ -21,9 +21,8 @@ export const CreateCampaignSchema = zod.object({
|
|
21
21
|
starts_at: zod.date().nullable(),
|
22
22
|
ends_at: zod.date().nullable(),
|
23
23
|
budget: zod.object({
|
24
|
-
attribute: zod.string().nullish(),
|
25
24
|
limit: zod.number().min(0).nullish(),
|
26
|
-
type: zod.enum(["spend", "usage"
|
25
|
+
type: zod.enum(["spend", "usage"]),
|
27
26
|
currency_code: zod.string().nullish(),
|
28
27
|
}),
|
29
28
|
})
|
@@ -39,9 +38,6 @@ export const CreateCampaignForm = () => {
|
|
39
38
|
})
|
40
39
|
|
41
40
|
const handleSubmit = form.handleSubmit(async (data) => {
|
42
|
-
const attribute = data.budget.attribute || null
|
43
|
-
const type = attribute ? "use_by_attribute" : data.budget.type
|
44
|
-
|
45
41
|
await mutateAsync(
|
46
42
|
{
|
47
43
|
name: data.name,
|
@@ -50,8 +46,7 @@ export const CreateCampaignForm = () => {
|
|
50
46
|
starts_at: data.starts_at,
|
51
47
|
ends_at: data.ends_at,
|
52
48
|
budget: {
|
53
|
-
type,
|
54
|
-
attribute,
|
49
|
+
type: data.budget.type,
|
55
50
|
limit: data.budget.limit ? data.budget.limit : undefined,
|
56
51
|
currency_code: data.budget.currency_code,
|
57
52
|
},
|