@medusajs/dashboard 2.10.4-snapshot-20250922090257 → 2.10.4-snapshot-20250922195925
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-FE4BXGVN.mjs → add-campaign-promotions-PLZXWFNV.mjs} +3 -3
- package/dist/{api-key-management-detail-SAVBCKX7.mjs → api-key-management-detail-ZQFNZNWW.mjs} +2 -1
- package/dist/app.js +2278 -1562
- package/dist/app.mjs +4 -3
- package/dist/{campaign-detail-KTOLZNTA.mjs → campaign-detail-VTCCVWKS.mjs} +5 -4
- package/dist/{categories-metadata-GXWJ3HOG.mjs → categories-metadata-FTFYPASQ.mjs} +2 -1
- package/dist/{category-detail-ENUI5EFL.mjs → category-detail-QHU2CLYA.mjs} +3 -2
- package/dist/{category-products-ZG5QDWSW.mjs → category-products-YGTL7GXQ.mjs} +3 -2
- package/dist/{chunk-S45XMWVD.mjs → chunk-5CE3JPWD.mjs} +1 -1
- package/dist/{chunk-JHXKKOHO.mjs → chunk-6V6KATTW.mjs} +33 -10
- package/dist/{chunk-5WKYR6PY.mjs → chunk-BM5ZIV5V.mjs} +1 -1
- package/dist/{chunk-OGHQ6VJI.mjs → chunk-BSBCIU6C.mjs} +0 -5
- package/dist/{chunk-NRBOPOMS.mjs → chunk-CU5EFQSB.mjs} +1 -1
- package/dist/{chunk-KMUDF36P.mjs → chunk-FTVAORQM.mjs} +1 -1
- package/dist/{chunk-GB7CZNXI.mjs → chunk-JO6QASTJ.mjs} +1 -1
- package/dist/{chunk-OKMF4YI7.mjs → chunk-K3OMOMRB.mjs} +25 -0
- package/dist/{chunk-LAWIWR7K.mjs → chunk-PHXKD2LR.mjs} +1 -1
- package/dist/{chunk-JELVERJM.mjs → chunk-PPI7PTY6.mjs} +31 -0
- package/dist/{chunk-6AGMMT5H.mjs → chunk-VE7JFMAN.mjs} +2 -2
- package/dist/{chunk-IRJKUFJU.mjs → chunk-WYDDFRYM.mjs} +130 -98
- package/dist/{chunk-7YZF3THS.mjs → chunk-XTNS2NRD.mjs} +1 -1
- package/dist/{chunk-Y4YXZY7R.mjs → chunk-YPDTZXV6.mjs} +1 -1
- package/dist/chunk-YZJ3W776.mjs +87 -0
- package/dist/{collection-add-products-2ISNNIHD.mjs → collection-add-products-OJ2EZLC7.mjs} +3 -2
- package/dist/{collection-detail-OSX6NHNQ.mjs → collection-detail-RMZK523E.mjs} +3 -2
- package/dist/{collection-list-MPIYSHQJ.mjs → collection-list-BJ3VNZAA.mjs} +4 -3
- package/dist/{collection-metadata-EOFYXEQI.mjs → collection-metadata-R3DI65D3.mjs} +2 -1
- package/dist/{customer-detail-FCNRRZSW.mjs → customer-detail-G7G6PYOO.mjs} +2 -1
- package/dist/{customer-group-detail-QI3QLJJL.mjs → customer-group-detail-XQ32DPQ3.mjs} +2 -1
- package/dist/{customer-group-list-GPIKR66X.mjs → customer-group-list-CARES5CM.mjs} +2 -1
- package/dist/{customers-add-customer-group-5TFTVDB6.mjs → customers-add-customer-group-NLPVKARS.mjs} +2 -1
- package/dist/{edit-rules-63NG4QVR.mjs → edit-rules-JRLCVE26.mjs} +2 -1
- package/dist/{inventory-create-RIVJFJJQ.mjs → inventory-create-ZC6HV2FY.mjs} +2 -1
- package/dist/{inventory-detail-5433AAQ2.mjs → inventory-detail-WVI4FTTH.mjs} +2 -1
- package/dist/{inventory-metadata-FH4CHJBA.mjs → inventory-metadata-BLIJBNQS.mjs} +2 -1
- package/dist/{inventory-stock-D6E4LQRK.mjs → inventory-stock-ZCTXWRK6.mjs} +2 -1
- package/dist/{location-detail-Z6ZDX6RY.mjs → location-detail-GV3POY4C.mjs} +2 -1
- package/dist/{location-fulfillment-providers-45VXZMZI.mjs → location-fulfillment-providers-INUQXJYU.mjs} +3 -2
- package/dist/{location-service-zone-shipping-option-create-NO3665DC.mjs → location-service-zone-shipping-option-create-6KO3QDMQ.mjs} +2 -1
- package/dist/{login-DSPNELTI.mjs → login-57FIKGXA.mjs} +2 -1
- package/dist/{order-create-claim-V63BWLB5.mjs → order-create-claim-LXKBCAWN.mjs} +2 -1
- package/dist/{order-create-edit-NPF4UZ4D.mjs → order-create-edit-264PTIEI.mjs} +2 -1
- package/dist/{order-create-exchange-RHIPPSKU.mjs → order-create-exchange-ZMUVPYM3.mjs} +2 -1
- package/dist/{order-create-fulfillment-4SSUHQ75.mjs → order-create-fulfillment-LE6O3SA5.mjs} +2 -1
- package/dist/{order-create-refund-QVQC5ZP5.mjs → order-create-refund-B7BO2EJL.mjs} +2 -1
- package/dist/{order-create-shipment-TJAARKWA.mjs → order-create-shipment-UOPCS5N7.mjs} +2 -1
- package/dist/{order-detail-2MIN6B2I.mjs → order-detail-SG7AXBRS.mjs} +2 -1
- package/dist/{order-edit-billing-address-QP2I5F3E.mjs → order-edit-billing-address-RPPJ4Z36.mjs} +2 -1
- package/dist/{order-edit-email-7WT7XTHB.mjs → order-edit-email-A7D5HTU6.mjs} +2 -1
- package/dist/{order-edit-shipping-address-3QFMQP4I.mjs → order-edit-shipping-address-LXKC5CJE.mjs} +2 -1
- package/dist/{order-list-7S3N6H5A.mjs → order-list-ZCMNSZYB.mjs} +1 -1
- package/dist/{order-metadata-YJS26DHK.mjs → order-metadata-KS47UOEE.mjs} +2 -1
- package/dist/{order-receive-return-PZMMMUB2.mjs → order-receive-return-PDU2YVLT.mjs} +2 -1
- package/dist/{order-request-transfer-QBIZD36E.mjs → order-request-transfer-WMQKDLDF.mjs} +2 -1
- package/dist/{price-list-create-RXDH5CXF.mjs → price-list-create-QZSB4W5Z.mjs} +3 -2
- package/dist/{price-list-detail-PKIKOJ4H.mjs → price-list-detail-2FMINPFT.mjs} +3 -2
- package/dist/{price-list-prices-add-2CDPUSYA.mjs → price-list-prices-add-WYK2QBAI.mjs} +3 -2
- package/dist/{product-attributes-LVV3K24U.mjs → product-attributes-KDXI2RNP.mjs} +5 -4
- package/dist/{product-create-HQORHMCM.mjs → product-create-TVYPK4VC.mjs} +5 -4
- package/dist/{product-create-variant-KJKQ6ROY.mjs → product-create-variant-6YWLDA2X.mjs} +2 -1
- package/dist/{product-detail-UROTMCRL.mjs → product-detail-RFKXMYE5.mjs} +5 -4
- package/dist/{product-edit-4EVIUVKV.mjs → product-edit-5FNY7HG4.mjs} +5 -4
- package/dist/{product-export-XERWEI5H.mjs → product-export-BEAUMFAZ.mjs} +3 -2
- package/dist/{product-import-AGFJMSVK.mjs → product-import-SOX4UJPM.mjs} +2 -1
- package/dist/{product-list-3B742YCJ.mjs → product-list-ZVXATJRE.mjs} +4 -3
- package/dist/{product-media-APQKPFTT.mjs → product-media-JPU23SPH.mjs} +2 -2
- package/dist/{product-metadata-NZ3HKO67.mjs → product-metadata-QRRCHZZB.mjs} +2 -1
- package/dist/{product-organization-YQUIMUYX.mjs → product-organization-QTWB7VMB.mjs} +5 -4
- package/dist/{product-shipping-profile-FRIMAOZQ.mjs → product-shipping-profile-Q6UX6ZNJ.mjs} +5 -4
- package/dist/{product-stock-SUVEQZML.mjs → product-stock-TSAIHVY6.mjs} +2 -1
- package/dist/{product-tag-create-T6HVAQKN.mjs → product-tag-create-5NZJS2D2.mjs} +2 -1
- package/dist/{product-tag-detail-HOWUZC3P.mjs → product-tag-detail-3XHUROBO.mjs} +6 -5
- package/dist/{product-tag-edit-WWQDNDRC.mjs → product-tag-edit-YYOOHKGG.mjs} +2 -1
- package/dist/{product-tag-list-FAKSLONF.mjs → product-tag-list-5XTTMNOA.mjs} +6 -5
- package/dist/{product-tag-metadata-6B56VEZU.mjs → product-tag-metadata-YAD3MPWF.mjs} +2 -1
- package/dist/{product-type-detail-KN64HYUV.mjs → product-type-detail-MNTAHQKJ.mjs} +3 -2
- package/dist/{product-type-metadata-F3FTI6OG.mjs → product-type-metadata-HWR3WBGT.mjs} +2 -1
- package/dist/{product-variant-detail-OUHBUY4J.mjs → product-variant-detail-DKFAG3KO.mjs} +2 -1
- package/dist/{product-variant-edit-NBYHDUJ5.mjs → product-variant-edit-EZENYVAN.mjs} +2 -1
- package/dist/{product-variant-metadata-XDVLJYGQ.mjs → product-variant-metadata-S7QENSUG.mjs} +2 -1
- package/dist/{promotion-create-UUOG52D5.mjs → promotion-create-O3KUSPIU.mjs} +2 -1
- package/dist/{promotion-detail-6ZD7Z6BF.mjs → promotion-detail-5DU6ULJG.mjs} +4 -3
- package/dist/{promotion-list-GI64LDWI.mjs → promotion-list-Q2FOGORE.mjs} +3 -3
- package/dist/refund-reason-create-NSZFGXWI.mjs +158 -0
- package/dist/refund-reason-edit-RKUSPQCL.mjs +144 -0
- package/dist/refund-reason-list-2F5PFERT.mjs +273 -0
- package/dist/{region-metadata-IQVB4ERU.mjs → region-metadata-G3JH5ZN6.mjs} +2 -1
- package/dist/{reservation-detail-RTGHD35L.mjs → reservation-detail-PJXS67UM.mjs} +2 -1
- package/dist/{reservation-metadata-WKJXBRLQ.mjs → reservation-metadata-UCKQB66O.mjs} +2 -1
- package/dist/{reset-password-SXA6YKTJ.mjs → reset-password-5KIEBJHN.mjs} +1 -1
- package/dist/{return-reason-list-MOP7YWMZ.mjs → return-reason-list-OGFYWMC5.mjs} +2 -2
- package/dist/{sales-channel-add-products-OKVZJ6FI.mjs → sales-channel-add-products-CSMNFGHD.mjs} +3 -2
- package/dist/{sales-channel-detail-WESBK6Q7.mjs → sales-channel-detail-ZSA3HNWW.mjs} +3 -2
- package/dist/{sales-channel-list-ADIJMXNV.mjs → sales-channel-list-X5ADP34V.mjs} +2 -1
- package/dist/{sales-channel-metadata-2OQAHYB4.mjs → sales-channel-metadata-ABWIDI3B.mjs} +2 -1
- package/dist/{shipping-option-type-create-3CGPGDYJ.mjs → shipping-option-type-create-Q2X5OMJS.mjs} +2 -1
- package/dist/{shipping-option-type-detail-S23H2OGW.mjs → shipping-option-type-detail-VT3Y5QQ4.mjs} +3 -2
- package/dist/{shipping-option-type-edit-IHE7XM6M.mjs → shipping-option-type-edit-IA3EER2N.mjs} +2 -1
- package/dist/{shipping-option-type-list-47GRJ6EC.mjs → shipping-option-type-list-JZPKAL3H.mjs} +3 -2
- package/dist/{shipping-profile-metadata-OXWOXAAR.mjs → shipping-profile-metadata-EYXBWBF2.mjs} +2 -1
- package/dist/{store-detail-4K7TW2TP.mjs → store-detail-LI72QMUZ.mjs} +2 -1
- package/dist/{store-metadata-JP2CI7EF.mjs → store-metadata-ZITLAS5H.mjs} +2 -1
- package/dist/{tax-region-create-W3K5IFD3.mjs → tax-region-create-IU2R5VIY.mjs} +3 -2
- package/dist/{tax-region-detail-V2F2DONN.mjs → tax-region-detail-6FHD35LB.mjs} +2 -1
- package/dist/{tax-region-edit-CJPMYTBF.mjs → tax-region-edit-O2WJXYIE.mjs} +2 -1
- package/dist/{tax-region-province-detail-4PUQ5ADW.mjs → tax-region-province-detail-YDBU4CUU.mjs} +2 -1
- package/dist/{tax-region-tax-override-create-3SCIOK4P.mjs → tax-region-tax-override-create-EF3LLZWM.mjs} +6 -5
- package/dist/{tax-region-tax-override-edit-P3QJKET3.mjs → tax-region-tax-override-edit-2DG3J6CO.mjs} +6 -5
- package/dist/{user-metadata-ZURLDLGC.mjs → user-metadata-QUIFIM5G.mjs} +2 -1
- package/dist/{workflow-execution-detail-4R6AFFHV.mjs → workflow-execution-detail-PVSQ2VGE.mjs} +2 -1
- package/package.json +9 -9
- package/src/components/layout/settings-layout/settings-layout.tsx +4 -0
- package/src/dashboard-app/routes/get-route.map.tsx +36 -0
- package/src/hooks/api/refund-reasons.tsx +113 -9
- package/src/hooks/table/columns/index.ts +1 -0
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +28 -0
- package/src/hooks/table/query/index.ts +1 -0
- package/src/hooks/table/query/use-refund-reason-table-query.tsx +32 -0
- package/src/hooks/table/use-table-configuration.tsx +1 -1
- package/src/i18n/translations/$schema.json +181 -65
- package/src/i18n/translations/en.json +31 -0
- package/src/routes/refund-reasons/common/hooks/use-delete-refund-reason-action.tsx +34 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +131 -0
- package/src/routes/refund-reasons/refund-reason-create/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +10 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +119 -0
- package/src/routes/refund-reasons/refund-reason-edit/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +33 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +131 -0
- package/src/routes/refund-reasons/refund-reason-list/index.ts +2 -0
- package/src/routes/refund-reasons/refund-reason-list/loader.ts +16 -0
- package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +21 -0
@@ -10202,6 +10202,115 @@
|
|
10202
10202
|
],
|
10203
10203
|
"additionalProperties": false
|
10204
10204
|
},
|
10205
|
+
"refundReasons": {
|
10206
|
+
"type": "object",
|
10207
|
+
"properties": {
|
10208
|
+
"domain": {
|
10209
|
+
"type": "string"
|
10210
|
+
},
|
10211
|
+
"subtitle": {
|
10212
|
+
"type": "string"
|
10213
|
+
},
|
10214
|
+
"calloutHint": {
|
10215
|
+
"type": "string"
|
10216
|
+
},
|
10217
|
+
"editReason": {
|
10218
|
+
"type": "string"
|
10219
|
+
},
|
10220
|
+
"create": {
|
10221
|
+
"type": "object",
|
10222
|
+
"properties": {
|
10223
|
+
"header": {
|
10224
|
+
"type": "string"
|
10225
|
+
},
|
10226
|
+
"subtitle": {
|
10227
|
+
"type": "string"
|
10228
|
+
},
|
10229
|
+
"hint": {
|
10230
|
+
"type": "string"
|
10231
|
+
},
|
10232
|
+
"successToast": {
|
10233
|
+
"type": "string"
|
10234
|
+
}
|
10235
|
+
},
|
10236
|
+
"required": ["header", "subtitle", "hint", "successToast"],
|
10237
|
+
"additionalProperties": false
|
10238
|
+
},
|
10239
|
+
"edit": {
|
10240
|
+
"type": "object",
|
10241
|
+
"properties": {
|
10242
|
+
"header": {
|
10243
|
+
"type": "string"
|
10244
|
+
},
|
10245
|
+
"subtitle": {
|
10246
|
+
"type": "string"
|
10247
|
+
},
|
10248
|
+
"successToast": {
|
10249
|
+
"type": "string"
|
10250
|
+
}
|
10251
|
+
},
|
10252
|
+
"required": ["header", "subtitle", "successToast"],
|
10253
|
+
"additionalProperties": false
|
10254
|
+
},
|
10255
|
+
"delete": {
|
10256
|
+
"type": "object",
|
10257
|
+
"properties": {
|
10258
|
+
"confirmation": {
|
10259
|
+
"type": "string"
|
10260
|
+
},
|
10261
|
+
"successToast": {
|
10262
|
+
"type": "string"
|
10263
|
+
}
|
10264
|
+
},
|
10265
|
+
"required": ["confirmation", "successToast"],
|
10266
|
+
"additionalProperties": false
|
10267
|
+
},
|
10268
|
+
"fields": {
|
10269
|
+
"type": "object",
|
10270
|
+
"properties": {
|
10271
|
+
"label": {
|
10272
|
+
"type": "object",
|
10273
|
+
"properties": {
|
10274
|
+
"label": {
|
10275
|
+
"type": "string"
|
10276
|
+
},
|
10277
|
+
"placeholder": {
|
10278
|
+
"type": "string"
|
10279
|
+
}
|
10280
|
+
},
|
10281
|
+
"required": ["label", "placeholder"],
|
10282
|
+
"additionalProperties": false
|
10283
|
+
},
|
10284
|
+
"description": {
|
10285
|
+
"type": "object",
|
10286
|
+
"properties": {
|
10287
|
+
"label": {
|
10288
|
+
"type": "string"
|
10289
|
+
},
|
10290
|
+
"placeholder": {
|
10291
|
+
"type": "string"
|
10292
|
+
}
|
10293
|
+
},
|
10294
|
+
"required": ["label", "placeholder"],
|
10295
|
+
"additionalProperties": false
|
10296
|
+
}
|
10297
|
+
},
|
10298
|
+
"required": ["label", "description"],
|
10299
|
+
"additionalProperties": false
|
10300
|
+
}
|
10301
|
+
},
|
10302
|
+
"required": [
|
10303
|
+
"domain",
|
10304
|
+
"subtitle",
|
10305
|
+
"calloutHint",
|
10306
|
+
"editReason",
|
10307
|
+
"create",
|
10308
|
+
"edit",
|
10309
|
+
"delete",
|
10310
|
+
"fields"
|
10311
|
+
],
|
10312
|
+
"additionalProperties": false
|
10313
|
+
},
|
10205
10314
|
"login": {
|
10206
10315
|
"type": "object",
|
10207
10316
|
"properties": {
|
@@ -11554,6 +11663,70 @@
|
|
11554
11663
|
],
|
11555
11664
|
"additionalProperties": false
|
11556
11665
|
},
|
11666
|
+
"dateTime": {
|
11667
|
+
"type": "object",
|
11668
|
+
"properties": {
|
11669
|
+
"years_one": {
|
11670
|
+
"type": "string"
|
11671
|
+
},
|
11672
|
+
"years_other": {
|
11673
|
+
"type": "string"
|
11674
|
+
},
|
11675
|
+
"months_one": {
|
11676
|
+
"type": "string"
|
11677
|
+
},
|
11678
|
+
"months_other": {
|
11679
|
+
"type": "string"
|
11680
|
+
},
|
11681
|
+
"weeks_one": {
|
11682
|
+
"type": "string"
|
11683
|
+
},
|
11684
|
+
"weeks_other": {
|
11685
|
+
"type": "string"
|
11686
|
+
},
|
11687
|
+
"days_one": {
|
11688
|
+
"type": "string"
|
11689
|
+
},
|
11690
|
+
"days_other": {
|
11691
|
+
"type": "string"
|
11692
|
+
},
|
11693
|
+
"hours_one": {
|
11694
|
+
"type": "string"
|
11695
|
+
},
|
11696
|
+
"hours_other": {
|
11697
|
+
"type": "string"
|
11698
|
+
},
|
11699
|
+
"minutes_one": {
|
11700
|
+
"type": "string"
|
11701
|
+
},
|
11702
|
+
"minutes_other": {
|
11703
|
+
"type": "string"
|
11704
|
+
},
|
11705
|
+
"seconds_one": {
|
11706
|
+
"type": "string"
|
11707
|
+
},
|
11708
|
+
"seconds_other": {
|
11709
|
+
"type": "string"
|
11710
|
+
}
|
11711
|
+
},
|
11712
|
+
"required": [
|
11713
|
+
"years_one",
|
11714
|
+
"years_other",
|
11715
|
+
"months_one",
|
11716
|
+
"months_other",
|
11717
|
+
"weeks_one",
|
11718
|
+
"weeks_other",
|
11719
|
+
"days_one",
|
11720
|
+
"days_other",
|
11721
|
+
"hours_one",
|
11722
|
+
"hours_other",
|
11723
|
+
"minutes_one",
|
11724
|
+
"minutes_other",
|
11725
|
+
"seconds_one",
|
11726
|
+
"seconds_other"
|
11727
|
+
],
|
11728
|
+
"additionalProperties": false
|
11729
|
+
},
|
11557
11730
|
"views": {
|
11558
11731
|
"type": "object",
|
11559
11732
|
"properties": {
|
@@ -11615,70 +11788,12 @@
|
|
11615
11788
|
"additionalProperties": false
|
11616
11789
|
}
|
11617
11790
|
},
|
11618
|
-
"required": ["save", "saveAsNew", "updateDefaultForEveryone", "updateViewName", "prompts"],
|
11619
|
-
"additionalProperties": false
|
11620
|
-
},
|
11621
|
-
"dateTime": {
|
11622
|
-
"type": "object",
|
11623
|
-
"properties": {
|
11624
|
-
"years_one": {
|
11625
|
-
"type": "string"
|
11626
|
-
},
|
11627
|
-
"years_other": {
|
11628
|
-
"type": "string"
|
11629
|
-
},
|
11630
|
-
"months_one": {
|
11631
|
-
"type": "string"
|
11632
|
-
},
|
11633
|
-
"months_other": {
|
11634
|
-
"type": "string"
|
11635
|
-
},
|
11636
|
-
"weeks_one": {
|
11637
|
-
"type": "string"
|
11638
|
-
},
|
11639
|
-
"weeks_other": {
|
11640
|
-
"type": "string"
|
11641
|
-
},
|
11642
|
-
"days_one": {
|
11643
|
-
"type": "string"
|
11644
|
-
},
|
11645
|
-
"days_other": {
|
11646
|
-
"type": "string"
|
11647
|
-
},
|
11648
|
-
"hours_one": {
|
11649
|
-
"type": "string"
|
11650
|
-
},
|
11651
|
-
"hours_other": {
|
11652
|
-
"type": "string"
|
11653
|
-
},
|
11654
|
-
"minutes_one": {
|
11655
|
-
"type": "string"
|
11656
|
-
},
|
11657
|
-
"minutes_other": {
|
11658
|
-
"type": "string"
|
11659
|
-
},
|
11660
|
-
"seconds_one": {
|
11661
|
-
"type": "string"
|
11662
|
-
},
|
11663
|
-
"seconds_other": {
|
11664
|
-
"type": "string"
|
11665
|
-
}
|
11666
|
-
},
|
11667
11791
|
"required": [
|
11668
|
-
"
|
11669
|
-
"
|
11670
|
-
"
|
11671
|
-
"
|
11672
|
-
"
|
11673
|
-
"weeks_other",
|
11674
|
-
"days_one",
|
11675
|
-
"days_other",
|
11676
|
-
"hours_one",
|
11677
|
-
"hours_other",
|
11678
|
-
"minutes_one",
|
11679
|
-
"minutes_other",
|
11680
|
-
"seconds_one",
|
11681
|
-
"seconds_other"
|
11792
|
+
"save",
|
11793
|
+
"saveAsNew",
|
11794
|
+
"updateDefaultForEveryone",
|
11795
|
+
"updateViewName",
|
11796
|
+
"prompts"
|
11682
11797
|
],
|
11683
11798
|
"additionalProperties": false
|
11684
11799
|
}
|
@@ -11724,6 +11839,7 @@
|
|
11724
11839
|
"salesChannels",
|
11725
11840
|
"apiKeyManagement",
|
11726
11841
|
"returnReasons",
|
11842
|
+
"refundReasons",
|
11727
11843
|
"login",
|
11728
11844
|
"invite",
|
11729
11845
|
"resetPassword",
|
@@ -11736,8 +11852,8 @@
|
|
11736
11852
|
"statuses",
|
11737
11853
|
"labels",
|
11738
11854
|
"fields",
|
11739
|
-
"
|
11740
|
-
"
|
11855
|
+
"dateTime",
|
11856
|
+
"views"
|
11741
11857
|
],
|
11742
11858
|
"additionalProperties": false
|
11743
11859
|
}
|
@@ -2740,6 +2740,37 @@
|
|
2740
2740
|
}
|
2741
2741
|
}
|
2742
2742
|
},
|
2743
|
+
"refundReasons": {
|
2744
|
+
"domain": "Refund Reasons",
|
2745
|
+
"subtitle": "Manage reasons for refunded items.",
|
2746
|
+
"calloutHint": "Manage the reasons to categorize refunds.",
|
2747
|
+
"editReason": "Edit Refund Reason",
|
2748
|
+
"create": {
|
2749
|
+
"header": "Add Refund Reason",
|
2750
|
+
"subtitle": "Specify the most common reasons for refunds.",
|
2751
|
+
"hint": "Create a new refund reason to categorize refunds.",
|
2752
|
+
"successToast": "Refund reason {{label}} was successfully created."
|
2753
|
+
},
|
2754
|
+
"edit": {
|
2755
|
+
"header": "Edit Refund Reason",
|
2756
|
+
"subtitle": "Edit the value of the refund reason.",
|
2757
|
+
"successToast": "Refund reason {{label}} was successfully updated."
|
2758
|
+
},
|
2759
|
+
"delete": {
|
2760
|
+
"confirmation": "You are about to delete the refund reason \"{{label}}\". This action cannot be undone.",
|
2761
|
+
"successToast": "Refund reason was successfully deleted."
|
2762
|
+
},
|
2763
|
+
"fields": {
|
2764
|
+
"label": {
|
2765
|
+
"label": "Label",
|
2766
|
+
"placeholder": "Gesture of goodwill"
|
2767
|
+
},
|
2768
|
+
"description": {
|
2769
|
+
"label": "Description",
|
2770
|
+
"placeholder": "Customer had a bad shopping experience"
|
2771
|
+
}
|
2772
|
+
}
|
2773
|
+
},
|
2743
2774
|
"login": {
|
2744
2775
|
"forgotPassword": "Forgot password? - <0>Reset</0>",
|
2745
2776
|
"title": "Welcome to Medusa",
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { toast, usePrompt } from "@medusajs/ui"
|
2
|
+
import { useTranslation } from "react-i18next"
|
3
|
+
import { useDeleteRefundReason } from "../../../../hooks/api"
|
4
|
+
|
5
|
+
export const useDeleteRefundReasonAction = (id: string, label: string) => {
|
6
|
+
const { t } = useTranslation()
|
7
|
+
const prompt = usePrompt()
|
8
|
+
|
9
|
+
const { mutateAsync } = useDeleteRefundReason(id)
|
10
|
+
|
11
|
+
return async () => {
|
12
|
+
const result = await prompt({
|
13
|
+
title: t("general.areYouSure"),
|
14
|
+
description: t("refundReasons.delete.confirmation", {
|
15
|
+
label,
|
16
|
+
}),
|
17
|
+
confirmText: t("actions.delete"),
|
18
|
+
cancelText: t("actions.cancel"),
|
19
|
+
})
|
20
|
+
|
21
|
+
if (!result) {
|
22
|
+
return
|
23
|
+
}
|
24
|
+
|
25
|
+
await mutateAsync(undefined, {
|
26
|
+
onSuccess: () => {
|
27
|
+
toast.success(t("refundReasons.delete.successToast"))
|
28
|
+
},
|
29
|
+
onError: (error) => {
|
30
|
+
toast.error(error.message)
|
31
|
+
},
|
32
|
+
})
|
33
|
+
}
|
34
|
+
}
|
package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { RefundReasonCreateForm } from "./refund-reason-create-form"
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import { zodResolver } from "@hookform/resolvers/zod"
|
2
|
+
import { Button, Heading, Input, Text, Textarea, toast } from "@medusajs/ui"
|
3
|
+
import { useForm } from "react-hook-form"
|
4
|
+
import { useTranslation } from "react-i18next"
|
5
|
+
import { z } from "zod"
|
6
|
+
import { Form } from "../../../../../components/common/form"
|
7
|
+
import {
|
8
|
+
RouteFocusModal,
|
9
|
+
useRouteModal,
|
10
|
+
} from "../../../../../components/modals"
|
11
|
+
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
12
|
+
import { useCreateRefundReason } from "../../../../../hooks/api"
|
13
|
+
|
14
|
+
const RefundReasonCreateSchema = z.object({
|
15
|
+
label: z.string().min(1),
|
16
|
+
description: z.string().optional(),
|
17
|
+
})
|
18
|
+
|
19
|
+
export const RefundReasonCreateForm = () => {
|
20
|
+
const { t } = useTranslation()
|
21
|
+
const { handleSuccess } = useRouteModal()
|
22
|
+
|
23
|
+
const form = useForm<z.infer<typeof RefundReasonCreateSchema>>({
|
24
|
+
defaultValues: {
|
25
|
+
label: "",
|
26
|
+
description: "",
|
27
|
+
},
|
28
|
+
resolver: zodResolver(RefundReasonCreateSchema),
|
29
|
+
})
|
30
|
+
|
31
|
+
const { mutateAsync, isPending } = useCreateRefundReason()
|
32
|
+
|
33
|
+
const handleSubmit = form.handleSubmit(async (data) => {
|
34
|
+
await mutateAsync(data, {
|
35
|
+
onSuccess: ({ refund_reason }) => {
|
36
|
+
toast.success(
|
37
|
+
t("refundReasons.create.successToast", {
|
38
|
+
label: refund_reason.label,
|
39
|
+
})
|
40
|
+
)
|
41
|
+
handleSuccess(`../`)
|
42
|
+
},
|
43
|
+
onError: (error) => {
|
44
|
+
toast.error(error.message)
|
45
|
+
},
|
46
|
+
})
|
47
|
+
})
|
48
|
+
|
49
|
+
return (
|
50
|
+
<RouteFocusModal.Form form={form}>
|
51
|
+
<KeyboundForm
|
52
|
+
className="flex size-full flex-col overflow-hidden"
|
53
|
+
onSubmit={handleSubmit}
|
54
|
+
>
|
55
|
+
<RouteFocusModal.Header />
|
56
|
+
<RouteFocusModal.Body className="flex flex-1 justify-center overflow-auto px-6 py-16">
|
57
|
+
<div className="flex w-full max-w-[720px] flex-col gap-y-8">
|
58
|
+
<div className="flex flex-col gap-y-1">
|
59
|
+
<RouteFocusModal.Title asChild>
|
60
|
+
<Heading>{t("refundReasons.create.header")}</Heading>
|
61
|
+
</RouteFocusModal.Title>
|
62
|
+
<RouteFocusModal.Description asChild>
|
63
|
+
<Text size="small" className="text-ui-fg-subtle">
|
64
|
+
{t("refundReasons.create.subtitle")}
|
65
|
+
</Text>
|
66
|
+
</RouteFocusModal.Description>
|
67
|
+
</div>
|
68
|
+
<div className="grid gap-4 md:grid-cols-2">
|
69
|
+
<Form.Field
|
70
|
+
control={form.control}
|
71
|
+
name="label"
|
72
|
+
render={({ field }) => {
|
73
|
+
return (
|
74
|
+
<Form.Item>
|
75
|
+
<Form.Label>
|
76
|
+
{t("refundReasons.fields.label.label")}
|
77
|
+
</Form.Label>
|
78
|
+
<Form.Control>
|
79
|
+
<Input
|
80
|
+
{...field}
|
81
|
+
placeholder={t(
|
82
|
+
"refundReasons.fields.label.placeholder"
|
83
|
+
)}
|
84
|
+
/>
|
85
|
+
</Form.Control>
|
86
|
+
<Form.ErrorMessage />
|
87
|
+
</Form.Item>
|
88
|
+
)
|
89
|
+
}}
|
90
|
+
/>
|
91
|
+
</div>
|
92
|
+
<Form.Field
|
93
|
+
control={form.control}
|
94
|
+
name="description"
|
95
|
+
render={({ field }) => {
|
96
|
+
return (
|
97
|
+
<Form.Item>
|
98
|
+
<Form.Label optional>
|
99
|
+
{t("refundReasons.fields.description.label")}
|
100
|
+
</Form.Label>
|
101
|
+
<Form.Control>
|
102
|
+
<Textarea
|
103
|
+
{...field}
|
104
|
+
placeholder={t(
|
105
|
+
"refundReasons.fields.description.placeholder"
|
106
|
+
)}
|
107
|
+
/>
|
108
|
+
</Form.Control>
|
109
|
+
<Form.ErrorMessage />
|
110
|
+
</Form.Item>
|
111
|
+
)
|
112
|
+
}}
|
113
|
+
/>
|
114
|
+
</div>
|
115
|
+
</RouteFocusModal.Body>
|
116
|
+
<RouteFocusModal.Footer>
|
117
|
+
<div className="flex items-center justify-end gap-2">
|
118
|
+
<RouteFocusModal.Close asChild>
|
119
|
+
<Button size="small" variant="secondary" type="button">
|
120
|
+
{t("actions.cancel")}
|
121
|
+
</Button>
|
122
|
+
</RouteFocusModal.Close>
|
123
|
+
<Button size="small" type="submit" isLoading={isPending}>
|
124
|
+
{t("actions.save")}
|
125
|
+
</Button>
|
126
|
+
</div>
|
127
|
+
</RouteFocusModal.Footer>
|
128
|
+
</KeyboundForm>
|
129
|
+
</RouteFocusModal.Form>
|
130
|
+
)
|
131
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { RefundReasonCreate as Component } from "./refund-reason-create"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { RouteFocusModal } from "../../../components/modals"
|
2
|
+
import { RefundReasonCreateForm } from "./components/refund-reason-create-form"
|
3
|
+
|
4
|
+
export const RefundReasonCreate = () => {
|
5
|
+
return (
|
6
|
+
<RouteFocusModal>
|
7
|
+
<RefundReasonCreateForm />
|
8
|
+
</RouteFocusModal>
|
9
|
+
)
|
10
|
+
}
|
package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { RefundReasonEditForm } from "./refund-reason-edit-form"
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import { zodResolver } from "@hookform/resolvers/zod"
|
2
|
+
import { HttpTypes } from "@medusajs/types"
|
3
|
+
import { Button, Input, Textarea, toast } from "@medusajs/ui"
|
4
|
+
import { useForm } from "react-hook-form"
|
5
|
+
import { useTranslation } from "react-i18next"
|
6
|
+
import { z } from "zod"
|
7
|
+
|
8
|
+
import { Form } from "../../../../../components/common/form"
|
9
|
+
import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
|
10
|
+
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
11
|
+
import { useUpdateRefundReason } from "../../../../../hooks/api/refund-reasons"
|
12
|
+
|
13
|
+
type RefundReasonEditFormProps = {
|
14
|
+
refundReason: HttpTypes.AdminRefundReason
|
15
|
+
}
|
16
|
+
|
17
|
+
const RefundReasonEditSchema = z.object({
|
18
|
+
label: z.string().min(1),
|
19
|
+
description: z.string().optional(),
|
20
|
+
})
|
21
|
+
|
22
|
+
export const RefundReasonEditForm = ({
|
23
|
+
refundReason,
|
24
|
+
}: RefundReasonEditFormProps) => {
|
25
|
+
const { t } = useTranslation()
|
26
|
+
const { handleSuccess } = useRouteModal()
|
27
|
+
|
28
|
+
const form = useForm<z.infer<typeof RefundReasonEditSchema>>({
|
29
|
+
defaultValues: {
|
30
|
+
label: refundReason.label,
|
31
|
+
description: refundReason.description ?? undefined,
|
32
|
+
},
|
33
|
+
resolver: zodResolver(RefundReasonEditSchema),
|
34
|
+
})
|
35
|
+
|
36
|
+
const { mutateAsync, isPending } = useUpdateRefundReason(refundReason.id)
|
37
|
+
|
38
|
+
const handleSubmit = form.handleSubmit(async (data) => {
|
39
|
+
await mutateAsync(data, {
|
40
|
+
onSuccess: ({ refund_reason }) => {
|
41
|
+
toast.success(
|
42
|
+
t("refundReasons.edit.successToast", {
|
43
|
+
label: refund_reason.label,
|
44
|
+
})
|
45
|
+
)
|
46
|
+
handleSuccess()
|
47
|
+
},
|
48
|
+
onError: (error) => {
|
49
|
+
toast.error(error.message)
|
50
|
+
},
|
51
|
+
})
|
52
|
+
})
|
53
|
+
|
54
|
+
return (
|
55
|
+
<RouteDrawer.Form form={form}>
|
56
|
+
<KeyboundForm
|
57
|
+
className="flex size-full flex-col overflow-hidden"
|
58
|
+
onSubmit={handleSubmit}
|
59
|
+
>
|
60
|
+
<RouteDrawer.Body className="flex flex-1 flex-col gap-y-4 overflow-auto">
|
61
|
+
<Form.Field
|
62
|
+
control={form.control}
|
63
|
+
name="label"
|
64
|
+
render={({ field }) => {
|
65
|
+
return (
|
66
|
+
<Form.Item>
|
67
|
+
<Form.Label>
|
68
|
+
{t("refundReasons.fields.label.label")}
|
69
|
+
</Form.Label>
|
70
|
+
<Form.Control>
|
71
|
+
<Input
|
72
|
+
{...field}
|
73
|
+
placeholder={t("refundReasons.fields.label.placeholder")}
|
74
|
+
/>
|
75
|
+
</Form.Control>
|
76
|
+
<Form.ErrorMessage />
|
77
|
+
</Form.Item>
|
78
|
+
)
|
79
|
+
}}
|
80
|
+
/>
|
81
|
+
<Form.Field
|
82
|
+
control={form.control}
|
83
|
+
name="description"
|
84
|
+
render={({ field }) => {
|
85
|
+
return (
|
86
|
+
<Form.Item>
|
87
|
+
<Form.Label optional>
|
88
|
+
{t("refundReasons.fields.description.label")}
|
89
|
+
</Form.Label>
|
90
|
+
<Form.Control>
|
91
|
+
<Textarea
|
92
|
+
{...field}
|
93
|
+
placeholder={t(
|
94
|
+
"refundReasons.fields.description.placeholder"
|
95
|
+
)}
|
96
|
+
/>
|
97
|
+
</Form.Control>
|
98
|
+
<Form.ErrorMessage />
|
99
|
+
</Form.Item>
|
100
|
+
)
|
101
|
+
}}
|
102
|
+
/>
|
103
|
+
</RouteDrawer.Body>
|
104
|
+
<RouteDrawer.Footer>
|
105
|
+
<div className="flex items-center justify-end gap-x-2">
|
106
|
+
<RouteDrawer.Close asChild>
|
107
|
+
<Button variant="secondary" size="small" type="button">
|
108
|
+
{t("actions.cancel")}
|
109
|
+
</Button>
|
110
|
+
</RouteDrawer.Close>
|
111
|
+
<Button size="small" type="submit" isLoading={isPending}>
|
112
|
+
{t("actions.save")}
|
113
|
+
</Button>
|
114
|
+
</div>
|
115
|
+
</RouteDrawer.Footer>
|
116
|
+
</KeyboundForm>
|
117
|
+
</RouteDrawer.Form>
|
118
|
+
)
|
119
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { RefundReasonEdit as Component } from "./refund-reason-edit"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Heading } from "@medusajs/ui"
|
2
|
+
import { useTranslation } from "react-i18next"
|
3
|
+
import { useParams } from "react-router-dom"
|
4
|
+
import { RouteDrawer } from "../../../components/modals"
|
5
|
+
import { useRefundReason } from "../../../hooks/api/refund-reasons"
|
6
|
+
import { RefundReasonEditForm } from "./components/refund-reason-edit-form"
|
7
|
+
|
8
|
+
export const RefundReasonEdit = () => {
|
9
|
+
const { id } = useParams()
|
10
|
+
const { t } = useTranslation()
|
11
|
+
|
12
|
+
const { refund_reason, isPending, isError, error } = useRefundReason(id!)
|
13
|
+
|
14
|
+
const ready = !isPending && !!refund_reason
|
15
|
+
|
16
|
+
if (isError) {
|
17
|
+
throw error
|
18
|
+
}
|
19
|
+
|
20
|
+
return (
|
21
|
+
<RouteDrawer>
|
22
|
+
<RouteDrawer.Header>
|
23
|
+
<RouteDrawer.Title asChild>
|
24
|
+
<Heading>{t("refundReasons.edit.header")}</Heading>
|
25
|
+
</RouteDrawer.Title>
|
26
|
+
<RouteDrawer.Description className="sr-only">
|
27
|
+
{t("refundReasons.edit.subtitle")}
|
28
|
+
</RouteDrawer.Description>
|
29
|
+
</RouteDrawer.Header>
|
30
|
+
{ready && <RefundReasonEditForm refundReason={refund_reason} />}
|
31
|
+
</RouteDrawer>
|
32
|
+
)
|
33
|
+
}
|
package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { RefundReasonListTable } from "./refund-reason-list-table"
|