@medusajs/dashboard 2.10.4-snapshot-20250923121159 → 2.10.4-snapshot-20250925180256
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-JOVLXLS4.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-I7T67TXF.mjs → api-key-management-detail-ZQLQKGYF.mjs} +15 -14
- 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-6GN6RVZ2.mjs → api-key-management-sales-channels-MVHVMPF6.mjs} +6 -5
- package/dist/app.css +89 -31
- package/dist/app.js +7166 -6079
- package/dist/app.mjs +17 -15
- 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-NRZHGINV.mjs → campaign-detail-LASOFZ2O.mjs} +22 -21
- 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-GXWJ3HOG.mjs → categories-metadata-HUIY6V4F.mjs} +13 -12
- package/dist/{category-create-FOVB5MJ4.mjs → category-create-GMFWRFT7.mjs} +38 -16
- package/dist/{category-detail-ENUI5EFL.mjs → category-detail-ZJJBYVFX.mjs} +19 -18
- 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-ZG5QDWSW.mjs → category-products-7N4TITQ4.mjs} +15 -14
- package/dist/{chunk-2HKRIUW4.mjs → chunk-2PGNKUXS.mjs} +1 -1
- package/dist/{chunk-X4X5KUGQ.mjs → chunk-4QUHWHBD.mjs} +3 -0
- package/dist/chunk-5U3FFMC7.mjs +84 -0
- package/dist/{chunk-Y4YXZY7R.mjs → chunk-5WMJLYEP.mjs} +2 -2
- package/dist/{chunk-RVOPC44F.mjs → chunk-7DFTLGA5.mjs} +623 -682
- package/dist/{chunk-YM4QJC6Y.mjs → chunk-7GBCLBMX.mjs} +1 -1
- package/dist/{chunk-JHXKKOHO.mjs → chunk-7JJTWGHU.mjs} +49 -15
- package/dist/{chunk-2YP2ZNKR.mjs → chunk-AN5IILM2.mjs} +1 -1
- package/dist/{chunk-YWNHMIEQ.mjs → chunk-AXXGAOQL.mjs} +2 -2
- package/dist/{chunk-5WKYR6PY.mjs → chunk-CXTAH75K.mjs} +1 -1
- package/dist/{chunk-J5E7MQSS.mjs → chunk-CY33DS7K.mjs} +6 -0
- package/dist/{chunk-ZJA7VBUR.mjs → chunk-DKOCYXB5.mjs} +34 -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-2RQLKDBF.mjs → chunk-GIZFNLKK.mjs} +103 -96
- package/dist/{chunk-AOFGTNG6.mjs → chunk-HQKGZADC.mjs} +6 -1
- package/dist/{chunk-LBIOZZPA.mjs → chunk-HWKLNKOY.mjs} +1 -1
- package/dist/{chunk-S2UEWRDA.mjs → chunk-IL5IMREK.mjs} +59 -49
- package/dist/{chunk-JIQQKKLO.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-XGJ5DXXG.mjs → chunk-K2HM7KXJ.mjs} +12 -12
- package/dist/{chunk-OKMF4YI7.mjs → chunk-K3OMOMRB.mjs} +25 -0
- 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-Q5DI5VYN.mjs → chunk-MLNUGLGT.mjs} +1 -1
- package/dist/{chunk-5M5ZVAWU.mjs → chunk-MSOFJHH3.mjs} +2 -2
- package/dist/{chunk-JMQ6V54O.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-2PMSBTXI.mjs → chunk-OFN7DIZA.mjs} +17 -13
- package/dist/{chunk-3NJTXRIY.mjs → chunk-OZPB6JBL.mjs} +5 -1
- package/dist/{chunk-FPJBF7VS.mjs → chunk-P2O6XTD4.mjs} +1 -1
- package/dist/{chunk-OGHQ6VJI.mjs → chunk-PAG2HG6I.mjs} +44 -5
- package/dist/{chunk-EFA7S5L3.mjs → chunk-PGTXMCSV.mjs} +1 -1
- package/dist/{chunk-D7H6ZNK4.mjs → chunk-PRLQLEEQ.mjs} +2 -0
- package/dist/{chunk-OLUNPPBR.mjs → chunk-QPLPGRYF.mjs} +1 -1
- package/dist/{chunk-ZODJNBAV.mjs → chunk-R2G2B47Y.mjs} +1 -0
- package/dist/{chunk-SMHXCFRS.mjs → chunk-RBDAWRFF.mjs} +54 -41
- 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-BHZAQZYP.mjs → chunk-U4R5MBF2.mjs} +1 -1
- package/dist/{chunk-CK3VFTZM.mjs → chunk-UKX2FFFV.mjs} +2 -2
- package/dist/{chunk-37UXEJF2.mjs → chunk-V6JXTITD.mjs} +1 -1
- package/dist/{chunk-R2NWOCML.mjs → chunk-VI7MI3US.mjs} +8 -2
- package/dist/chunk-VLOA5XAC.mjs +113 -0
- package/dist/{chunk-NRBOPOMS.mjs → chunk-VWQYN2RW.mjs} +1 -1
- package/dist/{chunk-4Q4LIFFO.mjs → chunk-XP3BY6G6.mjs} +1 -1
- package/dist/{chunk-6AGMMT5H.mjs → chunk-XR7I5HGZ.mjs} +4 -4
- 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-2ISNNIHD.mjs → collection-add-products-WKMNYPLS.mjs} +15 -14
- package/dist/{collection-create-75ZI5NDG.mjs → collection-create-PTOF33H2.mjs} +2 -2
- package/dist/{collection-detail-OSX6NHNQ.mjs → collection-detail-NONKXELG.mjs} +17 -16
- package/dist/{collection-edit-RD6BDDDI.mjs → collection-edit-WM57WXJ2.mjs} +2 -2
- package/dist/{collection-list-MPIYSHQJ.mjs → collection-list-3ZHLS2LP.mjs} +19 -18
- package/dist/{collection-metadata-EOFYXEQI.mjs → collection-metadata-J6P3K7U6.mjs} +13 -12
- package/dist/{customer-create-address-TPSDYZBN.mjs → customer-create-address-JOYBIPPN.mjs} +1 -1
- package/dist/{customer-detail-FCNRRZSW.mjs → customer-detail-5Y7ICDMA.mjs} +17 -16
- package/dist/{customer-group-add-customers-ULPWTALS.mjs → customer-group-add-customers-YF2T323Z.mjs} +3 -2
- package/dist/{customer-group-detail-QI3QLJJL.mjs → customer-group-detail-PXP73BFA.mjs} +16 -15
- package/dist/{customer-group-list-D26UKQMR.mjs → customer-group-list-3DB643XQ.mjs} +15 -14
- 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-5TFTVDB6.mjs → customers-add-customer-group-BVUVU46N.mjs} +14 -13
- 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-63NG4QVR.mjs → edit-rules-3MSTPCE5.mjs} +14 -13
- package/dist/{inventory-create-RIVJFJJQ.mjs → inventory-create-NEYX7PZJ.mjs} +19 -14
- package/dist/{inventory-detail-QHL7TJFZ.mjs → inventory-detail-66HDQL3W.mjs} +25 -18
- package/dist/{inventory-list-YMYF7QVP.mjs → inventory-list-J5VZGQ2M.mjs} +6 -5
- package/dist/{inventory-metadata-FH4CHJBA.mjs → inventory-metadata-OSTUWM23.mjs} +13 -12
- package/dist/{inventory-stock-D6E4LQRK.mjs → inventory-stock-XY2OCAY3.mjs} +14 -13
- package/dist/{location-create-LUP363ZB.mjs → location-create-22H74MFP.mjs} +1 -1
- package/dist/{location-detail-Z6ZDX6RY.mjs → location-detail-UZHD3IKW.mjs} +14 -13
- package/dist/{location-edit-26K26G23.mjs → location-edit-X6JBEWIF.mjs} +2 -2
- package/dist/{location-fulfillment-providers-45VXZMZI.mjs → location-fulfillment-providers-D4RMKQXU.mjs} +16 -15
- package/dist/{location-list-62KBWY4T.mjs → location-list-VNEYHAKV.mjs} +15 -8
- package/dist/{location-sales-channels-O5XLIPAR.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-NO3665DC.mjs → location-service-zone-shipping-option-create-OASLL2K7.mjs} +23 -15
- package/dist/{location-service-zone-shipping-option-edit-TMXNX4VX.mjs → location-service-zone-shipping-option-edit-DOCLZOO7.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-DSPNELTI.mjs → login-LQRL2ZDY.mjs} +11 -11
- 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-V63BWLB5.mjs → order-create-claim-7UF734QH.mjs} +20 -18
- package/dist/{order-create-edit-NPF4UZ4D.mjs → order-create-edit-MZHUVTGE.mjs} +18 -16
- package/dist/{order-create-exchange-RHIPPSKU.mjs → order-create-exchange-2UGEF65S.mjs} +20 -18
- package/dist/{order-create-fulfillment-4SSUHQ75.mjs → order-create-fulfillment-HGJ2YPUB.mjs} +19 -12
- package/dist/{order-create-refund-QVQC5ZP5.mjs → order-create-refund-CJDKVBSE.mjs} +52 -17
- package/dist/{order-create-return-GVA6M2RY.mjs → order-create-return-5IPRHHLJ.mjs} +11 -9
- package/dist/{order-create-shipment-TJAARKWA.mjs → order-create-shipment-3FDVQ6WT.mjs} +13 -11
- package/dist/{order-detail-2MIN6B2I.mjs → order-detail-SEPCRJW5.mjs} +50 -42
- package/dist/{order-edit-billing-address-QP2I5F3E.mjs → order-edit-billing-address-J75NQFRY.mjs} +12 -12
- package/dist/{order-edit-email-7WT7XTHB.mjs → order-edit-email-ABFQKE6A.mjs} +11 -11
- package/dist/{order-edit-shipping-address-3QFMQP4I.mjs → order-edit-shipping-address-OXW7TAJD.mjs} +12 -12
- package/dist/{order-list-73DBATIK.mjs → order-list-VDUUHTSU.mjs} +11 -10
- package/dist/{order-metadata-YJS26DHK.mjs → order-metadata-5NF3ICQL.mjs} +13 -12
- package/dist/{order-receive-return-PZMMMUB2.mjs → order-receive-return-IM65P7XQ.mjs} +14 -13
- package/dist/{order-request-transfer-QBIZD36E.mjs → order-request-transfer-LZ25KEDA.mjs} +12 -12
- package/dist/{price-list-configuration-435QDWB2.mjs → price-list-configuration-VACKCKJF.mjs} +6 -5
- package/dist/{price-list-create-RXDH5CXF.mjs → price-list-create-EC5VGCMW.mjs} +39 -24
- package/dist/{price-list-detail-PKIKOJ4H.mjs → price-list-detail-CRTJA5O4.mjs} +18 -17
- 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-2CDPUSYA.mjs → price-list-prices-add-HYCM4QDY.mjs} +28 -20
- package/dist/{price-list-prices-edit-ENB4GJZT.mjs → price-list-prices-edit-R53ITSDD.mjs} +5 -4
- package/dist/{product-attributes-FQDJCNUB.mjs → product-attributes-WVQRK3GQ.mjs} +19 -17
- package/dist/{product-create-W37RQLON.mjs → product-create-PWSPOVUS.mjs} +27 -21
- package/dist/{product-create-option-3JR35UZ5.mjs → product-create-option-OW2LMVST.mjs} +1 -1
- package/dist/{product-create-variant-KJKQ6ROY.mjs → product-create-variant-V2QGXFEF.mjs} +31 -18
- package/dist/{product-detail-TANIKAEK.mjs → product-detail-EBPCCBI4.mjs} +21 -19
- package/dist/{product-edit-DO76GHBI.mjs → product-edit-5E6D43KE.mjs} +41 -28
- package/dist/{product-edit-option-VNDGZ37A.mjs → product-edit-option-OM56DLU6.mjs} +1 -1
- package/dist/{product-export-XERWEI5H.mjs → product-export-VFC3I5DK.mjs} +13 -13
- package/dist/{product-import-AGFJMSVK.mjs → product-import-V7EZJ2TU.mjs} +14 -13
- package/dist/{product-list-KJ3HXPLB.mjs → product-list-FFZO57JG.mjs} +19 -18
- package/dist/{product-media-VG4YM2W6.mjs → product-media-TRKQTA4G.mjs} +5 -5
- package/dist/{product-metadata-NZ3HKO67.mjs → product-metadata-VYQ65KYI.mjs} +13 -12
- package/dist/{product-organization-OOVUGXNP.mjs → product-organization-OCVSTKEK.mjs} +20 -18
- package/dist/{product-prices-PCBMYYGV.mjs → product-prices-XLY5TUSJ.mjs} +3 -2
- package/dist/{product-sales-channels-QEJRSCAU.mjs → product-sales-channels-KSIHPDJG.mjs} +5 -4
- package/dist/{product-shipping-profile-FFMKOF6B.mjs → product-shipping-profile-SG6NDHF4.mjs} +19 -17
- package/dist/{product-stock-SUVEQZML.mjs → product-stock-LJRYRSKN.mjs} +16 -14
- package/dist/{product-tag-create-T6HVAQKN.mjs → product-tag-create-EB5CVUOP.mjs} +11 -11
- package/dist/{product-tag-detail-HOWUZC3P.mjs → product-tag-detail-V5CZY4R4.mjs} +22 -21
- package/dist/{product-tag-edit-WWQDNDRC.mjs → product-tag-edit-YATSW5OK.mjs} +11 -11
- package/dist/{product-tag-list-FAKSLONF.mjs → product-tag-list-2LFGEFGL.mjs} +22 -21
- package/dist/{product-tag-metadata-6B56VEZU.mjs → product-tag-metadata-R5P5FWAZ.mjs} +13 -12
- package/dist/{product-type-detail-KN64HYUV.mjs → product-type-detail-BZNI5GJ5.mjs} +17 -16
- package/dist/{product-type-list-6ZIWPIUH.mjs → product-type-list-MJLAGQYC.mjs} +5 -4
- package/dist/{product-type-metadata-F3FTI6OG.mjs → product-type-metadata-SUQHWLWA.mjs} +13 -12
- package/dist/{product-variant-detail-OUHBUY4J.mjs → product-variant-detail-W2JHQQQJ.mjs} +16 -15
- package/dist/{product-variant-edit-NBYHDUJ5.mjs → product-variant-edit-DSY77FF4.mjs} +17 -13
- package/dist/{product-variant-manage-inventory-items-TM3VAHBJ.mjs → product-variant-manage-inventory-items-JH65NAD4.mjs} +2 -2
- package/dist/{product-variant-metadata-XDVLJYGQ.mjs → product-variant-metadata-HE3MRTJB.mjs} +13 -12
- 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-YOUUM6RB.mjs} +9 -21
- package/dist/{promotion-create-UUOG52D5.mjs → promotion-create-NBFV4XQV.mjs} +29 -17
- package/dist/{promotion-detail-GONXLJZ2.mjs → promotion-detail-247QD6DA.mjs} +16 -15
- package/dist/{promotion-edit-details-HQLYX4X4.mjs → promotion-edit-details-A2UUSAZA.mjs} +10 -2
- package/dist/{promotion-list-NNEMVJ6I.mjs → promotion-list-WDHOSD55.mjs} +9 -8
- package/dist/refund-reason-create-45ZZOX7F.mjs +157 -0
- package/dist/refund-reason-edit-E2HDAQZI.mjs +144 -0
- package/dist/refund-reason-list-WI7NHRDS.mjs +245 -0
- package/dist/{region-add-countries-Y4YAHDUZ.mjs → region-add-countries-6GSF4CKJ.mjs} +3 -2
- package/dist/{region-create-5Y3GIQBV.mjs → region-create-AV2NJNNJ.mjs} +49 -39
- package/dist/{region-detail-CWRFM6P3.mjs → region-detail-PB7EUSTD.mjs} +5 -4
- package/dist/region-edit-X7CSUICV.mjs +308 -0
- package/dist/{region-list-FQNI7F37.mjs → region-list-52LF5S4S.mjs} +5 -4
- package/dist/{region-metadata-IQVB4ERU.mjs → region-metadata-3JIGHAUI.mjs} +13 -12
- package/dist/{reservation-create-7RFXWDXB.mjs → reservation-create-FKBCGQA7.mjs} +3 -3
- package/dist/{reservation-detail-RTGHD35L.mjs → reservation-detail-FENCNQDA.mjs} +15 -14
- package/dist/{reservation-list-UOC7RNRZ.mjs → reservation-list-NOWJUMXV.mjs} +7 -6
- package/dist/{reservation-metadata-WKJXBRLQ.mjs → reservation-metadata-DQ3A7MHU.mjs} +13 -12
- package/dist/{reset-password-ANJHGYUE.mjs → reset-password-LCVV4NOA.mjs} +1 -1
- package/dist/{return-reason-list-MOP7YWMZ.mjs → return-reason-list-FW7OYUOW.mjs} +8 -7
- package/dist/{sales-channel-add-products-OKVZJ6FI.mjs → sales-channel-add-products-G4EUOCWY.mjs} +15 -14
- package/dist/{sales-channel-create-3MPOMVPD.mjs → sales-channel-create-NODWGJDD.mjs} +4 -2
- package/dist/{sales-channel-detail-WESBK6Q7.mjs → sales-channel-detail-NT7PEVVH.mjs} +17 -16
- package/dist/{sales-channel-edit-LSLAM7A4.mjs → sales-channel-edit-ALIRERVH.mjs} +4 -2
- package/dist/{sales-channel-list-LKVHXUXW.mjs → sales-channel-list-REV2RETE.mjs} +15 -14
- package/dist/{sales-channel-metadata-2OQAHYB4.mjs → sales-channel-metadata-O5O6ADG5.mjs} +13 -12
- package/dist/{shipping-option-type-create-3CGPGDYJ.mjs → shipping-option-type-create-7FSJNHHA.mjs} +11 -11
- package/dist/{shipping-option-type-detail-S23H2OGW.mjs → shipping-option-type-detail-6UQST7RY.mjs} +15 -14
- package/dist/{shipping-option-type-edit-IHE7XM6M.mjs → shipping-option-type-edit-B475WRRR.mjs} +11 -11
- package/dist/{shipping-option-type-list-47GRJ6EC.mjs → shipping-option-type-list-DTETSFSA.mjs} +17 -16
- package/dist/{shipping-profile-detail-FDUPDSH4.mjs → shipping-profile-detail-FS46IJZP.mjs} +3 -2
- package/dist/{shipping-profile-metadata-OXWOXAAR.mjs → shipping-profile-metadata-PRINFNSY.mjs} +13 -12
- 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-4K7TW2TP.mjs → store-detail-QKF2TVNW.mjs} +16 -15
- package/dist/{store-edit-EU55TNFU.mjs → store-edit-ZPGTNZGL.mjs} +24 -12
- package/dist/{store-metadata-JP2CI7EF.mjs → store-metadata-M6GIKI5P.mjs} +13 -12
- package/dist/{tax-region-create-IWM4755I.mjs → tax-region-create-4DTM3RTZ.mjs} +14 -14
- package/dist/{tax-region-detail-V2F2DONN.mjs → tax-region-detail-SLCI3JYL.mjs} +18 -17
- package/dist/{tax-region-edit-CJPMYTBF.mjs → tax-region-edit-CJ63JXFQ.mjs} +12 -12
- 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-4PUQ5ADW.mjs → tax-region-province-detail-BGL2USQF.mjs} +17 -16
- package/dist/{tax-region-tax-override-create-3SCIOK4P.mjs → tax-region-tax-override-create-L4WOTSBO.mjs} +25 -20
- package/dist/{tax-region-tax-override-edit-P3QJKET3.mjs → tax-region-tax-override-edit-2JAVNE37.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-MKJLB5CQ.mjs → user-list-G4H2RSDX.mjs} +4 -3
- package/dist/{user-metadata-ZURLDLGC.mjs → user-metadata-DFTGB46F.mjs} +13 -12
- package/dist/{workflow-execution-detail-4R6AFFHV.mjs → workflow-execution-detail-YNT2RKIP.mjs} +17 -13
- 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/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 +20 -13
- 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/settings-layout/settings-layout.tsx +4 -0
- 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/dashboard-app/routes/get-route.map.tsx +36 -0
- package/src/hooks/api/campaigns.tsx +1 -0
- package/src/hooks/api/inventory.tsx +3 -0
- package/src/hooks/api/payments.tsx +6 -1
- package/src/hooks/api/refund-reasons.tsx +105 -10
- package/src/hooks/table/columns/index.ts +1 -0
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +32 -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/use-document-direction.tsx +54 -0
- package/src/i18n/translations/$schema.json +118 -0
- package/src/i18n/translations/en.json +34 -1
- 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/location-list.tsx +10 -4
- 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-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 +138 -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
- package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +29 -12
- package/src/routes/regions/region-create/region-create.tsx +1 -10
- package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +32 -10
- package/src/routes/regions/region-edit/region-edit.tsx +0 -5
- 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-ZCZL3STK.mjs +0 -64
- package/dist/manage-locations-3TBIUSHP.mjs +0 -236
- package/dist/region-edit-JWQWCLM3.mjs +0 -285
@@ -192,7 +192,8 @@ export const useProductStockColumns = (
|
|
192
192
|
return (
|
193
193
|
<div className="flex size-full items-center gap-x-2">
|
194
194
|
<Switch
|
195
|
-
|
195
|
+
dir="ltr"
|
196
|
+
className="shrink-0 cursor-not-allowed rtl:rotate-180"
|
196
197
|
tabIndex={-1}
|
197
198
|
size="small"
|
198
199
|
checked={checked}
|
@@ -10,6 +10,7 @@ import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
|
|
10
10
|
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
11
11
|
import { useUpdateUser } from "../../../../../hooks/api/users"
|
12
12
|
import { languages } from "../../../../../i18n/languages"
|
13
|
+
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
13
14
|
|
14
15
|
type EditProfileProps = {
|
15
16
|
user: HttpTypes.AdminUser
|
@@ -26,7 +27,7 @@ const EditProfileSchema = zod.object({
|
|
26
27
|
export const EditProfileForm = ({ user }: EditProfileProps) => {
|
27
28
|
const { t, i18n } = useTranslation()
|
28
29
|
const { handleSuccess } = useRouteModal()
|
29
|
-
|
30
|
+
const direction = useDocumentDirection()
|
30
31
|
const form = useForm<zod.infer<typeof EditProfileSchema>>({
|
31
32
|
defaultValues: {
|
32
33
|
first_name: user.first_name ?? "",
|
@@ -111,7 +112,11 @@ export const EditProfileForm = ({ user }: EditProfileProps) => {
|
|
111
112
|
</div>
|
112
113
|
<div>
|
113
114
|
<Form.Control>
|
114
|
-
<Select
|
115
|
+
<Select
|
116
|
+
dir={direction}
|
117
|
+
{...field}
|
118
|
+
onValueChange={field.onChange}
|
119
|
+
>
|
115
120
|
<Select.Trigger ref={ref} className="py-1 text-[13px]">
|
116
121
|
<Select.Value
|
117
122
|
placeholder={t("profile.edit.languagePlaceholder")}
|
@@ -151,7 +156,8 @@ export const EditProfileForm = ({ user }: EditProfileProps) => {
|
|
151
156
|
{t("profile.fields.usageInsightsLabel")}
|
152
157
|
</Form.Label>
|
153
158
|
<Form.Control>
|
154
|
-
<Switch
|
159
|
+
<Switch dir="ltr"
|
160
|
+
className="rtl:rotate-180"
|
155
161
|
{...rest}
|
156
162
|
checked={value}
|
157
163
|
onCheckedChange={onChange}
|
package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx
CHANGED
@@ -14,6 +14,7 @@ import {
|
|
14
14
|
usePromotionRuleAttributes,
|
15
15
|
usePromotionRules,
|
16
16
|
} from "../../../../../../hooks/api/promotions"
|
17
|
+
import { useDocumentDirection } from "../../../../../../hooks/use-document-direction"
|
17
18
|
import { CreatePromotionSchemaType } from "../../../../promotion-create/components/create-promotion-form/form-schema"
|
18
19
|
import { generateRuleAttributes } from "../edit-rules-form/utils"
|
19
20
|
import { RuleValueFormField } from "../rule-value-form-field"
|
@@ -44,6 +45,7 @@ export const RulesFormField = ({
|
|
44
45
|
const initialRulesSet = useRef(false)
|
45
46
|
|
46
47
|
const { t } = useTranslation()
|
48
|
+
const direction = useDocumentDirection()
|
47
49
|
const formData = form.getValues()
|
48
50
|
const { attributes } = usePromotionRuleAttributes(
|
49
51
|
ruleType,
|
@@ -224,6 +226,7 @@ export const RulesFormField = ({
|
|
224
226
|
<Form.Control>
|
225
227
|
{!disabled ? (
|
226
228
|
<Select
|
229
|
+
dir={direction}
|
227
230
|
{...fieldProps}
|
228
231
|
onValueChange={onValueChange}
|
229
232
|
disabled={fieldRule.required}
|
@@ -294,6 +297,7 @@ export const RulesFormField = ({
|
|
294
297
|
<Form.Control>
|
295
298
|
{!disabled ? (
|
296
299
|
<Select
|
300
|
+
dir= {direction}
|
297
301
|
{...fieldProps}
|
298
302
|
disabled={!fieldRule.attribute}
|
299
303
|
onValueChange={onChange}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { zodResolver } from "@hookform/resolvers/zod"
|
2
2
|
import { AdminCampaign, AdminPromotion } from "@medusajs/types"
|
3
|
-
import { Button, RadioGroup,
|
3
|
+
import { Button, RadioGroup, toast } from "@medusajs/ui"
|
4
4
|
import { useEffect } from "react"
|
5
5
|
import { useForm, useWatch } from "react-hook-form"
|
6
|
-
import {
|
6
|
+
import { useTranslation } from "react-i18next"
|
7
7
|
import * as zod from "zod"
|
8
8
|
import { Form } from "../../../../../components/common/form"
|
9
9
|
import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
|
@@ -11,10 +11,14 @@ import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
|
11
11
|
import { useUpdatePromotion } from "../../../../../hooks/api/promotions"
|
12
12
|
import { CreateCampaignFormFields } from "../../../../campaigns/common/components/create-campaign-form-fields"
|
13
13
|
import { CampaignDetails } from "./campaign-details"
|
14
|
+
import { sdk } from "../../../../../lib/client"
|
15
|
+
import { useComboboxData } from "../../../../../hooks/use-combobox-data"
|
16
|
+
import { Combobox } from "../../../../../components/inputs/combobox"
|
17
|
+
import { useCampaign } from "../../../../../hooks/api/campaigns"
|
18
|
+
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
14
19
|
|
15
20
|
type EditPromotionFormProps = {
|
16
21
|
promotion: AdminPromotion
|
17
|
-
campaigns: AdminCampaign[]
|
18
22
|
}
|
19
23
|
|
20
24
|
const EditPromotionSchema = zod.object({
|
@@ -24,14 +28,16 @@ const EditPromotionSchema = zod.object({
|
|
24
28
|
|
25
29
|
export const AddCampaignPromotionFields = ({
|
26
30
|
form,
|
27
|
-
campaigns,
|
28
31
|
withNewCampaign = true,
|
32
|
+
promotionCurrencyCode,
|
29
33
|
}: {
|
30
34
|
form: any
|
31
|
-
campaigns: AdminCampaign[]
|
32
35
|
withNewCampaign?: boolean
|
36
|
+
promotionCurrencyCode?: string
|
33
37
|
}) => {
|
34
38
|
const { t } = useTranslation()
|
39
|
+
const direction = useDocumentDirection()
|
40
|
+
|
35
41
|
const watchCampaignId = useWatch({
|
36
42
|
control: form.control,
|
37
43
|
name: "campaign_id",
|
@@ -42,7 +48,30 @@ export const AddCampaignPromotionFields = ({
|
|
42
48
|
name: "campaign_choice",
|
43
49
|
})
|
44
50
|
|
45
|
-
const
|
51
|
+
const campaignsCombobox = useComboboxData({
|
52
|
+
queryFn: (params) =>
|
53
|
+
sdk.admin.campaign.list({
|
54
|
+
...params,
|
55
|
+
}),
|
56
|
+
queryKey: ["campaigns"],
|
57
|
+
getOptions: (data) =>
|
58
|
+
data.campaigns.map((campaign) => ({
|
59
|
+
label: campaign.name.toUpperCase(),
|
60
|
+
value: campaign.id,
|
61
|
+
disabled:
|
62
|
+
campaign.budget?.currency_code &&
|
63
|
+
campaign.budget?.currency_code?.toLowerCase() !==
|
64
|
+
promotionCurrencyCode?.toLowerCase(), // also cannot add promotion which doesn't have currency defined to a campaign with a currency amount budget
|
65
|
+
})),
|
66
|
+
})
|
67
|
+
|
68
|
+
const { campaign: selectedCampaign } = useCampaign(
|
69
|
+
watchCampaignId as string,
|
70
|
+
undefined,
|
71
|
+
{
|
72
|
+
enabled: !!watchCampaignId,
|
73
|
+
}
|
74
|
+
)
|
46
75
|
|
47
76
|
return (
|
48
77
|
<div className="flex flex-col gap-y-8">
|
@@ -56,6 +85,7 @@ export const AddCampaignPromotionFields = ({
|
|
56
85
|
|
57
86
|
<Form.Control>
|
58
87
|
<RadioGroup
|
88
|
+
dir={direction}
|
59
89
|
className="grid grid-cols-1 gap-3"
|
60
90
|
{...field}
|
61
91
|
value={field.value}
|
@@ -97,54 +127,24 @@ export const AddCampaignPromotionFields = ({
|
|
97
127
|
<Form.Field
|
98
128
|
control={form.control}
|
99
129
|
name="campaign_id"
|
100
|
-
render={({ field: { onChange,
|
130
|
+
render={({ field: { onChange, ...field } }) => {
|
101
131
|
return (
|
102
132
|
<Form.Item>
|
103
|
-
<Form.Label>
|
133
|
+
<Form.Label tooltip={t("campaigns.fields.campaign_id.hint")}>
|
104
134
|
{t("promotions.form.campaign.existing.title")}
|
105
135
|
</Form.Label>
|
106
136
|
|
107
137
|
<Form.Control>
|
108
|
-
<
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<span className="txt-small text-ui-fg-subtle font-medium">
|
117
|
-
{t(
|
118
|
-
"promotions.form.campaign.existing.placeholder.title"
|
119
|
-
)}
|
120
|
-
</span>
|
121
|
-
<span className="txt-small text-ui-fg-muted">
|
122
|
-
{t(
|
123
|
-
"promotions.form.campaign.existing.placeholder.desc"
|
124
|
-
)}
|
125
|
-
</span>
|
126
|
-
</div>
|
127
|
-
)}
|
128
|
-
{campaigns.map((c) => (
|
129
|
-
<Select.Item key={c.id} value={c.id}>
|
130
|
-
{c.name?.toUpperCase()}
|
131
|
-
</Select.Item>
|
132
|
-
))}
|
133
|
-
</Select.Content>
|
134
|
-
</Select>
|
138
|
+
<Combobox
|
139
|
+
dir={direction}
|
140
|
+
options={campaignsCombobox.options}
|
141
|
+
searchValue={campaignsCombobox.searchValue}
|
142
|
+
onSearchValueChange={campaignsCombobox.onSearchValueChange}
|
143
|
+
onChange={onChange}
|
144
|
+
{...field}
|
145
|
+
></Combobox>
|
135
146
|
</Form.Control>
|
136
147
|
|
137
|
-
<Text
|
138
|
-
size="small"
|
139
|
-
leading="compact"
|
140
|
-
className="text-ui-fg-subtle"
|
141
|
-
>
|
142
|
-
<Trans
|
143
|
-
t={t}
|
144
|
-
i18nKey="campaigns.fields.campaign_id.hint"
|
145
|
-
components={[<br key="break" />]}
|
146
|
-
/>
|
147
|
-
</Text>
|
148
148
|
<Form.ErrorMessage />
|
149
149
|
</Form.Item>
|
150
150
|
)
|
@@ -156,14 +156,13 @@ export const AddCampaignPromotionFields = ({
|
|
156
156
|
<CreateCampaignFormFields form={form} fieldScope="campaign." />
|
157
157
|
)}
|
158
158
|
|
159
|
-
<CampaignDetails campaign={selectedCampaign} />
|
159
|
+
<CampaignDetails campaign={selectedCampaign as AdminCampaign} />
|
160
160
|
</div>
|
161
161
|
)
|
162
162
|
}
|
163
163
|
|
164
164
|
export const AddCampaignPromotionForm = ({
|
165
165
|
promotion,
|
166
|
-
campaigns,
|
167
166
|
}: EditPromotionFormProps) => {
|
168
167
|
const { t } = useTranslation()
|
169
168
|
const { handleSuccess } = useRouteModal()
|
@@ -221,8 +220,8 @@ export const AddCampaignPromotionForm = ({
|
|
221
220
|
<RouteDrawer.Body className="size-full overflow-auto">
|
222
221
|
<AddCampaignPromotionFields
|
223
222
|
form={form}
|
224
|
-
campaigns={campaigns}
|
225
223
|
withNewCampaign={false}
|
224
|
+
promotionCurrencyCode={promotion.application_method?.currency_code}
|
226
225
|
/>
|
227
226
|
</RouteDrawer.Body>
|
228
227
|
|
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next"
|
|
3
3
|
import { useParams } from "react-router-dom"
|
4
4
|
|
5
5
|
import { RouteDrawer } from "../../../components/modals"
|
6
|
-
import { useCampaigns } from "../../../hooks/api/campaigns"
|
7
6
|
import { usePromotion } from "../../../hooks/api/promotions"
|
8
7
|
import { AddCampaignPromotionForm } from "./components/add-campaign-promotion-form"
|
9
8
|
|
@@ -12,24 +11,8 @@ export const PromotionAddCampaign = () => {
|
|
12
11
|
const { t } = useTranslation()
|
13
12
|
const { promotion, isPending, isError, error } = usePromotion(id!)
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
if (promotion?.application_method?.currency_code) {
|
18
|
-
campaignQuery = {
|
19
|
-
budget: {
|
20
|
-
currency_code: promotion?.application_method?.currency_code,
|
21
|
-
},
|
22
|
-
}
|
23
|
-
}
|
24
|
-
|
25
|
-
const {
|
26
|
-
campaigns,
|
27
|
-
isPending: areCampaignsLoading,
|
28
|
-
isError: isCampaignError,
|
29
|
-
error: campaignError,
|
30
|
-
} = useCampaigns(campaignQuery)
|
31
|
-
if (isError || isCampaignError) {
|
32
|
-
throw error || campaignError
|
14
|
+
if (isError) {
|
15
|
+
throw error
|
33
16
|
}
|
34
17
|
|
35
18
|
return (
|
@@ -38,8 +21,8 @@ export const PromotionAddCampaign = () => {
|
|
38
21
|
<Heading>{t("promotions.campaign.edit.header")}</Heading>
|
39
22
|
</RouteDrawer.Header>
|
40
23
|
|
41
|
-
{!isPending &&
|
42
|
-
<AddCampaignPromotionForm promotion={promotion}
|
24
|
+
{!isPending && promotion && (
|
25
|
+
<AddCampaignPromotionForm promotion={promotion} />
|
43
26
|
)}
|
44
27
|
</RouteDrawer>
|
45
28
|
)
|
@@ -46,6 +46,7 @@ import { AddCampaignPromotionFields } from "../../../promotion-add-campaign/comp
|
|
46
46
|
import { Tab } from "./constants"
|
47
47
|
import { CreatePromotionSchema } from "./form-schema"
|
48
48
|
import { templates } from "./templates"
|
49
|
+
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
49
50
|
|
50
51
|
const defaultValues = {
|
51
52
|
campaign_id: undefined,
|
@@ -80,7 +81,7 @@ export const CreatePromotionForm = () => {
|
|
80
81
|
|
81
82
|
const { t } = useTranslation()
|
82
83
|
const { handleSuccess } = useRouteModal()
|
83
|
-
|
84
|
+
const direction = useDocumentDirection()
|
84
85
|
const form = useForm<z.infer<typeof CreatePromotionSchema>>({
|
85
86
|
defaultValues,
|
86
87
|
resolver: zodResolver(CreatePromotionSchema),
|
@@ -364,6 +365,7 @@ export const CreatePromotionForm = () => {
|
|
364
365
|
<RouteFocusModal.Form form={form}>
|
365
366
|
<KeyboundForm className="flex h-full flex-col" onSubmit={handleSubmit}>
|
366
367
|
<ProgressTabs
|
368
|
+
dir={direction}
|
367
369
|
value={tab}
|
368
370
|
onValueChange={(tab) => handleTabChange(tab as Tab)}
|
369
371
|
className="flex h-full flex-col overflow-hidden"
|
@@ -417,6 +419,7 @@ export const CreatePromotionForm = () => {
|
|
417
419
|
|
418
420
|
<Form.Control>
|
419
421
|
<RadioGroup
|
422
|
+
dir={direction}
|
420
423
|
key={"template_id"}
|
421
424
|
className="flex-col gap-y-3"
|
422
425
|
{...field}
|
@@ -486,6 +489,7 @@ export const CreatePromotionForm = () => {
|
|
486
489
|
|
487
490
|
<Form.Control>
|
488
491
|
<RadioGroup
|
492
|
+
dir={direction}
|
489
493
|
className="flex gap-y-3"
|
490
494
|
{...field}
|
491
495
|
value={field.value}
|
@@ -530,6 +534,7 @@ export const CreatePromotionForm = () => {
|
|
530
534
|
|
531
535
|
<Form.Control>
|
532
536
|
<RadioGroup
|
537
|
+
dir={direction}
|
533
538
|
className="flex gap-y-3"
|
534
539
|
{...field}
|
535
540
|
value={field.value}
|
@@ -619,7 +624,8 @@ export const CreatePromotionForm = () => {
|
|
619
624
|
</div>
|
620
625
|
<Form.Control className="mr-2 self-center">
|
621
626
|
<Switch
|
622
|
-
|
627
|
+
dir="ltr"
|
628
|
+
className="mt-[2px] rtl:rotate-180"
|
623
629
|
checked={!!value}
|
624
630
|
onCheckedChange={onChange}
|
625
631
|
{...field}
|
@@ -647,6 +653,7 @@ export const CreatePromotionForm = () => {
|
|
647
653
|
</Form.Label>
|
648
654
|
<Form.Control>
|
649
655
|
<RadioGroup
|
656
|
+
dir={direction}
|
650
657
|
className="flex gap-y-3"
|
651
658
|
{...field}
|
652
659
|
onValueChange={field.onChange}
|
@@ -699,7 +706,8 @@ export const CreatePromotionForm = () => {
|
|
699
706
|
</Form.Label>
|
700
707
|
<Form.Control>
|
701
708
|
<RadioGroup
|
702
|
-
|
709
|
+
dir={direction}
|
710
|
+
className="flex gap-y-3"
|
703
711
|
{...field}
|
704
712
|
onValueChange={field.onChange}
|
705
713
|
>
|
@@ -889,6 +897,7 @@ export const CreatePromotionForm = () => {
|
|
889
897
|
|
890
898
|
<Form.Control>
|
891
899
|
<RadioGroup
|
900
|
+
dir={direction}
|
892
901
|
className="flex gap-y-3"
|
893
902
|
{...field}
|
894
903
|
onValueChange={field.onChange}
|
@@ -16,6 +16,7 @@ import {
|
|
16
16
|
getCurrencySymbol,
|
17
17
|
} from "../../../../../lib/data/currencies"
|
18
18
|
import { SwitchBox } from "../../../../../components/common/switch-box"
|
19
|
+
import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
|
19
20
|
|
20
21
|
type EditPromotionFormProps = {
|
21
22
|
promotion: AdminPromotion
|
@@ -99,7 +100,7 @@ export const EditPromotionDetailsForm = ({
|
|
99
100
|
form.setValue("is_tax_inclusive", false)
|
100
101
|
}
|
101
102
|
}, [allocationWatchValue, form, promotion])
|
102
|
-
|
103
|
+
const direction = useDocumentDirection()
|
103
104
|
return (
|
104
105
|
<RouteDrawer.Form form={form}>
|
105
106
|
<KeyboundForm
|
@@ -117,6 +118,7 @@ export const EditPromotionDetailsForm = ({
|
|
117
118
|
<Form.Label>{t("promotions.form.status.label")}</Form.Label>
|
118
119
|
<Form.Control>
|
119
120
|
<RadioGroup
|
121
|
+
dir={direction}
|
120
122
|
className="flex-col gap-y-3"
|
121
123
|
{...field}
|
122
124
|
value={field.value}
|
@@ -162,6 +164,7 @@ export const EditPromotionDetailsForm = ({
|
|
162
164
|
<Form.Label>{t("promotions.form.method.label")}</Form.Label>
|
163
165
|
<Form.Control>
|
164
166
|
<RadioGroup
|
167
|
+
dir={direction}
|
165
168
|
className="flex-col gap-y-3"
|
166
169
|
{...field}
|
167
170
|
value={field.value}
|
@@ -242,6 +245,7 @@ export const EditPromotionDetailsForm = ({
|
|
242
245
|
</Form.Label>
|
243
246
|
<Form.Control>
|
244
247
|
<RadioGroup
|
248
|
+
dir={direction}
|
245
249
|
className="flex-col gap-y-3"
|
246
250
|
{...field}
|
247
251
|
onValueChange={field.onChange}
|
@@ -336,6 +340,7 @@ export const EditPromotionDetailsForm = ({
|
|
336
340
|
</Form.Label>
|
337
341
|
<Form.Control>
|
338
342
|
<RadioGroup
|
343
|
+
dir={direction}
|
339
344
|
className="flex-col gap-y-3"
|
340
345
|
{...field}
|
341
346
|
onValueChange={field.onChange}
|
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"
|