@medusajs/dashboard 2.10.4-snapshot-20250922195925 → 2.10.4-snapshot-20250925172615
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-3BB3BLFD.mjs} +7 -6
- package/dist/{adjust-inventory-WBEBMJN7.mjs → adjust-inventory-OIJTAKHP.mjs} +1 -1
- package/dist/{api-key-management-create-VXPZX2Q5.mjs → api-key-management-create-XDQHUNWK.mjs} +3 -3
- package/dist/{api-key-management-detail-ZQFNZNWW.mjs → api-key-management-detail-MM673US3.mjs} +16 -15
- package/dist/{api-key-management-edit-7CGMSHAY.mjs → api-key-management-edit-2SUSKI7T.mjs} +3 -3
- package/dist/{api-key-management-list-5DI3L4DV.mjs → api-key-management-list-C2WM4PHC.mjs} +8 -7
- package/dist/{api-key-management-sales-channels-WL5L5XWM.mjs → api-key-management-sales-channels-MVHVMPF6.mjs} +6 -5
- package/dist/app.css +89 -34
- package/dist/app.js +5093 -4715
- package/dist/app.mjs +18 -16
- package/dist/{campaign-budget-edit-OXNTSPGE.mjs → campaign-budget-edit-UWGCET5Z.mjs} +1 -1
- package/dist/{campaign-configuration-Z5HA2DG3.mjs → campaign-configuration-WWCCFNYQ.mjs} +1 -1
- package/dist/{campaign-create-AVBNHFC2.mjs → campaign-create-CQ3XBHSY.mjs} +4 -3
- package/dist/{campaign-detail-VTCCVWKS.mjs → campaign-detail-G2VM7CRL.mjs} +23 -22
- package/dist/{campaign-edit-3TDW52BO.mjs → campaign-edit-R43GXNET.mjs} +1 -1
- package/dist/{campaign-list-G4MD3RPU.mjs → campaign-list-CDO5PRTL.mjs} +7 -6
- package/dist/{categories-metadata-FTFYPASQ.mjs → categories-metadata-M4PAATNV.mjs} +14 -13
- package/dist/{category-create-FOVB5MJ4.mjs → category-create-GMFWRFT7.mjs} +38 -16
- package/dist/{category-detail-QHU2CLYA.mjs → category-detail-MTLPW4MR.mjs} +20 -19
- package/dist/{category-edit-O4ZSANE5.mjs → category-edit-HCHER73V.mjs} +36 -16
- package/dist/{category-list-UI6W5KF5.mjs → category-list-IXW2NWWJ.mjs} +8 -7
- package/dist/{category-organize-BW3YOPUS.mjs → category-organize-LRQKM4LA.mjs} +2 -2
- package/dist/{category-products-YGTL7GXQ.mjs → category-products-DGWKONYE.mjs} +16 -15
- package/dist/{chunk-2HKRIUW4.mjs → chunk-2PGNKUXS.mjs} +1 -1
- package/dist/{chunk-X4X5KUGQ.mjs → chunk-4QUHWHBD.mjs} +3 -0
- package/dist/{chunk-R2NWOCML.mjs → chunk-5FAWKUSU.mjs} +8 -2
- package/dist/{chunk-YZJ3W776.mjs → chunk-5U3FFMC7.mjs} +6 -9
- package/dist/{chunk-UNM3LPTG.mjs → chunk-7GBCLBMX.mjs} +25 -12
- package/dist/{chunk-6V6KATTW.mjs → chunk-7JJTWGHU.mjs} +29 -18
- package/dist/{chunk-VE7JFMAN.mjs → chunk-A4GWVZB4.mjs} +3 -3
- package/dist/{chunk-2YP2ZNKR.mjs → chunk-AN5IILM2.mjs} +1 -1
- package/dist/{chunk-YWNHMIEQ.mjs → chunk-AXXGAOQL.mjs} +2 -2
- package/dist/{chunk-2PMSBTXI.mjs → chunk-CD7VQIPA.mjs} +11 -11
- package/dist/{chunk-WYDDFRYM.mjs → chunk-CGEJJR5K.mjs} +595 -686
- package/dist/{chunk-J5E7MQSS.mjs → chunk-CY33DS7K.mjs} +6 -0
- package/dist/{chunk-PPI7PTY6.mjs → chunk-DKOCYXB5.mjs} +10 -4
- package/dist/{chunk-ZCZL3STK.mjs → chunk-EA5GGT2Q.mjs} +1 -1
- package/dist/{chunk-BSBCIU6C.mjs → chunk-EILZIUOP.mjs} +1 -1
- package/dist/{chunk-7VJK6HNE.mjs → chunk-EYL2JACT.mjs} +4 -4
- package/dist/{chunk-BFNH5UWD.mjs → chunk-EYTETK3W.mjs} +1 -1
- package/dist/{chunk-74K7HGNI.mjs → chunk-FXG2Z3QT.mjs} +3 -2
- package/dist/{chunk-SMHXCFRS.mjs → chunk-G3VGLFVH.mjs} +54 -41
- package/dist/{chunk-2RQLKDBF.mjs → chunk-GIZFNLKK.mjs} +103 -96
- package/dist/{chunk-CU5EFQSB.mjs → chunk-HOERC634.mjs} +1 -1
- package/dist/{chunk-AOFGTNG6.mjs → chunk-HQKGZADC.mjs} +6 -1
- package/dist/{chunk-LBIOZZPA.mjs → chunk-HWKLNKOY.mjs} +1 -1
- package/dist/{chunk-YPDTZXV6.mjs → chunk-I2QEZTVU.mjs} +2 -2
- package/dist/{chunk-S2UEWRDA.mjs → chunk-IL5IMREK.mjs} +59 -49
- package/dist/{chunk-FTVAORQM.mjs → chunk-IP2QPPWC.mjs} +1 -1
- package/dist/{chunk-SCBXRJPV.mjs → chunk-IRO6DO7J.mjs} +1 -1
- package/dist/{chunk-YI4CZGTU.mjs → chunk-ITJEYJNB.mjs} +1 -1
- package/dist/{chunk-T7G2CURS.mjs → chunk-IVZ6BMDB.mjs} +1 -0
- package/dist/{chunk-BM5ZIV5V.mjs → chunk-IXMPYDY2.mjs} +1 -1
- package/dist/{chunk-XGJ5DXXG.mjs → chunk-K2HM7KXJ.mjs} +12 -12
- package/dist/{chunk-2LPGQWPV.mjs → chunk-KTL6E2WT.mjs} +1 -1
- package/dist/{chunk-OHSRRFGN.mjs → chunk-LKVQ5YC6.mjs} +1 -1
- package/dist/{chunk-QGCKTVQX.mjs → chunk-LMRZMI7O.mjs} +1 -1
- package/dist/{chunk-PHXKD2LR.mjs → chunk-MAKOUE5W.mjs} +1 -1
- package/dist/{chunk-Q5DI5VYN.mjs → chunk-MLNUGLGT.mjs} +1 -1
- package/dist/{chunk-5M5ZVAWU.mjs → chunk-MSOFJHH3.mjs} +2 -2
- package/dist/{chunk-5CE3JPWD.mjs → chunk-NFQXNOP7.mjs} +1 -1
- package/dist/{chunk-UWJBDOQD.mjs → chunk-NKVMOKZA.mjs} +41 -29
- package/dist/{chunk-NCR5UWRI.mjs → chunk-NY6I2FYO.mjs} +1 -1
- package/dist/{chunk-3NJTXRIY.mjs → chunk-OZPB6JBL.mjs} +5 -1
- package/dist/{chunk-FPJBF7VS.mjs → chunk-P2O6XTD4.mjs} +1 -1
- package/dist/{chunk-EFA7S5L3.mjs → chunk-PGTXMCSV.mjs} +1 -1
- package/dist/{chunk-D7H6ZNK4.mjs → chunk-PRLQLEEQ.mjs} +2 -0
- package/dist/{chunk-ZODJNBAV.mjs → chunk-R2G2B47Y.mjs} +1 -0
- package/dist/{chunk-HUX22ZHT.mjs → chunk-RF75BZNF.mjs} +3 -3
- package/dist/{chunk-4RG7UJCT.mjs → chunk-RGP3IXX4.mjs} +1 -1
- package/dist/chunk-S4DMV3ZT.mjs +35 -0
- package/dist/{chunk-5NQ3X2JI.mjs → chunk-SNDSWB6B.mjs} +1 -1
- package/dist/{chunk-EE7SOCEQ.mjs → chunk-SQFZWNYA.mjs} +4 -4
- package/dist/{chunk-O74UDEWT.mjs → chunk-TKZK3YPU.mjs} +1 -1
- package/dist/{chunk-KSRI5LOF.mjs → chunk-U25RCIX2.mjs} +2 -2
- package/dist/{chunk-XTNS2NRD.mjs → chunk-U4R5MBF2.mjs} +1 -1
- package/dist/{chunk-CK3VFTZM.mjs → chunk-UKX2FFFV.mjs} +2 -2
- package/dist/{chunk-JO6QASTJ.mjs → chunk-V6JXTITD.mjs} +1 -1
- package/dist/chunk-VLOA5XAC.mjs +113 -0
- package/dist/{chunk-4Q4LIFFO.mjs → chunk-XP3BY6G6.mjs} +1 -1
- package/dist/{chunk-6IZUCU7K.mjs → chunk-YSFTQA6Y.mjs} +2 -2
- package/dist/{chunk-XKXNQ2KV.mjs → chunk-ZCARHA6C.mjs} +1 -1
- package/dist/{chunk-RMEITCLS.mjs → chunk-ZSDEVTFT.mjs} +1 -1
- package/dist/{collection-add-products-OJ2EZLC7.mjs → collection-add-products-KEB3ESAK.mjs} +16 -15
- package/dist/{collection-create-75ZI5NDG.mjs → collection-create-PTOF33H2.mjs} +2 -2
- package/dist/{collection-detail-RMZK523E.mjs → collection-detail-V24IDEZQ.mjs} +18 -17
- package/dist/{collection-edit-RD6BDDDI.mjs → collection-edit-WM57WXJ2.mjs} +2 -2
- package/dist/{collection-list-BJ3VNZAA.mjs → collection-list-GD2IJYOP.mjs} +19 -18
- package/dist/{collection-metadata-R3DI65D3.mjs → collection-metadata-Z2JMXTHW.mjs} +14 -13
- package/dist/{customer-create-address-TPSDYZBN.mjs → customer-create-address-JOYBIPPN.mjs} +1 -1
- package/dist/{customer-detail-G7G6PYOO.mjs → customer-detail-E7LPLLML.mjs} +18 -17
- package/dist/{customer-group-add-customers-ULPWTALS.mjs → customer-group-add-customers-YF2T323Z.mjs} +3 -2
- package/dist/{customer-group-detail-XQ32DPQ3.mjs → customer-group-detail-5ZWHOJOD.mjs} +17 -16
- package/dist/{customer-group-list-CARES5CM.mjs → customer-group-list-N22GDJVL.mjs} +16 -15
- package/dist/{customer-group-metadata-UPAPULMF.mjs → customer-group-metadata-YQCOIVQG.mjs} +2 -1
- package/dist/{customer-list-SINCBCOZ.mjs → customer-list-5IWEXYSW.mjs} +5 -4
- package/dist/{customer-metadata-5NPUMPZ2.mjs → customer-metadata-JZEJBH4V.mjs} +2 -1
- package/dist/{customers-add-customer-group-NLPVKARS.mjs → customers-add-customer-group-LFEUVS5G.mjs} +15 -14
- package/dist/{edit-inventory-item-ZPE4MMC4.mjs → edit-inventory-item-UV2Z7SYL.mjs} +1 -1
- package/dist/{edit-inventory-item-attributes-KT7BSPZ7.mjs → edit-inventory-item-attributes-BRC3KBYT.mjs} +2 -2
- package/dist/{edit-reservation-EKH4RIAX.mjs → edit-reservation-NYGQBFBO.mjs} +7 -2
- package/dist/{edit-rules-JRLCVE26.mjs → edit-rules-BCGRJ4FJ.mjs} +15 -14
- package/dist/{inventory-create-ZC6HV2FY.mjs → inventory-create-OPYAZF3M.mjs} +20 -15
- package/dist/{inventory-detail-WVI4FTTH.mjs → inventory-detail-PAVP7J2W.mjs} +26 -19
- package/dist/{inventory-list-YMYF7QVP.mjs → inventory-list-J5VZGQ2M.mjs} +6 -5
- package/dist/{inventory-metadata-BLIJBNQS.mjs → inventory-metadata-PMQLZCHW.mjs} +14 -13
- package/dist/{inventory-stock-ZCTXWRK6.mjs → inventory-stock-7QXMAX45.mjs} +15 -14
- package/dist/{location-create-LUP363ZB.mjs → location-create-22H74MFP.mjs} +1 -1
- package/dist/{location-detail-GV3POY4C.mjs → location-detail-IXHZ7DZS.mjs} +15 -14
- package/dist/{location-edit-26K26G23.mjs → location-edit-X6JBEWIF.mjs} +2 -2
- package/dist/{location-fulfillment-providers-INUQXJYU.mjs → location-fulfillment-providers-3KPC4HQT.mjs} +17 -16
- package/dist/location-list-VNEYHAKV.mjs +323 -0
- package/dist/{location-sales-channels-2BOIPBBG.mjs → location-sales-channels-66ZE3ZMI.mjs} +5 -4
- package/dist/{location-service-zone-create-RPFLBVV4.mjs → location-service-zone-create-D5QSFS3M.mjs} +4 -3
- package/dist/{location-service-zone-manage-areas-VEUUGPKF.mjs → location-service-zone-manage-areas-HKCALG4Q.mjs} +4 -3
- package/dist/{location-service-zone-shipping-option-create-6KO3QDMQ.mjs → location-service-zone-shipping-option-create-PVQ66CXW.mjs} +24 -16
- package/dist/{location-service-zone-shipping-option-edit-TMXNX4VX.mjs → location-service-zone-shipping-option-edit-JYM6GHTA.mjs} +40 -28
- package/dist/{location-service-zone-shipping-option-pricing-U2SDK5DE.mjs → location-service-zone-shipping-option-pricing-FLB63UKY.mjs} +3 -2
- package/dist/{login-57FIKGXA.mjs → login-DVYOEF5F.mjs} +12 -12
- package/dist/manage-locations-RPHTPGRE.mjs +247 -0
- package/dist/{order-allocate-items-J3ZHGC22.mjs → order-allocate-items-2RYXQRVK.mjs} +26 -14
- package/dist/{order-create-claim-LXKBCAWN.mjs → order-create-claim-FK4LIPAE.mjs} +21 -19
- package/dist/{order-create-edit-264PTIEI.mjs → order-create-edit-VGIWYKBB.mjs} +19 -17
- package/dist/{order-create-exchange-ZMUVPYM3.mjs → order-create-exchange-BMRCMN5G.mjs} +21 -19
- package/dist/{order-create-fulfillment-LE6O3SA5.mjs → order-create-fulfillment-NLGPRK4J.mjs} +20 -13
- package/dist/{order-create-refund-B7BO2EJL.mjs → order-create-refund-TEMK6IEQ.mjs} +51 -15
- package/dist/{order-create-return-GVA6M2RY.mjs → order-create-return-6FHAU3OZ.mjs} +11 -9
- package/dist/{order-create-shipment-UOPCS5N7.mjs → order-create-shipment-WCEZXWM6.mjs} +14 -12
- package/dist/{order-detail-SG7AXBRS.mjs → order-detail-QABTBPGX.mjs} +50 -41
- package/dist/{order-edit-billing-address-RPPJ4Z36.mjs → order-edit-billing-address-MWF3L6GK.mjs} +13 -13
- package/dist/{order-edit-email-A7D5HTU6.mjs → order-edit-email-UDJOGYPP.mjs} +12 -12
- package/dist/{order-edit-shipping-address-LXKC5CJE.mjs → order-edit-shipping-address-O46U65WM.mjs} +13 -13
- package/dist/{order-list-ZCMNSZYB.mjs → order-list-VDUUHTSU.mjs} +11 -10
- package/dist/{order-metadata-KS47UOEE.mjs → order-metadata-SHCFZWCA.mjs} +14 -13
- package/dist/{order-receive-return-PDU2YVLT.mjs → order-receive-return-MC4DIRK3.mjs} +15 -14
- package/dist/{order-request-transfer-WMQKDLDF.mjs → order-request-transfer-MELQKMC4.mjs} +13 -13
- package/dist/{price-list-configuration-435QDWB2.mjs → price-list-configuration-VACKCKJF.mjs} +6 -5
- package/dist/{price-list-create-QZSB4W5Z.mjs → price-list-create-TZUDGP2J.mjs} +40 -25
- package/dist/{price-list-detail-2FMINPFT.mjs → price-list-detail-DX74DH6G.mjs} +19 -18
- package/dist/{price-list-edit-ZGBOZYSC.mjs → price-list-edit-G73ZIU2Y.mjs} +51 -31
- package/dist/{price-list-list-C6NEB2R4.mjs → price-list-list-QYZSJNF5.mjs} +8 -7
- package/dist/{price-list-prices-add-WYK2QBAI.mjs → price-list-prices-add-IHMS7HIH.mjs} +29 -21
- package/dist/{price-list-prices-edit-ENB4GJZT.mjs → price-list-prices-edit-R53ITSDD.mjs} +5 -4
- package/dist/{product-attributes-KDXI2RNP.mjs → product-attributes-AULEVQ5C.mjs} +20 -18
- package/dist/{product-create-TVYPK4VC.mjs → product-create-2RPJZR2Q.mjs} +28 -22
- package/dist/{product-create-option-3JR35UZ5.mjs → product-create-option-OW2LMVST.mjs} +1 -1
- package/dist/{product-create-variant-6YWLDA2X.mjs → product-create-variant-NKU6J7NG.mjs} +32 -19
- package/dist/{product-detail-RFKXMYE5.mjs → product-detail-NNTUGXU5.mjs} +22 -20
- package/dist/{product-edit-5FNY7HG4.mjs → product-edit-6WRMNGPM.mjs} +42 -29
- package/dist/{product-edit-option-VNDGZ37A.mjs → product-edit-option-OM56DLU6.mjs} +1 -1
- package/dist/{product-export-BEAUMFAZ.mjs → product-export-W6KP2RGO.mjs} +14 -14
- package/dist/{product-import-SOX4UJPM.mjs → product-import-P76MITMC.mjs} +15 -14
- package/dist/{product-list-ZVXATJRE.mjs → product-list-7H64APWI.mjs} +20 -19
- package/dist/{product-media-JPU23SPH.mjs → product-media-TRKQTA4G.mjs} +5 -5
- package/dist/{product-metadata-QRRCHZZB.mjs → product-metadata-2G6DWHWG.mjs} +14 -13
- package/dist/{product-organization-QTWB7VMB.mjs → product-organization-43YS5OUI.mjs} +21 -19
- package/dist/{product-prices-PCBMYYGV.mjs → product-prices-XLY5TUSJ.mjs} +3 -2
- package/dist/{product-sales-channels-UGPAXFAV.mjs → product-sales-channels-KSIHPDJG.mjs} +5 -4
- package/dist/{product-shipping-profile-Q6UX6ZNJ.mjs → product-shipping-profile-SFU2PVR4.mjs} +20 -18
- package/dist/{product-stock-TSAIHVY6.mjs → product-stock-GAWLELSE.mjs} +17 -15
- package/dist/{product-tag-create-5NZJS2D2.mjs → product-tag-create-FVU5JRL3.mjs} +12 -12
- package/dist/{product-tag-detail-3XHUROBO.mjs → product-tag-detail-VMVPWMZK.mjs} +22 -21
- package/dist/{product-tag-edit-YYOOHKGG.mjs → product-tag-edit-OWI3OFVF.mjs} +12 -12
- package/dist/{product-tag-list-5XTTMNOA.mjs → product-tag-list-YPIZII2D.mjs} +22 -21
- package/dist/{product-tag-metadata-YAD3MPWF.mjs → product-tag-metadata-B4YBSHOH.mjs} +14 -13
- package/dist/{product-type-detail-MNTAHQKJ.mjs → product-type-detail-243HFRBD.mjs} +18 -17
- package/dist/{product-type-list-6ZIWPIUH.mjs → product-type-list-MJLAGQYC.mjs} +5 -4
- package/dist/{product-type-metadata-HWR3WBGT.mjs → product-type-metadata-4YE4UEOF.mjs} +14 -13
- package/dist/{product-variant-detail-DKFAG3KO.mjs → product-variant-detail-LJE3IFNE.mjs} +17 -16
- package/dist/{product-variant-edit-EZENYVAN.mjs → product-variant-edit-IGJIWVQQ.mjs} +18 -14
- package/dist/{product-variant-manage-inventory-items-TM3VAHBJ.mjs → product-variant-manage-inventory-items-2M2KTPNK.mjs} +2 -2
- package/dist/{product-variant-metadata-S7QENSUG.mjs → product-variant-metadata-F6BGFMMS.mjs} +14 -13
- package/dist/{profile-detail-ROG22HHL.mjs → profile-detail-XYAQ2G36.mjs} +3 -2
- package/dist/{profile-edit-HSUQIQQH.mjs → profile-edit-7WD4FTRH.mjs} +31 -19
- package/dist/{promotion-add-campaign-7R26KU2U.mjs → promotion-add-campaign-YREHV6TQ.mjs} +9 -21
- package/dist/{promotion-create-O3KUSPIU.mjs → promotion-create-YGHBTAFC.mjs} +30 -18
- package/dist/{promotion-detail-5DU6ULJG.mjs → promotion-detail-BIC23HFR.mjs} +127 -77
- package/dist/{promotion-edit-details-HQLYX4X4.mjs → promotion-edit-details-A2UUSAZA.mjs} +10 -2
- package/dist/{promotion-list-Q2FOGORE.mjs → promotion-list-WDHOSD55.mjs} +9 -8
- package/dist/{refund-reason-create-NSZFGXWI.mjs → refund-reason-create-YCWLRRBW.mjs} +12 -12
- package/dist/{refund-reason-edit-RKUSPQCL.mjs → refund-reason-edit-E2HDAQZI.mjs} +1 -1
- package/dist/{refund-reason-list-2F5PFERT.mjs → refund-reason-list-7GANH7KL.mjs} +107 -134
- package/dist/{region-add-countries-Y4YAHDUZ.mjs → region-add-countries-6GSF4CKJ.mjs} +3 -2
- package/dist/{region-create-5Y3GIQBV.mjs → region-create-AFZTSM3N.mjs} +34 -18
- package/dist/{region-detail-CWRFM6P3.mjs → region-detail-PB7EUSTD.mjs} +5 -4
- package/dist/{region-edit-JWQWCLM3.mjs → region-edit-DSYIUI7W.mjs} +25 -9
- package/dist/{region-list-FQNI7F37.mjs → region-list-52LF5S4S.mjs} +5 -4
- package/dist/{region-metadata-G3JH5ZN6.mjs → region-metadata-L5K6YENH.mjs} +14 -13
- package/dist/{reservation-create-7RFXWDXB.mjs → reservation-create-FV7QXGL3.mjs} +3 -3
- package/dist/{reservation-detail-PJXS67UM.mjs → reservation-detail-USDAVGWH.mjs} +16 -15
- package/dist/{reservation-list-UOC7RNRZ.mjs → reservation-list-NOWJUMXV.mjs} +7 -6
- package/dist/{reservation-metadata-UCKQB66O.mjs → reservation-metadata-47C6RWYS.mjs} +14 -13
- package/dist/{reset-password-5KIEBJHN.mjs → reset-password-LCVV4NOA.mjs} +1 -1
- package/dist/{return-reason-list-OGFYWMC5.mjs → return-reason-list-FW7OYUOW.mjs} +7 -6
- package/dist/{sales-channel-add-products-CSMNFGHD.mjs → sales-channel-add-products-NGPN4IRB.mjs} +16 -15
- package/dist/{sales-channel-create-3MPOMVPD.mjs → sales-channel-create-NODWGJDD.mjs} +4 -2
- package/dist/{sales-channel-detail-ZSA3HNWW.mjs → sales-channel-detail-IWWRX2Y3.mjs} +18 -17
- package/dist/{sales-channel-edit-LSLAM7A4.mjs → sales-channel-edit-ALIRERVH.mjs} +4 -2
- package/dist/{sales-channel-list-X5ADP34V.mjs → sales-channel-list-LCPDOQK3.mjs} +16 -15
- package/dist/{sales-channel-metadata-ABWIDI3B.mjs → sales-channel-metadata-VZ4TINYG.mjs} +14 -13
- package/dist/{shipping-option-type-create-Q2X5OMJS.mjs → shipping-option-type-create-NOMFII5B.mjs} +12 -12
- package/dist/{shipping-option-type-detail-VT3Y5QQ4.mjs → shipping-option-type-detail-6XIJRVZ5.mjs} +16 -15
- package/dist/{shipping-option-type-edit-IA3EER2N.mjs → shipping-option-type-edit-PEDYL6JQ.mjs} +12 -12
- package/dist/{shipping-option-type-list-JZPKAL3H.mjs → shipping-option-type-list-GI5GBLIS.mjs} +18 -17
- package/dist/{shipping-profile-detail-FDUPDSH4.mjs → shipping-profile-detail-FS46IJZP.mjs} +3 -2
- package/dist/{shipping-profile-metadata-EYXBWBF2.mjs → shipping-profile-metadata-ZOR7MQFF.mjs} +14 -13
- package/dist/{shipping-profiles-list-ZHJEUIKJ.mjs → shipping-profiles-list-QFOG5IDH.mjs} +5 -4
- package/dist/{store-add-currencies-R26SVHT5.mjs → store-add-currencies-W4MWOALR.mjs} +5 -2
- package/dist/{store-detail-LI72QMUZ.mjs → store-detail-MZAKRCTC.mjs} +17 -16
- package/dist/{store-edit-EU55TNFU.mjs → store-edit-3DU5MC25.mjs} +24 -12
- package/dist/{store-metadata-ZITLAS5H.mjs → store-metadata-GO4TXB3W.mjs} +14 -13
- package/dist/{tax-region-create-IU2R5VIY.mjs → tax-region-create-KDCNQGPC.mjs} +15 -15
- package/dist/{tax-region-detail-6FHD35LB.mjs → tax-region-detail-O6U6ZVDB.mjs} +19 -18
- package/dist/{tax-region-edit-O2WJXYIE.mjs → tax-region-edit-T4B5DM55.mjs} +13 -13
- package/dist/{tax-region-list-NMM3LBPN.mjs → tax-region-list-SQQE2GUU.mjs} +6 -5
- package/dist/{tax-region-province-create-GIIU2G7K.mjs → tax-region-province-create-SBRFGWN3.mjs} +2 -2
- package/dist/{tax-region-province-detail-YDBU4CUU.mjs → tax-region-province-detail-XH45ZAOJ.mjs} +18 -17
- package/dist/{tax-region-tax-override-create-EF3LLZWM.mjs → tax-region-tax-override-create-MSL7HEM6.mjs} +25 -20
- package/dist/{tax-region-tax-override-edit-2DG3J6CO.mjs → tax-region-tax-override-edit-AO6CYS62.mjs} +25 -20
- package/dist/{tax-region-tax-rate-create-Z43M3JTQ.mjs → tax-region-tax-rate-create-JIV5FXUD.mjs} +1 -1
- package/dist/{tax-region-tax-rate-edit-RBF5D2MK.mjs → tax-region-tax-rate-edit-WU2ZQLZQ.mjs} +1 -1
- package/dist/{user-detail-VIVFFLOW.mjs → user-detail-ZFW3YF3M.mjs} +4 -3
- package/dist/{user-invite-W26LOOW7.mjs → user-invite-KUH4AI2L.mjs} +4 -3
- package/dist/{user-list-3YFYZFSK.mjs → user-list-G4H2RSDX.mjs} +4 -3
- package/dist/{user-metadata-QUIFIM5G.mjs → user-metadata-2CR2AK3U.mjs} +14 -13
- package/dist/{workflow-execution-detail-PVSQ2VGE.mjs → workflow-execution-detail-ZD7OVL4W.mjs} +18 -14
- package/dist/{workflow-execution-list-5J3DQQRD.mjs → workflow-execution-list-5WL4L464.mjs} +4 -3
- package/package.json +9 -9
- package/src/components/common/action-menu/action-menu.tsx +3 -1
- package/src/components/common/customer-info/customer-info.tsx +1 -1
- package/src/components/common/json-view-section/json-view-section.tsx +4 -1
- package/src/components/common/sidebar-link/sidebar-link.tsx +1 -1
- package/src/components/common/switch-box/switch-box.tsx +2 -0
- package/src/components/data-grid/components/data-grid-root.tsx +9 -3
- package/src/components/data-grid/components/data-grid-toggleable-number-cell.tsx +2 -1
- package/src/components/data-table/data-table.tsx +64 -46
- package/src/components/filtering/filter-group/filter-group.tsx +5 -1
- package/src/components/filtering/order-by/order-by.tsx +4 -1
- package/src/components/forms/address-form/address-form.tsx +7 -2
- package/src/components/forms/metadata-form/metadata-form.tsx +6 -3
- package/src/components/inputs/combobox/combobox.tsx +11 -11
- package/src/components/inputs/country-select/country-select.tsx +1 -1
- package/src/components/inputs/province-select/province-select.tsx +1 -1
- package/src/components/layout/main-layout/main-layout.tsx +7 -5
- package/src/components/layout/shell/shell.tsx +6 -6
- package/src/components/layout/user-menu/user-menu.tsx +12 -10
- package/src/components/search/search.tsx +5 -3
- package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +4 -1
- package/src/components/table/data-table/data-table-root/data-table-root.tsx +3 -3
- package/src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx +1 -1
- package/src/hooks/api/campaigns.tsx +1 -0
- package/src/hooks/api/inventory.tsx +3 -0
- package/src/hooks/api/refund-reasons.tsx +7 -16
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +20 -16
- package/src/hooks/use-document-direction.tsx +54 -0
- package/src/i18n/translations/$schema.json +27 -2
- package/src/i18n/translations/en.json +10 -4
- package/src/providers/i18n-provider/i18n-provider.tsx +9 -4
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +3 -3
- package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +4 -1
- package/src/routes/categories/category-create/components/create-category-form/create-category-details.tsx +12 -3
- package/src/routes/categories/category-create/components/create-category-form/create-category-form.tsx +4 -3
- package/src/routes/categories/category-detail/components/category-organize-section/category-organize-section.tsx +1 -1
- package/src/routes/categories/category-edit/components/edit-category-form/edit-category-form.tsx +12 -3
- package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-create-form.tsx +3 -1
- package/src/routes/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx +1 -1
- package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-columns.tsx +7 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-item.tsx +2 -2
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-search-input.tsx +34 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx +127 -140
- package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx +1 -1
- package/src/routes/locations/location-list/index.ts +0 -1
- package/src/routes/locations/location-list/location-list.tsx +52 -14
- 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/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx +4 -1
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-form.tsx +3 -1
- package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +7 -2
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-form.tsx +7 -2
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +2 -1
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-create-form.tsx +2 -1
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +2 -1
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-form.tsx +5 -1
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +42 -1
- package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +2 -1
- package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/order-create-shipment-form.tsx +2 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +13 -5
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/order-receive-return-form.tsx +2 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx +3 -1
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-details-form.tsx +8 -2
- package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/edit-price-list-form.tsx +12 -3
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx +10 -5
- package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx +4 -0
- package/src/routes/products/common/components/category-combobox/category-combobox.tsx +11 -11
- package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +3 -1
- package/src/routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +10 -5
- package/src/routes/products/product-create-variant/components/create-product-variant-form/details-tab.tsx +6 -1
- package/src/routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +7 -2
- package/src/routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +2 -2
- package/src/routes/products/product-stock/hooks/use-product-stock-columns.tsx +2 -1
- package/src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +9 -3
- package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx +4 -0
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +48 -49
- package/src/routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +4 -21
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +12 -3
- package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +6 -1
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +85 -78
- package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +11 -2
- package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +11 -2
- package/src/routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +3 -1
- package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +2 -0
- package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +2 -0
- package/src/routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +2 -0
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +7 -2
- package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/tax-region-tax-override-create.tsx +3 -1
- package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/tax-region-tax-override-edit-form.tsx +3 -1
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +3 -2
- package/dist/chunk-BKJC5BGQ.mjs +0 -53
- package/dist/location-list-BKK2PAKF.mjs +0 -297
- package/dist/manage-locations-3TBIUSHP.mjs +0 -236
- 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
@@ -1,111 +1,75 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import {
|
2
|
+
AdminInventoryItem,
|
3
|
+
AdminStockLocation,
|
4
|
+
HttpTypes,
|
5
|
+
} from "@medusajs/types"
|
5
6
|
import { Button, Text, toast } from "@medusajs/ui"
|
6
|
-
import { useFieldArray, useForm } from "react-hook-form"
|
7
7
|
import { useTranslation } from "react-i18next"
|
8
|
-
import { z } from "zod"
|
9
8
|
import { RouteDrawer, useRouteModal } from "../../../../../../components/modals"
|
10
9
|
import { useBatchInventoryItemLocationLevels } from "../../../../../../hooks/api/inventory"
|
10
|
+
import { sdk } from "../../../../../../lib/client"
|
11
11
|
|
12
|
-
import {
|
13
|
-
import { KeyboundForm } from "../../../../../../components/utilities/keybound-form"
|
12
|
+
import { useMemo, useState } from "react"
|
14
13
|
import { LocationItem } from "./location-item"
|
14
|
+
import { LocationSearchInput } from "./location-search-input"
|
15
|
+
import { InfiniteList } from "../../../../../../components/common/infinite-list/infinite-list"
|
16
|
+
import { useStockLocations } from "../../../../../../hooks/api/stock-locations"
|
15
17
|
|
16
18
|
type EditInventoryItemAttributeFormProps = {
|
17
19
|
item: AdminInventoryItem
|
18
20
|
locations: AdminStockLocation[]
|
19
21
|
}
|
20
22
|
|
21
|
-
const EditInventoryItemAttributesSchema = z.object({
|
22
|
-
locations: z.array(
|
23
|
-
z.object({
|
24
|
-
id: z.string(),
|
25
|
-
location_id: z.string(),
|
26
|
-
selected: z.boolean(),
|
27
|
-
})
|
28
|
-
),
|
29
|
-
})
|
30
|
-
|
31
|
-
const getDefaultValues = (
|
32
|
-
allLocations: AdminStockLocation[],
|
33
|
-
existingLevels: Set<string>
|
34
|
-
) => {
|
35
|
-
return {
|
36
|
-
locations: allLocations.map((location) => ({
|
37
|
-
...location,
|
38
|
-
location_id: location.id,
|
39
|
-
selected: existingLevels.has(location.id),
|
40
|
-
})),
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
23
|
export const ManageLocationsForm = ({
|
45
24
|
item,
|
46
|
-
locations,
|
47
25
|
}: EditInventoryItemAttributeFormProps) => {
|
48
26
|
const existingLocationLevels = useMemo(
|
49
27
|
() => new Set(item.location_levels?.map((l) => l.location_id) ?? []),
|
50
|
-
item.location_levels
|
28
|
+
[item.location_levels]
|
51
29
|
)
|
52
30
|
|
53
31
|
const { t } = useTranslation()
|
54
32
|
const { handleSuccess } = useRouteModal()
|
33
|
+
const [searchQuery, setSearchQuery] = useState("")
|
34
|
+
const [selectedLocationIds, setSelectedLocationIds] = useState<Set<string>>(
|
35
|
+
existingLocationLevels
|
36
|
+
)
|
55
37
|
|
56
|
-
const
|
57
|
-
defaultValues: getDefaultValues(locations, existingLocationLevels),
|
58
|
-
resolver: zodResolver(EditInventoryItemAttributesSchema),
|
59
|
-
})
|
60
|
-
|
61
|
-
const { fields: locationFields, update: updateField } = useFieldArray({
|
62
|
-
control: form.control,
|
63
|
-
name: "locations",
|
64
|
-
})
|
38
|
+
const { count } = useStockLocations({ limit: 1, fields: "id" })
|
65
39
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
40
|
+
const handleLocationSelect = (locationId: string, selected: boolean) => {
|
41
|
+
setSelectedLocationIds((prev) => {
|
42
|
+
const newSet = new Set(prev)
|
43
|
+
if (selected) {
|
44
|
+
newSet.add(locationId)
|
45
|
+
} else {
|
46
|
+
newSet.delete(locationId)
|
47
|
+
}
|
48
|
+
return newSet
|
49
|
+
})
|
50
|
+
}
|
72
51
|
|
73
52
|
const { mutateAsync } = useBatchInventoryItemLocationLevels(item.id)
|
74
53
|
|
75
|
-
const handleSubmit =
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
// If the location is not changed do nothing
|
80
|
-
if (
|
81
|
-
(!location.selected &&
|
82
|
-
!existingLocationLevels.has(location.location_id)) ||
|
83
|
-
(location.selected &&
|
84
|
-
existingLocationLevels.has(location.location_id))
|
85
|
-
) {
|
86
|
-
return acc
|
87
|
-
}
|
54
|
+
const handleSubmit = async () => {
|
55
|
+
const toCreate = Array.from(selectedLocationIds).filter(
|
56
|
+
(id) => !existingLocationLevels.has(id)
|
57
|
+
)
|
88
58
|
|
89
|
-
|
90
|
-
|
91
|
-
} else {
|
92
|
-
acc[1].push(location.location_id)
|
93
|
-
}
|
94
|
-
return acc
|
95
|
-
},
|
96
|
-
[[], []] as [string[], string[]]
|
59
|
+
const toDeleteLocations = Array.from(existingLocationLevels).filter(
|
60
|
+
(id) => !selectedLocationIds.has(id)
|
97
61
|
)
|
98
62
|
|
99
|
-
|
100
|
-
|
101
|
-
|
63
|
+
const toDelete = toDeleteLocations
|
64
|
+
.map((id) => item.location_levels?.find((l) => l.location_id === id)?.id)
|
65
|
+
.filter(Boolean) as unknown as string[]
|
102
66
|
|
103
67
|
await mutateAsync(
|
104
68
|
{
|
105
|
-
create:
|
69
|
+
create: toCreate.map((location_id) => ({
|
106
70
|
location_id,
|
107
71
|
})),
|
108
|
-
delete:
|
72
|
+
delete: toDelete,
|
109
73
|
},
|
110
74
|
{
|
111
75
|
onSuccess: () => {
|
@@ -117,80 +81,103 @@ export const ManageLocationsForm = ({
|
|
117
81
|
},
|
118
82
|
}
|
119
83
|
)
|
120
|
-
}
|
84
|
+
}
|
121
85
|
|
122
86
|
return (
|
123
|
-
<
|
124
|
-
<
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<
|
131
|
-
|
132
|
-
|
133
|
-
</Text>
|
134
|
-
<Text className="px-2 py-1.5" size="small" leading="compact">
|
135
|
-
{item.title ?? "-"}
|
136
|
-
</Text>
|
137
|
-
</div>
|
138
|
-
<div className="grid grid-cols-2 divide-x">
|
139
|
-
<Text className="px-2 py-1.5" size="small" leading="compact">
|
140
|
-
{t("fields.sku")}
|
141
|
-
</Text>
|
142
|
-
<Text className="px-2 py-1.5" size="small" leading="compact">
|
143
|
-
{item.sku}
|
144
|
-
</Text>
|
145
|
-
</div>
|
87
|
+
<div className="flex flex-1 flex-col overflow-hidden">
|
88
|
+
<RouteDrawer.Body className="flex flex-1 flex-col gap-y-4 overflow-auto">
|
89
|
+
<div className="text-ui-fg-subtle shadow-elevation-card-rest grid grid-rows-2 divide-y rounded-lg border">
|
90
|
+
<div className="grid grid-cols-2 divide-x">
|
91
|
+
<Text className="px-2 py-1.5" size="small" leading="compact">
|
92
|
+
{t("fields.title")}
|
93
|
+
</Text>
|
94
|
+
<Text className="px-2 py-1.5" size="small" leading="compact">
|
95
|
+
{item.title ?? "-"}
|
96
|
+
</Text>
|
146
97
|
</div>
|
147
|
-
<div className="
|
148
|
-
<Text
|
149
|
-
{t("
|
98
|
+
<div className="grid grid-cols-2 divide-x">
|
99
|
+
<Text className="px-2 py-1.5" size="small" leading="compact">
|
100
|
+
{t("fields.sku")}
|
101
|
+
</Text>
|
102
|
+
<Text className="px-2 py-1.5" size="small" leading="compact">
|
103
|
+
{item.sku}
|
150
104
|
</Text>
|
151
|
-
<div className="text-ui-fg-subtle flex w-full justify-between">
|
152
|
-
<Text size="small" leading="compact">
|
153
|
-
{t("locations.selectLocations")}
|
154
|
-
</Text>
|
155
|
-
<Text size="small" leading="compact">
|
156
|
-
{"("}
|
157
|
-
{t("general.countOfTotalSelected", {
|
158
|
-
count: locationFields.filter((l) => l.selected).length,
|
159
|
-
total: locations.length,
|
160
|
-
})}
|
161
|
-
{")"}
|
162
|
-
</Text>
|
163
|
-
</div>
|
164
105
|
</div>
|
165
|
-
|
166
|
-
|
106
|
+
</div>
|
107
|
+
<div className="flex flex-col">
|
108
|
+
<Text size="small" weight="plus" leading="compact">
|
109
|
+
{t("locations.domain")}
|
110
|
+
</Text>
|
111
|
+
<div className="text-ui-fg-subtle flex w-full justify-between">
|
112
|
+
<Text size="small" leading="compact">
|
113
|
+
{t("locations.selectLocations")}
|
114
|
+
</Text>
|
115
|
+
<Text size="small" leading="compact">
|
116
|
+
{"("}
|
117
|
+
{t("general.countOfTotalSelected", {
|
118
|
+
count: selectedLocationIds.size,
|
119
|
+
total: count,
|
120
|
+
})}
|
121
|
+
{")"}
|
122
|
+
</Text>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<LocationSearchInput
|
127
|
+
onSearchChange={setSearchQuery}
|
128
|
+
placeholder={t("general.search")}
|
129
|
+
/>
|
130
|
+
|
131
|
+
<div className="min-h-0 flex-1">
|
132
|
+
<InfiniteList<
|
133
|
+
HttpTypes.AdminStockLocationListResponse,
|
134
|
+
HttpTypes.AdminStockLocation,
|
135
|
+
HttpTypes.AdminStockLocationListParams
|
136
|
+
>
|
137
|
+
queryKey={["stock-locations", searchQuery]}
|
138
|
+
queryFn={async (params) => {
|
139
|
+
const response = await sdk.admin.stockLocation.list({
|
140
|
+
limit: params.limit,
|
141
|
+
offset: params.offset,
|
142
|
+
...(searchQuery && { q: searchQuery }),
|
143
|
+
})
|
144
|
+
return response
|
145
|
+
}}
|
146
|
+
responseKey="stock_locations"
|
147
|
+
renderItem={(location) => (
|
167
148
|
<LocationItem
|
168
|
-
selected={location.
|
169
|
-
location={location
|
170
|
-
onSelect={() =>
|
171
|
-
|
172
|
-
...location,
|
173
|
-
selected: !location.selected,
|
174
|
-
})
|
149
|
+
selected={selectedLocationIds.has(location.id)}
|
150
|
+
location={location}
|
151
|
+
onSelect={(selected) =>
|
152
|
+
handleLocationSelect(location.id, selected)
|
175
153
|
}
|
176
|
-
key={location.id}
|
177
154
|
/>
|
178
|
-
)
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
</
|
187
|
-
|
188
|
-
|
189
|
-
|
155
|
+
)}
|
156
|
+
renderEmpty={() => (
|
157
|
+
<div className="flex items-center justify-center py-8">
|
158
|
+
<Text size="small" className="text-ui-fg-subtle">
|
159
|
+
{searchQuery
|
160
|
+
? t("locations.noLocationsFound")
|
161
|
+
: t("locations.noLocationsFound")}
|
162
|
+
</Text>
|
163
|
+
</div>
|
164
|
+
)}
|
165
|
+
pageSize={20}
|
166
|
+
/>
|
167
|
+
</div>
|
168
|
+
</RouteDrawer.Body>
|
169
|
+
<RouteDrawer.Footer>
|
170
|
+
<div className="flex items-center justify-end gap-x-2">
|
171
|
+
<RouteDrawer.Close asChild>
|
172
|
+
<Button variant="secondary" size="small">
|
173
|
+
{t("actions.cancel")}
|
190
174
|
</Button>
|
191
|
-
</
|
192
|
-
|
193
|
-
|
194
|
-
|
175
|
+
</RouteDrawer.Close>
|
176
|
+
<Button onClick={handleSubmit} size="small" isLoading={false}>
|
177
|
+
{t("actions.save")}
|
178
|
+
</Button>
|
179
|
+
</div>
|
180
|
+
</RouteDrawer.Footer>
|
181
|
+
</div>
|
195
182
|
)
|
196
183
|
}
|
package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx
CHANGED
@@ -62,7 +62,7 @@ export const EditLocationForm = ({ location }: EditLocationFormProps) => {
|
|
62
62
|
},
|
63
63
|
{
|
64
64
|
onSuccess: () => {
|
65
|
-
toast.success(t("stockLocations.edit.successToast"))
|
65
|
+
toast.success(t("stockLocations.edit.successToast", { name: name }))
|
66
66
|
handleSuccess()
|
67
67
|
},
|
68
68
|
onError: (e) => {
|
@@ -1,34 +1,46 @@
|
|
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
|
-
import {
|
14
|
+
import { keepPreviousData } from "@tanstack/react-query"
|
15
|
+
|
16
|
+
const PAGE_SIZE = 20
|
17
|
+
const PREFIX = "loc"
|
15
18
|
|
16
19
|
export function LocationList() {
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
+
const { t } = useTranslation()
|
21
|
+
|
22
|
+
const searchParams = useLocationListTableQuery({
|
23
|
+
pageSize: PAGE_SIZE,
|
24
|
+
prefix: PREFIX,
|
25
|
+
})
|
20
26
|
|
21
27
|
const {
|
22
28
|
stock_locations: stockLocations = [],
|
29
|
+
count,
|
23
30
|
isError,
|
24
31
|
error,
|
32
|
+
isLoading,
|
25
33
|
} = useStockLocations(
|
26
34
|
{
|
27
35
|
fields: LOCATION_LIST_FIELDS,
|
36
|
+
...searchParams,
|
28
37
|
},
|
29
|
-
{
|
38
|
+
{
|
39
|
+
placeholderData: keepPreviousData,
|
40
|
+
}
|
30
41
|
)
|
31
42
|
|
43
|
+
const columns = useLocationListTableColumns()
|
32
44
|
const { getWidgets } = useExtension()
|
33
45
|
|
34
46
|
if (isError) {
|
@@ -46,12 +58,38 @@ export function LocationList() {
|
|
46
58
|
showJSON
|
47
59
|
>
|
48
60
|
<TwoColumnPage.Main>
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
61
|
+
<Container className="flex flex-col divide-y p-0">
|
62
|
+
<DataTable
|
63
|
+
data={stockLocations}
|
64
|
+
columns={columns}
|
65
|
+
rowCount={count}
|
66
|
+
pageSize={PAGE_SIZE}
|
67
|
+
getRowId={(row) => row.id}
|
68
|
+
heading={t("stockLocations.domain")}
|
69
|
+
subHeading={t("stockLocations.list.description")}
|
70
|
+
emptyState={{
|
71
|
+
empty: {
|
72
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
73
|
+
description: t("stockLocations.list.noRecordsMessageEmpty"),
|
74
|
+
},
|
75
|
+
filtered: {
|
76
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
77
|
+
description: t("stockLocations.list.noRecordsMessageFiltered"),
|
78
|
+
},
|
79
|
+
}}
|
80
|
+
actions={[
|
81
|
+
{
|
82
|
+
label: t("actions.create"),
|
83
|
+
to: "create",
|
84
|
+
},
|
85
|
+
]}
|
86
|
+
isLoading={isLoading}
|
87
|
+
rowHref={(row) => `/settings/locations/${row.id}`}
|
88
|
+
enableSearch={true}
|
89
|
+
prefix={PREFIX}
|
90
|
+
layout="fill"
|
91
|
+
/>
|
92
|
+
</Container>
|
55
93
|
</TwoColumnPage.Main>
|
56
94
|
<TwoColumnPage.Sidebar>
|
57
95
|
<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
|
+
}
|
@@ -12,6 +12,7 @@ import { sdk } from "../../../../../lib/client"
|
|
12
12
|
import { formatProvider } from "../../../../../lib/format-provider"
|
13
13
|
import { FulfillmentSetType, ShippingOptionPriceType, } from "../../../common/constants"
|
14
14
|
import { CreateShippingOptionSchema } from "./schema"
|
15
|
+
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
15
16
|
|
16
17
|
type CreateShippingOptionDetailsFormProps = {
|
17
18
|
form: UseFormReturn<CreateShippingOptionSchema>
|
@@ -33,7 +34,7 @@ export const CreateShippingOptionDetailsForm = ({
|
|
33
34
|
type,
|
34
35
|
}: CreateShippingOptionDetailsFormProps) => {
|
35
36
|
const { t } = useTranslation()
|
36
|
-
|
37
|
+
const direction = useDocumentDirection()
|
37
38
|
const isPickup = type === FulfillmentSetType.Pickup
|
38
39
|
|
39
40
|
const shippingProfiles = useComboboxData({
|
@@ -105,6 +106,7 @@ export const CreateShippingOptionDetailsForm = ({
|
|
105
106
|
</Form.Label>
|
106
107
|
<Form.Control>
|
107
108
|
<RadioGroup
|
109
|
+
dir={direction}
|
108
110
|
className="grid grid-cols-1 gap-4 md:grid-cols-2"
|
109
111
|
{...field}
|
110
112
|
onValueChange={field.onChange}
|
@@ -252,6 +254,7 @@ export const CreateShippingOptionDetailsForm = ({
|
|
252
254
|
</Form.Label>
|
253
255
|
<Form.Control>
|
254
256
|
<Select
|
257
|
+
dir={direction}
|
255
258
|
{...field}
|
256
259
|
onValueChange={field.onChange}
|
257
260
|
disabled={!selectedProviderId}
|