@mercurjs/admin 2.2.0-rc.0 → 2.2.0-rc.1
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-QK73ARX4.js → add-campaign-promotions-RH5L6VMH.js} +7 -7
- package/dist/{adjust-inventory-X45NEQFK.js → adjust-inventory-P2M7KZ77.js} +10 -10
- package/dist/{api-key-management-create-LOD37GOQ.js → api-key-management-create-KDKSGJ4C.js} +3 -3
- package/dist/{api-key-management-detail-HKNZPPR2.js → api-key-management-detail-2RZ6NOYH.js} +13 -13
- package/dist/{api-key-management-edit-JP2GUMMJ.js → api-key-management-edit-NOGBLKBT.js} +3 -3
- package/dist/{api-key-management-list-5RXBJ24C.js → api-key-management-list-CGHUURWX.js} +8 -8
- package/dist/{api-key-management-sales-channels-4GLVMHU6.js → api-key-management-sales-channels-VJMUPYV3.js} +5 -5
- package/dist/{attribute-create-VGL7LGIH.js → attribute-create-KR4DSDH2.js} +15 -13
- package/dist/{attribute-detail-EKDAYT4B.js → attribute-detail-6FMX7IDW.js} +21 -20
- package/dist/{attribute-edit-OBNLNOJS.js → attribute-edit-WXO5FGR6.js} +2 -2
- package/dist/{attribute-edit-possible-value-QDFVWLA3.js → attribute-edit-possible-value-RO7BY3NC.js} +2 -2
- package/dist/{attribute-list-6A72PBIY.js → attribute-list-PJXWYS4C.js} +15 -15
- package/dist/{breadcrumb-IEEJTH47.js → breadcrumb-OBHTESQD.js} +1 -1
- package/dist/{campaign-budget-edit-NONE5NMV.js → campaign-budget-edit-QXAXRI6B.js} +1 -1
- package/dist/{campaign-configuration-JYSVIQFE.js → campaign-configuration-A3E6G2VQ.js} +1 -1
- package/dist/{campaign-create-6U2PONHA.js → campaign-create-TZH66JVU.js} +2 -2
- package/dist/{campaign-detail-RNB3FEJZ.js → campaign-detail-3PNOOUGP.js} +26 -22
- package/dist/{campaign-edit-MAS3DCFB.js → campaign-edit-6CIGS4ZU.js} +23 -7
- package/dist/{campaign-list-CDV4GWWD.js → campaign-list-TNJDWTM5.js} +6 -6
- package/dist/{categories-metadata-4LXL2PWA.js → categories-metadata-AIT33J5U.js} +10 -10
- package/dist/{category-create-AIS2MG7E.js → category-create-NTSIOKLK.js} +3 -3
- package/dist/{category-detail-557376TZ.js → category-detail-3WUCMDWO.js} +29 -25
- package/dist/{category-edit-LYR2IOTA.js → category-edit-4PGWERPJ.js} +26 -9
- package/dist/{category-icon-edit-W2TPCSDC.js → category-icon-edit-C2VAH5JA.js} +2 -2
- package/dist/{category-list-XKRI24VN.js → category-list-D4J4G6HW.js} +8 -8
- package/dist/{category-media-PC4V7YU4.js → category-media-E5UUDN3I.js} +2 -2
- package/dist/category-organize-T45BC4HL.js +129 -0
- package/dist/{category-products-44PCDDNN.js → category-products-TTQGSVUC.js} +18 -18
- package/dist/{chunk-LVRCEGL7.js → chunk-2KERYQNF.js} +52 -26
- package/dist/{chunk-KGA2XI6W.js → chunk-3F4Z4BNA.js} +33 -15
- package/dist/{chunk-3BTRS4AA.js → chunk-3FKB6UTO.js} +2 -2
- package/dist/{chunk-GCU4LHGY.js → chunk-3KS7PC2Z.js} +79 -33
- package/dist/{chunk-HI7NZVSJ.js → chunk-3LDOWS4A.js} +4 -3
- package/dist/{chunk-HT34QVZR.js → chunk-3LGGCLSO.js} +4 -3
- package/dist/{chunk-UZ452ISX.js → chunk-3WCK2FT4.js} +42 -27
- package/dist/{chunk-DPG4AWSG.js → chunk-4DJL3XN7.js} +25 -13
- package/dist/{chunk-PFBJWWUA.js → chunk-4QQ6BFWQ.js} +2 -2
- package/dist/{chunk-NOKCLBAL.js → chunk-4TNOZ4VH.js} +2 -1
- package/dist/{chunk-FICKHCWL.js → chunk-4TW5RTWO.js} +5 -3
- package/dist/{chunk-6DJQITWV.js → chunk-5CHUXS7G.js} +1 -1
- package/dist/{chunk-QDUZCJ7F.js → chunk-5EOYDQAS.js} +1 -1
- package/dist/{chunk-CNODWD3F.js → chunk-5NAX6LXB.js} +5 -4
- package/dist/{chunk-BFUHW56P.js → chunk-5NC3VFXY.js} +1 -1
- package/dist/{chunk-H7NIKMPE.js → chunk-5NSOIZFB.js} +3 -1
- package/dist/{chunk-RIO2IHPE.js → chunk-67KYEPSA.js} +1 -1
- package/dist/{chunk-EOSJHPHN.js → chunk-6DDS7IRR.js} +6 -5
- package/dist/{chunk-XW2BES72.js → chunk-6R767EBC.js} +8 -5
- package/dist/{chunk-EGHDC6K6.js → chunk-6S5RUSUU.js} +12 -11
- package/dist/{chunk-TDJSZ73V.js → chunk-6TMGHMZ2.js} +38 -10
- package/dist/{chunk-CW3HYGS5.js → chunk-7CQD5AQ6.js} +2 -6
- package/dist/{chunk-JSVYNNPF.js → chunk-7IGLZARZ.js} +2 -2
- package/dist/{chunk-PAYQJPGK.js → chunk-7PPT3477.js} +2 -2
- package/dist/{chunk-JLCA6PWC.js → chunk-AASCLZ5N.js} +1 -1
- package/dist/{chunk-RGS5ZOY7.js → chunk-AFYILTAC.js} +4 -3
- package/dist/chunk-APAT344J.js +144 -0
- package/dist/{chunk-4346EIRG.js → chunk-APMBU7ZV.js} +3 -3
- package/dist/{chunk-VGXJXU7X.js → chunk-AW5OKJQZ.js} +7 -6
- package/dist/{chunk-VY72NX26.js → chunk-BBD4WOUK.js} +5 -4
- package/dist/{chunk-JU2O2H7I.js → chunk-BHF4TD3T.js} +6 -6
- package/dist/{chunk-THPXRTE5.js → chunk-BHSY6RCN.js} +34 -13
- package/dist/{chunk-VYQ6ASFF.js → chunk-CWQKHTH6.js} +26 -10
- package/dist/{chunk-56UFDHNO.js → chunk-DJD3MWED.js} +1 -1
- package/dist/{chunk-EX4AGESR.js → chunk-DMZDXTS5.js} +95 -34
- package/dist/{chunk-OPSGADQI.js → chunk-DP6YFZHP.js} +1 -1
- package/dist/{chunk-HGTPUAHD.js → chunk-DUVYF37J.js} +1 -1
- package/dist/{chunk-BTJR5RSV.js → chunk-F57NIOVJ.js} +49 -20
- package/dist/{chunk-CHMIK6PK.js → chunk-F6DGTW4E.js} +3 -3
- package/dist/{chunk-BNFTJW4L.js → chunk-FVG5DTS6.js} +2 -2
- package/dist/{chunk-LSMTJU6Y.js → chunk-G2LHEJLS.js} +3 -3
- package/dist/{chunk-7O7LYBHL.js → chunk-G67PGZDM.js} +67 -25
- package/dist/{chunk-6ZVV2XHU.js → chunk-GRFWCCUW.js} +1 -1
- package/dist/{chunk-BLR3NTU6.js → chunk-GVPKRQWI.js} +4 -6
- package/dist/{chunk-BF7X4JQT.js → chunk-H3D6V3KM.js} +3 -2
- package/dist/{chunk-TZM63FZ4.js → chunk-HC7FWIMY.js} +7 -6
- package/dist/{chunk-W7CJSBDM.js → chunk-HYDXR5K4.js} +27 -15
- package/dist/{chunk-AMZ2QSSI.js → chunk-I5FOWDOM.js} +9 -6
- package/dist/{chunk-OYZIFLLC.js → chunk-I5HY5Q3K.js} +1 -1
- package/dist/{chunk-YMOP6JKN.js → chunk-IGTR66D2.js} +2 -2
- package/dist/{chunk-WKDHY2DJ.js → chunk-IJ2CSCLP.js} +5 -2
- package/dist/{chunk-NISAIYSW.js → chunk-JJOITP32.js} +11 -10
- package/dist/{chunk-25U23TXK.js → chunk-KT7CXVLT.js} +6 -5
- package/dist/{chunk-BVIIRGSW.js → chunk-KUBTN5TC.js} +4 -2
- package/dist/{chunk-DL7ENIQB.js → chunk-LEQINL55.js} +2 -1
- package/dist/{chunk-FMJBQE56.js → chunk-LPIPSLR7.js} +1 -1
- package/dist/{chunk-KFYTUQXT.js → chunk-LQQERWMM.js} +11 -10
- package/dist/{chunk-4C7L7TJT.js → chunk-LXNWSQOE.js} +3 -3
- package/dist/{chunk-VBKFXL2Q.js → chunk-MEDZM6N7.js} +26 -10
- package/dist/{chunk-ZKHF75MZ.js → chunk-MMKUMSZS.js} +1 -1
- package/dist/{chunk-GISFIAGQ.js → chunk-MPRW23TB.js} +47 -17
- package/dist/{chunk-GCEOEV6P.js → chunk-MTHPNKQ4.js} +4 -4
- package/dist/{chunk-ZU74CNL4.js → chunk-MUKW4VRI.js} +8 -7
- package/dist/{chunk-TH26CWVG.js → chunk-NLJ5F7FS.js} +1 -1
- package/dist/{chunk-6KWWJE5P.js → chunk-O7SDCQD6.js} +6 -6
- package/dist/{chunk-HQM7D57C.js → chunk-ODDJZVYL.js} +8 -6
- package/dist/{chunk-2FPQHWJZ.js → chunk-OG5AVHPY.js} +110 -28
- package/dist/{chunk-HRDVGFS7.js → chunk-OX6HZPVY.js} +21 -11
- package/dist/{chunk-5ACJR6WB.js → chunk-P2DFLKCN.js} +3 -3
- package/dist/{chunk-NWSKT55Z.js → chunk-P2JA3QTQ.js} +7 -6
- package/dist/{chunk-ZVPTNPLI.js → chunk-P3GGL5JL.js} +1 -1
- package/dist/{chunk-NZVS6B77.js → chunk-PDID73QY.js} +574 -536
- package/dist/{chunk-5Y2AIJ2T.js → chunk-PEUWV5YK.js} +2 -1
- package/dist/{chunk-K7H77TA5.js → chunk-PHWYJ26A.js} +1 -1
- package/dist/{chunk-W3P3RP5R.js → chunk-PPRIEP4H.js} +25 -11
- package/dist/{chunk-JEDX4KBB.js → chunk-Q5DRFJPI.js} +6 -5
- package/dist/{chunk-J3L2FUIA.js → chunk-QA7S7WVH.js} +54 -38
- package/dist/{chunk-Q6QXFLUY.js → chunk-QEX45BI3.js} +3 -1
- package/dist/{chunk-JZJT26E3.js → chunk-QVIX6O76.js} +1 -1
- package/dist/{chunk-F2SZ4LPF.js → chunk-R2LW5LGL.js} +40 -22
- package/dist/{chunk-DI2M3J5Q.js → chunk-RMB7MPIT.js} +1 -1
- package/dist/{chunk-2Z2M5K5A.js → chunk-RT2MBSJQ.js} +7 -6
- package/dist/{chunk-65YE4SVL.js → chunk-RYISNVIR.js} +27 -14
- package/dist/{chunk-BILFRATX.js → chunk-SAU35JEB.js} +1 -1
- package/dist/{chunk-PMVWIBTI.js → chunk-SLAWONP2.js} +52 -17
- package/dist/{chunk-ML7UVBKL.js → chunk-TIG77LHS.js} +1 -1
- package/dist/{chunk-YRINVEI3.js → chunk-TJJ7S3GL.js} +3 -2
- package/dist/{chunk-4BCUGMOR.js → chunk-UK5BVJI7.js} +1 -1
- package/dist/{chunk-MOG7LT73.js → chunk-UK5CZJ4A.js} +9 -7
- package/dist/{chunk-4BPQNCF5.js → chunk-UVH7PC5B.js} +6 -5
- package/dist/{chunk-HB3KRNZM.js → chunk-VH4W6LKI.js} +4 -3
- package/dist/{chunk-YRUCTB6M.js → chunk-VHOCBKSA.js} +3 -2
- package/dist/{chunk-IVBNI2QE.js → chunk-VQ6OPDS3.js} +85 -30
- package/dist/{chunk-LQSSUC7W.js → chunk-VX6OCQLN.js} +6 -5
- package/dist/{chunk-DSTHXHJ5.js → chunk-VYSB4CTB.js} +1356 -1356
- package/dist/{chunk-6BWJWA2F.js → chunk-WF2PHYTE.js} +6 -5
- package/dist/{chunk-GLZLBHFC.js → chunk-WX4ABVXL.js} +2 -2
- package/dist/{chunk-VPYI4X6C.js → chunk-X4SSIHH7.js} +35 -16
- package/dist/{chunk-VJ4LQXMA.js → chunk-XDMCPTDG.js} +96 -69
- package/dist/{chunk-KT4DGVRQ.js → chunk-XNUH2AOW.js} +8 -7
- package/dist/{chunk-OAN4CZKX.js → chunk-XWP4ZGKN.js} +6 -4
- package/dist/{chunk-32ZNZDFT.js → chunk-XXV6ZSWY.js} +4 -3
- package/dist/{chunk-GWSRWILC.js → chunk-YLQ63F5E.js} +6 -5
- package/dist/{chunk-MZOINNCV.js → chunk-YNR25MNM.js} +78 -56
- package/dist/{chunk-YHEH25IE.js → chunk-Z6CIQQUZ.js} +2 -1
- package/dist/{chunk-YNN2YNSE.js → chunk-ZAANJVLM.js} +1 -1
- package/dist/{chunk-MW47LDBT.js → chunk-ZOTBKQLG.js} +1 -1
- package/dist/{collection-add-products-JFUIZEZI.js → collection-add-products-TXJAEXUT.js} +18 -18
- package/dist/{collection-create-5IGFVQKE.js → collection-create-7ZQONUJL.js} +4 -3
- package/dist/{collection-detail-2WOLOVWF.js → collection-detail-FGXNWXAN.js} +28 -24
- package/dist/{collection-edit-UMZN5JZ6.js → collection-edit-ZFAECPWC.js} +33 -10
- package/dist/{collection-icon-edit-WCSKUDXE.js → collection-icon-edit-642AZRHR.js} +2 -2
- package/dist/{collection-list-B3Y2ALLZ.js → collection-list-ZLBRTQAC.js} +22 -22
- package/dist/{collection-media-YIV5BV3Y.js → collection-media-LMJFEFVY.js} +2 -2
- package/dist/{collection-metadata-SBK6SL4C.js → collection-metadata-AZRN32RU.js} +10 -10
- package/dist/{commission-rule-detail-ZQ3OHFA2.js → commission-rule-detail-FOLHANWL.js} +5 -5
- package/dist/{commissions-list-M5WLJD2P.js → commissions-list-SGVCP2O4.js} +9 -9
- package/dist/{customer-create-ZQ4RTXBA.js → customer-create-SC6LAEVJ.js} +1 -1
- package/dist/{customer-create-address-P2QYUZJ5.js → customer-create-address-VZMOF5AE.js} +9 -4
- package/dist/{customer-detail-ZGDPIWA4.js → customer-detail-3KIDRBLW.js} +26 -23
- package/dist/{customer-edit-D55FJLIN.js → customer-edit-RAWO66UL.js} +25 -7
- package/dist/{customer-edit-address-R5RXDUNZ.js → customer-edit-address-ZEVUPAYN.js} +15 -6
- package/dist/{customer-group-add-customers-O6A5ZFPM.js → customer-group-add-customers-LKFLDXVO.js} +5 -5
- package/dist/{customer-group-create-44R3DDOT.js → customer-group-create-3KAC3R3N.js} +1 -1
- package/dist/{customer-group-detail-FXUICFYC.js → customer-group-detail-KWHS7V6F.js} +28 -25
- package/dist/{customer-group-edit-NZ5SUPFQ.js → customer-group-edit-E7JX2L4J.js} +41 -20
- package/dist/{customer-group-list-R2DP2D42.js → customer-group-list-3FCJBXFY.js} +16 -16
- package/dist/{customer-group-metadata-JX7ZBXLJ.js → customer-group-metadata-3QRU7FIE.js} +10 -10
- package/dist/{customer-list-Z4DUQHCH.js → customer-list-JT6YE2IW.js} +7 -7
- package/dist/{customer-metadata-JT5GGCRV.js → customer-metadata-7DMBCQXW.js} +10 -10
- package/dist/{customers-add-customer-group-KX3XNNMU.js → customers-add-customer-group-IAGH6MJJ.js} +14 -14
- package/dist/{edit-inventory-item-73BY4I5T.js → edit-inventory-item-QPWV4MSP.js} +32 -17
- package/dist/{edit-inventory-item-attributes-ZMB343AB.js → edit-inventory-item-attributes-J7WHYKMK.js} +10 -10
- package/dist/{edit-reservation-BC5IOLK6.js → edit-reservation-PTUSCC6C.js} +26 -8
- package/dist/{edit-rules-4PPNBI7B.js → edit-rules-2WZOLTL7.js} +11 -11
- package/dist/extension-targets.d.ts +269 -0
- package/dist/extension-targets.js +1 -0
- package/dist/index.css +3 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.js +280 -252
- package/dist/{inventory-create-XQKH3HZQ.js → inventory-create-RDVKGH2S.js} +11 -11
- package/dist/{inventory-detail-RZJNTJDF.js → inventory-detail-LHWQTJ7S.js} +27 -23
- package/dist/{inventory-list-SPSBDJXO.js → inventory-list-Q2CCGYI5.js} +6 -6
- package/dist/{inventory-metadata-W2E4KYG3.js → inventory-metadata-CQHLKX4T.js} +10 -10
- package/dist/{inventory-stock-D2BNT2UL.js → inventory-stock-3TR47RNA.js} +10 -10
- package/dist/{loader-HRFMJ5TM.js → loader-ZYV22XGC.js} +15 -11
- package/dist/{location-detail-CNETNX3M.js → location-detail-ZRLP4XVJ.js} +12 -12
- package/dist/{location-fulfillment-providers-XXZ7AIUF.js → location-fulfillment-providers-CL7PKPTT.js} +20 -20
- package/dist/{location-list-RHUT7IRA.js → location-list-HW5F37YZ.js} +12 -12
- package/dist/{location-sales-channels-ZQBQ3VDH.js → location-sales-channels-Z4E5VA7M.js} +4 -4
- package/dist/{location-service-zone-create-O6GYRZEE.js → location-service-zone-create-WZXZFMA2.js} +4 -4
- package/dist/{location-service-zone-manage-areas-DBP3P27I.js → location-service-zone-manage-areas-5SYZKBQK.js} +4 -4
- package/dist/{location-service-zone-shipping-option-create-3PQ2EYD7.js → location-service-zone-shipping-option-create-Z3S7EUYH.js} +10 -10
- package/dist/{login-OKBXMSKY.js → login-JNIVGP2G.js} +10 -10
- package/dist/{manage-locations-SUJNIWWF.js → manage-locations-NGNUXP3N.js} +1 -1
- package/dist/{marketplace-add-currencies-IPE5RJF6.js → marketplace-add-currencies-ZBLGQQCX.js} +3 -3
- package/dist/{marketplace-detail-IHGJXVZS.js → marketplace-detail-RZWOCVGF.js} +15 -15
- package/dist/{marketplace-metadata-STYABOTX.js → marketplace-metadata-74YUQ6UC.js} +10 -10
- package/dist/{offer-detail-page-2G5BUOIB.js → offer-detail-page-XS52BE5U.js} +71 -25
- package/dist/{offer-variant-detail-page-V6TKNYZL.js → offer-variant-detail-page-QQGOMRUY.js} +9 -8
- package/dist/{offers-2QQFKGAX.js → offers-UUFYROYV.js} +38 -23
- package/dist/{order-create-claim-Y7ESDXLI.js → order-create-claim-AG3GMAE2.js} +5 -5
- package/dist/{order-create-edit-6L5S7KQM.js → order-create-edit-N3TDQQIT.js} +8 -8
- package/dist/{order-create-exchange-WHO3K2MW.js → order-create-exchange-ZCQBC54O.js} +15 -15
- package/dist/{order-create-refund-4ZO73NWS.js → order-create-refund-HXFCDZV5.js} +10 -10
- package/dist/{order-create-return-R5WJBQ5W.js → order-create-return-VUHKWVQM.js} +5 -5
- package/dist/{order-detail-QUGH2GXH.js → order-detail-CTZELMAQ.js} +23 -19
- package/dist/{order-edit-billing-address-BEOKFNLZ.js → order-edit-billing-address-S4YOG2EE.js} +11 -11
- package/dist/{order-edit-email-GLAQZCIT.js → order-edit-email-VSAS3M2E.js} +10 -10
- package/dist/{order-edit-shipping-address-PF54SFAG.js → order-edit-shipping-address-FZMDRJU5.js} +10 -10
- package/dist/{order-list-GMUOLGZY.js → order-list-EFBU3W6N.js} +13 -13
- package/dist/{order-metadata-VQOA3DOL.js → order-metadata-FKM3ZDNM.js} +10 -10
- package/dist/{order-request-transfer-BLQQ66IF.js → order-request-transfer-BCE6ED5E.js} +10 -10
- package/dist/pages/index.d.ts +25 -25
- package/dist/pages/index.js +107 -107
- package/dist/{payout-detail-6U2ANWOH.js → payout-detail-LY7SRCKO.js} +1 -1
- package/dist/{payout-list-3GQJQSVU.js → payout-list-WE3H7FKO.js} +5 -5
- package/dist/{price-list-configuration-BLHIGDSV.js → price-list-configuration-4UNGTKCM.js} +9 -9
- package/dist/{price-list-create-HKN72A6Q.js → price-list-create-XGRFJ74B.js} +21 -21
- package/dist/{price-list-detail-6JAMNNJW.js → price-list-detail-AE6S3CEM.js} +29 -25
- package/dist/{price-list-edit-RZQMPHXU.js → price-list-edit-4JPSL2NL.js} +26 -10
- package/dist/{price-list-list-HLWCOORV.js → price-list-list-EM3TNZQG.js} +9 -9
- package/dist/{price-list-prices-add-ST6WNQNH.js → price-list-prices-add-DF6W4N6L.js} +19 -19
- package/dist/{price-list-prices-edit-ZQE3Z3NK.js → price-list-prices-edit-AXJJTMKL.js} +10 -10
- package/dist/{product-add-existing-attributes-J6MML6MT.js → product-add-existing-attributes-UVVJDOEN.js} +15 -15
- package/dist/{product-attributes-4EPKS6MP.js → product-attributes-PCZDEFHM.js} +1 -1
- package/dist/{product-bulk-edit-TRI2KKHW.js → product-bulk-edit-FGB4T2KQ.js} +1 -1
- package/dist/{product-create-B4DTC2OM.js → product-create-3PZNLIDT.js} +22 -16
- package/dist/{product-create-attribute-BP6NN4GO.js → product-create-attribute-6AJPI6IJ.js} +2 -2
- package/dist/{product-create-variant-VDQQNHAK.js → product-create-variant-2OCZA6GW.js} +4 -4
- package/dist/{product-detail-MFJ3AIU6.js → product-detail-IVRD2OHL.js} +26 -21
- package/dist/{product-edit-26AWYWUU.js → product-edit-KMK7CMLI.js} +6 -2
- package/dist/{product-edit-attribute-AXPTES26.js → product-edit-attribute-FCEYWZWL.js} +3 -3
- package/dist/{product-list-DMQSLXM4.js → product-list-IMKQUEIM.js} +30 -27
- package/dist/{product-media-XRBLOV7D.js → product-media-B5D2HUQF.js} +4 -4
- package/dist/{product-metadata-LOF6TSJQ.js → product-metadata-6EFF4IPX.js} +10 -10
- package/dist/{product-organization-ISVMEWQG.js → product-organization-5FUCDOGD.js} +4 -4
- package/dist/{product-sales-channels-C6UUHWGB.js → product-sales-channels-GUK6FTDA.js} +4 -4
- package/dist/{product-shipping-profile-VTYQ22E4.js → product-shipping-profile-UFIRKPTG.js} +1 -1
- package/dist/{product-tag-create-AHG3Y4GE.js → product-tag-create-PSY5Q437.js} +10 -10
- package/dist/{product-tag-detail-4FL4CU5S.js → product-tag-detail-L5RXBCPS.js} +24 -24
- package/dist/{product-tag-edit-ACHNVZZP.js → product-tag-edit-NVGUS3CY.js} +10 -10
- package/dist/{product-tag-list-YPTIDXPX.js → product-tag-list-UX2GZALX.js} +24 -24
- package/dist/{product-tag-metadata-BXC7GMBB.js → product-tag-metadata-T4ZYOIXY.js} +10 -10
- package/dist/{product-type-detail-RAYCHYAF.js → product-type-detail-LJWSJ6V5.js} +20 -20
- package/dist/{product-type-list-JN4SKTFE.js → product-type-list-AQ3GEAZX.js} +5 -5
- package/dist/{product-type-metadata-24JU4JNK.js → product-type-metadata-OJJYUALT.js} +10 -10
- package/dist/{product-variant-detail-7CFNAI3A.js → product-variant-detail-FZL5OZFE.js} +11 -11
- package/dist/{product-variant-edit-C4HXFQFW.js → product-variant-edit-LSSJW4DS.js} +12 -12
- package/dist/{product-variant-metadata-5PUBLPDN.js → product-variant-metadata-D5AUINFJ.js} +10 -10
- package/dist/{profile-detail-PABUO545.js → profile-detail-PFJX3LPX.js} +1 -1
- package/dist/{promotion-add-campaign-WK36UMSF.js → promotion-add-campaign-PYEBYRHK.js} +2 -2
- package/dist/{promotion-create-7VBA6JFM.js → promotion-create-OFLXF3RZ.js} +14 -14
- package/dist/{promotion-detail-KXXWEFHW.js → promotion-detail-N7JHJGSW.js} +25 -19
- package/dist/{promotion-edit-details-YM5JPGEC.js → promotion-edit-details-GXA4FDTK.js} +25 -8
- package/dist/{promotion-list-56ZDROMH.js → promotion-list-MIL2B752.js} +9 -9
- package/dist/{refund-reason-create-UA3XS6DP.js → refund-reason-create-HTTX2UGC.js} +10 -10
- package/dist/{refund-reason-edit-3TAGKV3U.js → refund-reason-edit-I7XXP4EP.js} +10 -10
- package/dist/{refund-reason-list-PBLA5HYO.js → refund-reason-list-YYCNRERE.js} +18 -18
- package/dist/{region-add-countries-UO5A42HM.js → region-add-countries-WIJCJPOX.js} +3 -3
- package/dist/{region-create-7NA6RKWS.js → region-create-B3I3W7QJ.js} +3 -3
- package/dist/{region-detail-636IAPYK.js → region-detail-3OFMBGML.js} +5 -5
- package/dist/{region-list-GIU6NFI4.js → region-list-DD5S5BD2.js} +5 -5
- package/dist/{region-metadata-NRV3L42D.js → region-metadata-RRUP56B2.js} +10 -10
- package/dist/{reservation-create-ANLVF7EC.js → reservation-create-3RVQVMRF.js} +2 -2
- package/dist/{reservation-detail-MAWHNY2H.js → reservation-detail-QOVPIIMC.js} +20 -16
- package/dist/{reservation-list-UWZRPRPH.js → reservation-list-EJPMH7UX.js} +7 -7
- package/dist/{reservation-metadata-ZFKKAOWG.js → reservation-metadata-OAEUUCRG.js} +10 -10
- package/dist/{reset-password-UDA5ZMTZ.js → reset-password-AZ2RPOG5.js} +1 -1
- package/dist/{return-reason-list-NPAAMB5H.js → return-reason-list-PFDQCDWA.js} +10 -10
- package/dist/{sales-channel-add-products-2BBIMN6N.js → sales-channel-add-products-FXWQ4LZ6.js} +18 -18
- package/dist/{sales-channel-create-OC2BB67N.js → sales-channel-create-77PRY5T6.js} +2 -2
- package/dist/{sales-channel-detail-D5R7HPC7.js → sales-channel-detail-HVPDMOUJ.js} +20 -20
- package/dist/{sales-channel-edit-V62TBRC4.js → sales-channel-edit-PBN2XYEI.js} +2 -2
- package/dist/{sales-channel-list-LVW7XE7K.js → sales-channel-list-WBG6DUZJ.js} +13 -13
- package/dist/{sales-channel-metadata-5W4OZZYI.js → sales-channel-metadata-RXT26TCT.js} +10 -10
- package/dist/{shipping-option-type-create-GHOCZT64.js → shipping-option-type-create-2EVIHSGN.js} +10 -10
- package/dist/{shipping-option-type-detail-W32EHTBS.js → shipping-option-type-detail-BKFYUX2T.js} +11 -11
- package/dist/{shipping-option-type-edit-KRIP6HTC.js → shipping-option-type-edit-LTH6PE7B.js} +10 -10
- package/dist/{shipping-option-type-list-4FML2ZX5.js → shipping-option-type-list-7F5R6ACH.js} +15 -15
- package/dist/{shipping-profile-detail-UFGQ3CCH.js → shipping-profile-detail-FOPCKNOZ.js} +1 -1
- package/dist/{shipping-profile-metadata-52ZW757T.js → shipping-profile-metadata-WRFZ55C3.js} +10 -10
- package/dist/{shipping-profiles-list-PZQVMKR4.js → shipping-profiles-list-KXXYHJIY.js} +5 -5
- package/dist/{store-address-edit-IJ2UW6WC.js → store-address-edit-M6A37RFY.js} +1 -1
- package/dist/{store-bulk-edit-OIYKZ6AZ.js → store-bulk-edit-SYHKAJ6D.js} +2 -2
- package/dist/{store-closure-edit-H3EKROXP.js → store-closure-edit-VE7D5F7I.js} +1 -1
- package/dist/{store-create-Y3BGG5P5.js → store-create-6OQW7F4U.js} +11 -11
- package/dist/{store-details-56IHJJQV.js → store-details-YV4U4GZK.js} +25 -42
- package/dist/{store-edit-HWOGEOCH.js → store-edit-33N7EQE2.js} +49 -15
- package/dist/{store-list-5DRW6QZF.js → store-list-VTV3TYJN.js} +22 -22
- package/dist/{store-member-invite-7ORIMT73.js → store-member-invite-T5GCT6HV.js} +2 -2
- package/dist/{store-payment-details-edit-ERRJDLBO.js → store-payment-details-edit-JUM745OG.js} +1 -1
- package/dist/{store-professional-details-edit-VD2J4VYV.js → store-professional-details-edit-NKBYKBCA.js} +1 -1
- package/dist/{tax-region-create-GGDCD2VU.js → tax-region-create-7FXHJKVB.js} +11 -11
- package/dist/{tax-region-detail-L7STT6C7.js → tax-region-detail-6AFMQQP7.js} +16 -16
- package/dist/{tax-region-edit-6JOV3POI.js → tax-region-edit-N64TGNAG.js} +10 -10
- package/dist/{tax-region-list-NIAT626R.js → tax-region-list-IBT5YP3U.js} +4 -4
- package/dist/{tax-region-metadata-4P667IOY.js → tax-region-metadata-MKXFQ5B7.js} +10 -10
- package/dist/{tax-region-province-detail-2GRPOSWS.js → tax-region-province-detail-CBCYMSGF.js} +15 -15
- package/dist/{tax-region-tax-override-create-R5GKEOK6.js → tax-region-tax-override-create-DFOUTYWV.js} +23 -23
- package/dist/{tax-region-tax-override-edit-MLJKNLAR.js → tax-region-tax-override-edit-PY7XG5KR.js} +23 -23
- package/dist/{user-detail-452E7GII.js → user-detail-4FDNMJ6W.js} +2 -2
- package/dist/{user-invite-FCWARLW5.js → user-invite-LSWNFFLT.js} +3 -3
- package/dist/{user-list-OU6WS25V.js → user-list-B66HEMCD.js} +5 -5
- package/dist/{user-metadata-CHHV7S3A.js → user-metadata-5UFWFXLX.js} +10 -10
- package/package.json +17 -12
- package/dist/category-organize-H4JYCHDA.js +0 -112
- package/dist/chunk-LFKTHNWI.js +0 -83
- package/dist/{chunk-7OKYEA6I.js → chunk-HC2TEEKQ.js} +3 -3
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
useCancelOrderEdit,
|
|
35
35
|
useConfirmOrderEdit
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IGTR66D2.js";
|
|
37
37
|
import {
|
|
38
38
|
getPaymentsFromOrder,
|
|
39
39
|
getReservationsLimitCount
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
import {
|
|
79
79
|
_DataTable,
|
|
80
80
|
useDataTable
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-GRFWCCUW.js";
|
|
82
82
|
import {
|
|
83
83
|
useDate
|
|
84
84
|
} from "./chunk-UZWFZMOX.js";
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
} from "./chunk-VXW3BCN2.js";
|
|
92
92
|
import {
|
|
93
93
|
useReservationItems
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-WX4ABVXL.js";
|
|
95
95
|
import {
|
|
96
96
|
useCancelOrder,
|
|
97
97
|
useCancelOrderTransfer,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
} from "./chunk-PYF5EER5.js";
|
|
107
107
|
import {
|
|
108
108
|
useCustomer
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-AFYILTAC.js";
|
|
110
110
|
import {
|
|
111
111
|
ActionMenu
|
|
112
112
|
} from "./chunk-BDGZ4EQO.js";
|
|
@@ -118,6 +118,7 @@ import {
|
|
|
118
118
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
119
119
|
import { Children } from "react";
|
|
120
120
|
import { useLoaderData, useParams as useParams2 } from "react-router-dom";
|
|
121
|
+
import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
|
|
121
122
|
|
|
122
123
|
// src/pages/orders/order-detail/components/active-order-claim-section/active-order-claim-section.tsx
|
|
123
124
|
import { ExclamationCircle } from "@medusajs/icons";
|
|
@@ -454,6 +455,7 @@ var OrderActiveEditSection = ({
|
|
|
454
455
|
|
|
455
456
|
// src/pages/orders/order-detail/components/order-activity-section/order-activity-section.tsx
|
|
456
457
|
import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
|
|
458
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
457
459
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
458
460
|
|
|
459
461
|
// src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
|
|
@@ -1379,84 +1381,39 @@ var OrderActivitySection = ({ order }) => {
|
|
|
1379
1381
|
const { t } = useTranslation8();
|
|
1380
1382
|
return /* @__PURE__ */ jsxs8(Container5, { className: "flex flex-col gap-y-8 px-6 py-4", "data-testid": "order-activity-section", children: [
|
|
1381
1383
|
/* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ jsx8("div", { className: "flex items-center justify-between", "data-testid": "order-activity-header", children: /* @__PURE__ */ jsx8(Heading5, { level: "h2", "data-testid": "order-activity-heading", children: t("orders.activity.header") }) }) }),
|
|
1382
|
-
/* @__PURE__ */ jsx8(OrderTimeline, { order })
|
|
1383
|
-
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
// src/pages/orders/order-detail/components/order-commission-section/order-commission-section.tsx
|
|
1387
|
-
import { Container as Container6, Heading as Heading6, Text as Text7 } from "@medusajs/ui";
|
|
1388
|
-
import { useMemo as useMemo3 } from "react";
|
|
1389
|
-
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
1390
|
-
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1391
|
-
var OrderCommissionSection = ({
|
|
1392
|
-
order
|
|
1393
|
-
}) => {
|
|
1394
|
-
const { t } = useTranslation9();
|
|
1395
|
-
const { commission_lines, isLoading } = useOrderCommissionLines(order.id);
|
|
1396
|
-
const itemTitleById = useMemo3(() => {
|
|
1397
|
-
const map = /* @__PURE__ */ new Map();
|
|
1398
|
-
order.items?.forEach((item) => {
|
|
1399
|
-
map.set(item.id, item.product_title ?? item.title);
|
|
1400
|
-
});
|
|
1401
|
-
return map;
|
|
1402
|
-
}, [order.items]);
|
|
1403
|
-
if (isLoading || !commission_lines.length) {
|
|
1404
|
-
return null;
|
|
1405
|
-
}
|
|
1406
|
-
const total = commission_lines.reduce(
|
|
1407
|
-
(acc, line) => acc + (line.amount ?? 0),
|
|
1408
|
-
0
|
|
1409
|
-
);
|
|
1410
|
-
return /* @__PURE__ */ jsxs9(Container6, { className: "divide-y p-0", "data-testid": "order-commission-section", children: [
|
|
1411
|
-
/* @__PURE__ */ jsx9("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx9(Heading6, { level: "h2", children: t("fields.commission") }) }),
|
|
1412
|
-
/* @__PURE__ */ jsx9("div", { className: "divide-y", children: commission_lines.map((line) => {
|
|
1413
|
-
const label = line.shipping_method_id ? t("fields.shipping") : itemTitleById.get(line.item_id ?? "") ?? line.code;
|
|
1414
|
-
return /* @__PURE__ */ jsxs9(
|
|
1415
|
-
"div",
|
|
1416
|
-
{
|
|
1417
|
-
className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-4 px-6 py-4",
|
|
1418
|
-
children: [
|
|
1419
|
-
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: label }),
|
|
1420
|
-
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "text-right", children: getLocaleAmount(line.amount, order.currency_code) })
|
|
1421
|
-
]
|
|
1422
|
-
},
|
|
1423
|
-
line.id
|
|
1424
|
-
);
|
|
1425
|
-
}) }),
|
|
1426
|
-
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
1427
|
-
/* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: t("orders.commission.total") }),
|
|
1428
|
-
/* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: getLocaleAmount(total, order.currency_code) })
|
|
1429
|
-
] })
|
|
1384
|
+
/* @__PURE__ */ jsx8(OrderTimeline, { order }),
|
|
1385
|
+
/* @__PURE__ */ jsx8(DisplayExtensionZone, { model: "order", zone: "activity", data: order })
|
|
1430
1386
|
] });
|
|
1431
1387
|
};
|
|
1432
1388
|
|
|
1433
1389
|
// src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
|
|
1434
1390
|
import { ArrowPath as ArrowPath2, CurrencyDollar, Envelope, FlyingBox } from "@medusajs/icons";
|
|
1435
|
-
import { Container as
|
|
1436
|
-
import {
|
|
1391
|
+
import { Container as Container6, Heading as Heading6 } from "@medusajs/ui";
|
|
1392
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
1393
|
+
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
1437
1394
|
|
|
1438
1395
|
// src/components/common/customer-info/customer-info.tsx
|
|
1439
|
-
import { Avatar, Copy as Copy2, Text as
|
|
1440
|
-
import { useTranslation as
|
|
1396
|
+
import { Avatar, Copy as Copy2, Text as Text7 } from "@medusajs/ui";
|
|
1397
|
+
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
1441
1398
|
import { Link } from "react-router-dom";
|
|
1442
|
-
import { jsx as
|
|
1399
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1443
1400
|
var ID = ({ data }) => {
|
|
1444
|
-
const { t } =
|
|
1401
|
+
const { t } = useTranslation9();
|
|
1445
1402
|
const id = data.customer_id;
|
|
1446
1403
|
const name = getOrderCustomer(data);
|
|
1447
1404
|
const email = data.email;
|
|
1448
1405
|
const fallback = (name || email || "").charAt(0).toUpperCase();
|
|
1449
|
-
return /* @__PURE__ */
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1406
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1407
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
|
|
1408
|
+
/* @__PURE__ */ jsx9(
|
|
1452
1409
|
Link,
|
|
1453
1410
|
{
|
|
1454
1411
|
to: `/customers/${id}`,
|
|
1455
1412
|
className: "focus:shadow-borders-focus rounded-[4px] outline-none transition-shadow",
|
|
1456
|
-
children: /* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
|
|
1413
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
|
|
1414
|
+
/* @__PURE__ */ jsx9(Avatar, { size: "2xsmall", fallback }),
|
|
1415
|
+
/* @__PURE__ */ jsx9(
|
|
1416
|
+
Text7,
|
|
1460
1417
|
{
|
|
1461
1418
|
size: "small",
|
|
1462
1419
|
leading: "compact",
|
|
@@ -1470,26 +1427,26 @@ var ID = ({ data }) => {
|
|
|
1470
1427
|
] });
|
|
1471
1428
|
};
|
|
1472
1429
|
var Company = ({ data }) => {
|
|
1473
|
-
const { t } =
|
|
1430
|
+
const { t } = useTranslation9();
|
|
1474
1431
|
const company = data.shipping_address?.company || data.billing_address?.company;
|
|
1475
1432
|
if (!company) {
|
|
1476
1433
|
return null;
|
|
1477
1434
|
}
|
|
1478
|
-
return /* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
/* @__PURE__ */
|
|
1435
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1436
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
|
|
1437
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "truncate", children: company })
|
|
1481
1438
|
] });
|
|
1482
1439
|
};
|
|
1483
1440
|
var Contact = ({ data }) => {
|
|
1484
|
-
const { t } =
|
|
1441
|
+
const { t } = useTranslation9();
|
|
1485
1442
|
const phone = data.shipping_address?.phone || data.billing_address?.phone;
|
|
1486
1443
|
const email = data.email || "";
|
|
1487
|
-
return /* @__PURE__ */
|
|
1488
|
-
/* @__PURE__ */
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
|
|
1444
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1445
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
|
|
1446
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2", children: [
|
|
1447
|
+
/* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1448
|
+
/* @__PURE__ */ jsx9(
|
|
1449
|
+
Text7,
|
|
1493
1450
|
{
|
|
1494
1451
|
size: "small",
|
|
1495
1452
|
leading: "compact",
|
|
@@ -1497,11 +1454,11 @@ var Contact = ({ data }) => {
|
|
|
1497
1454
|
children: email
|
|
1498
1455
|
}
|
|
1499
1456
|
),
|
|
1500
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: email, className: "text-ui-fg-muted" }) })
|
|
1501
1458
|
] }),
|
|
1502
|
-
phone && /* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1504
|
-
|
|
1459
|
+
phone && /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1460
|
+
/* @__PURE__ */ jsx9(
|
|
1461
|
+
Text7,
|
|
1505
1462
|
{
|
|
1506
1463
|
size: "small",
|
|
1507
1464
|
leading: "compact",
|
|
@@ -1509,7 +1466,7 @@ var Contact = ({ data }) => {
|
|
|
1509
1466
|
children: phone
|
|
1510
1467
|
}
|
|
1511
1468
|
),
|
|
1512
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
|
|
1513
1470
|
] })
|
|
1514
1471
|
] })
|
|
1515
1472
|
] });
|
|
@@ -1518,33 +1475,33 @@ var AddressPrint = ({
|
|
|
1518
1475
|
address,
|
|
1519
1476
|
type
|
|
1520
1477
|
}) => {
|
|
1521
|
-
const { t } =
|
|
1522
|
-
return /* @__PURE__ */
|
|
1523
|
-
/* @__PURE__ */
|
|
1524
|
-
address ? /* @__PURE__ */
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
return /* @__PURE__ */
|
|
1478
|
+
const { t } = useTranslation9();
|
|
1479
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1480
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
|
|
1481
|
+
address ? /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1482
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
|
|
1483
|
+
return /* @__PURE__ */ jsxs9("span", { className: "break-words", children: [
|
|
1527
1484
|
line,
|
|
1528
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ jsx9("br", {})
|
|
1529
1486
|
] }, i);
|
|
1530
1487
|
}) }),
|
|
1531
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(
|
|
1532
1489
|
Copy2,
|
|
1533
1490
|
{
|
|
1534
1491
|
content: getFormattedAddress({ address }).join("\n"),
|
|
1535
1492
|
className: "text-ui-fg-muted"
|
|
1536
1493
|
}
|
|
1537
1494
|
) })
|
|
1538
|
-
] }) : /* @__PURE__ */
|
|
1495
|
+
] }) : /* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: "-" })
|
|
1539
1496
|
] });
|
|
1540
1497
|
};
|
|
1541
1498
|
var Addresses = ({ data }) => {
|
|
1542
|
-
const { t } =
|
|
1543
|
-
return /* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
|
|
1499
|
+
const { t } = useTranslation9();
|
|
1500
|
+
return /* @__PURE__ */ jsxs9("div", { className: "divide-y", children: [
|
|
1501
|
+
/* @__PURE__ */ jsx9(AddressPrint, { address: data.shipping_address, type: "shipping" }),
|
|
1502
|
+
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx9(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1503
|
+
/* @__PURE__ */ jsx9(
|
|
1504
|
+
Text7,
|
|
1548
1505
|
{
|
|
1549
1506
|
size: "small",
|
|
1550
1507
|
leading: "compact",
|
|
@@ -1553,7 +1510,7 @@ var Addresses = ({ data }) => {
|
|
|
1553
1510
|
children: t("addresses.billingAddress.label")
|
|
1554
1511
|
}
|
|
1555
1512
|
),
|
|
1556
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
|
|
1557
1514
|
] })
|
|
1558
1515
|
] });
|
|
1559
1516
|
};
|
|
@@ -1578,40 +1535,41 @@ var getOrderCustomer = (obj) => {
|
|
|
1578
1535
|
};
|
|
1579
1536
|
|
|
1580
1537
|
// src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
|
|
1581
|
-
import { jsx as
|
|
1538
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1582
1539
|
var OrderCustomerSection = ({ order }) => {
|
|
1583
|
-
return /* @__PURE__ */
|
|
1584
|
-
|
|
1540
|
+
return /* @__PURE__ */ jsxs10(
|
|
1541
|
+
Container6,
|
|
1585
1542
|
{
|
|
1586
1543
|
className: "divide-y p-0",
|
|
1587
1544
|
"data-testid": "order-customer-section",
|
|
1588
1545
|
children: [
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1591
|
-
/* @__PURE__ */
|
|
1592
|
-
/* @__PURE__ */
|
|
1593
|
-
/* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ jsx10(Header, { order }),
|
|
1547
|
+
/* @__PURE__ */ jsx10(CustomerInfo.ID, { data: order }),
|
|
1548
|
+
/* @__PURE__ */ jsx10(CustomerInfo.Contact, { data: order }),
|
|
1549
|
+
/* @__PURE__ */ jsx10(CustomerInfo.Company, { data: order }),
|
|
1550
|
+
/* @__PURE__ */ jsx10(CustomerInfo.Addresses, { data: order }),
|
|
1551
|
+
/* @__PURE__ */ jsx10(DisplayExtensionZone2, { model: "order", zone: "customer", data: order })
|
|
1594
1552
|
]
|
|
1595
1553
|
}
|
|
1596
1554
|
);
|
|
1597
1555
|
};
|
|
1598
1556
|
var Header = ({ order }) => {
|
|
1599
|
-
const { t } =
|
|
1600
|
-
return /* @__PURE__ */
|
|
1557
|
+
const { t } = useTranslation10();
|
|
1558
|
+
return /* @__PURE__ */ jsxs10(
|
|
1601
1559
|
"div",
|
|
1602
1560
|
{
|
|
1603
1561
|
className: "flex items-center justify-between px-6 py-4",
|
|
1604
1562
|
"data-testid": "order-customer-header",
|
|
1605
1563
|
children: [
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
|
|
1564
|
+
/* @__PURE__ */ jsx10(
|
|
1565
|
+
Heading6,
|
|
1608
1566
|
{
|
|
1609
1567
|
level: "h2",
|
|
1610
1568
|
"data-testid": "order-customer-heading",
|
|
1611
1569
|
children: t("fields.customer")
|
|
1612
1570
|
}
|
|
1613
1571
|
),
|
|
1614
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ jsx10(
|
|
1615
1573
|
ActionMenu,
|
|
1616
1574
|
{
|
|
1617
1575
|
groups: [
|
|
@@ -1620,7 +1578,7 @@ var Header = ({ order }) => {
|
|
|
1620
1578
|
{
|
|
1621
1579
|
label: t("transferOwnership.label"),
|
|
1622
1580
|
to: `transfer`,
|
|
1623
|
-
icon: /* @__PURE__ */
|
|
1581
|
+
icon: /* @__PURE__ */ jsx10(ArrowPath2, {})
|
|
1624
1582
|
}
|
|
1625
1583
|
]
|
|
1626
1584
|
},
|
|
@@ -1629,12 +1587,12 @@ var Header = ({ order }) => {
|
|
|
1629
1587
|
{
|
|
1630
1588
|
label: t("addresses.shippingAddress.editLabel"),
|
|
1631
1589
|
to: "shipping-address",
|
|
1632
|
-
icon: /* @__PURE__ */
|
|
1590
|
+
icon: /* @__PURE__ */ jsx10(FlyingBox, {})
|
|
1633
1591
|
},
|
|
1634
1592
|
{
|
|
1635
1593
|
label: t("addresses.billingAddress.editLabel"),
|
|
1636
1594
|
to: "billing-address",
|
|
1637
|
-
icon: /* @__PURE__ */
|
|
1595
|
+
icon: /* @__PURE__ */ jsx10(CurrencyDollar, {})
|
|
1638
1596
|
}
|
|
1639
1597
|
]
|
|
1640
1598
|
},
|
|
@@ -1643,7 +1601,7 @@ var Header = ({ order }) => {
|
|
|
1643
1601
|
{
|
|
1644
1602
|
label: t("email.editLabel"),
|
|
1645
1603
|
to: `email`,
|
|
1646
|
-
icon: /* @__PURE__ */
|
|
1604
|
+
icon: /* @__PURE__ */ jsx10(Envelope, {}),
|
|
1647
1605
|
disabled: order.status === "canceled"
|
|
1648
1606
|
}
|
|
1649
1607
|
]
|
|
@@ -1659,40 +1617,40 @@ var Header = ({ order }) => {
|
|
|
1659
1617
|
|
|
1660
1618
|
// src/pages/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx
|
|
1661
1619
|
import {
|
|
1662
|
-
Container as
|
|
1620
|
+
Container as Container7,
|
|
1663
1621
|
Copy as Copy3,
|
|
1664
|
-
Heading as
|
|
1622
|
+
Heading as Heading7,
|
|
1665
1623
|
StatusBadge,
|
|
1666
|
-
Text as
|
|
1624
|
+
Text as Text8,
|
|
1667
1625
|
Tooltip as Tooltip2
|
|
1668
1626
|
} from "@medusajs/ui";
|
|
1669
1627
|
import { format } from "date-fns";
|
|
1670
|
-
import { useTranslation as
|
|
1628
|
+
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
1671
1629
|
import { Link as Link2 } from "react-router-dom";
|
|
1672
|
-
import { Fragment as Fragment2, jsx as
|
|
1630
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1673
1631
|
var OrderFulfillmentSection = ({
|
|
1674
1632
|
order
|
|
1675
1633
|
}) => {
|
|
1676
1634
|
const fulfillments = order.fulfillments || [];
|
|
1677
|
-
return /* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
fulfillments.map((f, index) => /* @__PURE__ */
|
|
1635
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-y-3", "data-testid": "order-fulfillment-section", children: [
|
|
1636
|
+
/* @__PURE__ */ jsx11(UnfulfilledItemBreakdown, { order }),
|
|
1637
|
+
fulfillments.map((f, index) => /* @__PURE__ */ jsx11(Fulfillment, { index, fulfillment: f, order }, f.id))
|
|
1680
1638
|
] });
|
|
1681
1639
|
};
|
|
1682
1640
|
var UnfulfilledItem = ({
|
|
1683
1641
|
item,
|
|
1684
1642
|
currencyCode
|
|
1685
1643
|
}) => {
|
|
1686
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ jsxs11(
|
|
1687
1645
|
"div",
|
|
1688
1646
|
{
|
|
1689
1647
|
className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4",
|
|
1690
1648
|
children: [
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
|
|
1649
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-x-4", children: [
|
|
1650
|
+
/* @__PURE__ */ jsx11(Thumbnail, { src: item.thumbnail }),
|
|
1651
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
1652
|
+
/* @__PURE__ */ jsx11(
|
|
1653
|
+
Text8,
|
|
1696
1654
|
{
|
|
1697
1655
|
size: "small",
|
|
1698
1656
|
leading: "compact",
|
|
@@ -1701,20 +1659,20 @@ var UnfulfilledItem = ({
|
|
|
1701
1659
|
children: item.title
|
|
1702
1660
|
}
|
|
1703
1661
|
),
|
|
1704
|
-
item.variant_sku && /* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1706
|
-
/* @__PURE__ */
|
|
1662
|
+
item.variant_sku && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-1", children: [
|
|
1663
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant_sku }),
|
|
1664
|
+
/* @__PURE__ */ jsx11(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
|
|
1707
1665
|
] }),
|
|
1708
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
|
|
1709
1667
|
] })
|
|
1710
1668
|
] }),
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ jsxs11("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
|
|
1670
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx11(Text8, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
|
|
1671
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs11(Text8, { children: [
|
|
1672
|
+
/* @__PURE__ */ jsx11("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
|
|
1715
1673
|
"x"
|
|
1716
1674
|
] }) }),
|
|
1717
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx11(Text8, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
|
|
1718
1676
|
] })
|
|
1719
1677
|
]
|
|
1720
1678
|
},
|
|
@@ -1728,8 +1686,8 @@ var UnfulfilledItemBreakdown = ({ order }) => {
|
|
|
1728
1686
|
const unfulfilledItemsWithoutShipping = order.items.filter(
|
|
1729
1687
|
(i) => !i.requires_shipping && i.detail.fulfilled_quantity < i.quantity
|
|
1730
1688
|
);
|
|
1731
|
-
return /* @__PURE__ */
|
|
1732
|
-
!!unfulfilledItemsWithShipping.length && /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1690
|
+
!!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx11(
|
|
1733
1691
|
UnfulfilledItemDisplay,
|
|
1734
1692
|
{
|
|
1735
1693
|
order,
|
|
@@ -1737,7 +1695,7 @@ var UnfulfilledItemBreakdown = ({ order }) => {
|
|
|
1737
1695
|
requiresShipping: true
|
|
1738
1696
|
}
|
|
1739
1697
|
),
|
|
1740
|
-
!!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */
|
|
1698
|
+
!!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx11(
|
|
1741
1699
|
UnfulfilledItemDisplay,
|
|
1742
1700
|
{
|
|
1743
1701
|
order,
|
|
@@ -1752,19 +1710,19 @@ var UnfulfilledItemDisplay = ({
|
|
|
1752
1710
|
unfulfilledItems,
|
|
1753
1711
|
requiresShipping = false
|
|
1754
1712
|
}) => {
|
|
1755
|
-
const { t } =
|
|
1713
|
+
const { t } = useTranslation11();
|
|
1756
1714
|
if (order.status === "canceled") {
|
|
1757
1715
|
return;
|
|
1758
1716
|
}
|
|
1759
|
-
return /* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
requiresShipping && /* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */
|
|
1717
|
+
return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": "order-fulfillment-unfulfilled", children: [
|
|
1718
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-fulfillment-unfulfilled-header", children: [
|
|
1719
|
+
/* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": "order-fulfillment-unfulfilled-heading", children: t("orders.fulfillment.unfulfilledItems") }),
|
|
1720
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-4", "data-testid": "order-fulfillment-unfulfilled-badges", children: [
|
|
1721
|
+
requiresShipping && /* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-requires-shipping-badge", children: t("orders.fulfillment.requiresShipping") }),
|
|
1722
|
+
/* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-awaiting-badge", children: t("orders.fulfillment.awaitingFulfillmentBadge") })
|
|
1765
1723
|
] })
|
|
1766
1724
|
] }),
|
|
1767
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ jsx11("div", { "data-testid": "order-fulfillment-unfulfilled-items", children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx11(
|
|
1768
1726
|
UnfulfilledItem,
|
|
1769
1727
|
{
|
|
1770
1728
|
item,
|
|
@@ -1778,7 +1736,7 @@ var Fulfillment = ({
|
|
|
1778
1736
|
fulfillment,
|
|
1779
1737
|
index
|
|
1780
1738
|
}) => {
|
|
1781
|
-
const { t } =
|
|
1739
|
+
const { t } = useTranslation11();
|
|
1782
1740
|
const showLocation = !!fulfillment.location_id;
|
|
1783
1741
|
const isPickUpFulfillment = fulfillment.shipping_option?.service_zone.fulfillment_set.type === "pickup" /* Pickup */;
|
|
1784
1742
|
const { stock_location, isError, error } = useStockLocation(
|
|
@@ -1808,77 +1766,77 @@ var Fulfillment = ({
|
|
|
1808
1766
|
throw error;
|
|
1809
1767
|
}
|
|
1810
1768
|
const isValidUrl = (url) => url && url.length > 0 && url !== "#";
|
|
1811
|
-
return /* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": `order-fulfillment-${fulfillment.id}`, children: [
|
|
1770
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-header`, children: [
|
|
1771
|
+
/* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": `order-fulfillment-${fulfillment.id}-heading`, children: t("orders.fulfillment.number", {
|
|
1814
1772
|
number: index + 1
|
|
1815
1773
|
}) }),
|
|
1816
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center gap-x-4", "data-testid": `order-fulfillment-${fulfillment.id}-status-container`, children: /* @__PURE__ */ jsx11(
|
|
1817
1775
|
Tooltip2,
|
|
1818
1776
|
{
|
|
1819
1777
|
content: format(
|
|
1820
1778
|
new Date(statusTimestamp),
|
|
1821
1779
|
"dd MMM, yyyy, HH:mm:ss"
|
|
1822
1780
|
),
|
|
1823
|
-
children: /* @__PURE__ */
|
|
1781
|
+
children: /* @__PURE__ */ jsx11(StatusBadge, { color: statusColor, className: "text-nowrap", "data-testid": `order-fulfillment-${fulfillment.id}-status-badge`, children: statusText })
|
|
1824
1782
|
}
|
|
1825
1783
|
) })
|
|
1826
1784
|
] }),
|
|
1827
|
-
/* @__PURE__ */
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1786
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
|
|
1787
|
+
/* @__PURE__ */ jsx11("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(Text8, { size: "small", leading: "compact", children: [
|
|
1830
1788
|
f_item.quantity,
|
|
1831
1789
|
"x ",
|
|
1832
1790
|
f_item.title
|
|
1833
1791
|
] }) }, f_item.line_item_id)) })
|
|
1834
1792
|
] }),
|
|
1835
|
-
showLocation && /* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
stock_location ? /* @__PURE__ */
|
|
1793
|
+
showLocation && /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1794
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
|
|
1795
|
+
stock_location ? /* @__PURE__ */ jsx11(
|
|
1838
1796
|
Link2,
|
|
1839
1797
|
{
|
|
1840
1798
|
to: `/settings/locations/${stock_location.id}`,
|
|
1841
1799
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1842
|
-
children: /* @__PURE__ */
|
|
1800
|
+
children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: stock_location.name })
|
|
1843
1801
|
}
|
|
1844
|
-
) : /* @__PURE__ */
|
|
1802
|
+
) : /* @__PURE__ */ jsx11(Skeleton, { className: "w-16" })
|
|
1845
1803
|
] }),
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */
|
|
1848
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1805
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
|
|
1806
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
|
|
1849
1807
|
] }),
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1809
|
+
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
|
|
1810
|
+
/* @__PURE__ */ jsx11("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx11("ul", { children: fulfillment.labels.map((tlink) => {
|
|
1853
1811
|
const hasTrackingUrl = isValidUrl(tlink.tracking_url);
|
|
1854
1812
|
const hasLabelUrl = isValidUrl(tlink.label_url);
|
|
1855
1813
|
if (hasTrackingUrl || hasLabelUrl) {
|
|
1856
|
-
return /* @__PURE__ */
|
|
1857
|
-
hasTrackingUrl && /* @__PURE__ */
|
|
1814
|
+
return /* @__PURE__ */ jsxs11("li", { children: [
|
|
1815
|
+
hasTrackingUrl && /* @__PURE__ */ jsx11(
|
|
1858
1816
|
"a",
|
|
1859
1817
|
{
|
|
1860
1818
|
href: tlink.tracking_url,
|
|
1861
1819
|
target: "_blank",
|
|
1862
1820
|
rel: "noopener noreferrer",
|
|
1863
1821
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1864
|
-
children: /* @__PURE__ */
|
|
1822
|
+
children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: tlink.tracking_number })
|
|
1865
1823
|
}
|
|
1866
1824
|
),
|
|
1867
1825
|
hasTrackingUrl && hasLabelUrl && " - ",
|
|
1868
|
-
hasLabelUrl && /* @__PURE__ */
|
|
1826
|
+
hasLabelUrl && /* @__PURE__ */ jsx11(
|
|
1869
1827
|
"a",
|
|
1870
1828
|
{
|
|
1871
1829
|
href: tlink.label_url,
|
|
1872
1830
|
target: "_blank",
|
|
1873
1831
|
rel: "noopener noreferrer",
|
|
1874
1832
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1875
|
-
children: /* @__PURE__ */
|
|
1833
|
+
children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", as: "span", children: t("orders.fulfillment.labelLink") })
|
|
1876
1834
|
}
|
|
1877
1835
|
)
|
|
1878
1836
|
] }, tlink.tracking_number);
|
|
1879
1837
|
}
|
|
1880
|
-
return /* @__PURE__ */
|
|
1881
|
-
}) }) : /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
|
|
1839
|
+
}) }) : /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: "-" }) })
|
|
1882
1840
|
] })
|
|
1883
1841
|
] });
|
|
1884
1842
|
};
|
|
@@ -1886,18 +1844,26 @@ var Fulfillment = ({
|
|
|
1886
1844
|
// src/pages/orders/order-detail/components/order-general-section/order-general-section.tsx
|
|
1887
1845
|
import { XCircle } from "@medusajs/icons";
|
|
1888
1846
|
import {
|
|
1889
|
-
Container as
|
|
1847
|
+
Container as Container8,
|
|
1890
1848
|
Copy as Copy4,
|
|
1891
|
-
Heading as
|
|
1849
|
+
Heading as Heading8,
|
|
1892
1850
|
StatusBadge as StatusBadge2,
|
|
1893
|
-
Text as
|
|
1851
|
+
Text as Text9,
|
|
1894
1852
|
toast as toast6,
|
|
1895
1853
|
usePrompt as usePrompt2
|
|
1896
1854
|
} from "@medusajs/ui";
|
|
1897
|
-
import { useTranslation as
|
|
1898
|
-
import {
|
|
1855
|
+
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
1856
|
+
import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
|
|
1857
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1858
|
+
var GENERAL_FIELD_IDS = [
|
|
1859
|
+
"display_id",
|
|
1860
|
+
"created_at",
|
|
1861
|
+
"status",
|
|
1862
|
+
"payment_status",
|
|
1863
|
+
"fulfillment_status"
|
|
1864
|
+
];
|
|
1899
1865
|
var OrderGeneralSection = ({ order }) => {
|
|
1900
|
-
const { t } =
|
|
1866
|
+
const { t } = useTranslation12();
|
|
1901
1867
|
const prompt = usePrompt2();
|
|
1902
1868
|
const { getFullDate } = useDate();
|
|
1903
1869
|
const { mutateAsync: cancelOrder } = useCancelOrder(order.id);
|
|
@@ -1928,27 +1894,27 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1928
1894
|
}
|
|
1929
1895
|
});
|
|
1930
1896
|
};
|
|
1931
|
-
return /* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
/* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ jsxs12(Container8, { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-general-section", children: [
|
|
1898
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
1899
|
+
/* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "display_id", data: order, children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1", "data-testid": "order-general-section-id-container", children: [
|
|
1900
|
+
/* @__PURE__ */ jsxs12(Heading8, { "data-testid": "order-general-section-id-heading", children: [
|
|
1935
1901
|
"#",
|
|
1936
1902
|
order.display_id
|
|
1937
1903
|
] }),
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
] }),
|
|
1940
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ jsx12(Copy4, { content: `#${order.display_id}`, className: "text-ui-fg-muted", "data-testid": "order-general-section-id-copy" })
|
|
1905
|
+
] }) }),
|
|
1906
|
+
/* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "created_at", data: order, children: /* @__PURE__ */ jsx12(Text9, { size: "small", className: "text-ui-fg-subtle", "data-testid": "order-general-section-date", children: t("orders.onDateFromSalesChannel", {
|
|
1941
1907
|
date: getFullDate({ date: order.created_at, includeTime: true }),
|
|
1942
1908
|
salesChannel: order.sales_channel?.name
|
|
1943
|
-
}) })
|
|
1909
|
+
}) }) })
|
|
1944
1910
|
] }),
|
|
1945
|
-
/* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
/* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-4", "data-testid": "order-general-section-badges-container", children: [
|
|
1912
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1.5", "data-testid": "order-general-section-badges", children: [
|
|
1913
|
+
/* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "status", data: order, children: /* @__PURE__ */ jsx12(OrderBadge, { order }) }),
|
|
1914
|
+
/* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "payment_status", data: order, children: /* @__PURE__ */ jsx12(PaymentBadge, { order }) }),
|
|
1915
|
+
/* @__PURE__ */ jsx12(DisplayField, { model: "order", zone: "general", id: "fulfillment_status", data: order, children: /* @__PURE__ */ jsx12(FulfillmentBadge, { order }) })
|
|
1950
1916
|
] }),
|
|
1951
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ jsx12(
|
|
1952
1918
|
ActionMenu,
|
|
1953
1919
|
{
|
|
1954
1920
|
groups: [
|
|
@@ -1959,7 +1925,7 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1959
1925
|
onClick: handleCancel,
|
|
1960
1926
|
disabled: cancelDisabled,
|
|
1961
1927
|
disabledTooltip: cancelDisabledTooltip,
|
|
1962
|
-
icon: /* @__PURE__ */
|
|
1928
|
+
icon: /* @__PURE__ */ jsx12(XCircle, {})
|
|
1963
1929
|
}
|
|
1964
1930
|
]
|
|
1965
1931
|
}
|
|
@@ -1967,45 +1933,54 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1967
1933
|
"data-testid": "order-general-section-action-menu"
|
|
1968
1934
|
}
|
|
1969
1935
|
)
|
|
1970
|
-
] })
|
|
1936
|
+
] }),
|
|
1937
|
+
/* @__PURE__ */ jsx12(
|
|
1938
|
+
DisplayExtensionZone3,
|
|
1939
|
+
{
|
|
1940
|
+
model: "order",
|
|
1941
|
+
zone: "general",
|
|
1942
|
+
data: order,
|
|
1943
|
+
builtInFieldIds: GENERAL_FIELD_IDS
|
|
1944
|
+
}
|
|
1945
|
+
)
|
|
1971
1946
|
] });
|
|
1972
1947
|
};
|
|
1973
1948
|
var FulfillmentBadge = ({ order }) => {
|
|
1974
|
-
const { t } =
|
|
1949
|
+
const { t } = useTranslation12();
|
|
1975
1950
|
const { label, color } = getOrderFulfillmentStatus(
|
|
1976
1951
|
t,
|
|
1977
1952
|
order.fulfillment_status
|
|
1978
1953
|
);
|
|
1979
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsx12(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-fulfillment-badge", children: label });
|
|
1980
1955
|
};
|
|
1981
1956
|
var PaymentBadge = ({ order }) => {
|
|
1982
|
-
const { t } =
|
|
1957
|
+
const { t } = useTranslation12();
|
|
1983
1958
|
const { label, color } = getOrderPaymentStatus(t, order.payment_status);
|
|
1984
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ jsx12(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-payment-badge", children: label });
|
|
1985
1960
|
};
|
|
1986
1961
|
var OrderBadge = ({ order }) => {
|
|
1987
|
-
const { t } =
|
|
1962
|
+
const { t } = useTranslation12();
|
|
1988
1963
|
const orderStatus = getCanceledOrderStatus(t, order.status);
|
|
1989
1964
|
if (!orderStatus) {
|
|
1990
1965
|
return null;
|
|
1991
1966
|
}
|
|
1992
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ jsx12(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", "data-testid": "order-general-section-order-badge", children: orderStatus.label });
|
|
1993
1968
|
};
|
|
1994
1969
|
|
|
1995
1970
|
// src/components/common/display-id/display-id.tsx
|
|
1996
|
-
import { useTranslation as
|
|
1971
|
+
import { useTranslation as useTranslation13 } from "react-i18next";
|
|
1997
1972
|
import { useState as useState4 } from "react";
|
|
1998
1973
|
import copy from "copy-to-clipboard";
|
|
1999
1974
|
import { clx as clx2, toast as toast7, Tooltip as Tooltip3 } from "@medusajs/ui";
|
|
2000
|
-
import { jsx as
|
|
1975
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2001
1976
|
function DisplayId({ id, className }) {
|
|
2002
|
-
const { t } =
|
|
1977
|
+
const { t } = useTranslation13();
|
|
2003
1978
|
const [open, setOpen] = useState4(false);
|
|
2004
1979
|
const onClick = () => {
|
|
2005
1980
|
copy(id);
|
|
2006
1981
|
toast7.success(t("actions.idCopiedToClipboard"));
|
|
2007
1982
|
};
|
|
2008
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs13("span", { onClick, className: clx2("cursor-pointer", className), children: [
|
|
2009
1984
|
"#",
|
|
2010
1985
|
id.slice(-7)
|
|
2011
1986
|
] }) });
|
|
@@ -2027,28 +2002,29 @@ import { ArrowDownRightMini, DocumentText, XCircle as XCircle2 } from "@medusajs
|
|
|
2027
2002
|
import {
|
|
2028
2003
|
Badge,
|
|
2029
2004
|
Button as Button6,
|
|
2030
|
-
Container as
|
|
2031
|
-
Heading as
|
|
2005
|
+
Container as Container9,
|
|
2006
|
+
Heading as Heading9,
|
|
2032
2007
|
StatusBadge as StatusBadge3,
|
|
2033
|
-
Text as
|
|
2008
|
+
Text as Text10,
|
|
2034
2009
|
toast as toast8,
|
|
2035
2010
|
Tooltip as Tooltip4,
|
|
2036
2011
|
usePrompt as usePrompt3
|
|
2037
2012
|
} from "@medusajs/ui";
|
|
2013
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
2038
2014
|
import { format as format2 } from "date-fns";
|
|
2039
|
-
import { Trans, useTranslation as
|
|
2040
|
-
import { jsx as
|
|
2015
|
+
import { Trans, useTranslation as useTranslation14 } from "react-i18next";
|
|
2016
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2041
2017
|
var OrderPaymentSection = ({ order }) => {
|
|
2042
2018
|
const payments = getPaymentsFromOrder(order);
|
|
2043
2019
|
const refunds = payments.map((payment) => payment?.refunds).flat(1).filter(Boolean);
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
|
|
2020
|
+
return /* @__PURE__ */ jsxs14(
|
|
2021
|
+
Container9,
|
|
2046
2022
|
{
|
|
2047
2023
|
className: "divide-y p-0",
|
|
2048
2024
|
"data-testid": "order-payment-section",
|
|
2049
2025
|
children: [
|
|
2050
|
-
/* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsx14(Header2, { order }),
|
|
2027
|
+
/* @__PURE__ */ jsx14(
|
|
2052
2028
|
PaymentBreakdown,
|
|
2053
2029
|
{
|
|
2054
2030
|
order,
|
|
@@ -2057,22 +2033,23 @@ var OrderPaymentSection = ({ order }) => {
|
|
|
2057
2033
|
currencyCode: order.currency_code
|
|
2058
2034
|
}
|
|
2059
2035
|
),
|
|
2060
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ jsx14(Total, { order }),
|
|
2037
|
+
/* @__PURE__ */ jsx14(DisplayExtensionZone4, { model: "order", zone: "payment", data: order })
|
|
2061
2038
|
]
|
|
2062
2039
|
}
|
|
2063
2040
|
);
|
|
2064
2041
|
};
|
|
2065
2042
|
var Header2 = ({ order }) => {
|
|
2066
|
-
const { t } =
|
|
2043
|
+
const { t } = useTranslation14();
|
|
2067
2044
|
const { label, color } = getOrderPaymentStatus(t, order.payment_status);
|
|
2068
|
-
return /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ jsxs14(
|
|
2069
2046
|
"div",
|
|
2070
2047
|
{
|
|
2071
2048
|
className: "flex items-center justify-between px-6 py-4",
|
|
2072
2049
|
"data-testid": "order-payment-header",
|
|
2073
2050
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ jsx14(Heading9, { level: "h2", "data-testid": "order-payment-heading", children: t("orders.payment.title") }),
|
|
2052
|
+
/* @__PURE__ */ jsx14(
|
|
2076
2053
|
StatusBadge3,
|
|
2077
2054
|
{
|
|
2078
2055
|
color,
|
|
@@ -2089,8 +2066,8 @@ var Refund = ({
|
|
|
2089
2066
|
refund,
|
|
2090
2067
|
currencyCode
|
|
2091
2068
|
}) => {
|
|
2092
|
-
const { t } =
|
|
2093
|
-
const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */
|
|
2069
|
+
const { t } = useTranslation14();
|
|
2070
|
+
const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */ jsx14(
|
|
2094
2071
|
Badge,
|
|
2095
2072
|
{
|
|
2096
2073
|
size: "2xsmall",
|
|
@@ -2100,27 +2077,27 @@ var Refund = ({
|
|
|
2100
2077
|
children: refund.refund_reason.label
|
|
2101
2078
|
}
|
|
2102
2079
|
);
|
|
2103
|
-
const RefundNoteIndicator = refund.note && /* @__PURE__ */
|
|
2104
|
-
return /* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
/* @__PURE__ */
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2080
|
+
const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx14(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx14(DocumentText, { className: "ml-1 inline text-ui-tag-neutral-icon" }) });
|
|
2081
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-x-4 bg-ui-bg-subtle px-6 py-4 text-ui-fg-subtle sm:items-center", children: [
|
|
2082
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-1 flex-col gap-3 sm:flex-row sm:items-center", children: [
|
|
2083
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 flex-row items-center gap-x-3", children: [
|
|
2084
|
+
/* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
|
|
2085
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
2086
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
|
|
2087
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
|
|
2111
2088
|
] })
|
|
2112
2089
|
] }),
|
|
2113
|
-
/* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */
|
|
2090
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-3", children: [
|
|
2091
|
+
/* @__PURE__ */ jsx14("div", { className: "shrink-0", children: RefundNoteIndicator }),
|
|
2115
2092
|
RefundReasonBadge
|
|
2116
2093
|
] })
|
|
2117
2094
|
] }),
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 items-center justify-end gap-4", children: [
|
|
2096
|
+
/* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", children: [
|
|
2120
2097
|
"- ",
|
|
2121
2098
|
getLocaleAmount(refund.amount, currencyCode)
|
|
2122
2099
|
] }),
|
|
2123
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ jsx14("div", { className: "h-7 w-5" })
|
|
2124
2101
|
] })
|
|
2125
2102
|
] });
|
|
2126
2103
|
};
|
|
@@ -2130,7 +2107,7 @@ var Payment = ({
|
|
|
2130
2107
|
refunds,
|
|
2131
2108
|
currencyCode
|
|
2132
2109
|
}) => {
|
|
2133
|
-
const { t } =
|
|
2110
|
+
const { t } = useTranslation14();
|
|
2134
2111
|
const prompt = usePrompt3();
|
|
2135
2112
|
const { mutateAsync } = useCapturePayment(order.id, payment.id);
|
|
2136
2113
|
const handleCapture = async () => {
|
|
@@ -2174,32 +2151,32 @@ var Payment = ({
|
|
|
2174
2151
|
const [status, color] = getPaymentStatusAttributes(payment);
|
|
2175
2152
|
const showCapture = payment.captured_at === null && payment.canceled_at === null;
|
|
2176
2153
|
const totalRefunded = payment.refunds?.reduce((acc, next) => next.amount + acc, 0) ?? 0;
|
|
2177
|
-
return /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ jsxs14(
|
|
2178
2155
|
"div",
|
|
2179
2156
|
{
|
|
2180
2157
|
className: "divide-y",
|
|
2181
2158
|
"data-testid": `order-payment-${payment.id}`,
|
|
2182
2159
|
children: [
|
|
2183
|
-
/* @__PURE__ */
|
|
2160
|
+
/* @__PURE__ */ jsxs14(
|
|
2184
2161
|
"div",
|
|
2185
2162
|
{
|
|
2186
2163
|
className: "grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_1fr_20px]",
|
|
2187
2164
|
"data-testid": `order-payment-${payment.id}-row`,
|
|
2188
2165
|
children: [
|
|
2189
|
-
/* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
|
|
2166
|
+
/* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2167
|
+
/* @__PURE__ */ jsx14(
|
|
2168
|
+
Text10,
|
|
2192
2169
|
{
|
|
2193
2170
|
size: "small",
|
|
2194
2171
|
leading: "compact",
|
|
2195
2172
|
weight: "plus",
|
|
2196
2173
|
className: "truncate",
|
|
2197
2174
|
"data-testid": `order-payment-${payment.id}-id`,
|
|
2198
|
-
children: /* @__PURE__ */
|
|
2175
|
+
children: /* @__PURE__ */ jsx14(display_id_default, { id: payment.id })
|
|
2199
2176
|
}
|
|
2200
2177
|
),
|
|
2201
|
-
/* @__PURE__ */
|
|
2202
|
-
|
|
2178
|
+
/* @__PURE__ */ jsx14(
|
|
2179
|
+
Text10,
|
|
2203
2180
|
{
|
|
2204
2181
|
size: "small",
|
|
2205
2182
|
leading: "compact",
|
|
@@ -2208,8 +2185,8 @@ var Payment = ({
|
|
|
2208
2185
|
}
|
|
2209
2186
|
)
|
|
2210
2187
|
] }),
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
-
|
|
2188
|
+
/* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx14(
|
|
2189
|
+
Text10,
|
|
2213
2190
|
{
|
|
2214
2191
|
size: "small",
|
|
2215
2192
|
leading: "compact",
|
|
@@ -2218,7 +2195,7 @@ var Payment = ({
|
|
|
2218
2195
|
children: payment.provider_id
|
|
2219
2196
|
}
|
|
2220
2197
|
) }),
|
|
2221
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(
|
|
2222
2199
|
StatusBadge3,
|
|
2223
2200
|
{
|
|
2224
2201
|
color,
|
|
@@ -2227,8 +2204,8 @@ var Payment = ({
|
|
|
2227
2204
|
children: status
|
|
2228
2205
|
}
|
|
2229
2206
|
) }),
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
|
|
2207
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(
|
|
2208
|
+
Text10,
|
|
2232
2209
|
{
|
|
2233
2210
|
size: "small",
|
|
2234
2211
|
leading: "compact",
|
|
@@ -2236,7 +2213,7 @@ var Payment = ({
|
|
|
2236
2213
|
children: getLocaleAmount(payment.amount, payment.currency_code)
|
|
2237
2214
|
}
|
|
2238
2215
|
) }),
|
|
2239
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ jsx14(
|
|
2240
2217
|
ActionMenu,
|
|
2241
2218
|
{
|
|
2242
2219
|
groups: [
|
|
@@ -2244,7 +2221,7 @@ var Payment = ({
|
|
|
2244
2221
|
actions: [
|
|
2245
2222
|
{
|
|
2246
2223
|
label: t("orders.payment.createRefund"),
|
|
2247
|
-
icon: /* @__PURE__ */
|
|
2224
|
+
icon: /* @__PURE__ */ jsx14(XCircle2, {}),
|
|
2248
2225
|
to: `/orders/${order.id}/refund?paymentId=${payment.id}`,
|
|
2249
2226
|
disabled: !payment.captured_at || !!payment.canceled_at || totalRefunded >= payment.amount
|
|
2250
2227
|
}
|
|
@@ -2257,23 +2234,23 @@ var Payment = ({
|
|
|
2257
2234
|
]
|
|
2258
2235
|
}
|
|
2259
2236
|
),
|
|
2260
|
-
showCapture && /* @__PURE__ */
|
|
2237
|
+
showCapture && /* @__PURE__ */ jsxs14(
|
|
2261
2238
|
"div",
|
|
2262
2239
|
{
|
|
2263
2240
|
className: "flex items-center justify-between bg-ui-bg-subtle px-6 py-4",
|
|
2264
2241
|
"data-testid": `order-payment-${payment.id}-capture-section`,
|
|
2265
2242
|
children: [
|
|
2266
|
-
/* @__PURE__ */
|
|
2267
|
-
/* @__PURE__ */
|
|
2268
|
-
/* @__PURE__ */
|
|
2243
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-2", children: [
|
|
2244
|
+
/* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "shrink-0 text-ui-fg-muted" }),
|
|
2245
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx14(
|
|
2269
2246
|
Trans,
|
|
2270
2247
|
{
|
|
2271
2248
|
i18nKey: "orders.payment.isReadyToBeCaptured",
|
|
2272
|
-
components: [/* @__PURE__ */
|
|
2249
|
+
components: [/* @__PURE__ */ jsx14(display_id_default, { id: payment.id }, payment.id)]
|
|
2273
2250
|
}
|
|
2274
2251
|
) })
|
|
2275
2252
|
] }),
|
|
2276
|
-
/* @__PURE__ */
|
|
2253
|
+
/* @__PURE__ */ jsxs14(
|
|
2277
2254
|
Button6,
|
|
2278
2255
|
{
|
|
2279
2256
|
className: "shrink-0",
|
|
@@ -2282,15 +2259,15 @@ var Payment = ({
|
|
|
2282
2259
|
onClick: handleCapture,
|
|
2283
2260
|
"data-testid": `order-payment-${payment.id}-capture-button`,
|
|
2284
2261
|
children: [
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
2262
|
+
/* @__PURE__ */ jsx14("span", { className: "hidden sm:block", children: t("orders.payment.capture") }),
|
|
2263
|
+
/* @__PURE__ */ jsx14("span", { className: "sm:hidden", children: t("orders.payment.capture_short") })
|
|
2287
2264
|
]
|
|
2288
2265
|
}
|
|
2289
2266
|
)
|
|
2290
2267
|
]
|
|
2291
2268
|
}
|
|
2292
2269
|
),
|
|
2293
|
-
refunds.map((refund) => /* @__PURE__ */
|
|
2270
|
+
refunds.map((refund) => /* @__PURE__ */ jsx14(Refund, { refund, currencyCode }, refund.id))
|
|
2294
2271
|
]
|
|
2295
2272
|
}
|
|
2296
2273
|
);
|
|
@@ -2303,31 +2280,31 @@ var CreditLine = ({
|
|
|
2303
2280
|
return null;
|
|
2304
2281
|
}
|
|
2305
2282
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
2306
|
-
const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */
|
|
2307
|
-
return /* @__PURE__ */
|
|
2308
|
-
/* @__PURE__ */
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
|
|
2283
|
+
const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.reference_id }) : null;
|
|
2284
|
+
return /* @__PURE__ */ jsx14("div", { className: "divide-y", children: /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-[1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_20px]", children: [
|
|
2285
|
+
/* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2286
|
+
/* @__PURE__ */ jsx14(
|
|
2287
|
+
Text10,
|
|
2311
2288
|
{
|
|
2312
2289
|
size: "small",
|
|
2313
2290
|
leading: "compact",
|
|
2314
2291
|
weight: "plus",
|
|
2315
2292
|
className: "truncate",
|
|
2316
|
-
children: /* @__PURE__ */
|
|
2293
|
+
children: /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.id })
|
|
2317
2294
|
}
|
|
2318
2295
|
),
|
|
2319
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: creditLine.created_at ? format2(
|
|
2320
2297
|
new Date(creditLine.created_at),
|
|
2321
2298
|
"dd MMM, yyyy, HH:mm:ss"
|
|
2322
2299
|
) : "-" })
|
|
2323
2300
|
] }),
|
|
2324
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", className: "capitalize", children: [
|
|
2325
2302
|
prettyReference,
|
|
2326
2303
|
" (",
|
|
2327
2304
|
prettyReferenceId,
|
|
2328
2305
|
")"
|
|
2329
2306
|
] }) }),
|
|
2330
|
-
/* @__PURE__ */
|
|
2307
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: getLocaleAmount(creditLine.amount, currencyCode) }) })
|
|
2331
2308
|
] }) });
|
|
2332
2309
|
};
|
|
2333
2310
|
var PaymentBreakdown = ({
|
|
@@ -2350,7 +2327,7 @@ var PaymentBreakdown = ({
|
|
|
2350
2327
|
}
|
|
2351
2328
|
return { event: entry, type };
|
|
2352
2329
|
});
|
|
2353
|
-
return /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ jsx14(
|
|
2354
2331
|
"div",
|
|
2355
2332
|
{
|
|
2356
2333
|
className: "flex flex-col divide-y",
|
|
@@ -2358,7 +2335,7 @@ var PaymentBreakdown = ({
|
|
|
2358
2335
|
children: entries.map(({ type, event }) => {
|
|
2359
2336
|
switch (type) {
|
|
2360
2337
|
case "payment":
|
|
2361
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ jsx14(
|
|
2362
2339
|
Payment,
|
|
2363
2340
|
{
|
|
2364
2341
|
order,
|
|
@@ -2371,7 +2348,7 @@ var PaymentBreakdown = ({
|
|
|
2371
2348
|
event.id
|
|
2372
2349
|
);
|
|
2373
2350
|
case "refund":
|
|
2374
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx14(
|
|
2375
2352
|
Refund,
|
|
2376
2353
|
{
|
|
2377
2354
|
refund: event,
|
|
@@ -2380,7 +2357,7 @@ var PaymentBreakdown = ({
|
|
|
2380
2357
|
event.id
|
|
2381
2358
|
);
|
|
2382
2359
|
case "credit_line_refund":
|
|
2383
|
-
return /* @__PURE__ */
|
|
2360
|
+
return /* @__PURE__ */ jsx14(
|
|
2384
2361
|
CreditLine,
|
|
2385
2362
|
{
|
|
2386
2363
|
creditLine: event,
|
|
@@ -2394,36 +2371,36 @@ var PaymentBreakdown = ({
|
|
|
2394
2371
|
);
|
|
2395
2372
|
};
|
|
2396
2373
|
var Total = ({ order }) => {
|
|
2397
|
-
const { t } =
|
|
2374
|
+
const { t } = useTranslation14();
|
|
2398
2375
|
const totalPending = getTotalPending(order.payment_collections);
|
|
2399
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsxs14(
|
|
2400
2377
|
"div",
|
|
2401
2378
|
{
|
|
2402
2379
|
className: "flex flex-col gap-y-4 px-6 py-4",
|
|
2403
2380
|
"data-testid": "order-payment-total",
|
|
2404
2381
|
children: [
|
|
2405
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ jsxs14(
|
|
2406
2383
|
"div",
|
|
2407
2384
|
{
|
|
2408
2385
|
className: "flex items-center justify-between",
|
|
2409
2386
|
"data-testid": "order-payment-total-paid",
|
|
2410
2387
|
children: [
|
|
2411
|
-
/* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
|
|
2389
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(
|
|
2413
2390
|
getTotalCaptured(order.payment_collections),
|
|
2414
2391
|
order.currency_code
|
|
2415
2392
|
) })
|
|
2416
2393
|
]
|
|
2417
2394
|
}
|
|
2418
2395
|
),
|
|
2419
|
-
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */
|
|
2396
|
+
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs14(
|
|
2420
2397
|
"div",
|
|
2421
2398
|
{
|
|
2422
2399
|
className: "flex items-center justify-between",
|
|
2423
2400
|
"data-testid": "order-payment-total-pending",
|
|
2424
2401
|
children: [
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
|
|
2403
|
+
/* @__PURE__ */ jsx14(Text10, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
|
|
2427
2404
|
]
|
|
2428
2405
|
}
|
|
2429
2406
|
)
|
|
@@ -2433,8 +2410,8 @@ var Total = ({ order }) => {
|
|
|
2433
2410
|
};
|
|
2434
2411
|
|
|
2435
2412
|
// src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
|
|
2436
|
-
import { useMemo as
|
|
2437
|
-
import { useTranslation as
|
|
2413
|
+
import { useMemo as useMemo3, useState as useState6 } from "react";
|
|
2414
|
+
import { useTranslation as useTranslation17 } from "react-i18next";
|
|
2438
2415
|
import { Link as Link3 } from "react-router-dom";
|
|
2439
2416
|
import {
|
|
2440
2417
|
ArrowDownRightMini as ArrowDownRightMini2,
|
|
@@ -2449,15 +2426,16 @@ import {
|
|
|
2449
2426
|
Badge as Badge4,
|
|
2450
2427
|
Button as Button7,
|
|
2451
2428
|
clx as clx3,
|
|
2452
|
-
Container as
|
|
2429
|
+
Container as Container10,
|
|
2453
2430
|
Copy as Copy5,
|
|
2454
|
-
Heading as
|
|
2431
|
+
Heading as Heading10,
|
|
2455
2432
|
StatusBadge as StatusBadge4,
|
|
2456
|
-
Text as
|
|
2433
|
+
Text as Text12,
|
|
2457
2434
|
toast as toast9,
|
|
2458
2435
|
Tooltip as Tooltip6,
|
|
2459
2436
|
usePrompt as usePrompt4
|
|
2460
2437
|
} from "@medusajs/ui";
|
|
2438
|
+
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
2461
2439
|
import { format as format3 } from "date-fns";
|
|
2462
2440
|
|
|
2463
2441
|
// src/lib/credit-line.ts
|
|
@@ -2468,12 +2446,12 @@ var getTotalCreditLines = (creditLines) => creditLines.reduce((acc, creditLine)
|
|
|
2468
2446
|
|
|
2469
2447
|
// src/pages/orders/order-detail/components/order-summary-section/return-info-popover.tsx
|
|
2470
2448
|
import { InformationCircleSolid } from "@medusajs/icons";
|
|
2471
|
-
import { Badge as Badge2, Popover as Popover3, Text as
|
|
2449
|
+
import { Badge as Badge2, Popover as Popover3, Text as Text11 } from "@medusajs/ui";
|
|
2472
2450
|
import { useState as useState5 } from "react";
|
|
2473
|
-
import { useTranslation as
|
|
2474
|
-
import { jsx as
|
|
2451
|
+
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
2452
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2475
2453
|
function ReturnInfoPopover({ orderReturn }) {
|
|
2476
|
-
const { t } =
|
|
2454
|
+
const { t } = useTranslation15();
|
|
2477
2455
|
const [open, setOpen] = useState5(false);
|
|
2478
2456
|
const { getFullDate } = useDate();
|
|
2479
2457
|
const handleMouseEnter = () => {
|
|
@@ -2495,36 +2473,36 @@ function ReturnInfoPopover({ orderReturn }) {
|
|
|
2495
2473
|
if (typeof orderReturn !== "object") {
|
|
2496
2474
|
return;
|
|
2497
2475
|
}
|
|
2498
|
-
return /* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsxs15(Popover3, { open, children: [
|
|
2477
|
+
/* @__PURE__ */ jsx15(
|
|
2500
2478
|
Popover3.Trigger,
|
|
2501
2479
|
{
|
|
2502
2480
|
onMouseEnter: handleMouseEnter,
|
|
2503
2481
|
onMouseLeave: handleMouseLeave,
|
|
2504
2482
|
autoFocus: false,
|
|
2505
2483
|
className: "align-sub focus-visible:outline-none",
|
|
2506
|
-
children: /* @__PURE__ */
|
|
2484
|
+
children: /* @__PURE__ */ jsx15(InformationCircleSolid, {})
|
|
2507
2485
|
}
|
|
2508
2486
|
),
|
|
2509
|
-
/* @__PURE__ */
|
|
2487
|
+
/* @__PURE__ */ jsx15(
|
|
2510
2488
|
Popover3.Content,
|
|
2511
2489
|
{
|
|
2512
2490
|
align: "center",
|
|
2513
2491
|
side: "top",
|
|
2514
2492
|
className: "bg-ui-bg-component p-2 focus-visible:outline-none",
|
|
2515
|
-
children: /* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2493
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "", children: [
|
|
2494
|
+
/* @__PURE__ */ jsxs15(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
|
|
2517
2495
|
returnType,
|
|
2518
2496
|
": #",
|
|
2519
2497
|
returnTypeId.slice(-7)
|
|
2520
2498
|
] }),
|
|
2521
|
-
/* @__PURE__ */
|
|
2522
|
-
/* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
|
|
2500
|
+
/* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
|
|
2523
2501
|
" \xB7 ",
|
|
2524
2502
|
getFullDate({ date: orderReturn.requested_at, includeTime: true })
|
|
2525
2503
|
] }),
|
|
2526
|
-
/* @__PURE__ */
|
|
2527
|
-
/* @__PURE__ */
|
|
2504
|
+
/* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
|
|
2505
|
+
/* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
|
|
2528
2506
|
" \xB7 ",
|
|
2529
2507
|
orderReturn.received_at ? getFullDate({
|
|
2530
2508
|
date: orderReturn.received_at,
|
|
@@ -2541,10 +2519,10 @@ var return_info_popover_default = ReturnInfoPopover;
|
|
|
2541
2519
|
// src/pages/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx
|
|
2542
2520
|
import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
|
|
2543
2521
|
import { Badge as Badge3, Tooltip as Tooltip5 } from "@medusajs/ui";
|
|
2544
|
-
import { useTranslation as
|
|
2545
|
-
import { jsx as
|
|
2522
|
+
import { useTranslation as useTranslation16 } from "react-i18next";
|
|
2523
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2546
2524
|
function ShippingInfoPopover({ shippingMethod }) {
|
|
2547
|
-
const { t } =
|
|
2525
|
+
const { t } = useTranslation16();
|
|
2548
2526
|
const shippingDetail = shippingMethod?.detail;
|
|
2549
2527
|
if (!shippingDetail) {
|
|
2550
2528
|
return;
|
|
@@ -2562,24 +2540,24 @@ function ShippingInfoPopover({ shippingMethod }) {
|
|
|
2562
2540
|
if (!rmaId) {
|
|
2563
2541
|
return;
|
|
2564
2542
|
}
|
|
2565
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ jsx16(
|
|
2566
2544
|
Tooltip5,
|
|
2567
2545
|
{
|
|
2568
|
-
content: /* @__PURE__ */
|
|
2546
|
+
content: /* @__PURE__ */ jsxs16(Badge3, { size: "2xsmall", rounded: "full", children: [
|
|
2569
2547
|
rmaType,
|
|
2570
2548
|
": #",
|
|
2571
2549
|
rmaId.slice(-7)
|
|
2572
2550
|
] }),
|
|
2573
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ jsx16(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
|
|
2574
2552
|
}
|
|
2575
2553
|
);
|
|
2576
2554
|
}
|
|
2577
2555
|
var shipping_info_popover_default = ShippingInfoPopover;
|
|
2578
2556
|
|
|
2579
2557
|
// src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
|
|
2580
|
-
import { Fragment as Fragment3, jsx as
|
|
2558
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2581
2559
|
var OrderSummarySection = ({ order }) => {
|
|
2582
|
-
const { t } =
|
|
2560
|
+
const { t } = useTranslation17();
|
|
2583
2561
|
const prompt = usePrompt4();
|
|
2584
2562
|
const { reservations } = useReservationItems(
|
|
2585
2563
|
{
|
|
@@ -2638,24 +2616,24 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2638
2616
|
}
|
|
2639
2617
|
);
|
|
2640
2618
|
};
|
|
2641
|
-
return /* @__PURE__ */
|
|
2642
|
-
|
|
2619
|
+
return /* @__PURE__ */ jsxs17(
|
|
2620
|
+
Container10,
|
|
2643
2621
|
{
|
|
2644
2622
|
className: "divide-y p-0",
|
|
2645
2623
|
"data-testid": "order-summary-section",
|
|
2646
2624
|
children: [
|
|
2647
|
-
/* @__PURE__ */
|
|
2648
|
-
/* @__PURE__ */
|
|
2649
|
-
/* @__PURE__ */
|
|
2650
|
-
/* @__PURE__ */
|
|
2651
|
-
/* @__PURE__ */
|
|
2652
|
-
(showPayment || showRefund) && /* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ jsx17(Header3, { order, orderPreview }),
|
|
2626
|
+
/* @__PURE__ */ jsx17(ItemBreakdown, { order, reservations }),
|
|
2627
|
+
/* @__PURE__ */ jsx17(CostBreakdown, { order }),
|
|
2628
|
+
/* @__PURE__ */ jsx17(DiscountAndTotalBreakdown, { order }),
|
|
2629
|
+
/* @__PURE__ */ jsx17(Total2, { order }),
|
|
2630
|
+
(showPayment || showRefund) && /* @__PURE__ */ jsxs17(
|
|
2653
2631
|
"div",
|
|
2654
2632
|
{
|
|
2655
2633
|
className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4",
|
|
2656
2634
|
"data-testid": "order-summary-actions",
|
|
2657
2635
|
children: [
|
|
2658
|
-
showPayment && /* @__PURE__ */
|
|
2636
|
+
showPayment && /* @__PURE__ */ jsx17(
|
|
2659
2637
|
Button7,
|
|
2660
2638
|
{
|
|
2661
2639
|
size: "small",
|
|
@@ -2665,14 +2643,14 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2665
2643
|
children: t("orders.payment.markAsPaid")
|
|
2666
2644
|
}
|
|
2667
2645
|
),
|
|
2668
|
-
showRefund && /* @__PURE__ */
|
|
2646
|
+
showRefund && /* @__PURE__ */ jsx17(
|
|
2669
2647
|
Button7,
|
|
2670
2648
|
{
|
|
2671
2649
|
size: "small",
|
|
2672
2650
|
variant: "secondary",
|
|
2673
2651
|
asChild: true,
|
|
2674
2652
|
"data-testid": "order-summary-refund-button",
|
|
2675
|
-
children: /* @__PURE__ */
|
|
2653
|
+
children: /* @__PURE__ */ jsx17(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
|
|
2676
2654
|
amount: getStylizedAmount(
|
|
2677
2655
|
pendingDifference * -1,
|
|
2678
2656
|
order?.currency_code
|
|
@@ -2682,7 +2660,8 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2682
2660
|
)
|
|
2683
2661
|
]
|
|
2684
2662
|
}
|
|
2685
|
-
)
|
|
2663
|
+
),
|
|
2664
|
+
/* @__PURE__ */ jsx17(DisplayExtensionZone5, { model: "order", zone: "summary", data: order })
|
|
2686
2665
|
]
|
|
2687
2666
|
}
|
|
2688
2667
|
);
|
|
@@ -2691,20 +2670,20 @@ var Header3 = ({
|
|
|
2691
2670
|
order,
|
|
2692
2671
|
orderPreview
|
|
2693
2672
|
}) => {
|
|
2694
|
-
const { t } =
|
|
2673
|
+
const { t } = useTranslation17();
|
|
2695
2674
|
const shouldDisableReturn = order.items.every(
|
|
2696
2675
|
(i) => !(getReturnableQuantity(i) > 0)
|
|
2697
2676
|
);
|
|
2698
2677
|
const isOrderEditActive = orderPreview?.order_change?.change_type === "edit";
|
|
2699
2678
|
const isOrderEditPending = orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "pending";
|
|
2700
|
-
return /* @__PURE__ */
|
|
2679
|
+
return /* @__PURE__ */ jsxs17(
|
|
2701
2680
|
"div",
|
|
2702
2681
|
{
|
|
2703
2682
|
className: "flex items-center justify-between px-6 py-4",
|
|
2704
2683
|
"data-testid": "order-summary-header",
|
|
2705
2684
|
children: [
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ jsx17(Heading10, { level: "h2", "data-testid": "order-summary-heading", children: t("fields.summary") }),
|
|
2686
|
+
/* @__PURE__ */ jsx17(
|
|
2708
2687
|
ActionMenu,
|
|
2709
2688
|
{
|
|
2710
2689
|
groups: [
|
|
@@ -2715,7 +2694,7 @@ var Header3 = ({
|
|
|
2715
2694
|
isOrderEditPending ? "orders.summary.editOrderContinue" : "orders.summary.editOrder"
|
|
2716
2695
|
),
|
|
2717
2696
|
to: `/orders/${order.id}/edits`,
|
|
2718
|
-
icon: /* @__PURE__ */
|
|
2697
|
+
icon: /* @__PURE__ */ jsx17(PencilSquare, {}),
|
|
2719
2698
|
disabled: order.status === "canceled" || orderPreview?.order_change && orderPreview?.order_change?.change_type !== "edit" || orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "requested"
|
|
2720
2699
|
}
|
|
2721
2700
|
]
|
|
@@ -2725,19 +2704,19 @@ var Header3 = ({
|
|
|
2725
2704
|
{
|
|
2726
2705
|
label: t("orders.returns.create"),
|
|
2727
2706
|
to: `/orders/${order.id}/returns`,
|
|
2728
|
-
icon: /* @__PURE__ */
|
|
2707
|
+
icon: /* @__PURE__ */ jsx17(ArrowUturnLeft2, {}),
|
|
2729
2708
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
|
|
2730
2709
|
},
|
|
2731
2710
|
{
|
|
2732
2711
|
label: orderPreview?.order_change?.id && orderPreview?.order_change?.exchange_id ? t("orders.exchanges.manage") : t("orders.exchanges.create"),
|
|
2733
2712
|
to: `/orders/${order.id}/exchanges`,
|
|
2734
|
-
icon: /* @__PURE__ */
|
|
2713
|
+
icon: /* @__PURE__ */ jsx17(ArrowPath3, {}),
|
|
2735
2714
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
|
|
2736
2715
|
},
|
|
2737
2716
|
{
|
|
2738
2717
|
label: orderPreview?.order_change?.id && orderPreview?.order_change?.claim_id ? t("orders.claims.manage") : t("orders.claims.create"),
|
|
2739
2718
|
to: `/orders/${order.id}/claims`,
|
|
2740
|
-
icon: /* @__PURE__ */
|
|
2719
|
+
icon: /* @__PURE__ */ jsx17(ExclamationCircle2, {}),
|
|
2741
2720
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.claim_id || !!orderPreview?.order_change?.exchange_id
|
|
2742
2721
|
}
|
|
2743
2722
|
]
|
|
@@ -2758,30 +2737,30 @@ var Item = ({
|
|
|
2758
2737
|
claims,
|
|
2759
2738
|
exchanges
|
|
2760
2739
|
}) => {
|
|
2761
|
-
const { t } =
|
|
2740
|
+
const { t } = useTranslation17();
|
|
2762
2741
|
const offerInventoryLinks = item.offer?.inventory_item_link ?? [];
|
|
2763
2742
|
const isInventoryManaged = !!offerInventoryLinks.length;
|
|
2764
2743
|
const hasInventoryKit = (item.variant?.inventory_items?.length || 0) > 1 || item.variant?.inventory_items?.some((i) => i.required_quantity > 1);
|
|
2765
2744
|
const hasUnfulfilledItems = item.quantity - item.detail.fulfilled_quantity > 0;
|
|
2766
2745
|
const offerSku = item.offer?.sku ?? null;
|
|
2767
2746
|
const captionSku = offerSku ?? item.variant_sku ?? null;
|
|
2768
|
-
return /* @__PURE__ */
|
|
2769
|
-
/* @__PURE__ */
|
|
2747
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
2748
|
+
/* @__PURE__ */ jsxs17(
|
|
2770
2749
|
"div",
|
|
2771
2750
|
{
|
|
2772
2751
|
className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
|
|
2773
2752
|
"data-testid": `order-summary-item-${item.id}`,
|
|
2774
2753
|
children: [
|
|
2775
|
-
/* @__PURE__ */
|
|
2754
|
+
/* @__PURE__ */ jsxs17(
|
|
2776
2755
|
"div",
|
|
2777
2756
|
{
|
|
2778
2757
|
className: "flex items-start gap-x-4",
|
|
2779
2758
|
"data-testid": `order-summary-item-${item.id}-info`,
|
|
2780
2759
|
children: [
|
|
2781
|
-
/* @__PURE__ */
|
|
2782
|
-
/* @__PURE__ */
|
|
2783
|
-
/* @__PURE__ */
|
|
2784
|
-
|
|
2760
|
+
/* @__PURE__ */ jsx17(Thumbnail, { src: item.thumbnail }),
|
|
2761
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
2762
|
+
/* @__PURE__ */ jsx17(
|
|
2763
|
+
Text12,
|
|
2785
2764
|
{
|
|
2786
2765
|
size: "small",
|
|
2787
2766
|
leading: "compact",
|
|
@@ -2790,19 +2769,19 @@ var Item = ({
|
|
|
2790
2769
|
children: item.title
|
|
2791
2770
|
}
|
|
2792
2771
|
),
|
|
2793
|
-
captionSku && /* @__PURE__ */
|
|
2772
|
+
captionSku && /* @__PURE__ */ jsxs17(
|
|
2794
2773
|
"div",
|
|
2795
2774
|
{
|
|
2796
2775
|
className: "flex items-center gap-x-1",
|
|
2797
2776
|
"data-testid": `order-summary-item-${item.id}-sku`,
|
|
2798
2777
|
children: [
|
|
2799
|
-
/* @__PURE__ */
|
|
2800
|
-
/* @__PURE__ */
|
|
2778
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", children: captionSku }),
|
|
2779
|
+
/* @__PURE__ */ jsx17(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
|
|
2801
2780
|
]
|
|
2802
2781
|
}
|
|
2803
2782
|
),
|
|
2804
|
-
/* @__PURE__ */
|
|
2805
|
-
|
|
2783
|
+
/* @__PURE__ */ jsx17(
|
|
2784
|
+
Text12,
|
|
2806
2785
|
{
|
|
2807
2786
|
size: "small",
|
|
2808
2787
|
"data-testid": `order-summary-item-${item.id}-options`,
|
|
@@ -2813,31 +2792,31 @@ var Item = ({
|
|
|
2813
2792
|
]
|
|
2814
2793
|
}
|
|
2815
2794
|
),
|
|
2816
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsxs17(
|
|
2817
2796
|
"div",
|
|
2818
2797
|
{
|
|
2819
2798
|
className: "grid grid-cols-3 items-center gap-x-4",
|
|
2820
2799
|
"data-testid": `order-summary-item-${item.id}-pricing`,
|
|
2821
2800
|
children: [
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
|
|
2801
|
+
/* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx17(
|
|
2802
|
+
Text12,
|
|
2824
2803
|
{
|
|
2825
2804
|
size: "small",
|
|
2826
2805
|
"data-testid": `order-summary-item-${item.id}-unit-price`,
|
|
2827
2806
|
children: getLocaleAmount(item.unit_price, currencyCode)
|
|
2828
2807
|
}
|
|
2829
2808
|
) }),
|
|
2830
|
-
/* @__PURE__ */
|
|
2809
|
+
/* @__PURE__ */ jsxs17(
|
|
2831
2810
|
"div",
|
|
2832
2811
|
{
|
|
2833
2812
|
className: "flex items-center gap-x-2",
|
|
2834
2813
|
"data-testid": `order-summary-item-${item.id}-quantity`,
|
|
2835
2814
|
children: [
|
|
2836
|
-
/* @__PURE__ */
|
|
2837
|
-
/* @__PURE__ */
|
|
2815
|
+
/* @__PURE__ */ jsx17("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs17(Text12, { size: "small", children: [
|
|
2816
|
+
/* @__PURE__ */ jsx17("span", { className: "tabular-nums", children: item.quantity }),
|
|
2838
2817
|
"x"
|
|
2839
2818
|
] }) }),
|
|
2840
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ jsx17("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx17(
|
|
2841
2820
|
StatusBadge4,
|
|
2842
2821
|
{
|
|
2843
2822
|
color: reservation ? "green" : "orange",
|
|
@@ -2849,8 +2828,8 @@ var Item = ({
|
|
|
2849
2828
|
]
|
|
2850
2829
|
}
|
|
2851
2830
|
),
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
|
|
2831
|
+
/* @__PURE__ */ jsx17("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx17(
|
|
2832
|
+
Text12,
|
|
2854
2833
|
{
|
|
2855
2834
|
size: "small",
|
|
2856
2835
|
className: "pt-[1px]",
|
|
@@ -2865,10 +2844,10 @@ var Item = ({
|
|
|
2865
2844
|
},
|
|
2866
2845
|
item.id
|
|
2867
2846
|
),
|
|
2868
|
-
hasInventoryKit && /* @__PURE__ */
|
|
2869
|
-
returns.map((r) => /* @__PURE__ */
|
|
2870
|
-
claims.map((claim) => /* @__PURE__ */
|
|
2871
|
-
exchanges.map((exchange) => /* @__PURE__ */
|
|
2847
|
+
hasInventoryKit && /* @__PURE__ */ jsx17(InventoryKitBreakdown, { item }),
|
|
2848
|
+
returns.map((r) => /* @__PURE__ */ jsx17(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
|
|
2849
|
+
claims.map((claim) => /* @__PURE__ */ jsx17(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
|
|
2850
|
+
exchanges.map((exchange) => /* @__PURE__ */ jsx17(
|
|
2872
2851
|
ExchangeBreakdown,
|
|
2873
2852
|
{
|
|
2874
2853
|
exchange,
|
|
@@ -2894,13 +2873,13 @@ var ItemBreakdown = ({
|
|
|
2894
2873
|
order_id: order.id,
|
|
2895
2874
|
fields: "*items,*items.reason"
|
|
2896
2875
|
});
|
|
2897
|
-
const reservationsMap =
|
|
2876
|
+
const reservationsMap = useMemo3(
|
|
2898
2877
|
() => new Map((reservations || []).map((r) => [r.line_item_id, r])),
|
|
2899
2878
|
[reservations]
|
|
2900
2879
|
);
|
|
2901
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ jsx17("div", { "data-testid": "order-summary-items-breakdown", children: order.items?.map((item) => {
|
|
2902
2881
|
const reservation = reservationsMap.get(item.id);
|
|
2903
|
-
return /* @__PURE__ */
|
|
2882
|
+
return /* @__PURE__ */ jsx17(
|
|
2904
2883
|
Item,
|
|
2905
2884
|
{
|
|
2906
2885
|
item,
|
|
@@ -2919,22 +2898,36 @@ var Cost = ({
|
|
|
2919
2898
|
value,
|
|
2920
2899
|
secondaryValue,
|
|
2921
2900
|
tooltip
|
|
2922
|
-
}) => /* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2901
|
+
}) => /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 items-center", children: [
|
|
2902
|
+
/* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", children: [
|
|
2924
2903
|
label,
|
|
2925
2904
|
" ",
|
|
2926
2905
|
tooltip
|
|
2927
2906
|
] }),
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: secondaryValue }) }),
|
|
2908
|
+
/* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: value }) })
|
|
2930
2909
|
] });
|
|
2931
2910
|
var CostBreakdown = ({
|
|
2932
2911
|
order
|
|
2933
2912
|
}) => {
|
|
2934
|
-
const { t } =
|
|
2913
|
+
const { t } = useTranslation17();
|
|
2935
2914
|
const [isTaxOpen, setIsTaxOpen] = useState6(false);
|
|
2936
2915
|
const [isShippingOpen, setIsShippingOpen] = useState6(false);
|
|
2937
|
-
const
|
|
2916
|
+
const [isCommissionOpen, setIsCommissionOpen] = useState6(false);
|
|
2917
|
+
const { commission_lines } = useOrderCommissionLines(order.id);
|
|
2918
|
+
const hasCommission = commission_lines.length > 0;
|
|
2919
|
+
const commissionTotal = commission_lines.reduce(
|
|
2920
|
+
(acc, line) => acc + (line.amount ?? 0),
|
|
2921
|
+
0
|
|
2922
|
+
);
|
|
2923
|
+
const commissionItemTitleById = useMemo3(() => {
|
|
2924
|
+
const map = /* @__PURE__ */ new Map();
|
|
2925
|
+
order.items?.forEach((item) => {
|
|
2926
|
+
map.set(item.id, item.product_title ?? item.title);
|
|
2927
|
+
});
|
|
2928
|
+
return map;
|
|
2929
|
+
}, [order.items]);
|
|
2930
|
+
const taxCodes = useMemo3(() => {
|
|
2938
2931
|
const taxCodeMap = {};
|
|
2939
2932
|
order.items.forEach((item) => {
|
|
2940
2933
|
item.tax_lines?.forEach((line) => {
|
|
@@ -2959,32 +2952,32 @@ var CostBreakdown = ({
|
|
|
2959
2952
|
return taxCodeMap;
|
|
2960
2953
|
}, [order]);
|
|
2961
2954
|
const hasTaxes = !!Object.keys(taxCodes).length;
|
|
2962
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ jsxs17(
|
|
2963
2956
|
"div",
|
|
2964
2957
|
{
|
|
2965
2958
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
2966
2959
|
"data-testid": "order-summary-cost-breakdown",
|
|
2967
2960
|
children: [
|
|
2968
|
-
/* @__PURE__ */
|
|
2961
|
+
/* @__PURE__ */ jsx17(
|
|
2969
2962
|
Cost,
|
|
2970
2963
|
{
|
|
2971
2964
|
label: t("orders.summary.itemSubtotal"),
|
|
2972
2965
|
value: getLocaleAmount(order.item_subtotal, order.currency_code)
|
|
2973
2966
|
}
|
|
2974
2967
|
),
|
|
2975
|
-
/* @__PURE__ */
|
|
2968
|
+
/* @__PURE__ */ jsx17(
|
|
2976
2969
|
Cost,
|
|
2977
2970
|
{
|
|
2978
2971
|
label: (
|
|
2979
2972
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2980
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ jsxs17(
|
|
2981
2974
|
"span",
|
|
2982
2975
|
{
|
|
2983
2976
|
onClick: () => setIsShippingOpen((o) => !o),
|
|
2984
2977
|
className: "flex cursor-pointer items-center gap-1",
|
|
2985
2978
|
children: [
|
|
2986
|
-
/* @__PURE__ */
|
|
2987
|
-
/* @__PURE__ */
|
|
2979
|
+
/* @__PURE__ */ jsx17("span", { children: t("orders.summary.shippingSubtotal") }),
|
|
2980
|
+
/* @__PURE__ */ jsx17(
|
|
2988
2981
|
TriangleDownMini,
|
|
2989
2982
|
{
|
|
2990
2983
|
style: {
|
|
@@ -2999,30 +2992,30 @@ var CostBreakdown = ({
|
|
|
2999
2992
|
value: getLocaleAmount(order.shipping_subtotal, order.currency_code)
|
|
3000
2993
|
}
|
|
3001
2994
|
),
|
|
3002
|
-
isShippingOpen && /* @__PURE__ */
|
|
2995
|
+
isShippingOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
|
|
3003
2996
|
(m1, m2) => m1.created_at.localeCompare(m2.created_at)
|
|
3004
2997
|
).map((sm, i) => {
|
|
3005
|
-
return /* @__PURE__ */
|
|
2998
|
+
return /* @__PURE__ */ jsxs17(
|
|
3006
2999
|
"div",
|
|
3007
3000
|
{
|
|
3008
3001
|
className: "flex items-center justify-between gap-x-2",
|
|
3009
3002
|
children: [
|
|
3010
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3011
3004
|
sm.name,
|
|
3012
3005
|
sm.detail.return_id && ` (${t("fields.returnShipping")})`,
|
|
3013
3006
|
" ",
|
|
3014
|
-
/* @__PURE__ */
|
|
3007
|
+
/* @__PURE__ */ jsx17(shipping_info_popover_default, { shippingMethod: sm }, i)
|
|
3015
3008
|
] }) }),
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3010
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(sm.subtotal, order.currency_code) })
|
|
3018
3011
|
]
|
|
3019
3012
|
},
|
|
3020
3013
|
sm.id
|
|
3021
3014
|
);
|
|
3022
3015
|
}) }),
|
|
3023
|
-
/* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3017
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
|
|
3018
|
+
/* @__PURE__ */ jsxs17(
|
|
3026
3019
|
"div",
|
|
3027
3020
|
{
|
|
3028
3021
|
onClick: () => hasTaxes && setIsTaxOpen((o) => !o),
|
|
@@ -3030,8 +3023,8 @@ var CostBreakdown = ({
|
|
|
3030
3023
|
"cursor-pointer": hasTaxes
|
|
3031
3024
|
}),
|
|
3032
3025
|
children: [
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
hasTaxes && /* @__PURE__ */
|
|
3026
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small select-none", children: t("orders.summary.taxTotal") }),
|
|
3027
|
+
hasTaxes && /* @__PURE__ */ jsx17(
|
|
3035
3028
|
TriangleDownMini,
|
|
3036
3029
|
{
|
|
3037
3030
|
style: {
|
|
@@ -3042,34 +3035,72 @@ var CostBreakdown = ({
|
|
|
3042
3035
|
]
|
|
3043
3036
|
}
|
|
3044
3037
|
),
|
|
3045
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
|
|
3046
3039
|
] }),
|
|
3047
|
-
isTaxOpen && /* @__PURE__ */
|
|
3048
|
-
return /* @__PURE__ */
|
|
3040
|
+
isTaxOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
|
|
3041
|
+
return /* @__PURE__ */ jsxs17(
|
|
3049
3042
|
"div",
|
|
3050
3043
|
{
|
|
3051
3044
|
className: "flex items-center justify-between gap-x-2",
|
|
3052
3045
|
children: [
|
|
3053
|
-
/* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
3055
|
-
/* @__PURE__ */
|
|
3046
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
|
|
3047
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small", children: code }),
|
|
3048
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3056
3049
|
"(",
|
|
3057
3050
|
formatPercentage(rate),
|
|
3058
3051
|
")"
|
|
3059
3052
|
] })
|
|
3060
3053
|
] }),
|
|
3061
|
-
/* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3054
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3055
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
|
|
3063
3056
|
]
|
|
3064
3057
|
},
|
|
3065
3058
|
code
|
|
3066
3059
|
);
|
|
3067
3060
|
}) })
|
|
3068
3061
|
] }),
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
|
|
3072
|
-
|
|
3062
|
+
hasCommission && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3063
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
|
|
3064
|
+
/* @__PURE__ */ jsxs17(
|
|
3065
|
+
"div",
|
|
3066
|
+
{
|
|
3067
|
+
onClick: () => setIsCommissionOpen((o) => !o),
|
|
3068
|
+
className: "flex cursor-pointer items-center gap-1",
|
|
3069
|
+
children: [
|
|
3070
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small select-none", children: t("fields.commission") }),
|
|
3071
|
+
/* @__PURE__ */ jsx17(
|
|
3072
|
+
TriangleDownMini,
|
|
3073
|
+
{
|
|
3074
|
+
style: {
|
|
3075
|
+
transform: `rotate(${isCommissionOpen ? 0 : -90}deg)`
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
)
|
|
3079
|
+
]
|
|
3080
|
+
}
|
|
3081
|
+
),
|
|
3082
|
+
/* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: getLocaleAmount(commissionTotal, order.currency_code) }) })
|
|
3083
|
+
] }),
|
|
3084
|
+
isCommissionOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: commission_lines.map((line) => {
|
|
3085
|
+
const label = line.shipping_method_id ? t("fields.shipping") : commissionItemTitleById.get(line.item_id ?? "") ?? line.code;
|
|
3086
|
+
return /* @__PURE__ */ jsxs17(
|
|
3087
|
+
"div",
|
|
3088
|
+
{
|
|
3089
|
+
className: "flex items-center justify-between gap-x-2",
|
|
3090
|
+
children: [
|
|
3091
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17("span", { className: "txt-small", children: label }) }),
|
|
3092
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3093
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(line.amount, order.currency_code) })
|
|
3094
|
+
]
|
|
3095
|
+
},
|
|
3096
|
+
line.id
|
|
3097
|
+
);
|
|
3098
|
+
}) })
|
|
3099
|
+
] }),
|
|
3100
|
+
/* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3101
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
|
|
3102
|
+
/* @__PURE__ */ jsx17(
|
|
3103
|
+
Text12,
|
|
3073
3104
|
{
|
|
3074
3105
|
className: "text-ui-fg-subtle text-bold",
|
|
3075
3106
|
size: "small",
|
|
@@ -3085,11 +3116,11 @@ var CostBreakdown = ({
|
|
|
3085
3116
|
var DiscountAndTotalBreakdown = ({
|
|
3086
3117
|
order
|
|
3087
3118
|
}) => {
|
|
3088
|
-
const { t } =
|
|
3119
|
+
const { t } = useTranslation17();
|
|
3089
3120
|
const [isDiscountOpen, setIsDiscountOpen] = useState6(false);
|
|
3090
3121
|
const [isCreditLinesOpen, setIsCreditLinesOpen] = useState6(false);
|
|
3091
3122
|
const creditLines = order.credit_lines ?? [];
|
|
3092
|
-
const discounts =
|
|
3123
|
+
const discounts = useMemo3(() => {
|
|
3093
3124
|
const discounts2 = [];
|
|
3094
3125
|
if (order.item_discount_total) {
|
|
3095
3126
|
discounts2.push({
|
|
@@ -3117,18 +3148,18 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3117
3148
|
}, [order]);
|
|
3118
3149
|
const hasDiscount = discounts.length > 0;
|
|
3119
3150
|
const hasCreditLines = creditLines.length > 0;
|
|
3120
|
-
return /* @__PURE__ */
|
|
3151
|
+
return /* @__PURE__ */ jsxs17(
|
|
3121
3152
|
"div",
|
|
3122
3153
|
{
|
|
3123
3154
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
3124
3155
|
"data-testid": "order-summary-discount-breakdown",
|
|
3125
3156
|
children: [
|
|
3126
|
-
/* @__PURE__ */
|
|
3157
|
+
/* @__PURE__ */ jsx17(
|
|
3127
3158
|
Cost,
|
|
3128
3159
|
{
|
|
3129
3160
|
label: (
|
|
3130
3161
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
3131
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsxs17(
|
|
3132
3163
|
"span",
|
|
3133
3164
|
{
|
|
3134
3165
|
onClick: () => hasDiscount && setIsDiscountOpen((o) => !o),
|
|
@@ -3137,8 +3168,8 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3137
3168
|
}),
|
|
3138
3169
|
"data-testid": "order-summary-discount-toggle",
|
|
3139
3170
|
children: [
|
|
3140
|
-
/* @__PURE__ */
|
|
3141
|
-
hasDiscount && /* @__PURE__ */
|
|
3171
|
+
/* @__PURE__ */ jsx17("span", { children: t("orders.summary.discountTotal") }),
|
|
3172
|
+
hasDiscount && /* @__PURE__ */ jsx17(
|
|
3142
3173
|
TriangleDownMini,
|
|
3143
3174
|
{
|
|
3144
3175
|
style: {
|
|
@@ -3153,41 +3184,41 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3153
3184
|
value: getLocaleAmount(order.discount_total, order.currency_code)
|
|
3154
3185
|
}
|
|
3155
3186
|
),
|
|
3156
|
-
isDiscountOpen && /* @__PURE__ */
|
|
3157
|
-
return /* @__PURE__ */
|
|
3187
|
+
isDiscountOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
|
|
3188
|
+
return /* @__PURE__ */ jsxs17(
|
|
3158
3189
|
"div",
|
|
3159
3190
|
{
|
|
3160
3191
|
className: "flex items-center justify-between gap-x-2",
|
|
3161
3192
|
children: [
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
/* @__PURE__ */
|
|
3164
|
-
/* @__PURE__ */
|
|
3193
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
|
|
3194
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small", children: t(`fields.${type}`) }),
|
|
3195
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3165
3196
|
"(",
|
|
3166
3197
|
codes.join(", "),
|
|
3167
3198
|
")"
|
|
3168
3199
|
] })
|
|
3169
3200
|
] }),
|
|
3170
|
-
/* @__PURE__ */
|
|
3171
|
-
/* @__PURE__ */
|
|
3201
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3202
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
|
|
3172
3203
|
]
|
|
3173
3204
|
},
|
|
3174
3205
|
type
|
|
3175
3206
|
);
|
|
3176
3207
|
}) }),
|
|
3177
|
-
hasCreditLines && /* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3208
|
+
hasCreditLines && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3209
|
+
/* @__PURE__ */ jsx17(
|
|
3179
3210
|
Cost,
|
|
3180
3211
|
{
|
|
3181
3212
|
label: (
|
|
3182
3213
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
3183
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsxs17(
|
|
3184
3215
|
"span",
|
|
3185
3216
|
{
|
|
3186
3217
|
onClick: () => setIsCreditLinesOpen((o) => !o),
|
|
3187
3218
|
className: "flex cursor-pointer items-center gap-1",
|
|
3188
3219
|
children: [
|
|
3189
|
-
/* @__PURE__ */
|
|
3190
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ jsx17("span", { children: t("orders.creditLines.title") }),
|
|
3221
|
+
/* @__PURE__ */ jsx17(
|
|
3191
3222
|
TriangleDownMini,
|
|
3192
3223
|
{
|
|
3193
3224
|
style: {
|
|
@@ -3205,34 +3236,34 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3205
3236
|
)
|
|
3206
3237
|
}
|
|
3207
3238
|
),
|
|
3208
|
-
isCreditLinesOpen && /* @__PURE__ */
|
|
3239
|
+
isCreditLinesOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
|
|
3209
3240
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
3210
|
-
return /* @__PURE__ */
|
|
3241
|
+
return /* @__PURE__ */ jsxs17(
|
|
3211
3242
|
"div",
|
|
3212
3243
|
{
|
|
3213
3244
|
className: "flex items-center justify-between gap-x-2",
|
|
3214
3245
|
children: [
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3217
|
-
|
|
3246
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center", children: [
|
|
3247
|
+
/* @__PURE__ */ jsx17(
|
|
3248
|
+
Text12,
|
|
3218
3249
|
{
|
|
3219
3250
|
size: "small",
|
|
3220
3251
|
leading: "compact",
|
|
3221
3252
|
weight: "plus",
|
|
3222
3253
|
className: "txt-small text-ui-fg-subtle font-medium",
|
|
3223
|
-
children: /* @__PURE__ */
|
|
3254
|
+
children: /* @__PURE__ */ jsx17(display_id_default, { id: creditLine.id })
|
|
3224
3255
|
}
|
|
3225
3256
|
),
|
|
3226
|
-
/* @__PURE__ */
|
|
3227
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
|
|
3258
|
+
/* @__PURE__ */ jsx17(
|
|
3228
3259
|
Tooltip6,
|
|
3229
3260
|
{
|
|
3230
3261
|
content: format3(
|
|
3231
3262
|
new Date(creditLine.created_at),
|
|
3232
3263
|
"dd MMM, yyyy, HH:mm:ss"
|
|
3233
3264
|
),
|
|
3234
|
-
children: /* @__PURE__ */
|
|
3235
|
-
|
|
3265
|
+
children: /* @__PURE__ */ jsx17(
|
|
3266
|
+
Text12,
|
|
3236
3267
|
{
|
|
3237
3268
|
size: "small",
|
|
3238
3269
|
leading: "compact",
|
|
@@ -3245,9 +3276,9 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3245
3276
|
)
|
|
3246
3277
|
}
|
|
3247
3278
|
),
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
|
|
3279
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
|
|
3280
|
+
/* @__PURE__ */ jsxs17(
|
|
3281
|
+
Text12,
|
|
3251
3282
|
{
|
|
3252
3283
|
size: "small",
|
|
3253
3284
|
leading: "compact",
|
|
@@ -3260,8 +3291,8 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3260
3291
|
}
|
|
3261
3292
|
)
|
|
3262
3293
|
] }),
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3294
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3295
|
+
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
|
|
3265
3296
|
creditLine.amount,
|
|
3266
3297
|
order.currency_code
|
|
3267
3298
|
) })
|
|
@@ -3271,10 +3302,10 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3271
3302
|
);
|
|
3272
3303
|
}) })
|
|
3273
3304
|
] }),
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3277
|
-
|
|
3305
|
+
/* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3306
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
|
|
3307
|
+
/* @__PURE__ */ jsx17(
|
|
3308
|
+
Text12,
|
|
3278
3309
|
{
|
|
3279
3310
|
className: "text-ui-fg-subtle text-bold",
|
|
3280
3311
|
size: "small",
|
|
@@ -3288,17 +3319,17 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3288
3319
|
);
|
|
3289
3320
|
};
|
|
3290
3321
|
var InventoryKitBreakdown = ({ item }) => {
|
|
3291
|
-
const { t } =
|
|
3322
|
+
const { t } = useTranslation17();
|
|
3292
3323
|
const [isOpen, setIsOpen] = useState6(false);
|
|
3293
3324
|
const inventory = item.variant?.inventory_items || [];
|
|
3294
|
-
return /* @__PURE__ */
|
|
3295
|
-
/* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3326
|
+
/* @__PURE__ */ jsxs17(
|
|
3296
3327
|
"div",
|
|
3297
3328
|
{
|
|
3298
3329
|
onClick: () => setIsOpen((o) => !o),
|
|
3299
3330
|
className: "flex cursor-pointer items-center gap-2 border-t border-dashed px-6 py-4",
|
|
3300
3331
|
children: [
|
|
3301
|
-
/* @__PURE__ */
|
|
3332
|
+
/* @__PURE__ */ jsx17(
|
|
3302
3333
|
TriangleDownMini,
|
|
3303
3334
|
{
|
|
3304
3335
|
style: {
|
|
@@ -3306,26 +3337,26 @@ var InventoryKitBreakdown = ({ item }) => {
|
|
|
3306
3337
|
}
|
|
3307
3338
|
}
|
|
3308
3339
|
),
|
|
3309
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ jsx17("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
|
|
3310
3341
|
]
|
|
3311
3342
|
}
|
|
3312
3343
|
),
|
|
3313
|
-
isOpen && /* @__PURE__ */
|
|
3314
|
-
return /* @__PURE__ */
|
|
3344
|
+
isOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
|
|
3345
|
+
return /* @__PURE__ */ jsxs17(
|
|
3315
3346
|
"div",
|
|
3316
3347
|
{
|
|
3317
3348
|
className: "flex items-center justify-between gap-x-2",
|
|
3318
3349
|
children: [
|
|
3319
|
-
/* @__PURE__ */
|
|
3350
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
|
|
3320
3351
|
i.inventory.title,
|
|
3321
|
-
i.inventory.sku && /* @__PURE__ */
|
|
3352
|
+
i.inventory.sku && /* @__PURE__ */ jsxs17("span", { className: "text-ui-fg-subtle font-normal", children: [
|
|
3322
3353
|
" ",
|
|
3323
3354
|
"\u22C5 ",
|
|
3324
3355
|
i.inventory.sku
|
|
3325
3356
|
] })
|
|
3326
3357
|
] }) }),
|
|
3327
|
-
/* @__PURE__ */
|
|
3328
|
-
/* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3359
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-muted", children: [
|
|
3329
3360
|
i.required_quantity,
|
|
3330
3361
|
"x"
|
|
3331
3362
|
] })
|
|
@@ -3340,21 +3371,21 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3340
3371
|
orderReturn,
|
|
3341
3372
|
itemId
|
|
3342
3373
|
}) => {
|
|
3343
|
-
const { t } =
|
|
3374
|
+
const { t } = useTranslation17();
|
|
3344
3375
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3345
3376
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3346
|
-
return item && /* @__PURE__ */
|
|
3377
|
+
return item && /* @__PURE__ */ jsxs17(
|
|
3347
3378
|
"div",
|
|
3348
3379
|
{
|
|
3349
3380
|
className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
|
|
3350
3381
|
children: [
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
/* @__PURE__ */
|
|
3353
|
-
/* @__PURE__ */
|
|
3382
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3383
|
+
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3384
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
|
|
3354
3385
|
quantity: damagedQuantity
|
|
3355
3386
|
}) }),
|
|
3356
|
-
item?.note && /* @__PURE__ */
|
|
3357
|
-
item?.reason && /* @__PURE__ */
|
|
3387
|
+
item?.note && /* @__PURE__ */ jsx17(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx17(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
|
|
3388
|
+
item?.reason && /* @__PURE__ */ jsx17(
|
|
3358
3389
|
Badge4,
|
|
3359
3390
|
{
|
|
3360
3391
|
size: "2xsmall",
|
|
@@ -3364,9 +3395,9 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3364
3395
|
}
|
|
3365
3396
|
)
|
|
3366
3397
|
] }),
|
|
3367
|
-
/* @__PURE__ */
|
|
3398
|
+
/* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3368
3399
|
t(`orders.returns.damagedItemReceived`),
|
|
3369
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3370
3401
|
] })
|
|
3371
3402
|
]
|
|
3372
3403
|
},
|
|
@@ -3377,7 +3408,7 @@ var ReturnBreakdown = ({
|
|
|
3377
3408
|
orderReturn,
|
|
3378
3409
|
itemId
|
|
3379
3410
|
}) => {
|
|
3380
|
-
const { t } =
|
|
3411
|
+
const { t } = useTranslation17();
|
|
3381
3412
|
const { getRelativeDate } = useDate();
|
|
3382
3413
|
if (!["requested", "received", "partially_received"].includes(
|
|
3383
3414
|
orderReturn.status || ""
|
|
@@ -3387,29 +3418,29 @@ var ReturnBreakdown = ({
|
|
|
3387
3418
|
const isRequested = orderReturn.status === "requested";
|
|
3388
3419
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3389
3420
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3390
|
-
return item && /* @__PURE__ */
|
|
3391
|
-
damagedQuantity > 0 && /* @__PURE__ */
|
|
3421
|
+
return item && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3422
|
+
damagedQuantity > 0 && /* @__PURE__ */ jsx17(
|
|
3392
3423
|
ReturnBreakdownWithDamages,
|
|
3393
3424
|
{
|
|
3394
3425
|
orderReturn,
|
|
3395
3426
|
itemId
|
|
3396
3427
|
}
|
|
3397
3428
|
),
|
|
3398
|
-
/* @__PURE__ */
|
|
3429
|
+
/* @__PURE__ */ jsxs17(
|
|
3399
3430
|
"div",
|
|
3400
3431
|
{
|
|
3401
3432
|
className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
|
|
3402
3433
|
children: [
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3405
|
-
/* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3435
|
+
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3436
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(
|
|
3406
3437
|
`orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
|
|
3407
3438
|
{
|
|
3408
3439
|
requestedItemsCount: item?.[isRequested ? "quantity" : "received_quantity"]
|
|
3409
3440
|
}
|
|
3410
3441
|
) }),
|
|
3411
|
-
item?.note && /* @__PURE__ */
|
|
3412
|
-
item?.reason && /* @__PURE__ */
|
|
3442
|
+
item?.note && /* @__PURE__ */ jsx17(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx17(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
|
|
3443
|
+
item?.reason && /* @__PURE__ */ jsx17(
|
|
3413
3444
|
Badge4,
|
|
3414
3445
|
{
|
|
3415
3446
|
size: "2xsmall",
|
|
@@ -3419,13 +3450,13 @@ var ReturnBreakdown = ({
|
|
|
3419
3450
|
}
|
|
3420
3451
|
)
|
|
3421
3452
|
] }),
|
|
3422
|
-
orderReturn && isRequested && /* @__PURE__ */
|
|
3453
|
+
orderReturn && isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3423
3454
|
getRelativeDate(orderReturn.created_at),
|
|
3424
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3425
3456
|
] }),
|
|
3426
|
-
orderReturn && !isRequested && /* @__PURE__ */
|
|
3457
|
+
orderReturn && !isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3427
3458
|
t(`orders.returns.itemReceived`),
|
|
3428
|
-
/* @__PURE__ */
|
|
3459
|
+
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3429
3460
|
] })
|
|
3430
3461
|
]
|
|
3431
3462
|
},
|
|
@@ -3437,26 +3468,26 @@ var ClaimBreakdown = ({
|
|
|
3437
3468
|
claim,
|
|
3438
3469
|
itemId
|
|
3439
3470
|
}) => {
|
|
3440
|
-
const { t } =
|
|
3471
|
+
const { t } = useTranslation17();
|
|
3441
3472
|
const { getRelativeDate } = useDate();
|
|
3442
3473
|
const items = claim.additional_items.filter(
|
|
3443
3474
|
(item) => item.item?.id === itemId
|
|
3444
3475
|
);
|
|
3445
|
-
return !!items.length && /* @__PURE__ */
|
|
3476
|
+
return !!items.length && /* @__PURE__ */ jsxs17(
|
|
3446
3477
|
"div",
|
|
3447
3478
|
{
|
|
3448
3479
|
className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
|
|
3449
3480
|
children: [
|
|
3450
|
-
/* @__PURE__ */
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3482
|
+
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3483
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
|
|
3453
3484
|
itemsCount: items.reduce(
|
|
3454
3485
|
(acc, item) => acc = acc + item.quantity,
|
|
3455
3486
|
0
|
|
3456
3487
|
)
|
|
3457
3488
|
}) })
|
|
3458
3489
|
] }),
|
|
3459
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
|
|
3460
3491
|
]
|
|
3461
3492
|
},
|
|
3462
3493
|
claim.id
|
|
@@ -3466,68 +3497,68 @@ var ExchangeBreakdown = ({
|
|
|
3466
3497
|
exchange,
|
|
3467
3498
|
itemId
|
|
3468
3499
|
}) => {
|
|
3469
|
-
const { t } =
|
|
3500
|
+
const { t } = useTranslation17();
|
|
3470
3501
|
const { getRelativeDate } = useDate();
|
|
3471
3502
|
const items = exchange.additional_items.filter(
|
|
3472
3503
|
(item) => item?.item?.id === itemId
|
|
3473
3504
|
);
|
|
3474
|
-
return !!items.length && /* @__PURE__ */
|
|
3505
|
+
return !!items.length && /* @__PURE__ */ jsxs17(
|
|
3475
3506
|
"div",
|
|
3476
3507
|
{
|
|
3477
3508
|
className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-b-2 border-t-2 border-dotted px-6 py-4",
|
|
3478
3509
|
children: [
|
|
3479
|
-
/* @__PURE__ */
|
|
3480
|
-
/* @__PURE__ */
|
|
3481
|
-
/* @__PURE__ */
|
|
3510
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3511
|
+
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3512
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
|
|
3482
3513
|
itemsCount: items.reduce(
|
|
3483
3514
|
(acc, item) => acc = acc + item.quantity,
|
|
3484
3515
|
0
|
|
3485
3516
|
)
|
|
3486
3517
|
}) })
|
|
3487
3518
|
] }),
|
|
3488
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
|
|
3489
3520
|
]
|
|
3490
3521
|
},
|
|
3491
3522
|
exchange.id
|
|
3492
3523
|
);
|
|
3493
3524
|
};
|
|
3494
3525
|
var Total2 = ({ order }) => {
|
|
3495
|
-
const { t } =
|
|
3496
|
-
return /* @__PURE__ */
|
|
3526
|
+
const { t } = useTranslation17();
|
|
3527
|
+
return /* @__PURE__ */ jsxs17(
|
|
3497
3528
|
"div",
|
|
3498
3529
|
{
|
|
3499
3530
|
className: " flex flex-col gap-y-2 px-6 py-4",
|
|
3500
3531
|
"data-testid": "order-summary-total",
|
|
3501
3532
|
children: [
|
|
3502
|
-
/* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ jsxs17(
|
|
3503
3534
|
"div",
|
|
3504
3535
|
{
|
|
3505
3536
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
3506
3537
|
"data-testid": "order-summary-paid-total",
|
|
3507
3538
|
children: [
|
|
3508
|
-
/* @__PURE__ */
|
|
3509
|
-
/* @__PURE__ */
|
|
3539
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.paidTotal") }),
|
|
3540
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
|
|
3510
3541
|
getTotalCaptured(order.payment_collections || []),
|
|
3511
3542
|
order.currency_code
|
|
3512
3543
|
) })
|
|
3513
3544
|
]
|
|
3514
3545
|
}
|
|
3515
3546
|
),
|
|
3516
|
-
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3547
|
+
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3548
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
|
|
3549
|
+
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
|
|
3519
3550
|
getTotalCreditLines(order.credit_lines ?? []),
|
|
3520
3551
|
order.currency_code
|
|
3521
3552
|
) })
|
|
3522
3553
|
] }),
|
|
3523
|
-
/* @__PURE__ */
|
|
3554
|
+
/* @__PURE__ */ jsxs17(
|
|
3524
3555
|
"div",
|
|
3525
3556
|
{
|
|
3526
3557
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
3527
3558
|
"data-testid": "order-summary-outstanding-amount",
|
|
3528
3559
|
children: [
|
|
3529
|
-
/* @__PURE__ */
|
|
3530
|
-
|
|
3560
|
+
/* @__PURE__ */ jsx17(
|
|
3561
|
+
Text12,
|
|
3531
3562
|
{
|
|
3532
3563
|
className: "text-ui-fg-subtle text-semibold",
|
|
3533
3564
|
size: "small",
|
|
@@ -3535,8 +3566,8 @@ var Total2 = ({ order }) => {
|
|
|
3535
3566
|
children: t("orders.returns.outstandingAmount")
|
|
3536
3567
|
}
|
|
3537
3568
|
),
|
|
3538
|
-
/* @__PURE__ */
|
|
3539
|
-
|
|
3569
|
+
/* @__PURE__ */ jsx17(
|
|
3570
|
+
Text12,
|
|
3540
3571
|
{
|
|
3541
3572
|
className: "text-ui-fg-subtle text-bold",
|
|
3542
3573
|
size: "small",
|
|
@@ -3556,21 +3587,22 @@ var Total2 = ({ order }) => {
|
|
|
3556
3587
|
};
|
|
3557
3588
|
|
|
3558
3589
|
// src/pages/orders/order-detail/components/order-remaining-orders-group-section/order-remaining-orders-group-section.tsx
|
|
3559
|
-
import { Container as
|
|
3590
|
+
import { Container as Container11, Heading as Heading11 } from "@medusajs/ui";
|
|
3591
|
+
import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
|
|
3560
3592
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
3561
|
-
import { useMemo as
|
|
3562
|
-
import { useTranslation as
|
|
3593
|
+
import { useMemo as useMemo4 } from "react";
|
|
3594
|
+
import { useTranslation as useTranslation18 } from "react-i18next";
|
|
3563
3595
|
import { useParams } from "react-router-dom";
|
|
3564
|
-
import { jsx as
|
|
3596
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3565
3597
|
var DEFAULT_FIELDS2 = "id,*orders,*orders.customer,*orders.seller,*orders.sales_channel";
|
|
3566
3598
|
var OrderRemainingOrdersGroupSection = () => {
|
|
3567
3599
|
const { id } = useParams();
|
|
3568
|
-
const { t } =
|
|
3600
|
+
const { t } = useTranslation18();
|
|
3569
3601
|
const { order_group, isLoading, isError, error } = useOrderGroupByOrderId(
|
|
3570
3602
|
id,
|
|
3571
3603
|
{ fields: DEFAULT_FIELDS2 }
|
|
3572
3604
|
);
|
|
3573
|
-
const orders =
|
|
3605
|
+
const orders = useMemo4(() => {
|
|
3574
3606
|
const group = order_group;
|
|
3575
3607
|
if (!group?.orders) return [];
|
|
3576
3608
|
return group.orders.filter((o) => o.id !== id);
|
|
@@ -3590,21 +3622,21 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3590
3622
|
if (!isLoading && orders.length === 0) {
|
|
3591
3623
|
return null;
|
|
3592
3624
|
}
|
|
3593
|
-
return /* @__PURE__ */
|
|
3594
|
-
|
|
3625
|
+
return /* @__PURE__ */ jsxs18(
|
|
3626
|
+
Container11,
|
|
3595
3627
|
{
|
|
3596
3628
|
className: "divide-y p-0",
|
|
3597
3629
|
"data-testid": "order-remaining-orders-group-section",
|
|
3598
3630
|
children: [
|
|
3599
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ jsx18(
|
|
3600
3632
|
"div",
|
|
3601
3633
|
{
|
|
3602
3634
|
className: "flex items-center justify-between px-6 py-4",
|
|
3603
3635
|
"data-testid": "order-remaining-orders-group-header",
|
|
3604
|
-
children: /* @__PURE__ */
|
|
3636
|
+
children: /* @__PURE__ */ jsx18(Heading11, { level: "h2", "data-testid": "order-remaining-orders-group-heading", children: t("orders.group.heading") })
|
|
3605
3637
|
}
|
|
3606
3638
|
),
|
|
3607
|
-
/* @__PURE__ */
|
|
3639
|
+
/* @__PURE__ */ jsx18(
|
|
3608
3640
|
_DataTable,
|
|
3609
3641
|
{
|
|
3610
3642
|
columns,
|
|
@@ -3617,6 +3649,14 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3617
3649
|
message: t("orders.group.noOtherOrders")
|
|
3618
3650
|
}
|
|
3619
3651
|
}
|
|
3652
|
+
),
|
|
3653
|
+
/* @__PURE__ */ jsx18(
|
|
3654
|
+
DisplayExtensionZone6,
|
|
3655
|
+
{
|
|
3656
|
+
model: "order",
|
|
3657
|
+
zone: "order-group",
|
|
3658
|
+
data: order_group
|
|
3659
|
+
}
|
|
3620
3660
|
)
|
|
3621
3661
|
]
|
|
3622
3662
|
}
|
|
@@ -3624,35 +3664,35 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3624
3664
|
};
|
|
3625
3665
|
var columnHelper = createColumnHelper();
|
|
3626
3666
|
var useColumns = () => {
|
|
3627
|
-
return
|
|
3667
|
+
return useMemo4(
|
|
3628
3668
|
() => [
|
|
3629
3669
|
columnHelper.accessor("display_id", {
|
|
3630
|
-
header: () => /* @__PURE__ */
|
|
3631
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3670
|
+
header: () => /* @__PURE__ */ jsx18(DisplayIdHeader, {}),
|
|
3671
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(DisplayIdCell, { displayId: getValue() })
|
|
3632
3672
|
}),
|
|
3633
3673
|
columnHelper.display({
|
|
3634
3674
|
id: "seller",
|
|
3635
|
-
header: () => /* @__PURE__ */
|
|
3675
|
+
header: () => /* @__PURE__ */ jsx18(TextHeader, { text: "Store" }),
|
|
3636
3676
|
cell: ({ row }) => {
|
|
3637
3677
|
const seller = row.original.seller;
|
|
3638
|
-
return /* @__PURE__ */
|
|
3678
|
+
return /* @__PURE__ */ jsx18(TextCell, { text: seller?.name ?? "-" });
|
|
3639
3679
|
}
|
|
3640
3680
|
}),
|
|
3641
3681
|
columnHelper.accessor("created_at", {
|
|
3642
|
-
header: () => /* @__PURE__ */
|
|
3643
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3682
|
+
header: () => /* @__PURE__ */ jsx18(DateHeader, {}),
|
|
3683
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(DateCell, { date: new Date(getValue()) })
|
|
3644
3684
|
}),
|
|
3645
3685
|
columnHelper.accessor("payment_status", {
|
|
3646
|
-
header: () => /* @__PURE__ */
|
|
3647
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3686
|
+
header: () => /* @__PURE__ */ jsx18(PaymentStatusHeader, {}),
|
|
3687
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(PaymentStatusCell, { status: getValue() })
|
|
3648
3688
|
}),
|
|
3649
3689
|
columnHelper.accessor("fulfillment_status", {
|
|
3650
|
-
header: () => /* @__PURE__ */
|
|
3651
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3690
|
+
header: () => /* @__PURE__ */ jsx18(FulfillmentStatusHeader, {}),
|
|
3691
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(FulfillmentStatusCell, { status: getValue() })
|
|
3652
3692
|
}),
|
|
3653
3693
|
columnHelper.accessor("total", {
|
|
3654
|
-
header: () => /* @__PURE__ */
|
|
3655
|
-
cell: ({ getValue, row }) => /* @__PURE__ */
|
|
3694
|
+
header: () => /* @__PURE__ */ jsx18(TotalHeader, {}),
|
|
3695
|
+
cell: ({ getValue, row }) => /* @__PURE__ */ jsx18(
|
|
3656
3696
|
TotalCell,
|
|
3657
3697
|
{
|
|
3658
3698
|
currencyCode: row.original.currency_code,
|
|
@@ -3666,15 +3706,14 @@ var useColumns = () => {
|
|
|
3666
3706
|
};
|
|
3667
3707
|
|
|
3668
3708
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
3669
|
-
import { jsx as
|
|
3709
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3670
3710
|
var Root = ({ children }) => {
|
|
3671
3711
|
const initialData = useLoaderData();
|
|
3672
3712
|
const { id } = useParams2();
|
|
3713
|
+
const query = useLinkQuery("order", DEFAULT_FIELDS);
|
|
3673
3714
|
const { order: rawOrder, isLoading, isError, error } = useOrder(
|
|
3674
3715
|
id,
|
|
3675
|
-
|
|
3676
|
-
fields: DEFAULT_FIELDS
|
|
3677
|
-
},
|
|
3716
|
+
query,
|
|
3678
3717
|
{
|
|
3679
3718
|
initialData
|
|
3680
3719
|
}
|
|
@@ -3695,12 +3734,12 @@ var Root = ({ children }) => {
|
|
|
3695
3734
|
id
|
|
3696
3735
|
);
|
|
3697
3736
|
if (isLoading || !order || isPreviewLoading) {
|
|
3698
|
-
return /* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsx19(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
|
|
3699
3738
|
}
|
|
3700
3739
|
if (isError) {
|
|
3701
3740
|
throw error;
|
|
3702
3741
|
}
|
|
3703
|
-
return Children.count(children) > 0 ? /* @__PURE__ */
|
|
3742
|
+
return Children.count(children) > 0 ? /* @__PURE__ */ jsx19(
|
|
3704
3743
|
TwoColumnPage,
|
|
3705
3744
|
{
|
|
3706
3745
|
data: order,
|
|
@@ -3710,7 +3749,7 @@ var Root = ({ children }) => {
|
|
|
3710
3749
|
"data-testid": "order-detail-page",
|
|
3711
3750
|
children
|
|
3712
3751
|
}
|
|
3713
|
-
) : /* @__PURE__ */
|
|
3752
|
+
) : /* @__PURE__ */ jsxs19(
|
|
3714
3753
|
TwoColumnPage,
|
|
3715
3754
|
{
|
|
3716
3755
|
data: order,
|
|
@@ -3719,22 +3758,21 @@ var Root = ({ children }) => {
|
|
|
3719
3758
|
hasOutlet: true,
|
|
3720
3759
|
"data-testid": "order-detail-page",
|
|
3721
3760
|
children: [
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */
|
|
3725
|
-
/* @__PURE__ */
|
|
3726
|
-
/* @__PURE__ */
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
/* @__PURE__ */
|
|
3730
|
-
/* @__PURE__ */
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
/* @__PURE__ */
|
|
3735
|
-
/* @__PURE__ */
|
|
3736
|
-
|
|
3737
|
-
] })
|
|
3761
|
+
/* @__PURE__ */ jsx19(TwoColumnPage.Main, { "data-testid": "order-detail-main", children: /* @__PURE__ */ jsxs19(WidgetZone, { id: "orders.detail.main", data: order, children: [
|
|
3762
|
+
/* @__PURE__ */ jsx19(OrderActiveEditSection, { order }),
|
|
3763
|
+
/* @__PURE__ */ jsx19(ActiveOrderClaimSection, { orderPreview }),
|
|
3764
|
+
/* @__PURE__ */ jsx19(ActiveOrderExchangeSection, { orderPreview }),
|
|
3765
|
+
/* @__PURE__ */ jsx19(ActiveOrderReturnSection, { orderPreview }),
|
|
3766
|
+
/* @__PURE__ */ jsx19(OrderGeneralSection, { order }),
|
|
3767
|
+
/* @__PURE__ */ jsx19(OrderSummarySection, { order }),
|
|
3768
|
+
/* @__PURE__ */ jsx19(OrderPaymentSection, { order }),
|
|
3769
|
+
/* @__PURE__ */ jsx19(OrderFulfillmentSection, { order })
|
|
3770
|
+
] }) }),
|
|
3771
|
+
/* @__PURE__ */ jsx19(TwoColumnPage.Sidebar, { "data-testid": "order-detail-sidebar", children: /* @__PURE__ */ jsxs19(WidgetZone, { id: "orders.detail.side", data: order, children: [
|
|
3772
|
+
/* @__PURE__ */ jsx19(OrderCustomerSection, { order }),
|
|
3773
|
+
/* @__PURE__ */ jsx19(OrderActivitySection, { order }),
|
|
3774
|
+
/* @__PURE__ */ jsx19(OrderRemainingOrdersGroupSection, {})
|
|
3775
|
+
] }) })
|
|
3738
3776
|
]
|
|
3739
3777
|
}
|
|
3740
3778
|
);
|