@medusajs/dashboard 2.10.4-preview-20250924120212 → 2.10.4-preview-20250924150158
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/app.js +32 -3
- package/dist/app.mjs +1 -1
- package/dist/{chunk-3S523T5F.mjs → chunk-COUIM3ID.mjs} +1 -1
- package/dist/{chunk-FGF5B6J4.mjs → chunk-H45W7DHU.mjs} +8 -8
- package/dist/{order-create-refund-QZRNHK2D.mjs → order-create-refund-J3QWFH5Q.mjs} +35 -4
- package/dist/{product-attributes-K5EMRHFS.mjs → product-attributes-E55XL2RM.mjs} +2 -2
- package/dist/{product-create-5KQFXFJF.mjs → product-create-WUKUKVJ4.mjs} +1 -1
- package/dist/{product-detail-UM6PIKWQ.mjs → product-detail-MJ4TK4I4.mjs} +2 -2
- package/dist/{product-edit-QSCZEH74.mjs → product-edit-IS3TSDYG.mjs} +2 -2
- package/dist/{product-organization-YL4ZUCC4.mjs → product-organization-TN3PFQPN.mjs} +2 -2
- package/dist/{product-shipping-profile-PEIUF5AK.mjs → product-shipping-profile-DBRFIPTN.mjs} +2 -2
- package/package.json +9 -9
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +39 -1
package/dist/app.js
CHANGED
@@ -136677,11 +136677,13 @@ var init_create_refund_form = __esm({
|
|
136677
136677
|
value: zod10.string().or(zod10.number()),
|
136678
136678
|
float: zod10.number().or(zod10.null())
|
136679
136679
|
}),
|
136680
|
-
note: zod10.string().optional()
|
136680
|
+
note: zod10.string().optional(),
|
136681
|
+
refund_reason_id: zod10.string().optional()
|
136681
136682
|
});
|
136682
136683
|
CreateRefundForm = ({ order }) => {
|
136683
136684
|
const { t: t5 } = (0, import_react_i18next205.useTranslation)();
|
136684
136685
|
const { handleSuccess } = useRouteModal();
|
136686
|
+
const { refund_reasons } = useRefundReasons();
|
136685
136687
|
const [searchParams] = (0, import_react_router_dom88.useSearchParams)();
|
136686
136688
|
const [paymentId, setPaymentId] = (0, import_react185.useState)(
|
136687
136689
|
searchParams.get("paymentId") || void 0
|
@@ -136700,7 +136702,8 @@ var init_create_refund_form = __esm({
|
|
136700
136702
|
value: paymentAmount.toFixed(currency.decimal_digits),
|
136701
136703
|
float: paymentAmount
|
136702
136704
|
},
|
136703
|
-
note: ""
|
136705
|
+
note: "",
|
136706
|
+
refund_reason_id: ""
|
136704
136707
|
},
|
136705
136708
|
resolver: (0, import_zod45.zodResolver)(CreateRefundSchema)
|
136706
136709
|
});
|
@@ -136719,7 +136722,8 @@ var init_create_refund_form = __esm({
|
|
136719
136722
|
await mutateAsync(
|
136720
136723
|
{
|
136721
136724
|
amount: data.amount.float,
|
136722
|
-
note: data.note
|
136725
|
+
note: data.note,
|
136726
|
+
refund_reason_id: data.refund_reason_id
|
136723
136727
|
},
|
136724
136728
|
{
|
136725
136729
|
onSuccess: () => {
|
@@ -136833,6 +136837,31 @@ var init_create_refund_form = __esm({
|
|
136833
136837
|
}
|
136834
136838
|
}
|
136835
136839
|
),
|
136840
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
136841
|
+
Form.Field,
|
136842
|
+
{
|
136843
|
+
control: form.control,
|
136844
|
+
name: "refund_reason_id",
|
136845
|
+
render: ({ field }) => {
|
136846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(Form.Item, { children: [
|
136847
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(Form.Label, { children: t5("fields.refundReason") }),
|
136848
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(
|
136849
|
+
import_ui199.Select,
|
136850
|
+
{
|
136851
|
+
dir: direction,
|
136852
|
+
value: field.value,
|
136853
|
+
onValueChange: field.onChange,
|
136854
|
+
children: [
|
136855
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_ui199.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_ui199.Select.Value, {}) }),
|
136856
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_ui199.Select.Content, { children: refund_reasons?.map((reason) => /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_ui199.Select.Item, { value: reason.id, children: reason.label }, reason.id)) })
|
136857
|
+
]
|
136858
|
+
}
|
136859
|
+
) }),
|
136860
|
+
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(Form.ErrorMessage, {})
|
136861
|
+
] });
|
136862
|
+
}
|
136863
|
+
}
|
136864
|
+
),
|
136836
136865
|
/* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
|
136837
136866
|
Form.Field,
|
136838
136867
|
{
|
package/dist/app.mjs
CHANGED
@@ -3357,7 +3357,7 @@ function getRouteMap({
|
|
3357
3357
|
children: [
|
3358
3358
|
{
|
3359
3359
|
path: "create",
|
3360
|
-
lazy: () => import("./product-create-
|
3360
|
+
lazy: () => import("./product-create-WUKUKVJ4.mjs")
|
3361
3361
|
},
|
3362
3362
|
{
|
3363
3363
|
path: "import",
|
@@ -3373,7 +3373,7 @@ function getRouteMap({
|
|
3373
3373
|
path: ":id",
|
3374
3374
|
errorElement: /* @__PURE__ */ jsx18(ErrorBoundary, {}),
|
3375
3375
|
lazy: async () => {
|
3376
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
3376
|
+
const { Breadcrumb, loader } = await import("./product-detail-MJ4TK4I4.mjs");
|
3377
3377
|
return {
|
3378
3378
|
Component: Outlet4,
|
3379
3379
|
loader,
|
@@ -3385,11 +3385,11 @@ function getRouteMap({
|
|
3385
3385
|
children: [
|
3386
3386
|
{
|
3387
3387
|
path: "",
|
3388
|
-
lazy: () => import("./product-detail-
|
3388
|
+
lazy: () => import("./product-detail-MJ4TK4I4.mjs"),
|
3389
3389
|
children: [
|
3390
3390
|
{
|
3391
3391
|
path: "edit",
|
3392
|
-
lazy: () => import("./product-edit-
|
3392
|
+
lazy: () => import("./product-edit-IS3TSDYG.mjs")
|
3393
3393
|
},
|
3394
3394
|
{
|
3395
3395
|
path: "edit-variant",
|
@@ -3401,15 +3401,15 @@ function getRouteMap({
|
|
3401
3401
|
},
|
3402
3402
|
{
|
3403
3403
|
path: "attributes",
|
3404
|
-
lazy: () => import("./product-attributes-
|
3404
|
+
lazy: () => import("./product-attributes-E55XL2RM.mjs")
|
3405
3405
|
},
|
3406
3406
|
{
|
3407
3407
|
path: "organization",
|
3408
|
-
lazy: () => import("./product-organization-
|
3408
|
+
lazy: () => import("./product-organization-TN3PFQPN.mjs")
|
3409
3409
|
},
|
3410
3410
|
{
|
3411
3411
|
path: "shipping-profile",
|
3412
|
-
lazy: () => import("./product-shipping-profile-
|
3412
|
+
lazy: () => import("./product-shipping-profile-DBRFIPTN.mjs")
|
3413
3413
|
},
|
3414
3414
|
{
|
3415
3415
|
path: "media",
|
@@ -3588,7 +3588,7 @@ function getRouteMap({
|
|
3588
3588
|
},
|
3589
3589
|
{
|
3590
3590
|
path: "refund",
|
3591
|
-
lazy: () => import("./order-create-refund-
|
3591
|
+
lazy: () => import("./order-create-refund-J3QWFH5Q.mjs")
|
3592
3592
|
},
|
3593
3593
|
{
|
3594
3594
|
path: "transfer",
|
@@ -37,7 +37,9 @@ import {
|
|
37
37
|
usePlugins
|
38
38
|
} from "./chunk-BSBCIU6C.mjs";
|
39
39
|
import "./chunk-KOSCMAIC.mjs";
|
40
|
-
import
|
40
|
+
import {
|
41
|
+
useRefundReasons
|
42
|
+
} from "./chunk-5U3FFMC7.mjs";
|
41
43
|
import "./chunk-X6DSNTTX.mjs";
|
42
44
|
import "./chunk-I6E6CALJ.mjs";
|
43
45
|
import "./chunk-4RG7UJCT.mjs";
|
@@ -437,11 +439,13 @@ var CreateRefundSchema = zod2.object({
|
|
437
439
|
value: zod2.string().or(zod2.number()),
|
438
440
|
float: zod2.number().or(zod2.null())
|
439
441
|
}),
|
440
|
-
note: zod2.string().optional()
|
442
|
+
note: zod2.string().optional(),
|
443
|
+
refund_reason_id: zod2.string().optional()
|
441
444
|
});
|
442
445
|
var CreateRefundForm = ({ order }) => {
|
443
446
|
const { t } = useTranslation2();
|
444
447
|
const { handleSuccess } = useRouteModal();
|
448
|
+
const { refund_reasons } = useRefundReasons();
|
445
449
|
const [searchParams] = useSearchParams2();
|
446
450
|
const [paymentId, setPaymentId] = useState2(
|
447
451
|
searchParams.get("paymentId") || void 0
|
@@ -460,7 +464,8 @@ var CreateRefundForm = ({ order }) => {
|
|
460
464
|
value: paymentAmount.toFixed(currency.decimal_digits),
|
461
465
|
float: paymentAmount
|
462
466
|
},
|
463
|
-
note: ""
|
467
|
+
note: "",
|
468
|
+
refund_reason_id: ""
|
464
469
|
},
|
465
470
|
resolver: zodResolver2(CreateRefundSchema)
|
466
471
|
});
|
@@ -479,7 +484,8 @@ var CreateRefundForm = ({ order }) => {
|
|
479
484
|
await mutateAsync(
|
480
485
|
{
|
481
486
|
amount: data.amount.float,
|
482
|
-
note: data.note
|
487
|
+
note: data.note,
|
488
|
+
refund_reason_id: data.refund_reason_id
|
483
489
|
},
|
484
490
|
{
|
485
491
|
onSuccess: () => {
|
@@ -593,6 +599,31 @@ var CreateRefundForm = ({ order }) => {
|
|
593
599
|
}
|
594
600
|
}
|
595
601
|
),
|
602
|
+
/* @__PURE__ */ jsx2(
|
603
|
+
Form.Field,
|
604
|
+
{
|
605
|
+
control: form.control,
|
606
|
+
name: "refund_reason_id",
|
607
|
+
render: ({ field }) => {
|
608
|
+
return /* @__PURE__ */ jsxs2(Form.Item, { children: [
|
609
|
+
/* @__PURE__ */ jsx2(Form.Label, { children: t("fields.refundReason") }),
|
610
|
+
/* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsxs2(
|
611
|
+
Select2,
|
612
|
+
{
|
613
|
+
dir: direction,
|
614
|
+
value: field.value,
|
615
|
+
onValueChange: field.onChange,
|
616
|
+
children: [
|
617
|
+
/* @__PURE__ */ jsx2(Select2.Trigger, { children: /* @__PURE__ */ jsx2(Select2.Value, {}) }),
|
618
|
+
/* @__PURE__ */ jsx2(Select2.Content, { children: refund_reasons?.map((reason) => /* @__PURE__ */ jsx2(Select2.Item, { value: reason.id, children: reason.label }, reason.id)) })
|
619
|
+
]
|
620
|
+
}
|
621
|
+
) }),
|
622
|
+
/* @__PURE__ */ jsx2(Form.ErrorMessage, {})
|
623
|
+
] });
|
624
|
+
}
|
625
|
+
}
|
626
|
+
),
|
596
627
|
/* @__PURE__ */ jsx2(
|
597
628
|
Form.Field,
|
598
629
|
{
|
@@ -11,11 +11,11 @@ import {
|
|
11
11
|
} from "./chunk-4TC5YS65.mjs";
|
12
12
|
import {
|
13
13
|
PRODUCT_DETAIL_FIELDS
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-COUIM3ID.mjs";
|
15
15
|
import {
|
16
16
|
FormExtensionZone,
|
17
17
|
useExtendableForm
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-H45W7DHU.mjs";
|
19
19
|
import "./chunk-NQIC7ZFS.mjs";
|
20
20
|
import "./chunk-ONB3JEHR.mjs";
|
21
21
|
import "./chunk-4GQOUCX6.mjs";
|
@@ -30,8 +30,8 @@ import {
|
|
30
30
|
import "./chunk-PFKKVLZX.mjs";
|
31
31
|
import {
|
32
32
|
PRODUCT_DETAIL_FIELDS
|
33
|
-
} from "./chunk-
|
34
|
-
import "./chunk-
|
33
|
+
} from "./chunk-COUIM3ID.mjs";
|
34
|
+
import "./chunk-H45W7DHU.mjs";
|
35
35
|
import "./chunk-NQIC7ZFS.mjs";
|
36
36
|
import "./chunk-ONB3JEHR.mjs";
|
37
37
|
import "./chunk-4GQOUCX6.mjs";
|
@@ -15,11 +15,11 @@ import {
|
|
15
15
|
} from "./chunk-4TC5YS65.mjs";
|
16
16
|
import {
|
17
17
|
PRODUCT_DETAIL_FIELDS
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-COUIM3ID.mjs";
|
19
19
|
import {
|
20
20
|
FormExtensionZone,
|
21
21
|
useExtendableForm
|
22
|
-
} from "./chunk-
|
22
|
+
} from "./chunk-H45W7DHU.mjs";
|
23
23
|
import "./chunk-NQIC7ZFS.mjs";
|
24
24
|
import "./chunk-ONB3JEHR.mjs";
|
25
25
|
import "./chunk-4GQOUCX6.mjs";
|
@@ -17,11 +17,11 @@ import {
|
|
17
17
|
} from "./chunk-4TC5YS65.mjs";
|
18
18
|
import {
|
19
19
|
PRODUCT_DETAIL_FIELDS
|
20
|
-
} from "./chunk-
|
20
|
+
} from "./chunk-COUIM3ID.mjs";
|
21
21
|
import {
|
22
22
|
FormExtensionZone,
|
23
23
|
useExtendableForm
|
24
|
-
} from "./chunk-
|
24
|
+
} from "./chunk-H45W7DHU.mjs";
|
25
25
|
import "./chunk-NQIC7ZFS.mjs";
|
26
26
|
import "./chunk-ONB3JEHR.mjs";
|
27
27
|
import "./chunk-4GQOUCX6.mjs";
|
package/dist/{product-shipping-profile-PEIUF5AK.mjs → product-shipping-profile-DBRFIPTN.mjs}
RENAMED
@@ -14,8 +14,8 @@ import {
|
|
14
14
|
} from "./chunk-4TC5YS65.mjs";
|
15
15
|
import {
|
16
16
|
PRODUCT_DETAIL_FIELDS
|
17
|
-
} from "./chunk-
|
18
|
-
import "./chunk-
|
17
|
+
} from "./chunk-COUIM3ID.mjs";
|
18
|
+
import "./chunk-H45W7DHU.mjs";
|
19
19
|
import "./chunk-NQIC7ZFS.mjs";
|
20
20
|
import "./chunk-ONB3JEHR.mjs";
|
21
21
|
import "./chunk-4GQOUCX6.mjs";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/dashboard",
|
3
|
-
"version": "2.10.4-preview-
|
3
|
+
"version": "2.10.4-preview-20250924150158",
|
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-preview-
|
49
|
-
"@medusajs/icons": "2.10.4-preview-
|
50
|
-
"@medusajs/js-sdk": "2.10.4-preview-
|
51
|
-
"@medusajs/ui": "4.0.24-preview-
|
48
|
+
"@medusajs/admin-shared": "2.10.4-preview-20250924150158",
|
49
|
+
"@medusajs/icons": "2.10.4-preview-20250924150158",
|
50
|
+
"@medusajs/js-sdk": "2.10.4-preview-20250924150158",
|
51
|
+
"@medusajs/ui": "4.0.24-preview-20250924150158",
|
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-preview-
|
82
|
-
"@medusajs/admin-vite-plugin": "2.10.4-preview-
|
83
|
-
"@medusajs/types": "2.10.4-preview-
|
84
|
-
"@medusajs/ui-preset": "2.10.4-preview-
|
81
|
+
"@medusajs/admin-shared": "2.10.4-preview-20250924150158",
|
82
|
+
"@medusajs/admin-vite-plugin": "2.10.4-preview-20250924150158",
|
83
|
+
"@medusajs/types": "2.10.4-preview-20250924150158",
|
84
|
+
"@medusajs/ui-preset": "2.10.4-preview-20250924150158",
|
85
85
|
"@types/node": "^20.11.15",
|
86
86
|
"@types/react": "^18.2.79",
|
87
87
|
"@types/react-dom": "^18.2.25",
|
package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx
CHANGED
@@ -17,7 +17,7 @@ import * as zod from "zod"
|
|
17
17
|
import { Form } from "../../../../../components/common/form"
|
18
18
|
import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
|
19
19
|
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
20
|
-
import { useRefundPayment } from "../../../../../hooks/api"
|
20
|
+
import { useRefundPayment, useRefundReasons } from "../../../../../hooks/api"
|
21
21
|
import { currencies } from "../../../../../lib/data/currencies"
|
22
22
|
import { formatCurrency } from "../../../../../lib/format-currency"
|
23
23
|
import { formatProvider } from "../../../../../lib/format-provider"
|
@@ -35,11 +35,13 @@ const CreateRefundSchema = zod.object({
|
|
35
35
|
float: zod.number().or(zod.null()),
|
36
36
|
}),
|
37
37
|
note: zod.string().optional(),
|
38
|
+
refund_reason_id: zod.string().optional(),
|
38
39
|
})
|
39
40
|
|
40
41
|
export const CreateRefundForm = ({ order }: CreateRefundFormProps) => {
|
41
42
|
const { t } = useTranslation()
|
42
43
|
const { handleSuccess } = useRouteModal()
|
44
|
+
const { refund_reasons } = useRefundReasons()
|
43
45
|
|
44
46
|
const [searchParams] = useSearchParams()
|
45
47
|
const [paymentId, setPaymentId] = useState<string | undefined>(
|
@@ -62,6 +64,7 @@ export const CreateRefundForm = ({ order }: CreateRefundFormProps) => {
|
|
62
64
|
float: paymentAmount,
|
63
65
|
},
|
64
66
|
note: "",
|
67
|
+
refund_reason_id: "",
|
65
68
|
},
|
66
69
|
resolver: zodResolver(CreateRefundSchema),
|
67
70
|
})
|
@@ -90,6 +93,7 @@ export const CreateRefundForm = ({ order }: CreateRefundFormProps) => {
|
|
90
93
|
{
|
91
94
|
amount: data.amount.float!,
|
92
95
|
note: data.note,
|
96
|
+
refund_reason_id: data.refund_reason_id,
|
93
97
|
},
|
94
98
|
{
|
95
99
|
onSuccess: () => {
|
@@ -208,6 +212,40 @@ export const CreateRefundForm = ({ order }: CreateRefundFormProps) => {
|
|
208
212
|
}}
|
209
213
|
/>
|
210
214
|
|
215
|
+
<Form.Field
|
216
|
+
control={form.control}
|
217
|
+
name="refund_reason_id"
|
218
|
+
render={({ field }) => {
|
219
|
+
return (
|
220
|
+
<Form.Item>
|
221
|
+
<Form.Label>{t("fields.refundReason")}</Form.Label>
|
222
|
+
|
223
|
+
<Form.Control>
|
224
|
+
<Select
|
225
|
+
dir={direction}
|
226
|
+
value={field.value}
|
227
|
+
onValueChange={field.onChange}
|
228
|
+
>
|
229
|
+
<Select.Trigger>
|
230
|
+
<Select.Value />
|
231
|
+
</Select.Trigger>
|
232
|
+
|
233
|
+
<Select.Content>
|
234
|
+
{refund_reasons?.map((reason) => (
|
235
|
+
<Select.Item key={reason.id} value={reason.id}>
|
236
|
+
{reason.label}
|
237
|
+
</Select.Item>
|
238
|
+
))}
|
239
|
+
</Select.Content>
|
240
|
+
</Select>
|
241
|
+
</Form.Control>
|
242
|
+
|
243
|
+
<Form.ErrorMessage />
|
244
|
+
</Form.Item>
|
245
|
+
)
|
246
|
+
}}
|
247
|
+
/>
|
248
|
+
|
211
249
|
<Form.Field
|
212
250
|
control={form.control}
|
213
251
|
name={`note`}
|