@medusajs/dashboard 2.10.4-snapshot-20250922195925 → 2.10.4-snapshot-20250923121159
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-PLZXWFNV.mjs → add-campaign-promotions-JOVLXLS4.mjs} +3 -3
- package/dist/{api-key-management-detail-ZQFNZNWW.mjs → api-key-management-detail-I7T67TXF.mjs} +2 -3
- package/dist/{api-key-management-sales-channels-WL5L5XWM.mjs → api-key-management-sales-channels-6GN6RVZ2.mjs} +1 -1
- package/dist/app.css +0 -3
- package/dist/app.js +3320 -4024
- package/dist/app.mjs +3 -4
- package/dist/{campaign-detail-VTCCVWKS.mjs → campaign-detail-NRZHGINV.mjs} +4 -5
- package/dist/{categories-metadata-FTFYPASQ.mjs → categories-metadata-GXWJ3HOG.mjs} +1 -2
- package/dist/{category-detail-QHU2CLYA.mjs → category-detail-ENUI5EFL.mjs} +2 -3
- package/dist/{category-products-YGTL7GXQ.mjs → category-products-ZG5QDWSW.mjs} +2 -3
- package/dist/{chunk-JO6QASTJ.mjs → chunk-37UXEJF2.mjs} +1 -1
- package/dist/{chunk-BM5ZIV5V.mjs → chunk-5WKYR6PY.mjs} +1 -1
- package/dist/{chunk-VE7JFMAN.mjs → chunk-6AGMMT5H.mjs} +2 -2
- package/dist/{chunk-XTNS2NRD.mjs → chunk-BHZAQZYP.mjs} +1 -1
- package/dist/{chunk-6V6KATTW.mjs → chunk-JHXKKOHO.mjs} +10 -33
- package/dist/{chunk-FTVAORQM.mjs → chunk-JIQQKKLO.mjs} +1 -1
- package/dist/{chunk-5CE3JPWD.mjs → chunk-JMQ6V54O.mjs} +1 -1
- package/dist/{chunk-CU5EFQSB.mjs → chunk-NRBOPOMS.mjs} +1 -1
- package/dist/{chunk-BSBCIU6C.mjs → chunk-OGHQ6VJI.mjs} +5 -0
- package/dist/{chunk-K3OMOMRB.mjs → chunk-OKMF4YI7.mjs} +0 -25
- package/dist/{chunk-PHXKD2LR.mjs → chunk-OLUNPPBR.mjs} +1 -1
- package/dist/{chunk-WYDDFRYM.mjs → chunk-RVOPC44F.mjs} +103 -135
- package/dist/{chunk-YPDTZXV6.mjs → chunk-Y4YXZY7R.mjs} +1 -1
- package/dist/{chunk-UNM3LPTG.mjs → chunk-YM4QJC6Y.mjs} +24 -11
- package/dist/{chunk-PPI7PTY6.mjs → chunk-ZJA7VBUR.mjs} +6 -33
- package/dist/{collection-add-products-OJ2EZLC7.mjs → collection-add-products-2ISNNIHD.mjs} +2 -3
- package/dist/{collection-detail-RMZK523E.mjs → collection-detail-OSX6NHNQ.mjs} +2 -3
- package/dist/{collection-list-BJ3VNZAA.mjs → collection-list-MPIYSHQJ.mjs} +3 -4
- package/dist/{collection-metadata-R3DI65D3.mjs → collection-metadata-EOFYXEQI.mjs} +1 -2
- package/dist/{customer-detail-G7G6PYOO.mjs → customer-detail-FCNRRZSW.mjs} +1 -2
- package/dist/{customer-group-detail-XQ32DPQ3.mjs → customer-group-detail-QI3QLJJL.mjs} +1 -2
- package/dist/{customer-group-list-CARES5CM.mjs → customer-group-list-D26UKQMR.mjs} +2 -3
- package/dist/{customers-add-customer-group-NLPVKARS.mjs → customers-add-customer-group-5TFTVDB6.mjs} +1 -2
- package/dist/{edit-rules-JRLCVE26.mjs → edit-rules-63NG4QVR.mjs} +1 -2
- package/dist/{inventory-create-ZC6HV2FY.mjs → inventory-create-RIVJFJJQ.mjs} +1 -2
- package/dist/{inventory-detail-WVI4FTTH.mjs → inventory-detail-QHL7TJFZ.mjs} +2 -3
- package/dist/{inventory-metadata-BLIJBNQS.mjs → inventory-metadata-FH4CHJBA.mjs} +1 -2
- package/dist/{inventory-stock-ZCTXWRK6.mjs → inventory-stock-D6E4LQRK.mjs} +1 -2
- package/dist/{location-detail-GV3POY4C.mjs → location-detail-Z6ZDX6RY.mjs} +1 -2
- package/dist/{location-fulfillment-providers-INUQXJYU.mjs → location-fulfillment-providers-45VXZMZI.mjs} +2 -3
- package/dist/location-list-62KBWY4T.mjs +316 -0
- package/dist/{location-sales-channels-2BOIPBBG.mjs → location-sales-channels-O5XLIPAR.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-create-6KO3QDMQ.mjs → location-service-zone-shipping-option-create-NO3665DC.mjs} +1 -2
- package/dist/{login-57FIKGXA.mjs → login-DSPNELTI.mjs} +1 -2
- package/dist/{order-create-claim-LXKBCAWN.mjs → order-create-claim-V63BWLB5.mjs} +1 -2
- package/dist/{order-create-edit-264PTIEI.mjs → order-create-edit-NPF4UZ4D.mjs} +1 -2
- package/dist/{order-create-exchange-ZMUVPYM3.mjs → order-create-exchange-RHIPPSKU.mjs} +1 -2
- package/dist/{order-create-fulfillment-LE6O3SA5.mjs → order-create-fulfillment-4SSUHQ75.mjs} +1 -2
- package/dist/{order-create-refund-B7BO2EJL.mjs → order-create-refund-QVQC5ZP5.mjs} +1 -2
- package/dist/{order-create-shipment-UOPCS5N7.mjs → order-create-shipment-TJAARKWA.mjs} +1 -2
- package/dist/{order-detail-SG7AXBRS.mjs → order-detail-2MIN6B2I.mjs} +1 -2
- package/dist/{order-edit-billing-address-RPPJ4Z36.mjs → order-edit-billing-address-QP2I5F3E.mjs} +1 -2
- package/dist/{order-edit-email-A7D5HTU6.mjs → order-edit-email-7WT7XTHB.mjs} +1 -2
- package/dist/{order-edit-shipping-address-LXKC5CJE.mjs → order-edit-shipping-address-3QFMQP4I.mjs} +1 -2
- package/dist/{order-list-ZCMNSZYB.mjs → order-list-73DBATIK.mjs} +2 -2
- package/dist/{order-metadata-KS47UOEE.mjs → order-metadata-YJS26DHK.mjs} +1 -2
- package/dist/{order-receive-return-PDU2YVLT.mjs → order-receive-return-PZMMMUB2.mjs} +1 -2
- package/dist/{order-request-transfer-WMQKDLDF.mjs → order-request-transfer-QBIZD36E.mjs} +1 -2
- package/dist/{price-list-create-QZSB4W5Z.mjs → price-list-create-RXDH5CXF.mjs} +2 -3
- package/dist/{price-list-detail-2FMINPFT.mjs → price-list-detail-PKIKOJ4H.mjs} +2 -3
- package/dist/{price-list-prices-add-WYK2QBAI.mjs → price-list-prices-add-2CDPUSYA.mjs} +2 -3
- package/dist/{product-attributes-KDXI2RNP.mjs → product-attributes-FQDJCNUB.mjs} +4 -5
- package/dist/{product-create-TVYPK4VC.mjs → product-create-W37RQLON.mjs} +5 -6
- package/dist/{product-create-variant-6YWLDA2X.mjs → product-create-variant-KJKQ6ROY.mjs} +1 -2
- package/dist/{product-detail-RFKXMYE5.mjs → product-detail-TANIKAEK.mjs} +5 -6
- package/dist/{product-edit-5FNY7HG4.mjs → product-edit-DO76GHBI.mjs} +4 -5
- package/dist/{product-export-BEAUMFAZ.mjs → product-export-XERWEI5H.mjs} +2 -3
- package/dist/{product-import-SOX4UJPM.mjs → product-import-AGFJMSVK.mjs} +1 -2
- package/dist/{product-list-ZVXATJRE.mjs → product-list-KJ3HXPLB.mjs} +4 -5
- package/dist/{product-media-JPU23SPH.mjs → product-media-VG4YM2W6.mjs} +2 -2
- package/dist/{product-metadata-QRRCHZZB.mjs → product-metadata-NZ3HKO67.mjs} +1 -2
- package/dist/{product-organization-QTWB7VMB.mjs → product-organization-OOVUGXNP.mjs} +4 -5
- package/dist/{product-sales-channels-UGPAXFAV.mjs → product-sales-channels-QEJRSCAU.mjs} +1 -1
- package/dist/{product-shipping-profile-Q6UX6ZNJ.mjs → product-shipping-profile-FFMKOF6B.mjs} +4 -5
- package/dist/{product-stock-TSAIHVY6.mjs → product-stock-SUVEQZML.mjs} +1 -2
- package/dist/{product-tag-create-5NZJS2D2.mjs → product-tag-create-T6HVAQKN.mjs} +1 -2
- package/dist/{product-tag-detail-3XHUROBO.mjs → product-tag-detail-HOWUZC3P.mjs} +5 -6
- package/dist/{product-tag-edit-YYOOHKGG.mjs → product-tag-edit-WWQDNDRC.mjs} +1 -2
- package/dist/{product-tag-list-5XTTMNOA.mjs → product-tag-list-FAKSLONF.mjs} +5 -6
- package/dist/{product-tag-metadata-YAD3MPWF.mjs → product-tag-metadata-6B56VEZU.mjs} +1 -2
- package/dist/{product-type-detail-MNTAHQKJ.mjs → product-type-detail-KN64HYUV.mjs} +2 -3
- package/dist/{product-type-metadata-HWR3WBGT.mjs → product-type-metadata-F3FTI6OG.mjs} +1 -2
- package/dist/{product-variant-detail-DKFAG3KO.mjs → product-variant-detail-OUHBUY4J.mjs} +1 -2
- package/dist/{product-variant-edit-EZENYVAN.mjs → product-variant-edit-NBYHDUJ5.mjs} +1 -2
- package/dist/{product-variant-metadata-S7QENSUG.mjs → product-variant-metadata-XDVLJYGQ.mjs} +1 -2
- package/dist/{promotion-create-O3KUSPIU.mjs → promotion-create-UUOG52D5.mjs} +1 -2
- package/dist/{promotion-detail-5DU6ULJG.mjs → promotion-detail-GONXLJZ2.mjs} +113 -65
- package/dist/{promotion-list-Q2FOGORE.mjs → promotion-list-NNEMVJ6I.mjs} +3 -3
- package/dist/{region-metadata-G3JH5ZN6.mjs → region-metadata-IQVB4ERU.mjs} +1 -2
- package/dist/{reservation-detail-PJXS67UM.mjs → reservation-detail-RTGHD35L.mjs} +1 -2
- package/dist/{reservation-metadata-UCKQB66O.mjs → reservation-metadata-WKJXBRLQ.mjs} +1 -2
- package/dist/{reset-password-5KIEBJHN.mjs → reset-password-ANJHGYUE.mjs} +1 -1
- package/dist/{return-reason-list-OGFYWMC5.mjs → return-reason-list-MOP7YWMZ.mjs} +2 -2
- package/dist/{sales-channel-add-products-CSMNFGHD.mjs → sales-channel-add-products-OKVZJ6FI.mjs} +2 -3
- package/dist/{sales-channel-detail-ZSA3HNWW.mjs → sales-channel-detail-WESBK6Q7.mjs} +2 -3
- package/dist/{sales-channel-list-X5ADP34V.mjs → sales-channel-list-LKVHXUXW.mjs} +2 -3
- package/dist/{sales-channel-metadata-ABWIDI3B.mjs → sales-channel-metadata-2OQAHYB4.mjs} +1 -2
- package/dist/{shipping-option-type-create-Q2X5OMJS.mjs → shipping-option-type-create-3CGPGDYJ.mjs} +1 -2
- package/dist/{shipping-option-type-detail-VT3Y5QQ4.mjs → shipping-option-type-detail-S23H2OGW.mjs} +2 -3
- package/dist/{shipping-option-type-edit-IA3EER2N.mjs → shipping-option-type-edit-IHE7XM6M.mjs} +1 -2
- package/dist/{shipping-option-type-list-JZPKAL3H.mjs → shipping-option-type-list-47GRJ6EC.mjs} +2 -3
- package/dist/{shipping-profile-metadata-EYXBWBF2.mjs → shipping-profile-metadata-OXWOXAAR.mjs} +1 -2
- package/dist/{store-detail-LI72QMUZ.mjs → store-detail-4K7TW2TP.mjs} +1 -2
- package/dist/{store-metadata-ZITLAS5H.mjs → store-metadata-JP2CI7EF.mjs} +1 -2
- package/dist/{tax-region-create-IU2R5VIY.mjs → tax-region-create-IWM4755I.mjs} +2 -3
- package/dist/{tax-region-detail-6FHD35LB.mjs → tax-region-detail-V2F2DONN.mjs} +1 -2
- package/dist/{tax-region-edit-O2WJXYIE.mjs → tax-region-edit-CJPMYTBF.mjs} +1 -2
- package/dist/{tax-region-province-detail-YDBU4CUU.mjs → tax-region-province-detail-4PUQ5ADW.mjs} +1 -2
- package/dist/{tax-region-tax-override-create-EF3LLZWM.mjs → tax-region-tax-override-create-3SCIOK4P.mjs} +5 -6
- package/dist/{tax-region-tax-override-edit-2DG3J6CO.mjs → tax-region-tax-override-edit-P3QJKET3.mjs} +5 -6
- package/dist/{user-list-3YFYZFSK.mjs → user-list-MKJLB5CQ.mjs} +1 -1
- package/dist/{user-metadata-QUIFIM5G.mjs → user-metadata-ZURLDLGC.mjs} +1 -2
- package/dist/{workflow-execution-detail-PVSQ2VGE.mjs → workflow-execution-detail-4R6AFFHV.mjs} +1 -2
- package/package.json +9 -9
- package/src/components/data-table/data-table.tsx +64 -46
- package/src/components/layout/settings-layout/settings-layout.tsx +0 -4
- package/src/dashboard-app/routes/get-route.map.tsx +0 -36
- package/src/hooks/api/refund-reasons.tsx +9 -113
- package/src/hooks/table/columns/index.ts +0 -1
- package/src/hooks/table/query/index.ts +0 -1
- package/src/i18n/translations/$schema.json +19 -112
- package/src/i18n/translations/en.json +6 -33
- package/src/routes/locations/location-list/index.ts +0 -1
- package/src/routes/locations/location-list/location-list.tsx +51 -19
- package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
- package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
- package/dist/chunk-BKJC5BGQ.mjs +0 -53
- package/dist/chunk-YZJ3W776.mjs +0 -87
- package/dist/location-list-BKK2PAKF.mjs +0 -297
- package/dist/refund-reason-create-NSZFGXWI.mjs +0 -158
- package/dist/refund-reason-edit-RKUSPQCL.mjs +0 -144
- package/dist/refund-reason-list-2F5PFERT.mjs +0 -273
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +0 -28
- package/src/hooks/table/query/use-refund-reason-table-query.tsx +0 -32
- package/src/routes/locations/location-list/components/location-list-header/index.ts +0 -1
- package/src/routes/locations/location-list/components/location-list-header/location-list-header.tsx +0 -21
- package/src/routes/locations/location-list/loader.ts +0 -36
- package/src/routes/refund-reasons/common/hooks/use-delete-refund-reason-action.tsx +0 -34
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +0 -1
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +0 -131
- package/src/routes/refund-reasons/refund-reason-create/index.ts +0 -1
- package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +0 -10
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +0 -1
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +0 -119
- package/src/routes/refund-reasons/refund-reason-edit/index.ts +0 -1
- package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +0 -33
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +0 -1
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +0 -131
- package/src/routes/refund-reasons/refund-reason-list/index.ts +0 -2
- package/src/routes/refund-reasons/refund-reason-list/loader.ts +0 -16
- package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +0 -21
@@ -5830,9 +5830,23 @@
|
|
5830
5830
|
"properties": {
|
5831
5831
|
"description": {
|
5832
5832
|
"type": "string"
|
5833
|
+
},
|
5834
|
+
"noRecordsMessage": {
|
5835
|
+
"type": "string"
|
5836
|
+
},
|
5837
|
+
"noRecordsMessageEmpty": {
|
5838
|
+
"type": "string"
|
5839
|
+
},
|
5840
|
+
"noRecordsMessageFiltered": {
|
5841
|
+
"type": "string"
|
5833
5842
|
}
|
5834
5843
|
},
|
5835
|
-
"required": [
|
5844
|
+
"required": [
|
5845
|
+
"description",
|
5846
|
+
"noRecordsMessage",
|
5847
|
+
"noRecordsMessageEmpty",
|
5848
|
+
"noRecordsMessageFiltered"
|
5849
|
+
],
|
5836
5850
|
"additionalProperties": false
|
5837
5851
|
},
|
5838
5852
|
"create": {
|
@@ -5872,9 +5886,12 @@
|
|
5872
5886
|
"properties": {
|
5873
5887
|
"confirmation": {
|
5874
5888
|
"type": "string"
|
5889
|
+
},
|
5890
|
+
"successToast": {
|
5891
|
+
"type": "string"
|
5875
5892
|
}
|
5876
5893
|
},
|
5877
|
-
"required": ["confirmation"],
|
5894
|
+
"required": ["confirmation", "successToast"],
|
5878
5895
|
"additionalProperties": false
|
5879
5896
|
},
|
5880
5897
|
"fulfillmentProviders": {
|
@@ -10202,115 +10219,6 @@
|
|
10202
10219
|
],
|
10203
10220
|
"additionalProperties": false
|
10204
10221
|
},
|
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
|
-
},
|
10314
10222
|
"login": {
|
10315
10223
|
"type": "object",
|
10316
10224
|
"properties": {
|
@@ -11839,7 +11747,6 @@
|
|
11839
11747
|
"salesChannels",
|
11840
11748
|
"apiKeyManagement",
|
11841
11749
|
"returnReasons",
|
11842
|
-
"refundReasons",
|
11843
11750
|
"login",
|
11844
11751
|
"invite",
|
11845
11752
|
"resetPassword",
|
@@ -1534,7 +1534,10 @@
|
|
1534
1534
|
"stockLocations": {
|
1535
1535
|
"domain": "Locations & Shipping",
|
1536
1536
|
"list": {
|
1537
|
-
"description": "Manage your store's stock locations and shipping options."
|
1537
|
+
"description": "Manage your store's stock locations and shipping options.",
|
1538
|
+
"noRecordsMessage": "No records",
|
1539
|
+
"noRecordsMessageEmpty": "No locations found",
|
1540
|
+
"noRecordsMessageFiltered": "No locations found matching the filters"
|
1538
1541
|
},
|
1539
1542
|
"create": {
|
1540
1543
|
"header": "Create Stock Location",
|
@@ -1547,7 +1550,8 @@
|
|
1547
1550
|
"successToast": "Location {{name}} was successfully updated."
|
1548
1551
|
},
|
1549
1552
|
"delete": {
|
1550
|
-
"confirmation": "You are about to delete the stock location \"{{name}}\". This action cannot be undone."
|
1553
|
+
"confirmation": "You are about to delete the stock location \"{{name}}\". This action cannot be undone.",
|
1554
|
+
"successToast": "Location \"{{name}}\" was successfully deleted."
|
1551
1555
|
},
|
1552
1556
|
"fulfillmentProviders": {
|
1553
1557
|
"header": "Fulfillment Providers",
|
@@ -2740,37 +2744,6 @@
|
|
2740
2744
|
}
|
2741
2745
|
}
|
2742
2746
|
},
|
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
|
-
},
|
2774
2747
|
"login": {
|
2775
2748
|
"forgotPassword": "Forgot password? - <0>Reset</0>",
|
2776
2749
|
"title": "Welcome to Medusa",
|
@@ -1,34 +1,40 @@
|
|
1
1
|
import { ShoppingBag, TruckFast } from "@medusajs/icons"
|
2
2
|
import { Container, Heading } from "@medusajs/ui"
|
3
3
|
import { useTranslation } from "react-i18next"
|
4
|
-
import { useLoaderData } from "react-router-dom"
|
5
4
|
|
6
5
|
import { useStockLocations } from "../../../hooks/api/stock-locations"
|
7
|
-
import LocationListItem from "./components/location-list-item/location-list-item"
|
8
6
|
import { LOCATION_LIST_FIELDS } from "./constants"
|
9
|
-
import {
|
7
|
+
import { useLocationListTableColumns } from "./use-location-list-table-columns"
|
8
|
+
import { useLocationListTableQuery } from "./use-location-list-table-query"
|
10
9
|
|
10
|
+
import { DataTable } from "../../../components/data-table"
|
11
11
|
import { SidebarLink } from "../../../components/common/sidebar-link/sidebar-link"
|
12
12
|
import { TwoColumnPage } from "../../../components/layout/pages"
|
13
13
|
import { useExtension } from "../../../providers/extension-provider"
|
14
|
-
|
14
|
+
|
15
|
+
const PAGE_SIZE = 20
|
16
|
+
const PREFIX = "loc"
|
15
17
|
|
16
18
|
export function LocationList() {
|
17
|
-
const
|
18
|
-
|
19
|
-
|
19
|
+
const { t } = useTranslation()
|
20
|
+
|
21
|
+
const searchParams = useLocationListTableQuery({
|
22
|
+
pageSize: PAGE_SIZE,
|
23
|
+
prefix: PREFIX,
|
24
|
+
})
|
20
25
|
|
21
26
|
const {
|
22
27
|
stock_locations: stockLocations = [],
|
28
|
+
count,
|
23
29
|
isError,
|
24
30
|
error,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
)
|
31
|
+
isLoading,
|
32
|
+
} = useStockLocations({
|
33
|
+
fields: LOCATION_LIST_FIELDS,
|
34
|
+
...searchParams,
|
35
|
+
})
|
31
36
|
|
37
|
+
const columns = useLocationListTableColumns()
|
32
38
|
const { getWidgets } = useExtension()
|
33
39
|
|
34
40
|
if (isError) {
|
@@ -46,12 +52,38 @@ export function LocationList() {
|
|
46
52
|
showJSON
|
47
53
|
>
|
48
54
|
<TwoColumnPage.Main>
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
+
<Container className="flex flex-col divide-y p-0">
|
56
|
+
<DataTable
|
57
|
+
data={stockLocations}
|
58
|
+
columns={columns}
|
59
|
+
rowCount={count}
|
60
|
+
pageSize={PAGE_SIZE}
|
61
|
+
getRowId={(row) => row.id}
|
62
|
+
heading={t("stockLocations.domain")}
|
63
|
+
subHeading={t("stockLocations.list.description")}
|
64
|
+
emptyState={{
|
65
|
+
empty: {
|
66
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
67
|
+
description: t("stockLocations.list.noRecordsMessageEmpty"),
|
68
|
+
},
|
69
|
+
filtered: {
|
70
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
71
|
+
description: t("stockLocations.list.noRecordsMessageFiltered"),
|
72
|
+
},
|
73
|
+
}}
|
74
|
+
actions={[
|
75
|
+
{
|
76
|
+
label: t("actions.create"),
|
77
|
+
to: "create",
|
78
|
+
},
|
79
|
+
]}
|
80
|
+
isLoading={isLoading}
|
81
|
+
rowHref={(row) => `/settings/locations/${row.id}`}
|
82
|
+
enableSearch={true}
|
83
|
+
prefix={PREFIX}
|
84
|
+
layout="fill"
|
85
|
+
/>
|
86
|
+
</Container>
|
55
87
|
</TwoColumnPage.Main>
|
56
88
|
<TwoColumnPage.Sidebar>
|
57
89
|
<LinksSection />
|
@@ -0,0 +1,185 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
2
|
+
import { PencilSquare, Trash } from "@medusajs/icons"
|
3
|
+
import {
|
4
|
+
createDataTableColumnHelper,
|
5
|
+
StatusBadge,
|
6
|
+
toast,
|
7
|
+
usePrompt,
|
8
|
+
} from "@medusajs/ui"
|
9
|
+
import { useTranslation } from "react-i18next"
|
10
|
+
import { useMemo } from "react"
|
11
|
+
import { useNavigate } from "react-router-dom"
|
12
|
+
import { FetchError } from "@medusajs/js-sdk"
|
13
|
+
|
14
|
+
import { PlaceholderCell } from "../../../components/table/table-cells/common/placeholder-cell"
|
15
|
+
import { getFormattedAddress } from "../../../lib/addresses"
|
16
|
+
import { FulfillmentSetType } from "../common/constants"
|
17
|
+
import { queryClient } from "../../../lib/query-client"
|
18
|
+
import { stockLocationsQueryKeys } from "../../../hooks/api/stock-locations"
|
19
|
+
import { ListSummary } from "../../../components/common/list-summary"
|
20
|
+
import { sdk } from "../../../lib/client"
|
21
|
+
|
22
|
+
const columnHelper = createDataTableColumnHelper<HttpTypes.AdminStockLocation>()
|
23
|
+
|
24
|
+
export const useLocationListTableColumns = () => {
|
25
|
+
const { t } = useTranslation()
|
26
|
+
const navigate = useNavigate()
|
27
|
+
const prompt = usePrompt()
|
28
|
+
|
29
|
+
const handleDelete = async (location: HttpTypes.AdminStockLocation) => {
|
30
|
+
const result = await prompt({
|
31
|
+
title: t("general.areYouSure"),
|
32
|
+
description: t("stockLocations.delete.confirmation", {
|
33
|
+
name: location.name,
|
34
|
+
}),
|
35
|
+
confirmText: t("actions.remove"),
|
36
|
+
cancelText: t("actions.cancel"),
|
37
|
+
})
|
38
|
+
|
39
|
+
if (!result) {
|
40
|
+
return
|
41
|
+
}
|
42
|
+
|
43
|
+
try {
|
44
|
+
await sdk.admin.stockLocation.delete(location.id)
|
45
|
+
queryClient.invalidateQueries({
|
46
|
+
queryKey: stockLocationsQueryKeys.lists(),
|
47
|
+
})
|
48
|
+
|
49
|
+
queryClient.invalidateQueries({
|
50
|
+
queryKey: stockLocationsQueryKeys.detail(location.id),
|
51
|
+
})
|
52
|
+
|
53
|
+
toast.success(
|
54
|
+
t("stockLocations.delete.successToast", {
|
55
|
+
name: location.name,
|
56
|
+
})
|
57
|
+
)
|
58
|
+
} catch (e) {
|
59
|
+
toast.error((e as FetchError).message)
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
return useMemo(
|
64
|
+
() => [
|
65
|
+
columnHelper.accessor("name", {
|
66
|
+
header: t("fields.name"),
|
67
|
+
cell: ({ getValue }) => {
|
68
|
+
const name = getValue()
|
69
|
+
if (!name) {
|
70
|
+
return <PlaceholderCell />
|
71
|
+
}
|
72
|
+
|
73
|
+
return (
|
74
|
+
<span className="text-ui-fg-subtle text-small truncate">
|
75
|
+
{name}
|
76
|
+
</span>
|
77
|
+
)
|
78
|
+
},
|
79
|
+
}),
|
80
|
+
columnHelper.accessor("address", {
|
81
|
+
header: t("fields.address"),
|
82
|
+
cell: ({ getValue, row }) => {
|
83
|
+
const address = getValue()
|
84
|
+
const location = row.original
|
85
|
+
|
86
|
+
if (!address) {
|
87
|
+
return <PlaceholderCell />
|
88
|
+
}
|
89
|
+
|
90
|
+
return (
|
91
|
+
<div className="flex flex-col">
|
92
|
+
<span className="text-ui-fg-subtle text-small truncate">
|
93
|
+
{getFormattedAddress({
|
94
|
+
address: location.address as HttpTypes.AdminOrderAddress,
|
95
|
+
}).join(", ")}
|
96
|
+
</span>
|
97
|
+
</div>
|
98
|
+
)
|
99
|
+
},
|
100
|
+
}),
|
101
|
+
columnHelper.accessor("fulfillment_sets", {
|
102
|
+
id: "shipping_fulfillment",
|
103
|
+
header: t("stockLocations.fulfillmentSets.shipping.header"),
|
104
|
+
cell: ({ getValue }) => {
|
105
|
+
const fulfillmentSets = getValue()
|
106
|
+
const shippingSet = fulfillmentSets?.find(
|
107
|
+
(f) => f.type === FulfillmentSetType.Shipping
|
108
|
+
)
|
109
|
+
const fulfillmentSetExists = !!shippingSet
|
110
|
+
|
111
|
+
return (
|
112
|
+
<StatusBadge color={fulfillmentSetExists ? "green" : "grey"}>
|
113
|
+
{t(
|
114
|
+
fulfillmentSetExists ? "statuses.enabled" : "statuses.disabled"
|
115
|
+
)}
|
116
|
+
</StatusBadge>
|
117
|
+
)
|
118
|
+
},
|
119
|
+
}),
|
120
|
+
columnHelper.accessor("fulfillment_sets", {
|
121
|
+
id: "pickup_fulfillment",
|
122
|
+
header: t("stockLocations.fulfillmentSets.pickup.header"),
|
123
|
+
cell: ({ getValue }) => {
|
124
|
+
const fulfillmentSets = getValue()
|
125
|
+
const pickupSet = fulfillmentSets?.find(
|
126
|
+
(f) => f.type === FulfillmentSetType.Pickup
|
127
|
+
)
|
128
|
+
const fulfillmentSetExists = !!pickupSet
|
129
|
+
|
130
|
+
return (
|
131
|
+
<StatusBadge color={fulfillmentSetExists ? "green" : "grey"}>
|
132
|
+
{t(
|
133
|
+
fulfillmentSetExists ? "statuses.enabled" : "statuses.disabled"
|
134
|
+
)}
|
135
|
+
</StatusBadge>
|
136
|
+
)
|
137
|
+
},
|
138
|
+
}),
|
139
|
+
columnHelper.accessor("sales_channels", {
|
140
|
+
header: t("stockLocations.salesChannels.label"),
|
141
|
+
cell: ({ getValue }) => {
|
142
|
+
const salesChannels = getValue()
|
143
|
+
|
144
|
+
if (!salesChannels?.length) {
|
145
|
+
return <PlaceholderCell />
|
146
|
+
}
|
147
|
+
|
148
|
+
return (
|
149
|
+
<div className="flex items-center">
|
150
|
+
<ListSummary
|
151
|
+
inline
|
152
|
+
n={1}
|
153
|
+
list={salesChannels.map((s) => s.name)}
|
154
|
+
/>
|
155
|
+
</div>
|
156
|
+
)
|
157
|
+
},
|
158
|
+
}),
|
159
|
+
columnHelper.action({
|
160
|
+
actions: (ctx) => {
|
161
|
+
const location = ctx.row.original
|
162
|
+
return [
|
163
|
+
[
|
164
|
+
{
|
165
|
+
icon: <PencilSquare />,
|
166
|
+
label: t("actions.edit"),
|
167
|
+
onClick: () => {
|
168
|
+
navigate(`/settings/locations/${location.id}/edit`)
|
169
|
+
},
|
170
|
+
},
|
171
|
+
],
|
172
|
+
[
|
173
|
+
{
|
174
|
+
icon: <Trash />,
|
175
|
+
label: t("actions.delete"),
|
176
|
+
onClick: () => handleDelete(location),
|
177
|
+
},
|
178
|
+
],
|
179
|
+
]
|
180
|
+
},
|
181
|
+
}),
|
182
|
+
],
|
183
|
+
[]
|
184
|
+
)
|
185
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { HttpTypes } from "@medusajs/types"
|
2
|
+
import { useQueryParams } from "../../../hooks/use-query-params"
|
3
|
+
|
4
|
+
export const useLocationListTableQuery = ({
|
5
|
+
pageSize = 20,
|
6
|
+
prefix,
|
7
|
+
}: {
|
8
|
+
pageSize?: number
|
9
|
+
prefix?: string
|
10
|
+
}) => {
|
11
|
+
const queryObject = useQueryParams(["order", "offset", "q"], prefix)
|
12
|
+
|
13
|
+
const { offset, ...rest } = queryObject
|
14
|
+
|
15
|
+
const searchParams: HttpTypes.AdminStockLocationListParams = {
|
16
|
+
limit: pageSize,
|
17
|
+
offset: offset ? Number(offset) : 0,
|
18
|
+
...rest,
|
19
|
+
}
|
20
|
+
|
21
|
+
return searchParams
|
22
|
+
}
|
package/dist/chunk-BKJC5BGQ.mjs
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
// src/components/common/badge-list-summary/badge-list-summary.tsx
|
2
|
-
import { Badge, Tooltip, clx } from "@medusajs/ui";
|
3
|
-
import { useTranslation } from "react-i18next";
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
5
|
-
var BadgeListSummary = ({
|
6
|
-
list,
|
7
|
-
className,
|
8
|
-
inline,
|
9
|
-
rounded = false,
|
10
|
-
n = 2
|
11
|
-
}) => {
|
12
|
-
const { t } = useTranslation();
|
13
|
-
const title = t("general.plusCount", {
|
14
|
-
count: list.length - n
|
15
|
-
});
|
16
|
-
return /* @__PURE__ */ jsxs(
|
17
|
-
"div",
|
18
|
-
{
|
19
|
-
className: clx(
|
20
|
-
"text-ui-fg-subtle txt-compact-small gap-x-2 overflow-hidden",
|
21
|
-
{
|
22
|
-
"inline-flex": inline,
|
23
|
-
flex: !inline
|
24
|
-
},
|
25
|
-
className
|
26
|
-
),
|
27
|
-
children: [
|
28
|
-
list.slice(0, n).map((item) => {
|
29
|
-
return /* @__PURE__ */ jsx(Badge, { rounded: rounded ? "full" : "base", size: "2xsmall", children: item }, item);
|
30
|
-
}),
|
31
|
-
list.length > n && /* @__PURE__ */ jsx("div", { className: "whitespace-nowrap", children: /* @__PURE__ */ jsx(
|
32
|
-
Tooltip,
|
33
|
-
{
|
34
|
-
content: /* @__PURE__ */ jsx("ul", { children: list.slice(n).map((c) => /* @__PURE__ */ jsx("li", { children: c }, c)) }),
|
35
|
-
children: /* @__PURE__ */ jsx(
|
36
|
-
Badge,
|
37
|
-
{
|
38
|
-
rounded: rounded ? "full" : "base",
|
39
|
-
size: "2xsmall",
|
40
|
-
className: "cursor-default whitespace-nowrap",
|
41
|
-
children: title
|
42
|
-
}
|
43
|
-
)
|
44
|
-
}
|
45
|
-
) })
|
46
|
-
]
|
47
|
-
}
|
48
|
-
);
|
49
|
-
};
|
50
|
-
|
51
|
-
export {
|
52
|
-
BadgeListSummary
|
53
|
-
};
|
package/dist/chunk-YZJ3W776.mjs
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
queryClient
|
3
|
-
} from "./chunk-FXYH54JP.mjs";
|
4
|
-
import {
|
5
|
-
queryKeysFactory
|
6
|
-
} from "./chunk-774WSTCC.mjs";
|
7
|
-
import {
|
8
|
-
sdk
|
9
|
-
} from "./chunk-DEQUVHHE.mjs";
|
10
|
-
|
11
|
-
// src/hooks/api/refund-reasons.tsx
|
12
|
-
import {
|
13
|
-
useMutation,
|
14
|
-
useQuery
|
15
|
-
} from "@tanstack/react-query";
|
16
|
-
var REFUND_REASONS_QUERY_KEY = "refund_reasons";
|
17
|
-
var refundReasonsQueryKeys = queryKeysFactory(REFUND_REASONS_QUERY_KEY);
|
18
|
-
var useRefundReasons = (query, options) => {
|
19
|
-
const { data, ...rest } = useQuery({
|
20
|
-
queryFn: () => sdk.admin.refundReason.list(query),
|
21
|
-
queryKey: refundReasonsQueryKeys.list(query),
|
22
|
-
...options
|
23
|
-
});
|
24
|
-
return { ...data, ...rest };
|
25
|
-
};
|
26
|
-
var useRefundReason = (id, query, options) => {
|
27
|
-
const { data, ...rest } = useQuery({
|
28
|
-
queryFn: () => sdk.admin.refundReason.retrieve(id, query),
|
29
|
-
queryKey: refundReasonsQueryKeys.detail(id),
|
30
|
-
...options
|
31
|
-
});
|
32
|
-
return { ...data, ...rest };
|
33
|
-
};
|
34
|
-
var useCreateRefundReason = (query, options) => {
|
35
|
-
return useMutation({
|
36
|
-
mutationFn: async (data) => sdk.admin.refundReason.create(data, query),
|
37
|
-
onSuccess: (data, variables, context) => {
|
38
|
-
queryClient.invalidateQueries({
|
39
|
-
queryKey: refundReasonsQueryKeys.lists()
|
40
|
-
});
|
41
|
-
options?.onSuccess?.(data, variables, context);
|
42
|
-
},
|
43
|
-
...options
|
44
|
-
});
|
45
|
-
};
|
46
|
-
var useUpdateRefundReason = (id, query, options) => {
|
47
|
-
return useMutation({
|
48
|
-
mutationFn: async (data) => sdk.admin.refundReason.update(id, data, query),
|
49
|
-
onSuccess: (data, variables, context) => {
|
50
|
-
queryClient.invalidateQueries({
|
51
|
-
queryKey: refundReasonsQueryKeys.lists()
|
52
|
-
});
|
53
|
-
queryClient.invalidateQueries({
|
54
|
-
queryKey: refundReasonsQueryKeys.detail(data.refund_reason.id, query)
|
55
|
-
});
|
56
|
-
options?.onSuccess?.(data, variables, context);
|
57
|
-
},
|
58
|
-
...options
|
59
|
-
});
|
60
|
-
};
|
61
|
-
var useDeleteRefundReason = (id, options) => {
|
62
|
-
return useMutation({
|
63
|
-
mutationFn: () => sdk.admin.refundReason.delete(id),
|
64
|
-
onSuccess: (data, variables, context) => {
|
65
|
-
queryClient.invalidateQueries({
|
66
|
-
queryKey: refundReasonsQueryKeys.lists()
|
67
|
-
});
|
68
|
-
queryClient.invalidateQueries({
|
69
|
-
queryKey: refundReasonsQueryKeys.detail(id)
|
70
|
-
});
|
71
|
-
queryClient.invalidateQueries({
|
72
|
-
queryKey: refundReasonsQueryKeys.details()
|
73
|
-
});
|
74
|
-
options?.onSuccess?.(data, variables, context);
|
75
|
-
},
|
76
|
-
...options
|
77
|
-
});
|
78
|
-
};
|
79
|
-
|
80
|
-
export {
|
81
|
-
refundReasonsQueryKeys,
|
82
|
-
useRefundReasons,
|
83
|
-
useRefundReason,
|
84
|
-
useCreateRefundReason,
|
85
|
-
useUpdateRefundReason,
|
86
|
-
useDeleteRefundReason
|
87
|
-
};
|