@mercurjs/admin 2.2.0-canary.5 → 2.2.0-canary.50
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-FAG3FAOF.js → add-campaign-promotions-QQUFYFRH.js} +14 -14
- package/dist/{adjust-inventory-EAAPNIBZ.js → adjust-inventory-P2M7KZ77.js} +33 -34
- package/dist/{api-key-management-create-MRLR4WFZ.js → api-key-management-create-KDKSGJ4C.js} +5 -5
- package/dist/{api-key-management-detail-PIN6NFQF.js → api-key-management-detail-O6KKT7V2.js} +36 -38
- package/dist/{api-key-management-edit-EZHFP3RR.js → api-key-management-edit-NOGBLKBT.js} +5 -5
- package/dist/{api-key-management-list-OPANEDHB.js → api-key-management-list-QVYDHEZQ.js} +9 -9
- package/dist/{api-key-management-sales-channels-PBL3V4IS.js → api-key-management-sales-channels-W5NFP6EW.js} +9 -10
- package/dist/{attribute-create-F55LOXRA.js → attribute-create-KR4DSDH2.js} +96 -83
- package/dist/{attribute-create-possible-value-EXVHC272.js → attribute-create-possible-value-QFXKXZM4.js} +2 -2
- package/dist/{attribute-detail-NRDJUPTJ.js → attribute-detail-LWKL6UMS.js} +61 -49
- package/dist/{attribute-edit-SB6GN67M.js → attribute-edit-WXO5FGR6.js} +7 -7
- package/dist/{attribute-edit-possible-value-5CLQOLVR.js → attribute-edit-possible-value-RO7BY3NC.js} +5 -5
- package/dist/{attribute-edit-ranking-7AAAYEC7.js → attribute-edit-ranking-YGR3KCSC.js} +3 -3
- package/dist/attribute-list-QUSXFHRZ.js +61 -0
- package/dist/breadcrumb-GHBR74WM.js +27 -0
- package/dist/breadcrumb-OBHTESQD.js +26 -0
- package/dist/{campaign-budget-edit-WKSYXTBX.js → campaign-budget-edit-QXAXRI6B.js} +3 -3
- package/dist/{campaign-configuration-ZTK46EB5.js → campaign-configuration-A3E6G2VQ.js} +3 -3
- package/dist/{campaign-create-7BELREFT.js → campaign-create-TZH66JVU.js} +7 -7
- package/dist/{campaign-detail-QMLFWZ6K.js → campaign-detail-PF3LUUZU.js} +49 -46
- package/dist/{campaign-edit-ZGLDY4X4.js → campaign-edit-6CIGS4ZU.js} +25 -9
- package/dist/{campaign-list-NQGNOFVZ.js → campaign-list-YXZ5GE7I.js} +7 -7
- package/dist/{categories-metadata-5GXBBHEH.js → categories-metadata-AIT33J5U.js} +34 -35
- package/dist/{category-create-QPQQGIEN.js → category-create-NTSIOKLK.js} +10 -7
- package/dist/category-detail-NQIXS2WH.js +113 -0
- package/dist/{category-edit-DJP7TK4X.js → category-edit-4PGWERPJ.js} +31 -13
- package/dist/category-icon-edit-C2VAH5JA.js +117 -0
- package/dist/{category-list-T5SE63HU.js → category-list-5XGK4PEB.js} +12 -9
- package/dist/category-media-E5UUDN3I.js +655 -0
- package/dist/category-organize-T45BC4HL.js +129 -0
- package/dist/{category-products-255EJFTV.js → category-products-SX6CH3ZZ.js} +48 -48
- package/dist/{chunk-G3GSRFTB.js → chunk-26PTCTT3.js} +9 -8
- package/dist/{chunk-XAIID3PU.js → chunk-2CHED2KM.js} +25 -16
- package/dist/{chunk-FFNSWUDC.js → chunk-2GHNKPYY.js} +39 -11
- package/dist/{chunk-3JSAS7QP.js → chunk-2SMBVF6F.js} +24 -7
- package/dist/{chunk-WQFFCK3R.js → chunk-2V74T2WI.js} +1 -1
- package/dist/{chunk-26UTIAAZ.js → chunk-32URSQ4F.js} +1 -1
- package/dist/chunk-3LGGCLSO.js +185 -0
- package/dist/chunk-3RRHQY24.js +1284 -0
- package/dist/{chunk-6RHAGO5O.js → chunk-3WOU2BB5.js} +5 -4
- package/dist/{chunk-VKOE5J66.js → chunk-3XOE4NV5.js} +11 -2
- package/dist/{chunk-GP4J42UD.js → chunk-4TNOZ4VH.js} +3 -2
- package/dist/{chunk-UNOG2S56.js → chunk-4XGFT4RZ.js} +167 -102
- package/dist/{chunk-JQV7CXEC.js → chunk-5BSSIDW6.js} +17 -2
- package/dist/{chunk-FB7DDNCA.js → chunk-5CHUXS7G.js} +4 -4
- package/dist/{chunk-PR7Y27BW.js → chunk-5EOYDQAS.js} +1 -1
- package/dist/{chunk-LYZDVZWA.js → chunk-5NSOIZFB.js} +5 -3
- package/dist/{chunk-SS7LB52P.js → chunk-5WTNXDRM.js} +10 -9
- package/dist/chunk-6BAPAIQM.js +8 -0
- package/dist/{chunk-D2NBZVQC.js → chunk-6PGIRZA6.js} +15 -13
- package/dist/{chunk-NQEXDLYH.js → chunk-6ZVV2XHU.js} +28 -9
- package/dist/{chunk-TXNRS2JR.js → chunk-7CQD5AQ6.js} +2 -6
- package/dist/chunk-7IGLZARZ.js +101 -0
- package/dist/{chunk-SONUZNDT.js → chunk-7MYE6VFQ.js} +75 -53
- package/dist/chunk-7OKYEA6I.js +283 -0
- package/dist/{chunk-GKGLVDDV.js → chunk-A2F5MDPU.js} +1 -1
- package/dist/{chunk-NUC27ELX.js → chunk-AASCLZ5N.js} +5 -5
- package/dist/{chunk-46A3QXAL.js → chunk-ABS7HMLY.js} +2 -2
- package/dist/{chunk-PRBE5CM3.js → chunk-AFYILTAC.js} +35 -3
- package/dist/{chunk-KMZOBR5Q.js → chunk-AO3P27WX.js} +19 -16
- package/dist/chunk-APAT344J.js +144 -0
- package/dist/{chunk-NMFVQDVF.js → chunk-APMBU7ZV.js} +5 -5
- package/dist/{chunk-EFZBEG7O.js → chunk-B3IK3FNO.js} +24 -8
- package/dist/{chunk-3VTAK3S6.js → chunk-BFUHW56P.js} +4 -4
- package/dist/chunk-BW7BDHZV.js +34 -0
- package/dist/{chunk-LYZT5REU.js → chunk-C4XKPQ6T.js} +14 -1
- package/dist/{chunk-N6SI4IIT.js → chunk-CARSKIPW.js} +1 -1
- package/dist/chunk-CGIVQ7D2.js +115 -0
- package/dist/{chunk-HR7TFO2X.js → chunk-CQKCZECQ.js} +7 -7
- package/dist/chunk-CU4UVEHX.js +121 -0
- package/dist/{chunk-M5AJSIRN.js → chunk-DJD3MWED.js} +1 -1
- package/dist/{chunk-HZQGZQTV.js → chunk-DP6YFZHP.js} +10 -8
- package/dist/{chunk-I5THQVYP.js → chunk-DUVYF37J.js} +1 -1
- package/dist/{chunk-FXWKGNRV.js → chunk-EJY35WBK.js} +2 -2
- package/dist/{chunk-KJSCFEXT.js → chunk-EQGJGBA5.js} +291 -76
- package/dist/{chunk-XJ3WC4G7.js → chunk-ESC6LVVC.js} +4 -3
- package/dist/{chunk-46M463BR.js → chunk-EWFOFSF7.js} +1 -1
- package/dist/{chunk-533GMKEG.js → chunk-F5NW4XBU.js} +23 -3
- package/dist/{chunk-5AZCIOS4.js → chunk-F6NPDZHW.js} +2 -2
- package/dist/{chunk-R5F52U3C.js → chunk-FIWEITDG.js} +36 -8
- package/dist/{chunk-UFGVU7RF.js → chunk-FLFE6HXW.js} +1 -1
- package/dist/{chunk-4LXBQTFN.js → chunk-FREUYHMS.js} +1 -1
- package/dist/{chunk-2ZRWLCYP.js → chunk-FVG5DTS6.js} +3 -3
- package/dist/{chunk-E5WBU7ZR.js → chunk-G2LHEJLS.js} +4 -4
- package/dist/{chunk-OHOWEMHO.js → chunk-G5KNNOXX.js} +32 -26
- package/dist/{chunk-CKUIM5ZD.js → chunk-GLWJ5J3F.js} +52 -23
- package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
- package/dist/{chunk-CKD5563X.js → chunk-GT5A4XN2.js} +4 -3
- package/dist/{chunk-MKBCBAS2.js → chunk-GVPKRQWI.js} +79 -28
- package/dist/{chunk-BFT3CN5L.js → chunk-GWW6MPYK.js} +5 -4
- package/dist/{chunk-VDKOJ5WD.js → chunk-GYRTURN7.js} +1 -1
- package/dist/{chunk-YFRC6GEN.js → chunk-HLL6GLZO.js} +3 -3
- package/dist/{chunk-BKNAX6QQ.js → chunk-I3RIVWBQ.js} +5 -4
- package/dist/{chunk-6NDM5WGE.js → chunk-I5HY5Q3K.js} +19 -72
- package/dist/{chunk-WJJXUXSO.js → chunk-IC2PLPRP.js} +1 -1
- package/dist/{chunk-L3E6LES5.js → chunk-IGTR66D2.js} +7 -7
- package/dist/{chunk-WRVGLMRW.js → chunk-IJ2CSCLP.js} +7 -4
- package/dist/{chunk-EZGIPTIF.js → chunk-IOAB3VND.js} +54 -19
- package/dist/chunk-IWBQZK6E.js +166 -0
- package/dist/chunk-IZDTQFCP.js +65 -0
- package/dist/{chunk-AEMDNTW5.js → chunk-J54BZXZX.js} +2 -2
- package/dist/{chunk-A7JOHU6Q.js → chunk-J772X4Q3.js} +4 -3
- package/dist/{chunk-Y2M536WR.js → chunk-JHBNG7OD.js} +17 -0
- package/dist/{chunk-LYD3C73Z.js → chunk-JI7HMGMO.js} +1 -1
- package/dist/{chunk-5J2HQOKK.js → chunk-JPFPQWNT.js} +5 -4
- package/dist/{chunk-KT7X72J4.js → chunk-JXSXBSV6.js} +9 -1
- package/dist/chunk-K2JORJRZ.js +281 -0
- package/dist/{chunk-33BERJSG.js → chunk-K6RZE3F7.js} +1 -1
- package/dist/{chunk-MFI5TG54.js → chunk-KA3BALYJ.js} +56 -16
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-VERWLDVW.js → chunk-KL4DBMVO.js} +6 -5
- package/dist/{chunk-EBQUMS7H.js → chunk-KQVRWXAL.js} +50 -20
- package/dist/chunk-KUBTN5TC.js +206 -0
- package/dist/{chunk-Q2ULPJJ6.js → chunk-KXWN75T2.js} +2 -2
- package/dist/{chunk-MVNO35S5.js → chunk-L6D7AGRF.js} +18 -8
- package/dist/{chunk-LAPEZATU.js → chunk-L7DIEO5B.js} +1 -1
- package/dist/{chunk-YYMACYP6.js → chunk-LEQINL55.js} +3 -2
- package/dist/{chunk-CMHI2RPL.js → chunk-LPIPSLR7.js} +21 -0
- package/dist/chunk-LXNWSQOE.js +87 -0
- package/dist/{chunk-ZBWL72TB.js → chunk-LXZXXOJ3.js} +1 -11
- package/dist/{chunk-GQLVERZW.js → chunk-M5BZBKA3.js} +9 -9
- package/dist/{chunk-4XFFF2L5.js → chunk-MBHP7XGQ.js} +12 -11
- package/dist/{chunk-KXIA66EJ.js → chunk-MJTFEVGB.js} +36 -13
- package/dist/{chunk-ZRFWXNT3.js → chunk-MMKUMSZS.js} +205 -205
- package/dist/{chunk-DAXXLQKB.js → chunk-MO7TNIVQ.js} +1 -1
- package/dist/{chunk-ZN7LWXVC.js → chunk-MTHPNKQ4.js} +5 -5
- package/dist/{chunk-2YN2OI3W.js → chunk-MVRIYUOU.js} +34 -8
- package/dist/{chunk-K43FFKGD.js → chunk-N2CMOV3N.js} +1 -1
- package/dist/chunk-NASXWD7N.js +659 -0
- package/dist/{chunk-UXGLM3B4.js → chunk-NEGOGYEO.js} +4 -4
- package/dist/{chunk-3OUWXGMT.js → chunk-NI4FAFNL.js} +129 -61
- package/dist/{chunk-SXGSYSW7.js → chunk-NLJ5F7FS.js} +15 -7
- package/dist/{chunk-DWCBB4QM.js → chunk-NPUD4G37.js} +7 -6
- package/dist/{chunk-YNHS5G26.js → chunk-NQ2RDSI3.js} +2 -2
- package/dist/{chunk-6XTHMAA2.js → chunk-O6KUSG6F.js} +31 -13
- package/dist/{chunk-KTBL35I2.js → chunk-OAGTPKC5.js} +1 -1
- package/dist/chunk-ODDJZVYL.js +476 -0
- package/dist/{chunk-Q23KHB6V.js → chunk-OG5AVHPY.js} +111 -29
- package/dist/{chunk-AKC67AN5.js → chunk-OPE24DZA.js} +83 -63
- package/dist/{chunk-C4JUURO5.js → chunk-OT5X3VOQ.js} +1 -1
- package/dist/chunk-OTGABFC4.js +382 -0
- package/dist/{chunk-LD7NVG2X.js → chunk-P2DFLKCN.js} +5 -5
- package/dist/{chunk-634XVU3D.js → chunk-PAYQJPGK.js} +8 -1
- package/dist/{chunk-CPXK5RSJ.js → chunk-PEUWV5YK.js} +3 -2
- package/dist/{chunk-DRJAKRTI.js → chunk-PEVS3GLB.js} +7 -6
- package/dist/{chunk-34OFJ74B.js → chunk-PFD4SHVF.js} +53 -36
- package/dist/{chunk-FNKBJCNF.js → chunk-PHWYJ26A.js} +4 -4
- package/dist/{chunk-VYMODH6P.js → chunk-PYF5EER5.js} +1 -1
- package/dist/{chunk-7BD24KNM.js → chunk-PYZ7VL5X.js} +3 -3
- package/dist/{chunk-QFE4AEQJ.js → chunk-Q2CJGCIA.js} +401 -107
- package/dist/{chunk-X7H7TIOT.js → chunk-Q4R2O7XF.js} +9 -9
- package/dist/{chunk-5TRY5IMZ.js → chunk-Q6GUA5VE.js} +2 -2
- package/dist/{chunk-B66CMFMH.js → chunk-QCIDV3AP.js} +3 -3
- package/dist/{chunk-TNNQPNXY.js → chunk-QE4R2KT3.js} +1 -1
- package/dist/{chunk-FPV32HVT.js → chunk-QEX45BI3.js} +8 -6
- package/dist/chunk-QJCUPZZQ.js +356 -0
- package/dist/chunk-QR3GYYX6.js +0 -0
- package/dist/{chunk-3B6MTW5G.js → chunk-QUHSHIAC.js} +3 -0
- package/dist/{chunk-EB5QHYKL.js → chunk-QVIX6O76.js} +2 -2
- package/dist/{chunk-OH4AABUT.js → chunk-R325CPYC.js} +1 -1
- package/dist/{chunk-JPNPTILP.js → chunk-R4O667NT.js} +1 -1
- package/dist/{chunk-UKDC2AQR.js → chunk-RMB7MPIT.js} +1 -1
- package/dist/{chunk-2FGRDEAD.js → chunk-RQQ53CQJ.js} +1 -1
- package/dist/{chunk-LEG67A2R.js → chunk-SAU35JEB.js} +2 -11
- package/dist/{chunk-BGQ7H2KL.js → chunk-SHFF3Y5U.js} +26 -12
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/{chunk-IAWZQKUH.js → chunk-THMINQBZ.js} +4 -3
- package/dist/{chunk-LO7NJYHZ.js → chunk-TJJ7S3GL.js} +5 -4
- package/dist/{chunk-LXMGYWPO.js → chunk-TVTI7RG5.js} +10 -9
- package/dist/{chunk-J4MAIN7L.js → chunk-UK5BVJI7.js} +2 -2
- package/dist/{chunk-P42E3L6Z.js → chunk-VH4W6LKI.js} +4 -3
- package/dist/{chunk-ESPLVOFC.js → chunk-VHCDSNXF.js} +2 -2
- package/dist/{chunk-GPJ6KVY2.js → chunk-VHOCBKSA.js} +7 -6
- package/dist/chunk-VM56ZITS.js +356 -0
- package/dist/{chunk-4KX6CBJ4.js → chunk-VSLHL2AZ.js} +2 -0
- package/dist/{chunk-N3334MXP.js → chunk-VU6KTPOZ.js} +647 -754
- package/dist/{chunk-K6L5PHHQ.js → chunk-VVJPSCBO.js} +10 -9
- package/dist/{chunk-EPHVGD5Z.js → chunk-VXW3BCN2.js} +1 -1
- package/dist/{chunk-F5H5JZQZ.js → chunk-VYSB4CTB.js} +2112 -1706
- package/dist/{chunk-N3BYBEDV.js → chunk-WF3ZDT5Z.js} +11 -95
- package/dist/{chunk-X3PXBMI3.js → chunk-WNBV2NBG.js} +11 -10
- package/dist/{chunk-F7O6IXPA.js → chunk-WV4SPFOD.js} +72 -30
- package/dist/{chunk-ZB4SO44T.js → chunk-WX4ABVXL.js} +3 -3
- package/dist/{chunk-WYA62MUL.js → chunk-X5PMVI7H.js} +3 -3
- package/dist/{chunk-2MVNFKL6.js → chunk-XJQ4MWBR.js} +16 -15
- package/dist/{chunk-DV7QV3X2.js → chunk-XWP4ZGKN.js} +11 -16
- package/dist/{chunk-IWI34SYT.js → chunk-Y6C2YIKD.js} +8 -7
- package/dist/{chunk-CVFVEDMV.js → chunk-YBVXGODN.js} +4 -3
- package/dist/{chunk-X45JKZYW.js → chunk-YL7CBNVF.js} +11 -8
- package/dist/chunk-YPM6XXSO.js +525 -0
- package/dist/{chunk-S4SVK5DE.js → chunk-YVLANFBK.js} +29 -1
- package/dist/{chunk-3L7M4E7W.js → chunk-YXKHBSQJ.js} +14 -188
- package/dist/{chunk-IMR3MZDP.js → chunk-Z6CIQQUZ.js} +3 -2
- package/dist/{chunk-ACDG3RAL.js → chunk-Z7XMG6DA.js} +89 -128
- package/dist/{chunk-4RT7P5ZQ.js → chunk-ZAANJVLM.js} +2 -2
- package/dist/{chunk-KAZ5BYTQ.js → chunk-ZAOEFQ6K.js} +5 -4
- package/dist/{chunk-SA3MMYXT.js → chunk-ZCQMFJ4X.js} +22 -10
- package/dist/{chunk-FEC24V7X.js → chunk-ZOTBKQLG.js} +2 -2
- package/dist/{chunk-COP7NFSJ.js → chunk-ZVPTNPLI.js} +3 -3
- package/dist/{collection-add-products-4ZTBHENL.js → collection-add-products-TRY52HYQ.js} +45 -46
- package/dist/{collection-create-GPBN7KO6.js → collection-create-7ZQONUJL.js} +89 -17
- package/dist/collection-detail-MQ7ZH6OT.js +104 -0
- package/dist/{collection-edit-NVRFKO46.js → collection-edit-ZFAECPWC.js} +35 -12
- package/dist/collection-icon-edit-642AZRHR.js +117 -0
- package/dist/collection-list-YMCTIJ52.js +85 -0
- package/dist/collection-media-LMJFEFVY.js +655 -0
- package/dist/{collection-metadata-E4C54MTU.js → collection-metadata-AZRN32RU.js} +34 -35
- package/dist/commission-rule-commission-edit-V5JVRNZN.js +195 -0
- package/dist/commission-rule-create-EZ2C6AWK.js +464 -0
- package/dist/commission-rule-detail-FOLHANWL.js +45 -0
- package/dist/commission-rule-edit-NQ5EYCGO.js +352 -0
- package/dist/commissions-list-56S53CQ4.js +36 -0
- package/dist/{constants-Bahlh59D.d.ts → constants-CBhKGpBZ.d.ts} +12 -5
- package/dist/{customer-create-QHA4KM6N.js → customer-create-SC6LAEVJ.js} +3 -3
- package/dist/{customer-create-address-TYWVWNUE.js → customer-create-address-VZMOF5AE.js} +11 -6
- package/dist/{customer-detail-ONZGPCHW.js → customer-detail-VIWHZUOZ.js} +51 -52
- package/dist/{customer-edit-JZ4PQTIN.js → customer-edit-RAWO66UL.js} +27 -9
- package/dist/customer-edit-address-ZEVUPAYN.js +311 -0
- package/dist/{customer-group-add-customers-VJUBEN7M.js → customer-group-add-customers-VKUSW6AS.js} +13 -13
- package/dist/{customer-group-create-NA2UKCF6.js → customer-group-create-3KAC3R3N.js} +3 -3
- package/dist/{customer-group-detail-XTCDJX7O.js → customer-group-detail-JVULZZTT.js} +51 -49
- package/dist/{customer-group-edit-3O6HAYYN.js → customer-group-edit-E7JX2L4J.js} +43 -22
- package/dist/customer-group-list-SKODEZKB.js +57 -0
- package/dist/{customer-group-metadata-N7HGHXNC.js → customer-group-metadata-3QRU7FIE.js} +34 -35
- package/dist/{customer-list-MB6WZFMA.js → customer-list-LYDL4IEG.js} +9 -9
- package/dist/{customer-metadata-63OWV4KB.js → customer-metadata-7DMBCQXW.js} +34 -35
- package/dist/{customers-add-customer-group-NUXPXNUC.js → customers-add-customer-group-FXRUE5SD.js} +46 -46
- package/dist/{edit-inventory-item-YOJTYA7H.js → edit-inventory-item-QPWV4MSP.js} +55 -41
- package/dist/{edit-inventory-item-attributes-JGY633F2.js → edit-inventory-item-attributes-J7WHYKMK.js} +33 -34
- package/dist/{edit-reservation-ACDUXG33.js → edit-reservation-PTUSCC6C.js} +29 -11
- package/dist/{edit-rules-4VAD5Q3L.js → edit-rules-2WZOLTL7.js} +34 -35
- package/dist/extension-targets.d.ts +269 -0
- package/dist/extension-targets.js +1 -0
- package/dist/global-commission-edit-TRSS5JBH.js +203 -0
- package/dist/index.css +5187 -3
- package/dist/index.d.ts +16 -5
- package/dist/index.js +405 -383
- package/dist/inventory-create-RDVKGH2S.js +58 -0
- package/dist/{inventory-detail-B3HU2OVR.js → inventory-detail-J7NMO7EZ.js} +50 -47
- package/dist/{inventory-list-AE44PEW7.js → inventory-list-XBDJ7BHE.js} +8 -8
- package/dist/{inventory-metadata-WCFTI7AH.js → inventory-metadata-CQHLKX4T.js} +34 -35
- package/dist/{inventory-stock-M65W4GRN.js → inventory-stock-3TR47RNA.js} +38 -39
- package/dist/{invite-VQ2HR2OM.js → invite-25CGHT4W.js} +3 -3
- package/dist/loader-TIPLOZF7.js +32 -0
- package/dist/loader-ZYV22XGC.js +40 -0
- package/dist/{location-create-ZMNB7YKR.js → location-create-GKORXOYD.js} +3 -3
- package/dist/{location-detail-2NCZD5MO.js → location-detail-DTBVSZBJ.js} +36 -37
- package/dist/{location-edit-DMBF3CYZ.js → location-edit-T2CWF6N2.js} +3 -3
- package/dist/{location-fulfillment-providers-3XKOFATD.js → location-fulfillment-providers-P5U5K4NO.js} +46 -47
- package/dist/location-list-LH27WJBT.js +54 -0
- package/dist/{location-sales-channels-TEUZYDTT.js → location-sales-channels-PRQUBZIV.js} +9 -10
- package/dist/{location-service-zone-create-ZS3UWJAA.js → location-service-zone-create-O6GYRZEE.js} +11 -11
- package/dist/{location-service-zone-edit-MTGU2O4C.js → location-service-zone-edit-7ZTB45TD.js} +5 -5
- package/dist/{location-service-zone-manage-areas-S7QZTIFT.js → location-service-zone-manage-areas-DBP3P27I.js} +11 -11
- package/dist/location-service-zone-shipping-option-create-Z3S7EUYH.js +60 -0
- package/dist/{location-service-zone-shipping-option-edit-3PGSNKYT.js → location-service-zone-shipping-option-edit-SLQM4GSH.js} +7 -7
- package/dist/{location-service-zone-shipping-option-pricing-POBJOF3Z.js → location-service-zone-shipping-option-pricing-UZ577SNK.js} +9 -9
- package/dist/{login-DJWU5X5L.js → login-JNIVGP2G.js} +32 -33
- package/dist/{manage-locations-E2XQPKKE.js → manage-locations-NGNUXP3N.js} +3 -3
- package/dist/{marketplace-add-currencies-6ANNBGZM.js → marketplace-add-currencies-IPE5RJF6.js} +13 -13
- package/dist/marketplace-detail-VNCNRAE4.js +75 -0
- package/dist/{marketplace-edit-6Q3G2OY5.js → marketplace-edit-WG6LMQ2P.js} +5 -5
- package/dist/{marketplace-metadata-7DNBHUDD.js → marketplace-metadata-74YUQ6UC.js} +34 -35
- package/dist/offer-detail-page-KQMSZLQN.js +631 -0
- package/dist/offer-variant-detail-page-GESVAA2S.js +144 -0
- package/dist/offers-NW24IATZ.js +198 -0
- package/dist/{order-create-claim-MPSXY24H.js → order-create-claim-Y7ESDXLI.js} +284 -259
- package/dist/{order-create-edit-6JLXERBY.js → order-create-edit-CAKL6MJQ.js} +215 -120
- package/dist/{order-create-exchange-O6COEAGJ.js → order-create-exchange-QGSECB7D.js} +302 -275
- package/dist/{order-create-refund-TCNCSOMX.js → order-create-refund-HXFCDZV5.js} +37 -38
- package/dist/{order-create-return-EVSD6GKE.js → order-create-return-R5WJBQ5W.js} +58 -31
- package/dist/{order-detail-BOW62X75.js → order-detail-DGZXN7IQ.js} +53 -51
- package/dist/{order-edit-billing-address-5ZBOWDWQ.js → order-edit-billing-address-ZAQ3FPRT.js} +35 -36
- package/dist/{order-edit-email-DQJW2SAM.js → order-edit-email-VSAS3M2E.js} +34 -35
- package/dist/{order-edit-shipping-address-RIML4XFQ.js → order-edit-shipping-address-FZMDRJU5.js} +34 -35
- package/dist/{order-list-U5DZYLJK.js → order-list-6LIYSO2R.js} +19 -18
- package/dist/{order-metadata-WGZUETFN.js → order-metadata-FKM3ZDNM.js} +34 -35
- package/dist/{order-request-transfer-QFUMEZPD.js → order-request-transfer-BCE6ED5E.js} +34 -35
- package/dist/pages/index.d.ts +574 -491
- package/dist/pages/index.js +204 -206
- package/dist/{payout-detail-TWO6HN4E.js → payout-detail-LY7SRCKO.js} +3 -3
- package/dist/{payout-list-7WJZFNW5.js → payout-list-VUJKOAOJ.js} +8 -8
- package/dist/{price-list-configuration-O3MR5IUA.js → price-list-configuration-DYFBYDQE.js} +14 -13
- package/dist/price-list-create-U2DMHUQE.js +77 -0
- package/dist/price-list-detail-CAK3AFSU.js +108 -0
- package/dist/{price-list-edit-OJAYEUYO.js → price-list-edit-4JPSL2NL.js} +28 -12
- package/dist/{price-list-list-ARICU2NA.js → price-list-list-PJIIPQOF.js} +11 -11
- package/dist/price-list-prices-add-6TO5RTTD.js +72 -0
- package/dist/{price-list-prices-edit-4HBSUC5W.js → price-list-prices-edit-AXJJTMKL.js} +35 -36
- package/dist/{product-add-existing-attributes-IHCIKDIH.js → product-add-existing-attributes-XIJB2NXI.js} +93 -54
- package/dist/{product-attributes-ZURXNZ3J.js → product-attributes-PCZDEFHM.js} +4 -4
- package/dist/{product-bulk-edit-LHCPVFUX.js → product-bulk-edit-FGB4T2KQ.js} +4 -4
- package/dist/product-create-KCMW6PCB.js +71 -0
- package/dist/{product-create-attribute-UBWABT2Q.js → product-create-attribute-6AJPI6IJ.js} +92 -54
- package/dist/{product-create-variant-MVYZPDO7.js → product-create-variant-2OCZA6GW.js} +8 -8
- package/dist/product-detail-A6DZWYEL.js +110 -0
- package/dist/{product-edit-EDW3D2KW.js → product-edit-KMK7CMLI.js} +9 -5
- package/dist/product-edit-attribute-FCEYWZWL.js +336 -0
- package/dist/product-list-CIHKL6N7.js +90 -0
- package/dist/{product-media-J3VTWOU4.js → product-media-P57SRDNX.js} +14 -17
- package/dist/{product-metadata-T2D4GEIP.js → product-metadata-6EFF4IPX.js} +35 -36
- package/dist/{product-organization-D6UMZAUE.js → product-organization-QNCCL277.js} +84 -51
- package/dist/{product-sales-channels-NTT6KMSD.js → product-sales-channels-GD7NYUP3.js} +8 -9
- package/dist/{product-shipping-profile-WM7LORFB.js → product-shipping-profile-UFIRKPTG.js} +4 -4
- package/dist/{product-tag-create-47G425O2.js → product-tag-create-PSY5Q437.js} +33 -34
- package/dist/{product-tag-detail-VNGOBWYE.js → product-tag-detail-D54OKWUZ.js} +58 -57
- package/dist/{product-tag-edit-DN7IVL75.js → product-tag-edit-NVGUS3CY.js} +33 -34
- package/dist/{product-tag-list-ZGRJZT2U.js → product-tag-list-QNWZAU5G.js} +58 -57
- package/dist/{product-tag-metadata-YLDBRJMI.js → product-tag-metadata-T4ZYOIXY.js} +34 -35
- package/dist/{product-type-create-RHG4KEAV.js → product-type-create-PPTAW3DW.js} +3 -3
- package/dist/{product-type-detail-MPONGCVO.js → product-type-detail-TXZ6HTOV.js} +44 -45
- package/dist/{product-type-edit-CABB7R7Y.js → product-type-edit-55AH3P7G.js} +3 -3
- package/dist/{product-type-list-TM26QMHR.js → product-type-list-OZILJZLG.js} +8 -8
- package/dist/{product-type-metadata-TDAER7JD.js → product-type-metadata-OJJYUALT.js} +34 -35
- package/dist/{product-variant-detail-5BF6JTHV.js → product-variant-detail-FZL5OZFE.js} +33 -34
- package/dist/{product-variant-edit-2RHFG2CZ.js → product-variant-edit-LSSJW4DS.js} +35 -36
- package/dist/{product-variant-metadata-G2LLH7YK.js → product-variant-metadata-D5AUINFJ.js} +34 -35
- package/dist/{profile-detail-ZRL5SERS.js → profile-detail-PFJX3LPX.js} +3 -3
- package/dist/{profile-edit-HQTWYWZ7.js → profile-edit-O6Z3XJ4U.js} +3 -3
- package/dist/{promotion-add-campaign-S3JJSFHT.js → promotion-add-campaign-PYEBYRHK.js} +7 -7
- package/dist/promotion-create-OFLXF3RZ.js +57 -0
- package/dist/promotion-detail-H6S4JYYD.js +96 -0
- package/dist/{promotion-edit-details-TKRC5HES.js → promotion-edit-details-GXA4FDTK.js} +29 -17
- package/dist/{promotion-list-AFBLWKTJ.js → promotion-list-A3V4W5DY.js} +10 -10
- package/dist/{refund-reason-create-6RPQHIJI.js → refund-reason-create-HTTX2UGC.js} +33 -34
- package/dist/{refund-reason-edit-W2TVZB3N.js → refund-reason-edit-I7XXP4EP.js} +33 -34
- package/dist/{refund-reason-list-TS6JWYS4.js → refund-reason-list-YYCNRERE.js} +49 -48
- package/dist/{region-add-countries-COXN4LP3.js → region-add-countries-UO5A42HM.js} +12 -12
- package/dist/{region-create-P66Q65XY.js → region-create-7NA6RKWS.js} +13 -13
- package/dist/{region-detail-P2HHBYFV.js → region-detail-VA4FGEKA.js} +9 -9
- package/dist/{region-edit-XFE54SAO.js → region-edit-Z4VYO3TQ.js} +5 -5
- package/dist/{region-list-2XXKCDDX.js → region-list-WU4LTP5Y.js} +9 -9
- package/dist/{region-metadata-TNSJDCBM.js → region-metadata-RRUP56B2.js} +34 -35
- package/dist/{reservation-create-2TDZAX5A.js → reservation-create-3RVQVMRF.js} +5 -5
- package/dist/{reservation-detail-KFOVTTFH.js → reservation-detail-QOVPIIMC.js} +42 -39
- package/dist/{reservation-list-K4RPXJTO.js → reservation-list-SGGW2MSN.js} +9 -9
- package/dist/{reservation-metadata-HBFAVVPW.js → reservation-metadata-OAEUUCRG.js} +34 -35
- package/dist/{reset-password-3NYZNQPK.js → reset-password-7KNQD6OM.js} +3 -3
- package/dist/{return-reason-create-KED7446I.js → return-reason-create-DYJCGEOK.js} +3 -3
- package/dist/{return-reason-edit-57EU3XSE.js → return-reason-edit-A7ATUTCD.js} +3 -3
- package/dist/{return-reason-list-WBLPUYD4.js → return-reason-list-HMSZJDKI.js} +23 -21
- package/dist/{sales-channel-add-products-IHGDKRKH.js → sales-channel-add-products-6TXYF3HM.js} +46 -47
- package/dist/{sales-channel-create-MPZCRQBT.js → sales-channel-create-77PRY5T6.js} +4 -4
- package/dist/{sales-channel-detail-QCFO7VUA.js → sales-channel-detail-SYE4FUXD.js} +43 -44
- package/dist/{sales-channel-edit-GILK4QK3.js → sales-channel-edit-PBN2XYEI.js} +4 -4
- package/dist/sales-channel-list-4CNHLSBR.js +52 -0
- package/dist/{sales-channel-metadata-OEQVWJRQ.js → sales-channel-metadata-RXT26TCT.js} +34 -35
- package/dist/{shipping-option-type-create-SMXDCF6I.js → shipping-option-type-create-2EVIHSGN.js} +33 -34
- package/dist/{shipping-option-type-detail-MO3YRUVR.js → shipping-option-type-detail-BKFYUX2T.js} +34 -35
- package/dist/{shipping-option-type-edit-KO64TZS6.js → shipping-option-type-edit-LTH6PE7B.js} +33 -34
- package/dist/shipping-option-type-list-7NSGG7ZI.js +60 -0
- package/dist/{shipping-profile-create-UJNCCKKK.js → shipping-profile-create-HKYX4FKJ.js} +3 -3
- package/dist/{shipping-profile-detail-YAKZHWZI.js → shipping-profile-detail-FOPCKNOZ.js} +3 -3
- package/dist/{shipping-profile-metadata-FLTMLAZN.js → shipping-profile-metadata-WRFZ55C3.js} +34 -35
- package/dist/{shipping-profiles-list-JF2SQIQ7.js → shipping-profiles-list-AKSZ4O35.js} +7 -7
- package/dist/{store-address-edit-PKIBRFH4.js → store-address-edit-M6A37RFY.js} +4 -4
- package/dist/{store-bulk-edit-LW6ABDJK.js → store-bulk-edit-SYHKAJ6D.js} +5 -5
- package/dist/{store-closure-edit-OK7MTUHY.js → store-closure-edit-VE7D5F7I.js} +3 -3
- package/dist/{store-create-STR6YNFJ.js → store-create-6OQW7F4U.js} +37 -38
- package/dist/store-details-45RPSTMU.js +104 -0
- package/dist/{store-edit-KRBR5MGV.js → store-edit-HABD7SAL.js} +59 -21
- package/dist/store-list-XZU26QTH.js +82 -0
- package/dist/{store-member-invite-AKH3KHMF.js → store-member-invite-T5GCT6HV.js} +6 -6
- package/dist/{store-payment-details-edit-HOGHZMZC.js → store-payment-details-edit-JUM745OG.js} +3 -3
- package/dist/{store-professional-details-edit-DPJ4ZFDR.js → store-professional-details-edit-NKBYKBCA.js} +3 -3
- package/dist/{tax-region-create-NEKIT7TT.js → tax-region-create-SKBBBZXJ.js} +34 -35
- package/dist/tax-region-detail-UGD2KK2H.js +69 -0
- package/dist/{tax-region-edit-4PJV5F5X.js → tax-region-edit-N64TGNAG.js} +33 -34
- package/dist/{tax-region-list-FIBHEFVD.js → tax-region-list-GRZIXRD4.js} +8 -8
- package/dist/{tax-region-metadata-EYRFMJLL.js → tax-region-metadata-MKXFQ5B7.js} +34 -35
- package/dist/{tax-region-province-create-OVLIZPNP.js → tax-region-province-create-7YT2LNJG.js} +3 -3
- package/dist/{tax-region-province-detail-MTHKW7LW.js → tax-region-province-detail-LITAO6EZ.js} +40 -41
- package/dist/{tax-region-tax-override-create-OGW3MPBD.js → tax-region-tax-override-create-NCAWHUOU.js} +61 -62
- package/dist/{tax-region-tax-override-edit-LTZCYN4Y.js → tax-region-tax-override-edit-OOP7RQZR.js} +61 -62
- package/dist/{tax-region-tax-rate-create-KDN6G52Y.js → tax-region-tax-rate-create-3ZLVL3X3.js} +4 -4
- package/dist/{tax-region-tax-rate-edit-D4BFDDJ7.js → tax-region-tax-rate-edit-XVMPIJOF.js} +4 -4
- package/dist/{user-detail-2OTVNTCL.js → user-detail-4FDNMJ6W.js} +4 -4
- package/dist/{user-edit-MXS2DV37.js → user-edit-T3MZKULQ.js} +3 -3
- package/dist/{user-invite-HLZJ7FST.js → user-invite-FCWARLW5.js} +11 -11
- package/dist/{user-list-TR7RSGUO.js → user-list-62A6ZMIX.js} +7 -7
- package/dist/{user-metadata-GIR3A7WO.js → user-metadata-5UFWFXLX.js} +34 -35
- package/package.json +25 -17
- package/dist/[id]-272FUOXG.js +0 -503
- package/dist/attribute-list-URWKNTSJ.js +0 -62
- package/dist/category-detail-RIKOZMPK.js +0 -108
- package/dist/category-organize-DQQGAAJY.js +0 -112
- package/dist/chunk-2XVH2IJL.js +0 -473
- package/dist/chunk-54RTJBYO.js +0 -153
- package/dist/chunk-6WBQDJIH.js +0 -1733
- package/dist/chunk-7O6WJTBI.js +0 -139
- package/dist/chunk-AKTAFKIU.js +0 -228
- package/dist/chunk-CKNQJPAG.js +0 -135
- package/dist/chunk-DDANJIE7.js +0 -207
- package/dist/chunk-GVEF6UDT.js +0 -8
- package/dist/chunk-J65IXAGI.js +0 -292
- package/dist/chunk-LFKTHNWI.js +0 -83
- package/dist/chunk-MSESXKMA.js +0 -390
- package/dist/chunk-RXM4B6HR.js +0 -8
- package/dist/chunk-SWL7ZCP3.js +0 -11
- package/dist/chunk-TE245WV3.js +0 -371
- package/dist/chunk-UM7ZR3VU.js +0 -14
- package/dist/chunk-V5XHY5LP.js +0 -39
- package/dist/chunk-ZZ3XFIEM.js +0 -84
- package/dist/collection-detail-W7OC2ALM.js +0 -99
- package/dist/collection-list-B7LALPSA.js +0 -83
- package/dist/commission-rate-create-7MEIKAXK.js +0 -783
- package/dist/commission-rate-detail-XBMB3Y7S.js +0 -86
- package/dist/commission-rate-edit-XXUAGK5Q.js +0 -768
- package/dist/commission-rate-list-Y5XLEO67.js +0 -26
- package/dist/customer-group-list-63ER7WQH.js +0 -58
- package/dist/inventory-create-3NJZLSFO.js +0 -59
- package/dist/loader-O4EABIXE.js +0 -26
- package/dist/location-list-VS6V2FXE.js +0 -55
- package/dist/location-service-zone-shipping-option-create-LAM3OHBC.js +0 -61
- package/dist/marketplace-detail-IQLU7R3J.js +0 -76
- package/dist/offers-UJCSO3RD.js +0 -440
- package/dist/order-allocate-items-TMVWJUV3.js +0 -563
- package/dist/order-create-fulfillment-Y4HQ5YRS.js +0 -644
- package/dist/order-create-shipment-EWOJJXEM.js +0 -215
- package/dist/order-receive-return-MDUU4L4X.js +0 -563
- package/dist/price-list-create-J4AJG42T.js +0 -78
- package/dist/price-list-detail-D2ETNZ5N.js +0 -105
- package/dist/price-list-prices-add-FQLQ5DPX.js +0 -73
- package/dist/product-brand-create-B3ZJGHUQ.js +0 -171
- package/dist/product-brand-detail-O7UKYV4H.js +0 -100
- package/dist/product-brand-edit-3TQDHZNN.js +0 -179
- package/dist/product-brand-list-ZBPBSRQN.js +0 -30
- package/dist/product-brand-metadata-N2CJ5K3Z.js +0 -87
- package/dist/product-create-BQXFDMEP.js +0 -72
- package/dist/product-detail-I57XSYLB.js +0 -102
- package/dist/product-list-PR532XII.js +0 -88
- package/dist/promotion-create-G3M4UJX2.js +0 -58
- package/dist/promotion-detail-4EHU6FKF.js +0 -91
- package/dist/sales-channel-list-YNHR5EHL.js +0 -54
- package/dist/shipping-option-type-list-6C26GWDM.js +0 -61
- package/dist/store-details-3U4OEFWC.js +0 -122
- package/dist/store-list-PJ3U254I.js +0 -83
- package/dist/tax-region-detail-LVN5XSN5.js +0 -70
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
By
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OT5X3VOQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getFormattedAddress,
|
|
6
6
|
isSameAddress
|
|
@@ -18,19 +18,26 @@ import {
|
|
|
18
18
|
useCancelClaim,
|
|
19
19
|
useCancelClaimRequest,
|
|
20
20
|
useClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QCIDV3AP.js";
|
|
22
22
|
import {
|
|
23
23
|
useCancelExchange,
|
|
24
24
|
useCancelExchangeRequest,
|
|
25
25
|
useExchanges
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PYZ7VL5X.js";
|
|
27
27
|
import {
|
|
28
|
-
getReturnableQuantity
|
|
29
|
-
|
|
28
|
+
getReturnableQuantity,
|
|
29
|
+
useCancelReturn,
|
|
30
|
+
useCancelReturnRequest,
|
|
31
|
+
useReturns
|
|
32
|
+
} from "./chunk-YXKHBSQJ.js";
|
|
30
33
|
import {
|
|
31
34
|
useCancelOrderEdit,
|
|
32
35
|
useConfirmOrderEdit
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IGTR66D2.js";
|
|
37
|
+
import {
|
|
38
|
+
getPaymentsFromOrder,
|
|
39
|
+
getReservationsLimitCount
|
|
40
|
+
} from "./chunk-3KOTDGC2.js";
|
|
34
41
|
import {
|
|
35
42
|
formatProvider
|
|
36
43
|
} from "./chunk-VW56KWO2.js";
|
|
@@ -39,7 +46,7 @@ import {
|
|
|
39
46
|
} from "./chunk-XSX255FK.js";
|
|
40
47
|
import {
|
|
41
48
|
DEFAULT_FIELDS
|
|
42
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JHBNG7OD.js";
|
|
43
50
|
import {
|
|
44
51
|
FulfillmentStatusCell,
|
|
45
52
|
FulfillmentStatusHeader,
|
|
@@ -53,15 +60,6 @@ import {
|
|
|
53
60
|
DateCell,
|
|
54
61
|
DateHeader
|
|
55
62
|
} from "./chunk-25LYVP3C.js";
|
|
56
|
-
import {
|
|
57
|
-
getPaymentsFromOrder,
|
|
58
|
-
getReservationsLimitCount
|
|
59
|
-
} from "./chunk-3KOTDGC2.js";
|
|
60
|
-
import {
|
|
61
|
-
useCancelReturn,
|
|
62
|
-
useCancelReturnRequest,
|
|
63
|
-
useReturns
|
|
64
|
-
} from "./chunk-3L7M4E7W.js";
|
|
65
63
|
import {
|
|
66
64
|
getLocaleAmount,
|
|
67
65
|
getStylizedAmount,
|
|
@@ -71,45 +69,44 @@ import {
|
|
|
71
69
|
TextCell,
|
|
72
70
|
TextHeader
|
|
73
71
|
} from "./chunk-JHIMVLB2.js";
|
|
74
|
-
import {
|
|
75
|
-
_DataTable,
|
|
76
|
-
useDataTable
|
|
77
|
-
} from "./chunk-NQEXDLYH.js";
|
|
78
72
|
import {
|
|
79
73
|
TwoColumnPage
|
|
80
74
|
} from "./chunk-E74OUNA3.js";
|
|
81
75
|
import {
|
|
82
76
|
Thumbnail
|
|
83
77
|
} from "./chunk-WIYFXWRI.js";
|
|
78
|
+
import {
|
|
79
|
+
_DataTable,
|
|
80
|
+
useDataTable
|
|
81
|
+
} from "./chunk-6ZVV2XHU.js";
|
|
84
82
|
import {
|
|
85
83
|
useDate
|
|
86
84
|
} from "./chunk-UZWFZMOX.js";
|
|
87
85
|
import {
|
|
88
86
|
useCapturePayment,
|
|
89
87
|
useMarkPaymentCollectionAsPaid
|
|
90
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ABS7HMLY.js";
|
|
91
89
|
import {
|
|
92
90
|
useStockLocation
|
|
93
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-VXW3BCN2.js";
|
|
92
|
+
import {
|
|
93
|
+
useReservationItems
|
|
94
|
+
} from "./chunk-WX4ABVXL.js";
|
|
94
95
|
import {
|
|
95
96
|
useCancelOrder,
|
|
96
|
-
useCancelOrderFulfillment,
|
|
97
97
|
useCancelOrderTransfer,
|
|
98
|
-
useMarkOrderFulfillmentAsDelivered,
|
|
99
98
|
useOrder,
|
|
100
99
|
useOrderChanges,
|
|
100
|
+
useOrderCommissionLines,
|
|
101
101
|
useOrderLineItems,
|
|
102
102
|
useOrderPreview
|
|
103
|
-
} from "./chunk-
|
|
104
|
-
import {
|
|
105
|
-
useReservationItems
|
|
106
|
-
} from "./chunk-ZB4SO44T.js";
|
|
103
|
+
} from "./chunk-WF3ZDT5Z.js";
|
|
107
104
|
import {
|
|
108
105
|
useOrderGroupByOrderId
|
|
109
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-PYF5EER5.js";
|
|
110
107
|
import {
|
|
111
108
|
useCustomer
|
|
112
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-AFYILTAC.js";
|
|
113
110
|
import {
|
|
114
111
|
ActionMenu
|
|
115
112
|
} from "./chunk-BDGZ4EQO.js";
|
|
@@ -121,6 +118,7 @@ import {
|
|
|
121
118
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
122
119
|
import { Children } from "react";
|
|
123
120
|
import { useLoaderData, useParams as useParams2 } from "react-router-dom";
|
|
121
|
+
import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
|
|
124
122
|
|
|
125
123
|
// src/pages/orders/order-detail/components/active-order-claim-section/active-order-claim-section.tsx
|
|
126
124
|
import { ExclamationCircle } from "@medusajs/icons";
|
|
@@ -457,6 +455,7 @@ var OrderActiveEditSection = ({
|
|
|
457
455
|
|
|
458
456
|
// src/pages/orders/order-detail/components/order-activity-section/order-activity-section.tsx
|
|
459
457
|
import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
|
|
458
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
460
459
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
461
460
|
|
|
462
461
|
// src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
|
|
@@ -1382,37 +1381,88 @@ var OrderActivitySection = ({ order }) => {
|
|
|
1382
1381
|
const { t } = useTranslation8();
|
|
1383
1382
|
return /* @__PURE__ */ jsxs8(Container5, { className: "flex flex-col gap-y-8 px-6 py-4", "data-testid": "order-activity-section", children: [
|
|
1384
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") }) }) }),
|
|
1385
|
-
/* @__PURE__ */ jsx8(OrderTimeline, { order })
|
|
1384
|
+
/* @__PURE__ */ jsx8(OrderTimeline, { order }),
|
|
1385
|
+
/* @__PURE__ */ jsx8(DisplayExtensionZone, { model: "order", zone: "activity", data: order })
|
|
1386
|
+
] });
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1389
|
+
// src/pages/orders/order-detail/components/order-commission-section/order-commission-section.tsx
|
|
1390
|
+
import { Container as Container6, Heading as Heading6, Text as Text7 } from "@medusajs/ui";
|
|
1391
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
1392
|
+
import { useMemo as useMemo3 } from "react";
|
|
1393
|
+
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
1394
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1395
|
+
var OrderCommissionSection = ({
|
|
1396
|
+
order
|
|
1397
|
+
}) => {
|
|
1398
|
+
const { t } = useTranslation9();
|
|
1399
|
+
const { commission_lines, isLoading } = useOrderCommissionLines(order.id);
|
|
1400
|
+
const itemTitleById = useMemo3(() => {
|
|
1401
|
+
const map = /* @__PURE__ */ new Map();
|
|
1402
|
+
order.items?.forEach((item) => {
|
|
1403
|
+
map.set(item.id, item.product_title ?? item.title);
|
|
1404
|
+
});
|
|
1405
|
+
return map;
|
|
1406
|
+
}, [order.items]);
|
|
1407
|
+
if (isLoading || !commission_lines.length) {
|
|
1408
|
+
return null;
|
|
1409
|
+
}
|
|
1410
|
+
const total = commission_lines.reduce(
|
|
1411
|
+
(acc, line) => acc + (line.amount ?? 0),
|
|
1412
|
+
0
|
|
1413
|
+
);
|
|
1414
|
+
return /* @__PURE__ */ jsxs9(Container6, { className: "divide-y p-0", "data-testid": "order-commission-section", children: [
|
|
1415
|
+
/* @__PURE__ */ jsx9("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx9(Heading6, { level: "h2", children: t("fields.commission") }) }),
|
|
1416
|
+
/* @__PURE__ */ jsx9("div", { className: "divide-y", children: commission_lines.map((line) => {
|
|
1417
|
+
const label = line.shipping_method_id ? t("fields.shipping") : itemTitleById.get(line.item_id ?? "") ?? line.code;
|
|
1418
|
+
return /* @__PURE__ */ jsxs9(
|
|
1419
|
+
"div",
|
|
1420
|
+
{
|
|
1421
|
+
className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-4 px-6 py-4",
|
|
1422
|
+
children: [
|
|
1423
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: label }),
|
|
1424
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "text-right", children: getLocaleAmount(line.amount, order.currency_code) })
|
|
1425
|
+
]
|
|
1426
|
+
},
|
|
1427
|
+
line.id
|
|
1428
|
+
);
|
|
1429
|
+
}) }),
|
|
1430
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
1431
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: t("orders.commission.total") }),
|
|
1432
|
+
/* @__PURE__ */ jsx9(Text7, { size: "small", weight: "plus", leading: "compact", children: getLocaleAmount(total, order.currency_code) })
|
|
1433
|
+
] }),
|
|
1434
|
+
/* @__PURE__ */ jsx9(DisplayExtensionZone2, { model: "order", zone: "commission", data: order })
|
|
1386
1435
|
] });
|
|
1387
1436
|
};
|
|
1388
1437
|
|
|
1389
1438
|
// src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
|
|
1390
1439
|
import { ArrowPath as ArrowPath2, CurrencyDollar, Envelope, FlyingBox } from "@medusajs/icons";
|
|
1391
|
-
import { Container as
|
|
1392
|
-
import {
|
|
1440
|
+
import { Container as Container7, Heading as Heading7 } from "@medusajs/ui";
|
|
1441
|
+
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
1442
|
+
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
1393
1443
|
|
|
1394
1444
|
// src/components/common/customer-info/customer-info.tsx
|
|
1395
|
-
import { Avatar, Copy as Copy2, Text as
|
|
1396
|
-
import { useTranslation as
|
|
1445
|
+
import { Avatar, Copy as Copy2, Text as Text8 } from "@medusajs/ui";
|
|
1446
|
+
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
1397
1447
|
import { Link } from "react-router-dom";
|
|
1398
|
-
import { jsx as
|
|
1448
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1399
1449
|
var ID = ({ data }) => {
|
|
1400
|
-
const { t } =
|
|
1450
|
+
const { t } = useTranslation10();
|
|
1401
1451
|
const id = data.customer_id;
|
|
1402
1452
|
const name = getOrderCustomer(data);
|
|
1403
1453
|
const email = data.email;
|
|
1404
1454
|
const fallback = (name || email || "").charAt(0).toUpperCase();
|
|
1405
|
-
return /* @__PURE__ */
|
|
1406
|
-
/* @__PURE__ */
|
|
1407
|
-
/* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1456
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
|
|
1457
|
+
/* @__PURE__ */ jsx10(
|
|
1408
1458
|
Link,
|
|
1409
1459
|
{
|
|
1410
1460
|
to: `/customers/${id}`,
|
|
1411
1461
|
className: "focus:shadow-borders-focus rounded-[4px] outline-none transition-shadow",
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
|
|
1462
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
|
|
1463
|
+
/* @__PURE__ */ jsx10(Avatar, { size: "2xsmall", fallback }),
|
|
1464
|
+
/* @__PURE__ */ jsx10(
|
|
1465
|
+
Text8,
|
|
1416
1466
|
{
|
|
1417
1467
|
size: "small",
|
|
1418
1468
|
leading: "compact",
|
|
@@ -1426,26 +1476,26 @@ var ID = ({ data }) => {
|
|
|
1426
1476
|
] });
|
|
1427
1477
|
};
|
|
1428
1478
|
var Company = ({ data }) => {
|
|
1429
|
-
const { t } =
|
|
1479
|
+
const { t } = useTranslation10();
|
|
1430
1480
|
const company = data.shipping_address?.company || data.billing_address?.company;
|
|
1431
1481
|
if (!company) {
|
|
1432
1482
|
return null;
|
|
1433
1483
|
}
|
|
1434
|
-
return /* @__PURE__ */
|
|
1435
|
-
/* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */
|
|
1484
|
+
return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1485
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
|
|
1486
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", className: "truncate", children: company })
|
|
1437
1487
|
] });
|
|
1438
1488
|
};
|
|
1439
1489
|
var Contact = ({ data }) => {
|
|
1440
|
-
const { t } =
|
|
1490
|
+
const { t } = useTranslation10();
|
|
1441
1491
|
const phone = data.shipping_address?.phone || data.billing_address?.phone;
|
|
1442
1492
|
const email = data.email || "";
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
|
|
1493
|
+
return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1494
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
|
|
1495
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-y-2", children: [
|
|
1496
|
+
/* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1497
|
+
/* @__PURE__ */ jsx10(
|
|
1498
|
+
Text8,
|
|
1449
1499
|
{
|
|
1450
1500
|
size: "small",
|
|
1451
1501
|
leading: "compact",
|
|
@@ -1453,11 +1503,11 @@ var Contact = ({ data }) => {
|
|
|
1453
1503
|
children: email
|
|
1454
1504
|
}
|
|
1455
1505
|
),
|
|
1456
|
-
/* @__PURE__ */
|
|
1506
|
+
/* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(Copy2, { content: email, className: "text-ui-fg-muted" }) })
|
|
1457
1507
|
] }),
|
|
1458
|
-
phone && /* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
|
|
1508
|
+
phone && /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1509
|
+
/* @__PURE__ */ jsx10(
|
|
1510
|
+
Text8,
|
|
1461
1511
|
{
|
|
1462
1512
|
size: "small",
|
|
1463
1513
|
leading: "compact",
|
|
@@ -1465,7 +1515,7 @@ var Contact = ({ data }) => {
|
|
|
1465
1515
|
children: phone
|
|
1466
1516
|
}
|
|
1467
1517
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
|
|
1469
1519
|
] })
|
|
1470
1520
|
] })
|
|
1471
1521
|
] });
|
|
@@ -1474,33 +1524,33 @@ var AddressPrint = ({
|
|
|
1474
1524
|
address,
|
|
1475
1525
|
type
|
|
1476
1526
|
}) => {
|
|
1477
|
-
const { t } =
|
|
1478
|
-
return /* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
address ? /* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
return /* @__PURE__ */
|
|
1527
|
+
const { t } = useTranslation10();
|
|
1528
|
+
return /* @__PURE__ */ jsxs10("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1529
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
|
|
1530
|
+
address ? /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1531
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
|
|
1532
|
+
return /* @__PURE__ */ jsxs10("span", { className: "break-words", children: [
|
|
1483
1533
|
line,
|
|
1484
|
-
/* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ jsx10("br", {})
|
|
1485
1535
|
] }, i);
|
|
1486
1536
|
}) }),
|
|
1487
|
-
/* @__PURE__ */
|
|
1537
|
+
/* @__PURE__ */ jsx10("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx10(
|
|
1488
1538
|
Copy2,
|
|
1489
1539
|
{
|
|
1490
1540
|
content: getFormattedAddress({ address }).join("\n"),
|
|
1491
1541
|
className: "text-ui-fg-muted"
|
|
1492
1542
|
}
|
|
1493
1543
|
) })
|
|
1494
|
-
] }) : /* @__PURE__ */
|
|
1544
|
+
] }) : /* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", children: "-" })
|
|
1495
1545
|
] });
|
|
1496
1546
|
};
|
|
1497
1547
|
var Addresses = ({ data }) => {
|
|
1498
|
-
const { t } =
|
|
1499
|
-
return /* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
|
|
1548
|
+
const { t } = useTranslation10();
|
|
1549
|
+
return /* @__PURE__ */ jsxs10("div", { className: "divide-y", children: [
|
|
1550
|
+
/* @__PURE__ */ jsx10(AddressPrint, { address: data.shipping_address, type: "shipping" }),
|
|
1551
|
+
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx10(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1552
|
+
/* @__PURE__ */ jsx10(
|
|
1553
|
+
Text8,
|
|
1504
1554
|
{
|
|
1505
1555
|
size: "small",
|
|
1506
1556
|
leading: "compact",
|
|
@@ -1509,7 +1559,7 @@ var Addresses = ({ data }) => {
|
|
|
1509
1559
|
children: t("addresses.billingAddress.label")
|
|
1510
1560
|
}
|
|
1511
1561
|
),
|
|
1512
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ jsx10(Text8, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
|
|
1513
1563
|
] })
|
|
1514
1564
|
] });
|
|
1515
1565
|
};
|
|
@@ -1534,40 +1584,41 @@ var getOrderCustomer = (obj) => {
|
|
|
1534
1584
|
};
|
|
1535
1585
|
|
|
1536
1586
|
// src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
|
|
1537
|
-
import { jsx as
|
|
1587
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1538
1588
|
var OrderCustomerSection = ({ order }) => {
|
|
1539
|
-
return /* @__PURE__ */
|
|
1540
|
-
|
|
1589
|
+
return /* @__PURE__ */ jsxs11(
|
|
1590
|
+
Container7,
|
|
1541
1591
|
{
|
|
1542
1592
|
className: "divide-y p-0",
|
|
1543
1593
|
"data-testid": "order-customer-section",
|
|
1544
1594
|
children: [
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsx11(Header, { order }),
|
|
1596
|
+
/* @__PURE__ */ jsx11(CustomerInfo.ID, { data: order }),
|
|
1597
|
+
/* @__PURE__ */ jsx11(CustomerInfo.Contact, { data: order }),
|
|
1598
|
+
/* @__PURE__ */ jsx11(CustomerInfo.Company, { data: order }),
|
|
1599
|
+
/* @__PURE__ */ jsx11(CustomerInfo.Addresses, { data: order }),
|
|
1600
|
+
/* @__PURE__ */ jsx11(DisplayExtensionZone3, { model: "order", zone: "customer", data: order })
|
|
1550
1601
|
]
|
|
1551
1602
|
}
|
|
1552
1603
|
);
|
|
1553
1604
|
};
|
|
1554
1605
|
var Header = ({ order }) => {
|
|
1555
|
-
const { t } =
|
|
1556
|
-
return /* @__PURE__ */
|
|
1606
|
+
const { t } = useTranslation11();
|
|
1607
|
+
return /* @__PURE__ */ jsxs11(
|
|
1557
1608
|
"div",
|
|
1558
1609
|
{
|
|
1559
1610
|
className: "flex items-center justify-between px-6 py-4",
|
|
1560
1611
|
"data-testid": "order-customer-header",
|
|
1561
1612
|
children: [
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
|
|
1613
|
+
/* @__PURE__ */ jsx11(
|
|
1614
|
+
Heading7,
|
|
1564
1615
|
{
|
|
1565
1616
|
level: "h2",
|
|
1566
1617
|
"data-testid": "order-customer-heading",
|
|
1567
1618
|
children: t("fields.customer")
|
|
1568
1619
|
}
|
|
1569
1620
|
),
|
|
1570
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ jsx11(
|
|
1571
1622
|
ActionMenu,
|
|
1572
1623
|
{
|
|
1573
1624
|
groups: [
|
|
@@ -1576,7 +1627,7 @@ var Header = ({ order }) => {
|
|
|
1576
1627
|
{
|
|
1577
1628
|
label: t("transferOwnership.label"),
|
|
1578
1629
|
to: `transfer`,
|
|
1579
|
-
icon: /* @__PURE__ */
|
|
1630
|
+
icon: /* @__PURE__ */ jsx11(ArrowPath2, {})
|
|
1580
1631
|
}
|
|
1581
1632
|
]
|
|
1582
1633
|
},
|
|
@@ -1585,12 +1636,12 @@ var Header = ({ order }) => {
|
|
|
1585
1636
|
{
|
|
1586
1637
|
label: t("addresses.shippingAddress.editLabel"),
|
|
1587
1638
|
to: "shipping-address",
|
|
1588
|
-
icon: /* @__PURE__ */
|
|
1639
|
+
icon: /* @__PURE__ */ jsx11(FlyingBox, {})
|
|
1589
1640
|
},
|
|
1590
1641
|
{
|
|
1591
1642
|
label: t("addresses.billingAddress.editLabel"),
|
|
1592
1643
|
to: "billing-address",
|
|
1593
|
-
icon: /* @__PURE__ */
|
|
1644
|
+
icon: /* @__PURE__ */ jsx11(CurrencyDollar, {})
|
|
1594
1645
|
}
|
|
1595
1646
|
]
|
|
1596
1647
|
},
|
|
@@ -1599,7 +1650,7 @@ var Header = ({ order }) => {
|
|
|
1599
1650
|
{
|
|
1600
1651
|
label: t("email.editLabel"),
|
|
1601
1652
|
to: `email`,
|
|
1602
|
-
icon: /* @__PURE__ */
|
|
1653
|
+
icon: /* @__PURE__ */ jsx11(Envelope, {}),
|
|
1603
1654
|
disabled: order.status === "canceled"
|
|
1604
1655
|
}
|
|
1605
1656
|
]
|
|
@@ -1614,45 +1665,41 @@ var Header = ({ order }) => {
|
|
|
1614
1665
|
};
|
|
1615
1666
|
|
|
1616
1667
|
// src/pages/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx
|
|
1617
|
-
import { Buildings, XCircle } from "@medusajs/icons";
|
|
1618
1668
|
import {
|
|
1619
|
-
|
|
1620
|
-
Container as Container7,
|
|
1669
|
+
Container as Container8,
|
|
1621
1670
|
Copy as Copy3,
|
|
1622
|
-
Heading as
|
|
1671
|
+
Heading as Heading8,
|
|
1623
1672
|
StatusBadge,
|
|
1624
|
-
Text as
|
|
1625
|
-
Tooltip as Tooltip2
|
|
1626
|
-
toast as toast6,
|
|
1627
|
-
usePrompt as usePrompt2
|
|
1673
|
+
Text as Text9,
|
|
1674
|
+
Tooltip as Tooltip2
|
|
1628
1675
|
} from "@medusajs/ui";
|
|
1629
1676
|
import { format } from "date-fns";
|
|
1630
|
-
import { useTranslation as
|
|
1631
|
-
import { Link as Link2
|
|
1632
|
-
import { Fragment as Fragment2, jsx as
|
|
1677
|
+
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
1678
|
+
import { Link as Link2 } from "react-router-dom";
|
|
1679
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1633
1680
|
var OrderFulfillmentSection = ({
|
|
1634
1681
|
order
|
|
1635
1682
|
}) => {
|
|
1636
1683
|
const fulfillments = order.fulfillments || [];
|
|
1637
|
-
return /* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1639
|
-
fulfillments.map((f, index) => /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-y-3", "data-testid": "order-fulfillment-section", children: [
|
|
1685
|
+
/* @__PURE__ */ jsx12(UnfulfilledItemBreakdown, { order }),
|
|
1686
|
+
fulfillments.map((f, index) => /* @__PURE__ */ jsx12(Fulfillment, { index, fulfillment: f, order }, f.id))
|
|
1640
1687
|
] });
|
|
1641
1688
|
};
|
|
1642
1689
|
var UnfulfilledItem = ({
|
|
1643
1690
|
item,
|
|
1644
1691
|
currencyCode
|
|
1645
1692
|
}) => {
|
|
1646
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ jsxs12(
|
|
1647
1694
|
"div",
|
|
1648
1695
|
{
|
|
1649
1696
|
className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4",
|
|
1650
1697
|
children: [
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1655
|
-
|
|
1698
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-x-4", children: [
|
|
1699
|
+
/* @__PURE__ */ jsx12(Thumbnail, { src: item.thumbnail }),
|
|
1700
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
1701
|
+
/* @__PURE__ */ jsx12(
|
|
1702
|
+
Text9,
|
|
1656
1703
|
{
|
|
1657
1704
|
size: "small",
|
|
1658
1705
|
leading: "compact",
|
|
@@ -1661,20 +1708,20 @@ var UnfulfilledItem = ({
|
|
|
1661
1708
|
children: item.title
|
|
1662
1709
|
}
|
|
1663
1710
|
),
|
|
1664
|
-
item.variant_sku && /* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
1711
|
+
item.variant_sku && /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", children: item.variant_sku }),
|
|
1713
|
+
/* @__PURE__ */ jsx12(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
|
|
1667
1714
|
] }),
|
|
1668
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
|
|
1669
1716
|
] })
|
|
1670
1717
|
] }),
|
|
1671
|
-
/* @__PURE__ */
|
|
1672
|
-
/* @__PURE__ */
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ jsxs12("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
|
|
1719
|
+
/* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx12(Text9, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
|
|
1720
|
+
/* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs12(Text9, { children: [
|
|
1721
|
+
/* @__PURE__ */ jsx12("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
|
|
1675
1722
|
"x"
|
|
1676
1723
|
] }) }),
|
|
1677
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx12("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx12(Text9, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
|
|
1678
1725
|
] })
|
|
1679
1726
|
]
|
|
1680
1727
|
},
|
|
@@ -1688,8 +1735,8 @@ var UnfulfilledItemBreakdown = ({ order }) => {
|
|
|
1688
1735
|
const unfulfilledItemsWithoutShipping = order.items.filter(
|
|
1689
1736
|
(i) => !i.requires_shipping && i.detail.fulfilled_quantity < i.quantity
|
|
1690
1737
|
);
|
|
1691
|
-
return /* @__PURE__ */
|
|
1692
|
-
!!unfulfilledItemsWithShipping.length && /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
1739
|
+
!!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx12(
|
|
1693
1740
|
UnfulfilledItemDisplay,
|
|
1694
1741
|
{
|
|
1695
1742
|
order,
|
|
@@ -1697,7 +1744,7 @@ var UnfulfilledItemBreakdown = ({ order }) => {
|
|
|
1697
1744
|
requiresShipping: true
|
|
1698
1745
|
}
|
|
1699
1746
|
),
|
|
1700
|
-
!!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */
|
|
1747
|
+
!!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx12(
|
|
1701
1748
|
UnfulfilledItemDisplay,
|
|
1702
1749
|
{
|
|
1703
1750
|
order,
|
|
@@ -1712,36 +1759,19 @@ var UnfulfilledItemDisplay = ({
|
|
|
1712
1759
|
unfulfilledItems,
|
|
1713
1760
|
requiresShipping = false
|
|
1714
1761
|
}) => {
|
|
1715
|
-
const { t } =
|
|
1762
|
+
const { t } = useTranslation12();
|
|
1716
1763
|
if (order.status === "canceled") {
|
|
1717
1764
|
return;
|
|
1718
1765
|
}
|
|
1719
|
-
return /* @__PURE__ */
|
|
1720
|
-
/* @__PURE__ */
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
1723
|
-
requiresShipping && /* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */ jsx11(
|
|
1726
|
-
ActionMenu,
|
|
1727
|
-
{
|
|
1728
|
-
groups: [
|
|
1729
|
-
{
|
|
1730
|
-
actions: [
|
|
1731
|
-
{
|
|
1732
|
-
label: t("orders.fulfillment.fulfillItems"),
|
|
1733
|
-
icon: /* @__PURE__ */ jsx11(Buildings, {}),
|
|
1734
|
-
to: `/orders/${order.id}/fulfillment?requires_shipping=${requiresShipping}`
|
|
1735
|
-
}
|
|
1736
|
-
]
|
|
1737
|
-
}
|
|
1738
|
-
],
|
|
1739
|
-
"data-testid": "order-fulfillment-unfulfilled-action-menu"
|
|
1740
|
-
}
|
|
1741
|
-
)
|
|
1766
|
+
return /* @__PURE__ */ jsxs12(Container8, { className: "divide-y p-0", "data-testid": "order-fulfillment-unfulfilled", children: [
|
|
1767
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-fulfillment-unfulfilled-header", children: [
|
|
1768
|
+
/* @__PURE__ */ jsx12(Heading8, { level: "h2", "data-testid": "order-fulfillment-unfulfilled-heading", children: t("orders.fulfillment.unfulfilledItems") }),
|
|
1769
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-4", "data-testid": "order-fulfillment-unfulfilled-badges", children: [
|
|
1770
|
+
requiresShipping && /* @__PURE__ */ jsx12(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-requires-shipping-badge", children: t("orders.fulfillment.requiresShipping") }),
|
|
1771
|
+
/* @__PURE__ */ jsx12(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-awaiting-badge", children: t("orders.fulfillment.awaitingFulfillmentBadge") })
|
|
1742
1772
|
] })
|
|
1743
1773
|
] }),
|
|
1744
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ jsx12("div", { "data-testid": "order-fulfillment-unfulfilled-items", children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx12(
|
|
1745
1775
|
UnfulfilledItem,
|
|
1746
1776
|
{
|
|
1747
1777
|
item,
|
|
@@ -1753,12 +1783,9 @@ var UnfulfilledItemDisplay = ({
|
|
|
1753
1783
|
};
|
|
1754
1784
|
var Fulfillment = ({
|
|
1755
1785
|
fulfillment,
|
|
1756
|
-
order,
|
|
1757
1786
|
index
|
|
1758
1787
|
}) => {
|
|
1759
|
-
const { t } =
|
|
1760
|
-
const prompt = usePrompt2();
|
|
1761
|
-
const navigate = useNavigate5();
|
|
1788
|
+
const { t } = useTranslation12();
|
|
1762
1789
|
const showLocation = !!fulfillment.location_id;
|
|
1763
1790
|
const isPickUpFulfillment = fulfillment.shipping_option?.service_zone.fulfillment_set.type === "pickup" /* Pickup */;
|
|
1764
1791
|
const { stock_location, isError, error } = useStockLocation(
|
|
@@ -1784,189 +1811,117 @@ var Fulfillment = ({
|
|
|
1784
1811
|
statusColor = "green";
|
|
1785
1812
|
statusTimestamp = fulfillment.shipped_at;
|
|
1786
1813
|
}
|
|
1787
|
-
const { mutateAsync } = useCancelOrderFulfillment(order.id, fulfillment.id);
|
|
1788
|
-
const { mutateAsync: markAsDelivered } = useMarkOrderFulfillmentAsDelivered(
|
|
1789
|
-
order.id,
|
|
1790
|
-
fulfillment.id
|
|
1791
|
-
);
|
|
1792
|
-
const showShippingButton = !fulfillment.canceled_at && !fulfillment.shipped_at && !fulfillment.delivered_at && fulfillment.requires_shipping && !isPickUpFulfillment;
|
|
1793
|
-
const showDeliveryButton = !fulfillment.canceled_at && !fulfillment.delivered_at;
|
|
1794
|
-
const handleMarkAsDelivered = async () => {
|
|
1795
|
-
const res = await prompt({
|
|
1796
|
-
title: t("general.areYouSure"),
|
|
1797
|
-
description: t("orders.fulfillment.markAsDeliveredWarning"),
|
|
1798
|
-
confirmText: t("actions.continue"),
|
|
1799
|
-
cancelText: t("actions.cancel"),
|
|
1800
|
-
variant: "confirmation"
|
|
1801
|
-
});
|
|
1802
|
-
if (res) {
|
|
1803
|
-
await markAsDelivered(void 0, {
|
|
1804
|
-
onSuccess: () => {
|
|
1805
|
-
toast6.success(
|
|
1806
|
-
t(
|
|
1807
|
-
isPickUpFulfillment ? "orders.fulfillment.toast.fulfillmentPickedUp" : "orders.fulfillment.toast.fulfillmentDelivered"
|
|
1808
|
-
)
|
|
1809
|
-
);
|
|
1810
|
-
},
|
|
1811
|
-
onError: (e) => {
|
|
1812
|
-
toast6.error(e.message);
|
|
1813
|
-
}
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
const handleCancel = async () => {
|
|
1818
|
-
if (fulfillment.shipped_at) {
|
|
1819
|
-
toast6.warning(t("orders.fulfillment.toast.fulfillmentShipped"));
|
|
1820
|
-
return;
|
|
1821
|
-
}
|
|
1822
|
-
const res = await prompt({
|
|
1823
|
-
title: t("general.areYouSure"),
|
|
1824
|
-
description: t("orders.fulfillment.cancelWarning"),
|
|
1825
|
-
confirmText: t("actions.continue"),
|
|
1826
|
-
cancelText: t("actions.cancel")
|
|
1827
|
-
});
|
|
1828
|
-
if (res) {
|
|
1829
|
-
await mutateAsync(void 0, {
|
|
1830
|
-
onSuccess: () => {
|
|
1831
|
-
toast6.success(t("orders.fulfillment.toast.canceled"));
|
|
1832
|
-
},
|
|
1833
|
-
onError: (e) => {
|
|
1834
|
-
toast6.error(e.message);
|
|
1835
|
-
}
|
|
1836
|
-
});
|
|
1837
|
-
}
|
|
1838
|
-
};
|
|
1839
1814
|
if (isError) {
|
|
1840
1815
|
throw error;
|
|
1841
1816
|
}
|
|
1842
1817
|
const isValidUrl = (url) => url && url.length > 0 && url !== "#";
|
|
1843
|
-
return /* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */
|
|
1845
|
-
/* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ jsxs12(Container8, { className: "divide-y p-0", "data-testid": `order-fulfillment-${fulfillment.id}`, children: [
|
|
1819
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-header`, children: [
|
|
1820
|
+
/* @__PURE__ */ jsx12(Heading8, { level: "h2", "data-testid": `order-fulfillment-${fulfillment.id}-heading`, children: t("orders.fulfillment.number", {
|
|
1846
1821
|
number: index + 1
|
|
1847
1822
|
}) }),
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
),
|
|
1859
|
-
/* @__PURE__ */ jsx11(
|
|
1860
|
-
ActionMenu,
|
|
1861
|
-
{
|
|
1862
|
-
groups: [
|
|
1863
|
-
{
|
|
1864
|
-
actions: [
|
|
1865
|
-
{
|
|
1866
|
-
label: t("actions.cancel"),
|
|
1867
|
-
icon: /* @__PURE__ */ jsx11(XCircle, {}),
|
|
1868
|
-
onClick: handleCancel,
|
|
1869
|
-
disabled: !!fulfillment.canceled_at || !!fulfillment.shipped_at || !!fulfillment.delivered_at
|
|
1870
|
-
}
|
|
1871
|
-
]
|
|
1872
|
-
}
|
|
1873
|
-
],
|
|
1874
|
-
"data-testid": `order-fulfillment-${fulfillment.id}-action-menu`
|
|
1875
|
-
}
|
|
1876
|
-
)
|
|
1877
|
-
] })
|
|
1823
|
+
/* @__PURE__ */ jsx12("div", { className: "flex items-center gap-x-4", "data-testid": `order-fulfillment-${fulfillment.id}-status-container`, children: /* @__PURE__ */ jsx12(
|
|
1824
|
+
Tooltip2,
|
|
1825
|
+
{
|
|
1826
|
+
content: format(
|
|
1827
|
+
new Date(statusTimestamp),
|
|
1828
|
+
"dd MMM, yyyy, HH:mm:ss"
|
|
1829
|
+
),
|
|
1830
|
+
children: /* @__PURE__ */ jsx12(StatusBadge, { color: statusColor, className: "text-nowrap", "data-testid": `order-fulfillment-${fulfillment.id}-status-badge`, children: statusText })
|
|
1831
|
+
}
|
|
1832
|
+
) })
|
|
1878
1833
|
] }),
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
/* @__PURE__ */
|
|
1881
|
-
/* @__PURE__ */
|
|
1834
|
+
/* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1835
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
|
|
1836
|
+
/* @__PURE__ */ jsx12("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsxs12(Text9, { size: "small", leading: "compact", children: [
|
|
1882
1837
|
f_item.quantity,
|
|
1883
1838
|
"x ",
|
|
1884
1839
|
f_item.title
|
|
1885
1840
|
] }) }, f_item.line_item_id)) })
|
|
1886
1841
|
] }),
|
|
1887
|
-
showLocation && /* @__PURE__ */
|
|
1888
|
-
/* @__PURE__ */
|
|
1889
|
-
stock_location ? /* @__PURE__ */
|
|
1842
|
+
showLocation && /* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1843
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
|
|
1844
|
+
stock_location ? /* @__PURE__ */ jsx12(
|
|
1890
1845
|
Link2,
|
|
1891
1846
|
{
|
|
1892
1847
|
to: `/settings/locations/${stock_location.id}`,
|
|
1893
1848
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1894
|
-
children: /* @__PURE__ */
|
|
1849
|
+
children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: stock_location.name })
|
|
1895
1850
|
}
|
|
1896
|
-
) : /* @__PURE__ */
|
|
1851
|
+
) : /* @__PURE__ */ jsx12(Skeleton, { className: "w-16" })
|
|
1897
1852
|
] }),
|
|
1898
|
-
/* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1854
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
|
|
1855
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
|
|
1901
1856
|
] }),
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
-
/* @__PURE__ */
|
|
1857
|
+
/* @__PURE__ */ jsxs12("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1858
|
+
/* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
|
|
1859
|
+
/* @__PURE__ */ jsx12("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx12("ul", { children: fulfillment.labels.map((tlink) => {
|
|
1905
1860
|
const hasTrackingUrl = isValidUrl(tlink.tracking_url);
|
|
1906
1861
|
const hasLabelUrl = isValidUrl(tlink.label_url);
|
|
1907
1862
|
if (hasTrackingUrl || hasLabelUrl) {
|
|
1908
|
-
return /* @__PURE__ */
|
|
1909
|
-
hasTrackingUrl && /* @__PURE__ */
|
|
1863
|
+
return /* @__PURE__ */ jsxs12("li", { children: [
|
|
1864
|
+
hasTrackingUrl && /* @__PURE__ */ jsx12(
|
|
1910
1865
|
"a",
|
|
1911
1866
|
{
|
|
1912
1867
|
href: tlink.tracking_url,
|
|
1913
1868
|
target: "_blank",
|
|
1914
1869
|
rel: "noopener noreferrer",
|
|
1915
1870
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1916
|
-
children: /* @__PURE__ */
|
|
1871
|
+
children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", as: "span", children: tlink.tracking_number })
|
|
1917
1872
|
}
|
|
1918
1873
|
),
|
|
1919
1874
|
hasTrackingUrl && hasLabelUrl && " - ",
|
|
1920
|
-
hasLabelUrl && /* @__PURE__ */
|
|
1875
|
+
hasLabelUrl && /* @__PURE__ */ jsx12(
|
|
1921
1876
|
"a",
|
|
1922
1877
|
{
|
|
1923
1878
|
href: tlink.label_url,
|
|
1924
1879
|
target: "_blank",
|
|
1925
1880
|
rel: "noopener noreferrer",
|
|
1926
1881
|
className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
|
|
1927
|
-
children: /* @__PURE__ */
|
|
1882
|
+
children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", as: "span", children: t("orders.fulfillment.labelLink") })
|
|
1928
1883
|
}
|
|
1929
1884
|
)
|
|
1930
1885
|
] }, tlink.tracking_number);
|
|
1931
1886
|
}
|
|
1932
|
-
return /* @__PURE__ */
|
|
1933
|
-
}) }) : /* @__PURE__ */
|
|
1934
|
-
] }),
|
|
1935
|
-
(showShippingButton || showDeliveryButton) && /* @__PURE__ */ jsxs11("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-actions`, children: [
|
|
1936
|
-
showDeliveryButton && /* @__PURE__ */ jsx11(Button6, { onClick: handleMarkAsDelivered, variant: "secondary", "data-testid": `order-fulfillment-${fulfillment.id}-mark-delivered-button`, children: t(
|
|
1937
|
-
isPickUpFulfillment ? "orders.fulfillment.markAsPickedUp" : "orders.fulfillment.markAsDelivered"
|
|
1938
|
-
) }),
|
|
1939
|
-
showShippingButton && /* @__PURE__ */ jsx11(
|
|
1940
|
-
Button6,
|
|
1941
|
-
{
|
|
1942
|
-
onClick: () => navigate(`./${fulfillment.id}/create-shipment`),
|
|
1943
|
-
variant: "secondary",
|
|
1944
|
-
"data-testid": `order-fulfillment-${fulfillment.id}-mark-shipped-button`,
|
|
1945
|
-
children: t("orders.fulfillment.markAsShipped")
|
|
1946
|
-
}
|
|
1947
|
-
)
|
|
1887
|
+
return /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
|
|
1888
|
+
}) }) : /* @__PURE__ */ jsx12(Text9, { size: "small", leading: "compact", children: "-" }) })
|
|
1948
1889
|
] })
|
|
1949
1890
|
] });
|
|
1950
1891
|
};
|
|
1951
1892
|
|
|
1952
1893
|
// src/pages/orders/order-detail/components/order-general-section/order-general-section.tsx
|
|
1953
|
-
import { XCircle
|
|
1894
|
+
import { XCircle } from "@medusajs/icons";
|
|
1954
1895
|
import {
|
|
1955
|
-
Container as
|
|
1896
|
+
Container as Container9,
|
|
1956
1897
|
Copy as Copy4,
|
|
1957
|
-
Heading as
|
|
1898
|
+
Heading as Heading9,
|
|
1958
1899
|
StatusBadge as StatusBadge2,
|
|
1959
|
-
Text as
|
|
1960
|
-
toast as
|
|
1961
|
-
usePrompt as
|
|
1900
|
+
Text as Text10,
|
|
1901
|
+
toast as toast6,
|
|
1902
|
+
usePrompt as usePrompt2
|
|
1962
1903
|
} from "@medusajs/ui";
|
|
1963
|
-
import { useTranslation as
|
|
1964
|
-
import {
|
|
1904
|
+
import { useTranslation as useTranslation13 } from "react-i18next";
|
|
1905
|
+
import { DisplayExtensionZone as DisplayExtensionZone4, DisplayField } from "@mercurjs/dashboard-shared";
|
|
1906
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1907
|
+
var GENERAL_FIELD_IDS = [
|
|
1908
|
+
"display_id",
|
|
1909
|
+
"created_at",
|
|
1910
|
+
"status",
|
|
1911
|
+
"payment_status",
|
|
1912
|
+
"fulfillment_status"
|
|
1913
|
+
];
|
|
1965
1914
|
var OrderGeneralSection = ({ order }) => {
|
|
1966
|
-
const { t } =
|
|
1967
|
-
const prompt =
|
|
1915
|
+
const { t } = useTranslation13();
|
|
1916
|
+
const prompt = usePrompt2();
|
|
1968
1917
|
const { getFullDate } = useDate();
|
|
1969
1918
|
const { mutateAsync: cancelOrder } = useCancelOrder(order.id);
|
|
1919
|
+
const hasAnyFulfilledItem = order.items?.some(
|
|
1920
|
+
// @ts-ignore — detail.fulfilled_quantity is exposed via Mercur query-config
|
|
1921
|
+
(i) => (i.detail?.fulfilled_quantity ?? 0) > 0
|
|
1922
|
+
);
|
|
1923
|
+
const cancelDisabled = !!order.canceled_at || !!hasAnyFulfilledItem;
|
|
1924
|
+
const cancelDisabledTooltip = order.canceled_at ? void 0 : hasAnyFulfilledItem ? t("orders.actions.cancelDisabledFulfilled") : void 0;
|
|
1970
1925
|
const handleCancel = async () => {
|
|
1971
1926
|
const res = await prompt({
|
|
1972
1927
|
title: t("general.areYouSure"),
|
|
@@ -1981,34 +1936,34 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1981
1936
|
}
|
|
1982
1937
|
await cancelOrder(void 0, {
|
|
1983
1938
|
onSuccess: () => {
|
|
1984
|
-
|
|
1939
|
+
toast6.success(t("orders.orderCanceled"));
|
|
1985
1940
|
},
|
|
1986
1941
|
onError: (e) => {
|
|
1987
|
-
|
|
1942
|
+
toast6.error(e.message);
|
|
1988
1943
|
}
|
|
1989
1944
|
});
|
|
1990
1945
|
};
|
|
1991
|
-
return /* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
/* @__PURE__ */
|
|
1946
|
+
return /* @__PURE__ */ jsxs13(Container9, { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-general-section", children: [
|
|
1947
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
1948
|
+
/* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "display_id", data: order, children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-1", "data-testid": "order-general-section-id-container", children: [
|
|
1949
|
+
/* @__PURE__ */ jsxs13(Heading9, { "data-testid": "order-general-section-id-heading", children: [
|
|
1995
1950
|
"#",
|
|
1996
1951
|
order.display_id
|
|
1997
1952
|
] }),
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
] }),
|
|
2000
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ jsx13(Copy4, { content: `#${order.display_id}`, className: "text-ui-fg-muted", "data-testid": "order-general-section-id-copy" })
|
|
1954
|
+
] }) }),
|
|
1955
|
+
/* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "created_at", data: order, children: /* @__PURE__ */ jsx13(Text10, { size: "small", className: "text-ui-fg-subtle", "data-testid": "order-general-section-date", children: t("orders.onDateFromSalesChannel", {
|
|
2001
1956
|
date: getFullDate({ date: order.created_at, includeTime: true }),
|
|
2002
1957
|
salesChannel: order.sales_channel?.name
|
|
2003
|
-
}) })
|
|
1958
|
+
}) }) })
|
|
2004
1959
|
] }),
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
/* @__PURE__ */
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
2009
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-4", "data-testid": "order-general-section-badges-container", children: [
|
|
1961
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-x-1.5", "data-testid": "order-general-section-badges", children: [
|
|
1962
|
+
/* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "status", data: order, children: /* @__PURE__ */ jsx13(OrderBadge, { order }) }),
|
|
1963
|
+
/* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "payment_status", data: order, children: /* @__PURE__ */ jsx13(PaymentBadge, { order }) }),
|
|
1964
|
+
/* @__PURE__ */ jsx13(DisplayField, { model: "order", zone: "general", id: "fulfillment_status", data: order, children: /* @__PURE__ */ jsx13(FulfillmentBadge, { order }) })
|
|
2010
1965
|
] }),
|
|
2011
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ jsx13(
|
|
2012
1967
|
ActionMenu,
|
|
2013
1968
|
{
|
|
2014
1969
|
groups: [
|
|
@@ -2017,8 +1972,9 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
2017
1972
|
{
|
|
2018
1973
|
label: t("actions.cancel"),
|
|
2019
1974
|
onClick: handleCancel,
|
|
2020
|
-
disabled:
|
|
2021
|
-
|
|
1975
|
+
disabled: cancelDisabled,
|
|
1976
|
+
disabledTooltip: cancelDisabledTooltip,
|
|
1977
|
+
icon: /* @__PURE__ */ jsx13(XCircle, {})
|
|
2022
1978
|
}
|
|
2023
1979
|
]
|
|
2024
1980
|
}
|
|
@@ -2026,45 +1982,54 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
2026
1982
|
"data-testid": "order-general-section-action-menu"
|
|
2027
1983
|
}
|
|
2028
1984
|
)
|
|
2029
|
-
] })
|
|
1985
|
+
] }),
|
|
1986
|
+
/* @__PURE__ */ jsx13(
|
|
1987
|
+
DisplayExtensionZone4,
|
|
1988
|
+
{
|
|
1989
|
+
model: "order",
|
|
1990
|
+
zone: "general",
|
|
1991
|
+
data: order,
|
|
1992
|
+
builtInFieldIds: GENERAL_FIELD_IDS
|
|
1993
|
+
}
|
|
1994
|
+
)
|
|
2030
1995
|
] });
|
|
2031
1996
|
};
|
|
2032
1997
|
var FulfillmentBadge = ({ order }) => {
|
|
2033
|
-
const { t } =
|
|
1998
|
+
const { t } = useTranslation13();
|
|
2034
1999
|
const { label, color } = getOrderFulfillmentStatus(
|
|
2035
2000
|
t,
|
|
2036
2001
|
order.fulfillment_status
|
|
2037
2002
|
);
|
|
2038
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ jsx13(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-fulfillment-badge", children: label });
|
|
2039
2004
|
};
|
|
2040
2005
|
var PaymentBadge = ({ order }) => {
|
|
2041
|
-
const { t } =
|
|
2006
|
+
const { t } = useTranslation13();
|
|
2042
2007
|
const { label, color } = getOrderPaymentStatus(t, order.payment_status);
|
|
2043
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ jsx13(StatusBadge2, { color, className: "text-nowrap", "data-testid": "order-general-section-payment-badge", children: label });
|
|
2044
2009
|
};
|
|
2045
2010
|
var OrderBadge = ({ order }) => {
|
|
2046
|
-
const { t } =
|
|
2011
|
+
const { t } = useTranslation13();
|
|
2047
2012
|
const orderStatus = getCanceledOrderStatus(t, order.status);
|
|
2048
2013
|
if (!orderStatus) {
|
|
2049
2014
|
return null;
|
|
2050
2015
|
}
|
|
2051
|
-
return /* @__PURE__ */
|
|
2016
|
+
return /* @__PURE__ */ jsx13(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", "data-testid": "order-general-section-order-badge", children: orderStatus.label });
|
|
2052
2017
|
};
|
|
2053
2018
|
|
|
2054
2019
|
// src/components/common/display-id/display-id.tsx
|
|
2055
|
-
import { useTranslation as
|
|
2020
|
+
import { useTranslation as useTranslation14 } from "react-i18next";
|
|
2056
2021
|
import { useState as useState4 } from "react";
|
|
2057
2022
|
import copy from "copy-to-clipboard";
|
|
2058
|
-
import { clx as clx2, toast as
|
|
2059
|
-
import { jsx as
|
|
2023
|
+
import { clx as clx2, toast as toast7, Tooltip as Tooltip3 } from "@medusajs/ui";
|
|
2024
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2060
2025
|
function DisplayId({ id, className }) {
|
|
2061
|
-
const { t } =
|
|
2026
|
+
const { t } = useTranslation14();
|
|
2062
2027
|
const [open, setOpen] = useState4(false);
|
|
2063
2028
|
const onClick = () => {
|
|
2064
2029
|
copy(id);
|
|
2065
|
-
|
|
2030
|
+
toast7.success(t("actions.idCopiedToClipboard"));
|
|
2066
2031
|
};
|
|
2067
|
-
return /* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ jsx14(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs14("span", { onClick, className: clx2("cursor-pointer", className), children: [
|
|
2068
2033
|
"#",
|
|
2069
2034
|
id.slice(-7)
|
|
2070
2035
|
] }) });
|
|
@@ -2082,32 +2047,33 @@ var getTotalPending = (paymentCollections) => paymentCollections.filter((pc) =>
|
|
|
2082
2047
|
}, 0);
|
|
2083
2048
|
|
|
2084
2049
|
// src/pages/orders/order-detail/components/order-payment-section/order-payment-section.tsx
|
|
2085
|
-
import { ArrowDownRightMini, DocumentText, XCircle as
|
|
2050
|
+
import { ArrowDownRightMini, DocumentText, XCircle as XCircle2 } from "@medusajs/icons";
|
|
2086
2051
|
import {
|
|
2087
2052
|
Badge,
|
|
2088
|
-
Button as
|
|
2089
|
-
Container as
|
|
2090
|
-
Heading as
|
|
2053
|
+
Button as Button6,
|
|
2054
|
+
Container as Container10,
|
|
2055
|
+
Heading as Heading10,
|
|
2091
2056
|
StatusBadge as StatusBadge3,
|
|
2092
|
-
Text as
|
|
2093
|
-
toast as
|
|
2057
|
+
Text as Text11,
|
|
2058
|
+
toast as toast8,
|
|
2094
2059
|
Tooltip as Tooltip4,
|
|
2095
|
-
usePrompt as
|
|
2060
|
+
usePrompt as usePrompt3
|
|
2096
2061
|
} from "@medusajs/ui";
|
|
2062
|
+
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
2097
2063
|
import { format as format2 } from "date-fns";
|
|
2098
|
-
import { Trans, useTranslation as
|
|
2099
|
-
import { jsx as
|
|
2064
|
+
import { Trans, useTranslation as useTranslation15 } from "react-i18next";
|
|
2065
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2100
2066
|
var OrderPaymentSection = ({ order }) => {
|
|
2101
2067
|
const payments = getPaymentsFromOrder(order);
|
|
2102
2068
|
const refunds = payments.map((payment) => payment?.refunds).flat(1).filter(Boolean);
|
|
2103
|
-
return /* @__PURE__ */
|
|
2104
|
-
|
|
2069
|
+
return /* @__PURE__ */ jsxs15(
|
|
2070
|
+
Container10,
|
|
2105
2071
|
{
|
|
2106
|
-
className: "divide-y
|
|
2072
|
+
className: "divide-y p-0",
|
|
2107
2073
|
"data-testid": "order-payment-section",
|
|
2108
2074
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2075
|
+
/* @__PURE__ */ jsx15(Header2, { order }),
|
|
2076
|
+
/* @__PURE__ */ jsx15(
|
|
2111
2077
|
PaymentBreakdown,
|
|
2112
2078
|
{
|
|
2113
2079
|
order,
|
|
@@ -2116,22 +2082,23 @@ var OrderPaymentSection = ({ order }) => {
|
|
|
2116
2082
|
currencyCode: order.currency_code
|
|
2117
2083
|
}
|
|
2118
2084
|
),
|
|
2119
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsx15(Total, { order }),
|
|
2086
|
+
/* @__PURE__ */ jsx15(DisplayExtensionZone5, { model: "order", zone: "payment", data: order })
|
|
2120
2087
|
]
|
|
2121
2088
|
}
|
|
2122
2089
|
);
|
|
2123
2090
|
};
|
|
2124
2091
|
var Header2 = ({ order }) => {
|
|
2125
|
-
const { t } =
|
|
2092
|
+
const { t } = useTranslation15();
|
|
2126
2093
|
const { label, color } = getOrderPaymentStatus(t, order.payment_status);
|
|
2127
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ jsxs15(
|
|
2128
2095
|
"div",
|
|
2129
2096
|
{
|
|
2130
2097
|
className: "flex items-center justify-between px-6 py-4",
|
|
2131
2098
|
"data-testid": "order-payment-header",
|
|
2132
2099
|
children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2100
|
+
/* @__PURE__ */ jsx15(Heading10, { level: "h2", "data-testid": "order-payment-heading", children: t("orders.payment.title") }),
|
|
2101
|
+
/* @__PURE__ */ jsx15(
|
|
2135
2102
|
StatusBadge3,
|
|
2136
2103
|
{
|
|
2137
2104
|
color,
|
|
@@ -2148,8 +2115,8 @@ var Refund = ({
|
|
|
2148
2115
|
refund,
|
|
2149
2116
|
currencyCode
|
|
2150
2117
|
}) => {
|
|
2151
|
-
const { t } =
|
|
2152
|
-
const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */
|
|
2118
|
+
const { t } = useTranslation15();
|
|
2119
|
+
const RefundReasonBadge = refund?.refund_reason && /* @__PURE__ */ jsx15(
|
|
2153
2120
|
Badge,
|
|
2154
2121
|
{
|
|
2155
2122
|
size: "2xsmall",
|
|
@@ -2159,27 +2126,27 @@ var Refund = ({
|
|
|
2159
2126
|
children: refund.refund_reason.label
|
|
2160
2127
|
}
|
|
2161
2128
|
);
|
|
2162
|
-
const RefundNoteIndicator = refund.note && /* @__PURE__ */
|
|
2163
|
-
return /* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
/* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
2129
|
+
const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx15(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx15(DocumentText, { className: "ml-1 inline text-ui-tag-neutral-icon" }) });
|
|
2130
|
+
return /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-x-4 bg-ui-bg-subtle px-6 py-4 text-ui-fg-subtle sm:items-center", children: [
|
|
2131
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-1 flex-col gap-3 sm:flex-row sm:items-center", children: [
|
|
2132
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex shrink-0 flex-row items-center gap-x-3", children: [
|
|
2133
|
+
/* @__PURE__ */ jsx15(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
|
|
2134
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
2135
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
|
|
2136
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
|
|
2170
2137
|
] })
|
|
2171
2138
|
] }),
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-x-3", children: [
|
|
2140
|
+
/* @__PURE__ */ jsx15("div", { className: "shrink-0", children: RefundNoteIndicator }),
|
|
2174
2141
|
RefundReasonBadge
|
|
2175
2142
|
] })
|
|
2176
2143
|
] }),
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex shrink-0 items-center justify-end gap-4", children: [
|
|
2145
|
+
/* @__PURE__ */ jsxs15(Text11, { size: "small", leading: "compact", children: [
|
|
2179
2146
|
"- ",
|
|
2180
2147
|
getLocaleAmount(refund.amount, currencyCode)
|
|
2181
2148
|
] }),
|
|
2182
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ jsx15("div", { className: "h-7 w-5" })
|
|
2183
2150
|
] })
|
|
2184
2151
|
] });
|
|
2185
2152
|
};
|
|
@@ -2189,8 +2156,8 @@ var Payment = ({
|
|
|
2189
2156
|
refunds,
|
|
2190
2157
|
currencyCode
|
|
2191
2158
|
}) => {
|
|
2192
|
-
const { t } =
|
|
2193
|
-
const prompt =
|
|
2159
|
+
const { t } = useTranslation15();
|
|
2160
|
+
const prompt = usePrompt3();
|
|
2194
2161
|
const { mutateAsync } = useCapturePayment(order.id, payment.id);
|
|
2195
2162
|
const handleCapture = async () => {
|
|
2196
2163
|
const res = await prompt({
|
|
@@ -2209,14 +2176,14 @@ var Payment = ({
|
|
|
2209
2176
|
{ amount: payment.amount },
|
|
2210
2177
|
{
|
|
2211
2178
|
onSuccess: () => {
|
|
2212
|
-
|
|
2179
|
+
toast8.success(
|
|
2213
2180
|
t("orders.payment.capturePaymentSuccess", {
|
|
2214
2181
|
amount: formatCurrency(payment.amount, currencyCode)
|
|
2215
2182
|
})
|
|
2216
2183
|
);
|
|
2217
2184
|
},
|
|
2218
2185
|
onError: (error) => {
|
|
2219
|
-
|
|
2186
|
+
toast8.error(error.message);
|
|
2220
2187
|
}
|
|
2221
2188
|
}
|
|
2222
2189
|
);
|
|
@@ -2233,32 +2200,32 @@ var Payment = ({
|
|
|
2233
2200
|
const [status, color] = getPaymentStatusAttributes(payment);
|
|
2234
2201
|
const showCapture = payment.captured_at === null && payment.canceled_at === null;
|
|
2235
2202
|
const totalRefunded = payment.refunds?.reduce((acc, next) => next.amount + acc, 0) ?? 0;
|
|
2236
|
-
return /* @__PURE__ */
|
|
2203
|
+
return /* @__PURE__ */ jsxs15(
|
|
2237
2204
|
"div",
|
|
2238
2205
|
{
|
|
2239
|
-
className: "divide-y
|
|
2206
|
+
className: "divide-y",
|
|
2240
2207
|
"data-testid": `order-payment-${payment.id}`,
|
|
2241
2208
|
children: [
|
|
2242
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ jsxs15(
|
|
2243
2210
|
"div",
|
|
2244
2211
|
{
|
|
2245
2212
|
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]",
|
|
2246
2213
|
"data-testid": `order-payment-${payment.id}-row`,
|
|
2247
2214
|
children: [
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
|
|
2215
|
+
/* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2216
|
+
/* @__PURE__ */ jsx15(
|
|
2217
|
+
Text11,
|
|
2251
2218
|
{
|
|
2252
2219
|
size: "small",
|
|
2253
2220
|
leading: "compact",
|
|
2254
2221
|
weight: "plus",
|
|
2255
2222
|
className: "truncate",
|
|
2256
2223
|
"data-testid": `order-payment-${payment.id}-id`,
|
|
2257
|
-
children: /* @__PURE__ */
|
|
2224
|
+
children: /* @__PURE__ */ jsx15(display_id_default, { id: payment.id })
|
|
2258
2225
|
}
|
|
2259
2226
|
),
|
|
2260
|
-
/* @__PURE__ */
|
|
2261
|
-
|
|
2227
|
+
/* @__PURE__ */ jsx15(
|
|
2228
|
+
Text11,
|
|
2262
2229
|
{
|
|
2263
2230
|
size: "small",
|
|
2264
2231
|
leading: "compact",
|
|
@@ -2267,8 +2234,8 @@ var Payment = ({
|
|
|
2267
2234
|
}
|
|
2268
2235
|
)
|
|
2269
2236
|
] }),
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
|
|
2237
|
+
/* @__PURE__ */ jsx15("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx15(
|
|
2238
|
+
Text11,
|
|
2272
2239
|
{
|
|
2273
2240
|
size: "small",
|
|
2274
2241
|
leading: "compact",
|
|
@@ -2277,7 +2244,7 @@ var Payment = ({
|
|
|
2277
2244
|
children: payment.provider_id
|
|
2278
2245
|
}
|
|
2279
2246
|
) }),
|
|
2280
|
-
/* @__PURE__ */
|
|
2247
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(
|
|
2281
2248
|
StatusBadge3,
|
|
2282
2249
|
{
|
|
2283
2250
|
color,
|
|
@@ -2286,8 +2253,8 @@ var Payment = ({
|
|
|
2286
2253
|
children: status
|
|
2287
2254
|
}
|
|
2288
2255
|
) }),
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
|
|
2256
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(
|
|
2257
|
+
Text11,
|
|
2291
2258
|
{
|
|
2292
2259
|
size: "small",
|
|
2293
2260
|
leading: "compact",
|
|
@@ -2295,7 +2262,7 @@ var Payment = ({
|
|
|
2295
2262
|
children: getLocaleAmount(payment.amount, payment.currency_code)
|
|
2296
2263
|
}
|
|
2297
2264
|
) }),
|
|
2298
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx15(
|
|
2299
2266
|
ActionMenu,
|
|
2300
2267
|
{
|
|
2301
2268
|
groups: [
|
|
@@ -2303,7 +2270,7 @@ var Payment = ({
|
|
|
2303
2270
|
actions: [
|
|
2304
2271
|
{
|
|
2305
2272
|
label: t("orders.payment.createRefund"),
|
|
2306
|
-
icon: /* @__PURE__ */
|
|
2273
|
+
icon: /* @__PURE__ */ jsx15(XCircle2, {}),
|
|
2307
2274
|
to: `/orders/${order.id}/refund?paymentId=${payment.id}`,
|
|
2308
2275
|
disabled: !payment.captured_at || !!payment.canceled_at || totalRefunded >= payment.amount
|
|
2309
2276
|
}
|
|
@@ -2316,24 +2283,24 @@ var Payment = ({
|
|
|
2316
2283
|
]
|
|
2317
2284
|
}
|
|
2318
2285
|
),
|
|
2319
|
-
showCapture && /* @__PURE__ */
|
|
2286
|
+
showCapture && /* @__PURE__ */ jsxs15(
|
|
2320
2287
|
"div",
|
|
2321
2288
|
{
|
|
2322
2289
|
className: "flex items-center justify-between bg-ui-bg-subtle px-6 py-4",
|
|
2323
2290
|
"data-testid": `order-payment-${payment.id}-capture-section`,
|
|
2324
2291
|
children: [
|
|
2325
|
-
/* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-x-2", children: [
|
|
2293
|
+
/* @__PURE__ */ jsx15(ArrowDownRightMini, { className: "shrink-0 text-ui-fg-muted" }),
|
|
2294
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx15(
|
|
2328
2295
|
Trans,
|
|
2329
2296
|
{
|
|
2330
2297
|
i18nKey: "orders.payment.isReadyToBeCaptured",
|
|
2331
|
-
components: [/* @__PURE__ */
|
|
2298
|
+
components: [/* @__PURE__ */ jsx15(display_id_default, { id: payment.id }, payment.id)]
|
|
2332
2299
|
}
|
|
2333
2300
|
) })
|
|
2334
2301
|
] }),
|
|
2335
|
-
/* @__PURE__ */
|
|
2336
|
-
|
|
2302
|
+
/* @__PURE__ */ jsxs15(
|
|
2303
|
+
Button6,
|
|
2337
2304
|
{
|
|
2338
2305
|
className: "shrink-0",
|
|
2339
2306
|
size: "small",
|
|
@@ -2341,15 +2308,15 @@ var Payment = ({
|
|
|
2341
2308
|
onClick: handleCapture,
|
|
2342
2309
|
"data-testid": `order-payment-${payment.id}-capture-button`,
|
|
2343
2310
|
children: [
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx15("span", { className: "hidden sm:block", children: t("orders.payment.capture") }),
|
|
2312
|
+
/* @__PURE__ */ jsx15("span", { className: "sm:hidden", children: t("orders.payment.capture_short") })
|
|
2346
2313
|
]
|
|
2347
2314
|
}
|
|
2348
2315
|
)
|
|
2349
2316
|
]
|
|
2350
2317
|
}
|
|
2351
2318
|
),
|
|
2352
|
-
refunds.map((refund) => /* @__PURE__ */
|
|
2319
|
+
refunds.map((refund) => /* @__PURE__ */ jsx15(Refund, { refund, currencyCode }, refund.id))
|
|
2353
2320
|
]
|
|
2354
2321
|
}
|
|
2355
2322
|
);
|
|
@@ -2362,31 +2329,31 @@ var CreditLine = ({
|
|
|
2362
2329
|
return null;
|
|
2363
2330
|
}
|
|
2364
2331
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
2365
|
-
const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */
|
|
2366
|
-
return /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
|
|
2332
|
+
const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx15(display_id_default, { id: creditLine.reference_id }) : null;
|
|
2333
|
+
return /* @__PURE__ */ jsx15("div", { className: "divide-y", children: /* @__PURE__ */ jsxs15("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: [
|
|
2334
|
+
/* @__PURE__ */ jsxs15("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2335
|
+
/* @__PURE__ */ jsx15(
|
|
2336
|
+
Text11,
|
|
2370
2337
|
{
|
|
2371
2338
|
size: "small",
|
|
2372
2339
|
leading: "compact",
|
|
2373
2340
|
weight: "plus",
|
|
2374
2341
|
className: "truncate",
|
|
2375
|
-
children: /* @__PURE__ */
|
|
2342
|
+
children: /* @__PURE__ */ jsx15(display_id_default, { id: creditLine.id })
|
|
2376
2343
|
}
|
|
2377
2344
|
),
|
|
2378
|
-
/* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: creditLine.created_at ? format2(
|
|
2379
2346
|
new Date(creditLine.created_at),
|
|
2380
2347
|
"dd MMM, yyyy, HH:mm:ss"
|
|
2381
2348
|
) : "-" })
|
|
2382
2349
|
] }),
|
|
2383
|
-
/* @__PURE__ */
|
|
2350
|
+
/* @__PURE__ */ jsx15("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs15(Text11, { size: "small", leading: "compact", className: "capitalize", children: [
|
|
2384
2351
|
prettyReference,
|
|
2385
2352
|
" (",
|
|
2386
2353
|
prettyReferenceId,
|
|
2387
2354
|
")"
|
|
2388
2355
|
] }) }),
|
|
2389
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx15(Text11, { size: "small", leading: "compact", children: getLocaleAmount(creditLine.amount, currencyCode) }) })
|
|
2390
2357
|
] }) });
|
|
2391
2358
|
};
|
|
2392
2359
|
var PaymentBreakdown = ({
|
|
@@ -2409,15 +2376,15 @@ var PaymentBreakdown = ({
|
|
|
2409
2376
|
}
|
|
2410
2377
|
return { event: entry, type };
|
|
2411
2378
|
});
|
|
2412
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsx15(
|
|
2413
2380
|
"div",
|
|
2414
2381
|
{
|
|
2415
|
-
className: "flex flex-col divide-y
|
|
2382
|
+
className: "flex flex-col divide-y",
|
|
2416
2383
|
"data-testid": "order-payment-breakdown",
|
|
2417
2384
|
children: entries.map(({ type, event }) => {
|
|
2418
2385
|
switch (type) {
|
|
2419
2386
|
case "payment":
|
|
2420
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ jsx15(
|
|
2421
2388
|
Payment,
|
|
2422
2389
|
{
|
|
2423
2390
|
order,
|
|
@@ -2430,7 +2397,7 @@ var PaymentBreakdown = ({
|
|
|
2430
2397
|
event.id
|
|
2431
2398
|
);
|
|
2432
2399
|
case "refund":
|
|
2433
|
-
return /* @__PURE__ */
|
|
2400
|
+
return /* @__PURE__ */ jsx15(
|
|
2434
2401
|
Refund,
|
|
2435
2402
|
{
|
|
2436
2403
|
refund: event,
|
|
@@ -2439,7 +2406,7 @@ var PaymentBreakdown = ({
|
|
|
2439
2406
|
event.id
|
|
2440
2407
|
);
|
|
2441
2408
|
case "credit_line_refund":
|
|
2442
|
-
return /* @__PURE__ */
|
|
2409
|
+
return /* @__PURE__ */ jsx15(
|
|
2443
2410
|
CreditLine,
|
|
2444
2411
|
{
|
|
2445
2412
|
creditLine: event,
|
|
@@ -2453,36 +2420,36 @@ var PaymentBreakdown = ({
|
|
|
2453
2420
|
);
|
|
2454
2421
|
};
|
|
2455
2422
|
var Total = ({ order }) => {
|
|
2456
|
-
const { t } =
|
|
2423
|
+
const { t } = useTranslation15();
|
|
2457
2424
|
const totalPending = getTotalPending(order.payment_collections);
|
|
2458
|
-
return /* @__PURE__ */
|
|
2425
|
+
return /* @__PURE__ */ jsxs15(
|
|
2459
2426
|
"div",
|
|
2460
2427
|
{
|
|
2461
2428
|
className: "flex flex-col gap-y-4 px-6 py-4",
|
|
2462
2429
|
"data-testid": "order-payment-total",
|
|
2463
2430
|
children: [
|
|
2464
|
-
/* @__PURE__ */
|
|
2431
|
+
/* @__PURE__ */ jsxs15(
|
|
2465
2432
|
"div",
|
|
2466
2433
|
{
|
|
2467
2434
|
className: "flex items-center justify-between",
|
|
2468
2435
|
"data-testid": "order-payment-total-paid",
|
|
2469
2436
|
children: [
|
|
2470
|
-
/* @__PURE__ */
|
|
2471
|
-
/* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
|
|
2438
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(
|
|
2472
2439
|
getTotalCaptured(order.payment_collections),
|
|
2473
2440
|
order.currency_code
|
|
2474
2441
|
) })
|
|
2475
2442
|
]
|
|
2476
2443
|
}
|
|
2477
2444
|
),
|
|
2478
|
-
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */
|
|
2445
|
+
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs15(
|
|
2479
2446
|
"div",
|
|
2480
2447
|
{
|
|
2481
2448
|
className: "flex items-center justify-between",
|
|
2482
2449
|
"data-testid": "order-payment-total-pending",
|
|
2483
2450
|
children: [
|
|
2484
|
-
/* @__PURE__ */
|
|
2485
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
|
|
2452
|
+
/* @__PURE__ */ jsx15(Text11, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
|
|
2486
2453
|
]
|
|
2487
2454
|
}
|
|
2488
2455
|
)
|
|
@@ -2492,12 +2459,11 @@ var Total = ({ order }) => {
|
|
|
2492
2459
|
};
|
|
2493
2460
|
|
|
2494
2461
|
// src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
|
|
2495
|
-
import { useMemo as
|
|
2496
|
-
import { useTranslation as
|
|
2462
|
+
import { useMemo as useMemo4, useState as useState6 } from "react";
|
|
2463
|
+
import { useTranslation as useTranslation18 } from "react-i18next";
|
|
2497
2464
|
import { Link as Link3 } from "react-router-dom";
|
|
2498
2465
|
import {
|
|
2499
2466
|
ArrowDownRightMini as ArrowDownRightMini2,
|
|
2500
|
-
ArrowLongRight,
|
|
2501
2467
|
ArrowPath as ArrowPath3,
|
|
2502
2468
|
ArrowUturnLeft as ArrowUturnLeft2,
|
|
2503
2469
|
DocumentText as DocumentText2,
|
|
@@ -2507,17 +2473,18 @@ import {
|
|
|
2507
2473
|
} from "@medusajs/icons";
|
|
2508
2474
|
import {
|
|
2509
2475
|
Badge as Badge4,
|
|
2510
|
-
Button as
|
|
2476
|
+
Button as Button7,
|
|
2511
2477
|
clx as clx3,
|
|
2512
|
-
Container as
|
|
2478
|
+
Container as Container11,
|
|
2513
2479
|
Copy as Copy5,
|
|
2514
|
-
Heading as
|
|
2480
|
+
Heading as Heading11,
|
|
2515
2481
|
StatusBadge as StatusBadge4,
|
|
2516
|
-
Text as
|
|
2517
|
-
toast as
|
|
2482
|
+
Text as Text13,
|
|
2483
|
+
toast as toast9,
|
|
2518
2484
|
Tooltip as Tooltip6,
|
|
2519
|
-
usePrompt as
|
|
2485
|
+
usePrompt as usePrompt4
|
|
2520
2486
|
} from "@medusajs/ui";
|
|
2487
|
+
import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
|
|
2521
2488
|
import { format as format3 } from "date-fns";
|
|
2522
2489
|
|
|
2523
2490
|
// src/lib/credit-line.ts
|
|
@@ -2528,12 +2495,12 @@ var getTotalCreditLines = (creditLines) => creditLines.reduce((acc, creditLine)
|
|
|
2528
2495
|
|
|
2529
2496
|
// src/pages/orders/order-detail/components/order-summary-section/return-info-popover.tsx
|
|
2530
2497
|
import { InformationCircleSolid } from "@medusajs/icons";
|
|
2531
|
-
import { Badge as Badge2, Popover as Popover3, Text as
|
|
2498
|
+
import { Badge as Badge2, Popover as Popover3, Text as Text12 } from "@medusajs/ui";
|
|
2532
2499
|
import { useState as useState5 } from "react";
|
|
2533
|
-
import { useTranslation as
|
|
2534
|
-
import { jsx as
|
|
2500
|
+
import { useTranslation as useTranslation16 } from "react-i18next";
|
|
2501
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2535
2502
|
function ReturnInfoPopover({ orderReturn }) {
|
|
2536
|
-
const { t } =
|
|
2503
|
+
const { t } = useTranslation16();
|
|
2537
2504
|
const [open, setOpen] = useState5(false);
|
|
2538
2505
|
const { getFullDate } = useDate();
|
|
2539
2506
|
const handleMouseEnter = () => {
|
|
@@ -2555,36 +2522,36 @@ function ReturnInfoPopover({ orderReturn }) {
|
|
|
2555
2522
|
if (typeof orderReturn !== "object") {
|
|
2556
2523
|
return;
|
|
2557
2524
|
}
|
|
2558
|
-
return /* @__PURE__ */
|
|
2559
|
-
/* @__PURE__ */
|
|
2525
|
+
return /* @__PURE__ */ jsxs16(Popover3, { open, children: [
|
|
2526
|
+
/* @__PURE__ */ jsx16(
|
|
2560
2527
|
Popover3.Trigger,
|
|
2561
2528
|
{
|
|
2562
2529
|
onMouseEnter: handleMouseEnter,
|
|
2563
2530
|
onMouseLeave: handleMouseLeave,
|
|
2564
2531
|
autoFocus: false,
|
|
2565
2532
|
className: "align-sub focus-visible:outline-none",
|
|
2566
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ jsx16(InformationCircleSolid, {})
|
|
2567
2534
|
}
|
|
2568
2535
|
),
|
|
2569
|
-
/* @__PURE__ */
|
|
2536
|
+
/* @__PURE__ */ jsx16(
|
|
2570
2537
|
Popover3.Content,
|
|
2571
2538
|
{
|
|
2572
2539
|
align: "center",
|
|
2573
2540
|
side: "top",
|
|
2574
2541
|
className: "bg-ui-bg-component p-2 focus-visible:outline-none",
|
|
2575
|
-
children: /* @__PURE__ */
|
|
2576
|
-
/* @__PURE__ */
|
|
2542
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "", children: [
|
|
2543
|
+
/* @__PURE__ */ jsxs16(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
|
|
2577
2544
|
returnType,
|
|
2578
2545
|
": #",
|
|
2579
2546
|
returnTypeId.slice(-7)
|
|
2580
2547
|
] }),
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ jsxs16(Text12, { size: "xsmall", children: [
|
|
2549
|
+
/* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
|
|
2583
2550
|
" \xB7 ",
|
|
2584
2551
|
getFullDate({ date: orderReturn.requested_at, includeTime: true })
|
|
2585
2552
|
] }),
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ jsxs16(Text12, { size: "xsmall", children: [
|
|
2554
|
+
/* @__PURE__ */ jsx16("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
|
|
2588
2555
|
" \xB7 ",
|
|
2589
2556
|
orderReturn.received_at ? getFullDate({
|
|
2590
2557
|
date: orderReturn.received_at,
|
|
@@ -2601,10 +2568,10 @@ var return_info_popover_default = ReturnInfoPopover;
|
|
|
2601
2568
|
// src/pages/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx
|
|
2602
2569
|
import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
|
|
2603
2570
|
import { Badge as Badge3, Tooltip as Tooltip5 } from "@medusajs/ui";
|
|
2604
|
-
import { useTranslation as
|
|
2605
|
-
import { jsx as
|
|
2571
|
+
import { useTranslation as useTranslation17 } from "react-i18next";
|
|
2572
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2606
2573
|
function ShippingInfoPopover({ shippingMethod }) {
|
|
2607
|
-
const { t } =
|
|
2574
|
+
const { t } = useTranslation17();
|
|
2608
2575
|
const shippingDetail = shippingMethod?.detail;
|
|
2609
2576
|
if (!shippingDetail) {
|
|
2610
2577
|
return;
|
|
@@ -2622,25 +2589,25 @@ function ShippingInfoPopover({ shippingMethod }) {
|
|
|
2622
2589
|
if (!rmaId) {
|
|
2623
2590
|
return;
|
|
2624
2591
|
}
|
|
2625
|
-
return /* @__PURE__ */
|
|
2592
|
+
return /* @__PURE__ */ jsx17(
|
|
2626
2593
|
Tooltip5,
|
|
2627
2594
|
{
|
|
2628
|
-
content: /* @__PURE__ */
|
|
2595
|
+
content: /* @__PURE__ */ jsxs17(Badge3, { size: "2xsmall", rounded: "full", children: [
|
|
2629
2596
|
rmaType,
|
|
2630
2597
|
": #",
|
|
2631
2598
|
rmaId.slice(-7)
|
|
2632
2599
|
] }),
|
|
2633
|
-
children: /* @__PURE__ */
|
|
2600
|
+
children: /* @__PURE__ */ jsx17(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
|
|
2634
2601
|
}
|
|
2635
2602
|
);
|
|
2636
2603
|
}
|
|
2637
2604
|
var shipping_info_popover_default = ShippingInfoPopover;
|
|
2638
2605
|
|
|
2639
2606
|
// src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
|
|
2640
|
-
import { Fragment as Fragment3, jsx as
|
|
2607
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2641
2608
|
var OrderSummarySection = ({ order }) => {
|
|
2642
|
-
const { t } =
|
|
2643
|
-
const prompt =
|
|
2609
|
+
const { t } = useTranslation18();
|
|
2610
|
+
const prompt = usePrompt4();
|
|
2644
2611
|
const { reservations } = useReservationItems(
|
|
2645
2612
|
{
|
|
2646
2613
|
line_item_id: order?.items?.map((i) => i.id),
|
|
@@ -2649,34 +2616,6 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2649
2616
|
{ enabled: Array.isArray(order?.items) }
|
|
2650
2617
|
);
|
|
2651
2618
|
const { order: orderPreview } = useOrderPreview(order.id);
|
|
2652
|
-
const { returns = [] } = useReturns({
|
|
2653
|
-
status: "requested",
|
|
2654
|
-
order_id: order.id,
|
|
2655
|
-
fields: "+received_at"
|
|
2656
|
-
});
|
|
2657
|
-
const receivableReturns = useMemo3(
|
|
2658
|
-
() => returns.filter((r) => !r.canceled_at),
|
|
2659
|
-
[returns]
|
|
2660
|
-
);
|
|
2661
|
-
const showReturns = !!receivableReturns.length;
|
|
2662
|
-
const showAllocateButton = useMemo3(() => {
|
|
2663
|
-
if (!reservations) {
|
|
2664
|
-
return false;
|
|
2665
|
-
}
|
|
2666
|
-
const reservationsMap = new Map(
|
|
2667
|
-
reservations.map((r) => [r.line_item_id, r.id])
|
|
2668
|
-
);
|
|
2669
|
-
for (const item of order.items) {
|
|
2670
|
-
if (item.variant?.manage_inventory) {
|
|
2671
|
-
if (item.quantity - item.detail.fulfilled_quantity > 0) {
|
|
2672
|
-
if (!reservationsMap.has(item.id)) {
|
|
2673
|
-
return true;
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
return false;
|
|
2679
|
-
}, [order.items, reservations]);
|
|
2680
2619
|
const unpaidPaymentCollection = order.payment_collections.find(
|
|
2681
2620
|
(pc) => pc.status === "not_paid"
|
|
2682
2621
|
);
|
|
@@ -2711,7 +2650,7 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2711
2650
|
{ order_id: order.id },
|
|
2712
2651
|
{
|
|
2713
2652
|
onSuccess: () => {
|
|
2714
|
-
|
|
2653
|
+
toast9.success(
|
|
2715
2654
|
t("orders.payment.markAsPaidPaymentSuccess", {
|
|
2716
2655
|
amount: formatCurrency(
|
|
2717
2656
|
paymentCollection.amount,
|
|
@@ -2721,86 +2660,30 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2721
2660
|
);
|
|
2722
2661
|
},
|
|
2723
2662
|
onError: (error) => {
|
|
2724
|
-
|
|
2663
|
+
toast9.error(error.message);
|
|
2725
2664
|
}
|
|
2726
2665
|
}
|
|
2727
2666
|
);
|
|
2728
2667
|
};
|
|
2729
|
-
return /* @__PURE__ */
|
|
2730
|
-
|
|
2668
|
+
return /* @__PURE__ */ jsxs18(
|
|
2669
|
+
Container11,
|
|
2731
2670
|
{
|
|
2732
|
-
className: "divide-y
|
|
2671
|
+
className: "divide-y p-0",
|
|
2733
2672
|
"data-testid": "order-summary-section",
|
|
2734
2673
|
children: [
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
/* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
/* @__PURE__ */
|
|
2740
|
-
(
|
|
2674
|
+
/* @__PURE__ */ jsx18(Header3, { order, orderPreview }),
|
|
2675
|
+
/* @__PURE__ */ jsx18(ItemBreakdown, { order, reservations }),
|
|
2676
|
+
/* @__PURE__ */ jsx18(CostBreakdown, { order }),
|
|
2677
|
+
/* @__PURE__ */ jsx18(DiscountAndTotalBreakdown, { order }),
|
|
2678
|
+
/* @__PURE__ */ jsx18(Total2, { order }),
|
|
2679
|
+
(showPayment || showRefund) && /* @__PURE__ */ jsxs18(
|
|
2741
2680
|
"div",
|
|
2742
2681
|
{
|
|
2743
2682
|
className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4",
|
|
2744
2683
|
"data-testid": "order-summary-actions",
|
|
2745
2684
|
children: [
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
{
|
|
2749
|
-
asChild: true,
|
|
2750
|
-
variant: "secondary",
|
|
2751
|
-
size: "small",
|
|
2752
|
-
"data-testid": "order-summary-receive-return-button",
|
|
2753
|
-
children: /* @__PURE__ */ jsx17(
|
|
2754
|
-
Link3,
|
|
2755
|
-
{
|
|
2756
|
-
to: `/orders/${order.id}/returns/${receivableReturns[0].id}/receive`,
|
|
2757
|
-
children: t("orders.returns.receive.action")
|
|
2758
|
-
}
|
|
2759
|
-
)
|
|
2760
|
-
}
|
|
2761
|
-
) : /* @__PURE__ */ jsx17(
|
|
2762
|
-
ActionMenu,
|
|
2763
|
-
{
|
|
2764
|
-
groups: [
|
|
2765
|
-
{
|
|
2766
|
-
actions: receivableReturns.map((r) => {
|
|
2767
|
-
let id = r.id;
|
|
2768
|
-
let returnType = "Return";
|
|
2769
|
-
if (r.exchange_id) {
|
|
2770
|
-
id = r.exchange_id;
|
|
2771
|
-
returnType = "Exchange";
|
|
2772
|
-
}
|
|
2773
|
-
if (r.claim_id) {
|
|
2774
|
-
id = r.claim_id;
|
|
2775
|
-
returnType = "Claim";
|
|
2776
|
-
}
|
|
2777
|
-
return {
|
|
2778
|
-
label: t("orders.returns.receive.receiveItems", {
|
|
2779
|
-
id: `#${id.slice(-7)}`,
|
|
2780
|
-
returnType
|
|
2781
|
-
}),
|
|
2782
|
-
icon: /* @__PURE__ */ jsx17(ArrowLongRight, {}),
|
|
2783
|
-
to: `/orders/${order.id}/returns/${r.id}/receive`
|
|
2784
|
-
};
|
|
2785
|
-
})
|
|
2786
|
-
}
|
|
2787
|
-
],
|
|
2788
|
-
"data-testid": "order-summary-receive-returns-menu",
|
|
2789
|
-
children: /* @__PURE__ */ jsx17(Button8, { variant: "secondary", size: "small", children: t("orders.returns.receive.action") })
|
|
2790
|
-
}
|
|
2791
|
-
)),
|
|
2792
|
-
showAllocateButton && /* @__PURE__ */ jsx17(
|
|
2793
|
-
Button8,
|
|
2794
|
-
{
|
|
2795
|
-
asChild: true,
|
|
2796
|
-
variant: "secondary",
|
|
2797
|
-
size: "small",
|
|
2798
|
-
"data-testid": "order-summary-allocate-items-button",
|
|
2799
|
-
children: /* @__PURE__ */ jsx17(Link3, { to: "allocate-items", children: t("orders.allocateItems.action") })
|
|
2800
|
-
}
|
|
2801
|
-
),
|
|
2802
|
-
showPayment && /* @__PURE__ */ jsx17(
|
|
2803
|
-
Button8,
|
|
2685
|
+
showPayment && /* @__PURE__ */ jsx18(
|
|
2686
|
+
Button7,
|
|
2804
2687
|
{
|
|
2805
2688
|
size: "small",
|
|
2806
2689
|
variant: "secondary",
|
|
@@ -2809,14 +2692,14 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2809
2692
|
children: t("orders.payment.markAsPaid")
|
|
2810
2693
|
}
|
|
2811
2694
|
),
|
|
2812
|
-
showRefund && /* @__PURE__ */
|
|
2813
|
-
|
|
2695
|
+
showRefund && /* @__PURE__ */ jsx18(
|
|
2696
|
+
Button7,
|
|
2814
2697
|
{
|
|
2815
2698
|
size: "small",
|
|
2816
2699
|
variant: "secondary",
|
|
2817
2700
|
asChild: true,
|
|
2818
2701
|
"data-testid": "order-summary-refund-button",
|
|
2819
|
-
children: /* @__PURE__ */
|
|
2702
|
+
children: /* @__PURE__ */ jsx18(Link3, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
|
|
2820
2703
|
amount: getStylizedAmount(
|
|
2821
2704
|
pendingDifference * -1,
|
|
2822
2705
|
order?.currency_code
|
|
@@ -2826,7 +2709,8 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2826
2709
|
)
|
|
2827
2710
|
]
|
|
2828
2711
|
}
|
|
2829
|
-
)
|
|
2712
|
+
),
|
|
2713
|
+
/* @__PURE__ */ jsx18(DisplayExtensionZone6, { model: "order", zone: "summary", data: order })
|
|
2830
2714
|
]
|
|
2831
2715
|
}
|
|
2832
2716
|
);
|
|
@@ -2835,20 +2719,20 @@ var Header3 = ({
|
|
|
2835
2719
|
order,
|
|
2836
2720
|
orderPreview
|
|
2837
2721
|
}) => {
|
|
2838
|
-
const { t } =
|
|
2722
|
+
const { t } = useTranslation18();
|
|
2839
2723
|
const shouldDisableReturn = order.items.every(
|
|
2840
2724
|
(i) => !(getReturnableQuantity(i) > 0)
|
|
2841
2725
|
);
|
|
2842
2726
|
const isOrderEditActive = orderPreview?.order_change?.change_type === "edit";
|
|
2843
2727
|
const isOrderEditPending = orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "pending";
|
|
2844
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsxs18(
|
|
2845
2729
|
"div",
|
|
2846
2730
|
{
|
|
2847
2731
|
className: "flex items-center justify-between px-6 py-4",
|
|
2848
2732
|
"data-testid": "order-summary-header",
|
|
2849
2733
|
children: [
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
/* @__PURE__ */
|
|
2734
|
+
/* @__PURE__ */ jsx18(Heading11, { level: "h2", "data-testid": "order-summary-heading", children: t("fields.summary") }),
|
|
2735
|
+
/* @__PURE__ */ jsx18(
|
|
2852
2736
|
ActionMenu,
|
|
2853
2737
|
{
|
|
2854
2738
|
groups: [
|
|
@@ -2859,7 +2743,7 @@ var Header3 = ({
|
|
|
2859
2743
|
isOrderEditPending ? "orders.summary.editOrderContinue" : "orders.summary.editOrder"
|
|
2860
2744
|
),
|
|
2861
2745
|
to: `/orders/${order.id}/edits`,
|
|
2862
|
-
icon: /* @__PURE__ */
|
|
2746
|
+
icon: /* @__PURE__ */ jsx18(PencilSquare, {}),
|
|
2863
2747
|
disabled: order.status === "canceled" || orderPreview?.order_change && orderPreview?.order_change?.change_type !== "edit" || orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "requested"
|
|
2864
2748
|
}
|
|
2865
2749
|
]
|
|
@@ -2869,19 +2753,19 @@ var Header3 = ({
|
|
|
2869
2753
|
{
|
|
2870
2754
|
label: t("orders.returns.create"),
|
|
2871
2755
|
to: `/orders/${order.id}/returns`,
|
|
2872
|
-
icon: /* @__PURE__ */
|
|
2756
|
+
icon: /* @__PURE__ */ jsx18(ArrowUturnLeft2, {}),
|
|
2873
2757
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
|
|
2874
2758
|
},
|
|
2875
2759
|
{
|
|
2876
2760
|
label: orderPreview?.order_change?.id && orderPreview?.order_change?.exchange_id ? t("orders.exchanges.manage") : t("orders.exchanges.create"),
|
|
2877
2761
|
to: `/orders/${order.id}/exchanges`,
|
|
2878
|
-
icon: /* @__PURE__ */
|
|
2762
|
+
icon: /* @__PURE__ */ jsx18(ArrowPath3, {}),
|
|
2879
2763
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.exchange_id || !!orderPreview?.order_change?.claim_id
|
|
2880
2764
|
},
|
|
2881
2765
|
{
|
|
2882
2766
|
label: orderPreview?.order_change?.id && orderPreview?.order_change?.claim_id ? t("orders.claims.manage") : t("orders.claims.create"),
|
|
2883
2767
|
to: `/orders/${order.id}/claims`,
|
|
2884
|
-
icon: /* @__PURE__ */
|
|
2768
|
+
icon: /* @__PURE__ */ jsx18(ExclamationCircle2, {}),
|
|
2885
2769
|
disabled: shouldDisableReturn || isOrderEditActive || !!orderPreview?.order_change?.return_id && !orderPreview?.order_change?.claim_id || !!orderPreview?.order_change?.exchange_id
|
|
2886
2770
|
}
|
|
2887
2771
|
]
|
|
@@ -2902,27 +2786,30 @@ var Item = ({
|
|
|
2902
2786
|
claims,
|
|
2903
2787
|
exchanges
|
|
2904
2788
|
}) => {
|
|
2905
|
-
const { t } =
|
|
2906
|
-
const
|
|
2907
|
-
const
|
|
2789
|
+
const { t } = useTranslation18();
|
|
2790
|
+
const offerInventoryLinks = item.offer?.inventory_item_link ?? [];
|
|
2791
|
+
const isInventoryManaged = !!offerInventoryLinks.length;
|
|
2792
|
+
const hasInventoryKit = (item.variant?.inventory_items?.length || 0) > 1 || item.variant?.inventory_items?.some((i) => i.required_quantity > 1);
|
|
2908
2793
|
const hasUnfulfilledItems = item.quantity - item.detail.fulfilled_quantity > 0;
|
|
2909
|
-
|
|
2910
|
-
|
|
2794
|
+
const offerSku = item.offer?.sku ?? null;
|
|
2795
|
+
const captionSku = offerSku ?? item.variant_sku ?? null;
|
|
2796
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
2797
|
+
/* @__PURE__ */ jsxs18(
|
|
2911
2798
|
"div",
|
|
2912
2799
|
{
|
|
2913
2800
|
className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
|
|
2914
2801
|
"data-testid": `order-summary-item-${item.id}`,
|
|
2915
2802
|
children: [
|
|
2916
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ jsxs18(
|
|
2917
2804
|
"div",
|
|
2918
2805
|
{
|
|
2919
2806
|
className: "flex items-start gap-x-4",
|
|
2920
2807
|
"data-testid": `order-summary-item-${item.id}-info`,
|
|
2921
2808
|
children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
|
|
2809
|
+
/* @__PURE__ */ jsx18(Thumbnail, { src: item.thumbnail }),
|
|
2810
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
2811
|
+
/* @__PURE__ */ jsx18(
|
|
2812
|
+
Text13,
|
|
2926
2813
|
{
|
|
2927
2814
|
size: "small",
|
|
2928
2815
|
leading: "compact",
|
|
@@ -2931,19 +2818,19 @@ var Item = ({
|
|
|
2931
2818
|
children: item.title
|
|
2932
2819
|
}
|
|
2933
2820
|
),
|
|
2934
|
-
|
|
2821
|
+
captionSku && /* @__PURE__ */ jsxs18(
|
|
2935
2822
|
"div",
|
|
2936
2823
|
{
|
|
2937
2824
|
className: "flex items-center gap-x-1",
|
|
2938
2825
|
"data-testid": `order-summary-item-${item.id}-sku`,
|
|
2939
2826
|
children: [
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", children: captionSku }),
|
|
2828
|
+
/* @__PURE__ */ jsx18(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
|
|
2942
2829
|
]
|
|
2943
2830
|
}
|
|
2944
2831
|
),
|
|
2945
|
-
/* @__PURE__ */
|
|
2946
|
-
|
|
2832
|
+
/* @__PURE__ */ jsx18(
|
|
2833
|
+
Text13,
|
|
2947
2834
|
{
|
|
2948
2835
|
size: "small",
|
|
2949
2836
|
"data-testid": `order-summary-item-${item.id}-options`,
|
|
@@ -2954,31 +2841,31 @@ var Item = ({
|
|
|
2954
2841
|
]
|
|
2955
2842
|
}
|
|
2956
2843
|
),
|
|
2957
|
-
/* @__PURE__ */
|
|
2844
|
+
/* @__PURE__ */ jsxs18(
|
|
2958
2845
|
"div",
|
|
2959
2846
|
{
|
|
2960
2847
|
className: "grid grid-cols-3 items-center gap-x-4",
|
|
2961
2848
|
"data-testid": `order-summary-item-${item.id}-pricing`,
|
|
2962
2849
|
children: [
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
|
|
2850
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsx18(
|
|
2851
|
+
Text13,
|
|
2965
2852
|
{
|
|
2966
2853
|
size: "small",
|
|
2967
2854
|
"data-testid": `order-summary-item-${item.id}-unit-price`,
|
|
2968
2855
|
children: getLocaleAmount(item.unit_price, currencyCode)
|
|
2969
2856
|
}
|
|
2970
2857
|
) }),
|
|
2971
|
-
/* @__PURE__ */
|
|
2858
|
+
/* @__PURE__ */ jsxs18(
|
|
2972
2859
|
"div",
|
|
2973
2860
|
{
|
|
2974
2861
|
className: "flex items-center gap-x-2",
|
|
2975
2862
|
"data-testid": `order-summary-item-${item.id}-quantity`,
|
|
2976
2863
|
children: [
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ jsx18("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs18(Text13, { size: "small", children: [
|
|
2865
|
+
/* @__PURE__ */ jsx18("span", { className: "tabular-nums", children: item.quantity }),
|
|
2979
2866
|
"x"
|
|
2980
2867
|
] }) }),
|
|
2981
|
-
/* @__PURE__ */
|
|
2868
|
+
/* @__PURE__ */ jsx18("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx18(
|
|
2982
2869
|
StatusBadge4,
|
|
2983
2870
|
{
|
|
2984
2871
|
color: reservation ? "green" : "orange",
|
|
@@ -2990,8 +2877,8 @@ var Item = ({
|
|
|
2990
2877
|
]
|
|
2991
2878
|
}
|
|
2992
2879
|
),
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
|
|
2880
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx18(
|
|
2881
|
+
Text13,
|
|
2995
2882
|
{
|
|
2996
2883
|
size: "small",
|
|
2997
2884
|
className: "pt-[1px]",
|
|
@@ -3006,10 +2893,10 @@ var Item = ({
|
|
|
3006
2893
|
},
|
|
3007
2894
|
item.id
|
|
3008
2895
|
),
|
|
3009
|
-
hasInventoryKit && /* @__PURE__ */
|
|
3010
|
-
returns.map((r) => /* @__PURE__ */
|
|
3011
|
-
claims.map((claim) => /* @__PURE__ */
|
|
3012
|
-
exchanges.map((exchange) => /* @__PURE__ */
|
|
2896
|
+
hasInventoryKit && /* @__PURE__ */ jsx18(InventoryKitBreakdown, { item }),
|
|
2897
|
+
returns.map((r) => /* @__PURE__ */ jsx18(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id)),
|
|
2898
|
+
claims.map((claim) => /* @__PURE__ */ jsx18(ClaimBreakdown, { claim, itemId: item.id }, claim.id)),
|
|
2899
|
+
exchanges.map((exchange) => /* @__PURE__ */ jsx18(
|
|
3013
2900
|
ExchangeBreakdown,
|
|
3014
2901
|
{
|
|
3015
2902
|
exchange,
|
|
@@ -3035,13 +2922,13 @@ var ItemBreakdown = ({
|
|
|
3035
2922
|
order_id: order.id,
|
|
3036
2923
|
fields: "*items,*items.reason"
|
|
3037
2924
|
});
|
|
3038
|
-
const reservationsMap =
|
|
2925
|
+
const reservationsMap = useMemo4(
|
|
3039
2926
|
() => new Map((reservations || []).map((r) => [r.line_item_id, r])),
|
|
3040
2927
|
[reservations]
|
|
3041
2928
|
);
|
|
3042
|
-
return /* @__PURE__ */
|
|
2929
|
+
return /* @__PURE__ */ jsx18("div", { "data-testid": "order-summary-items-breakdown", children: order.items?.map((item) => {
|
|
3043
2930
|
const reservation = reservationsMap.get(item.id);
|
|
3044
|
-
return /* @__PURE__ */
|
|
2931
|
+
return /* @__PURE__ */ jsx18(
|
|
3045
2932
|
Item,
|
|
3046
2933
|
{
|
|
3047
2934
|
item,
|
|
@@ -3060,22 +2947,22 @@ var Cost = ({
|
|
|
3060
2947
|
value,
|
|
3061
2948
|
secondaryValue,
|
|
3062
2949
|
tooltip
|
|
3063
|
-
}) => /* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
2950
|
+
}) => /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-3 items-center", children: [
|
|
2951
|
+
/* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", children: [
|
|
3065
2952
|
label,
|
|
3066
2953
|
" ",
|
|
3067
2954
|
tooltip
|
|
3068
2955
|
] }),
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
2956
|
+
/* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: secondaryValue }) }),
|
|
2957
|
+
/* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: value }) })
|
|
3071
2958
|
] });
|
|
3072
2959
|
var CostBreakdown = ({
|
|
3073
2960
|
order
|
|
3074
2961
|
}) => {
|
|
3075
|
-
const { t } =
|
|
2962
|
+
const { t } = useTranslation18();
|
|
3076
2963
|
const [isTaxOpen, setIsTaxOpen] = useState6(false);
|
|
3077
2964
|
const [isShippingOpen, setIsShippingOpen] = useState6(false);
|
|
3078
|
-
const taxCodes =
|
|
2965
|
+
const taxCodes = useMemo4(() => {
|
|
3079
2966
|
const taxCodeMap = {};
|
|
3080
2967
|
order.items.forEach((item) => {
|
|
3081
2968
|
item.tax_lines?.forEach((line) => {
|
|
@@ -3100,32 +2987,32 @@ var CostBreakdown = ({
|
|
|
3100
2987
|
return taxCodeMap;
|
|
3101
2988
|
}, [order]);
|
|
3102
2989
|
const hasTaxes = !!Object.keys(taxCodes).length;
|
|
3103
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsxs18(
|
|
3104
2991
|
"div",
|
|
3105
2992
|
{
|
|
3106
2993
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
3107
2994
|
"data-testid": "order-summary-cost-breakdown",
|
|
3108
2995
|
children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
2996
|
+
/* @__PURE__ */ jsx18(
|
|
3110
2997
|
Cost,
|
|
3111
2998
|
{
|
|
3112
2999
|
label: t("orders.summary.itemSubtotal"),
|
|
3113
3000
|
value: getLocaleAmount(order.item_subtotal, order.currency_code)
|
|
3114
3001
|
}
|
|
3115
3002
|
),
|
|
3116
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx18(
|
|
3117
3004
|
Cost,
|
|
3118
3005
|
{
|
|
3119
3006
|
label: (
|
|
3120
3007
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
3121
|
-
/* @__PURE__ */
|
|
3008
|
+
/* @__PURE__ */ jsxs18(
|
|
3122
3009
|
"span",
|
|
3123
3010
|
{
|
|
3124
3011
|
onClick: () => setIsShippingOpen((o) => !o),
|
|
3125
3012
|
className: "flex cursor-pointer items-center gap-1",
|
|
3126
3013
|
children: [
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3014
|
+
/* @__PURE__ */ jsx18("span", { children: t("orders.summary.shippingSubtotal") }),
|
|
3015
|
+
/* @__PURE__ */ jsx18(
|
|
3129
3016
|
TriangleDownMini,
|
|
3130
3017
|
{
|
|
3131
3018
|
style: {
|
|
@@ -3140,30 +3027,30 @@ var CostBreakdown = ({
|
|
|
3140
3027
|
value: getLocaleAmount(order.shipping_subtotal, order.currency_code)
|
|
3141
3028
|
}
|
|
3142
3029
|
),
|
|
3143
|
-
isShippingOpen && /* @__PURE__ */
|
|
3030
|
+
isShippingOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
|
|
3144
3031
|
(m1, m2) => m1.created_at.localeCompare(m2.created_at)
|
|
3145
3032
|
).map((sm, i) => {
|
|
3146
|
-
return /* @__PURE__ */
|
|
3033
|
+
return /* @__PURE__ */ jsxs18(
|
|
3147
3034
|
"div",
|
|
3148
3035
|
{
|
|
3149
3036
|
className: "flex items-center justify-between gap-x-2",
|
|
3150
3037
|
children: [
|
|
3151
|
-
/* @__PURE__ */
|
|
3038
|
+
/* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
|
|
3152
3039
|
sm.name,
|
|
3153
3040
|
sm.detail.return_id && ` (${t("fields.returnShipping")})`,
|
|
3154
3041
|
" ",
|
|
3155
|
-
/* @__PURE__ */
|
|
3042
|
+
/* @__PURE__ */ jsx18(shipping_info_popover_default, { shippingMethod: sm }, i)
|
|
3156
3043
|
] }) }),
|
|
3157
|
-
/* @__PURE__ */
|
|
3158
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3045
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(sm.subtotal, order.currency_code) })
|
|
3159
3046
|
]
|
|
3160
3047
|
},
|
|
3161
3048
|
sm.id
|
|
3162
3049
|
);
|
|
3163
3050
|
}) }),
|
|
3164
|
-
/* @__PURE__ */
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3052
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-between", children: [
|
|
3053
|
+
/* @__PURE__ */ jsxs18(
|
|
3167
3054
|
"div",
|
|
3168
3055
|
{
|
|
3169
3056
|
onClick: () => hasTaxes && setIsTaxOpen((o) => !o),
|
|
@@ -3171,8 +3058,8 @@ var CostBreakdown = ({
|
|
|
3171
3058
|
"cursor-pointer": hasTaxes
|
|
3172
3059
|
}),
|
|
3173
3060
|
children: [
|
|
3174
|
-
/* @__PURE__ */
|
|
3175
|
-
hasTaxes && /* @__PURE__ */
|
|
3061
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small select-none", children: t("orders.summary.taxTotal") }),
|
|
3062
|
+
hasTaxes && /* @__PURE__ */ jsx18(
|
|
3176
3063
|
TriangleDownMini,
|
|
3177
3064
|
{
|
|
3178
3065
|
style: {
|
|
@@ -3183,34 +3070,34 @@ var CostBreakdown = ({
|
|
|
3183
3070
|
]
|
|
3184
3071
|
}
|
|
3185
3072
|
),
|
|
3186
|
-
/* @__PURE__ */
|
|
3073
|
+
/* @__PURE__ */ jsx18("div", { className: "text-right", children: /* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
|
|
3187
3074
|
] }),
|
|
3188
|
-
isTaxOpen && /* @__PURE__ */
|
|
3189
|
-
return /* @__PURE__ */
|
|
3075
|
+
isTaxOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
|
|
3076
|
+
return /* @__PURE__ */ jsxs18(
|
|
3190
3077
|
"div",
|
|
3191
3078
|
{
|
|
3192
3079
|
className: "flex items-center justify-between gap-x-2",
|
|
3193
3080
|
children: [
|
|
3194
|
-
/* @__PURE__ */
|
|
3195
|
-
/* @__PURE__ */
|
|
3196
|
-
/* @__PURE__ */
|
|
3081
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex gap-1", children: [
|
|
3082
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small", children: code }),
|
|
3083
|
+
/* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
|
|
3197
3084
|
"(",
|
|
3198
3085
|
formatPercentage(rate),
|
|
3199
3086
|
")"
|
|
3200
3087
|
] })
|
|
3201
3088
|
] }),
|
|
3202
|
-
/* @__PURE__ */
|
|
3203
|
-
/* @__PURE__ */
|
|
3089
|
+
/* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3090
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
|
|
3204
3091
|
]
|
|
3205
3092
|
},
|
|
3206
3093
|
code
|
|
3207
3094
|
);
|
|
3208
3095
|
}) })
|
|
3209
3096
|
] }),
|
|
3210
|
-
/* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
|
|
3097
|
+
/* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3098
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
|
|
3099
|
+
/* @__PURE__ */ jsx18(
|
|
3100
|
+
Text13,
|
|
3214
3101
|
{
|
|
3215
3102
|
className: "text-ui-fg-subtle text-bold",
|
|
3216
3103
|
size: "small",
|
|
@@ -3226,11 +3113,11 @@ var CostBreakdown = ({
|
|
|
3226
3113
|
var DiscountAndTotalBreakdown = ({
|
|
3227
3114
|
order
|
|
3228
3115
|
}) => {
|
|
3229
|
-
const { t } =
|
|
3116
|
+
const { t } = useTranslation18();
|
|
3230
3117
|
const [isDiscountOpen, setIsDiscountOpen] = useState6(false);
|
|
3231
3118
|
const [isCreditLinesOpen, setIsCreditLinesOpen] = useState6(false);
|
|
3232
3119
|
const creditLines = order.credit_lines ?? [];
|
|
3233
|
-
const discounts =
|
|
3120
|
+
const discounts = useMemo4(() => {
|
|
3234
3121
|
const discounts2 = [];
|
|
3235
3122
|
if (order.item_discount_total) {
|
|
3236
3123
|
discounts2.push({
|
|
@@ -3258,18 +3145,18 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3258
3145
|
}, [order]);
|
|
3259
3146
|
const hasDiscount = discounts.length > 0;
|
|
3260
3147
|
const hasCreditLines = creditLines.length > 0;
|
|
3261
|
-
return /* @__PURE__ */
|
|
3148
|
+
return /* @__PURE__ */ jsxs18(
|
|
3262
3149
|
"div",
|
|
3263
3150
|
{
|
|
3264
3151
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
3265
3152
|
"data-testid": "order-summary-discount-breakdown",
|
|
3266
3153
|
children: [
|
|
3267
|
-
/* @__PURE__ */
|
|
3154
|
+
/* @__PURE__ */ jsx18(
|
|
3268
3155
|
Cost,
|
|
3269
3156
|
{
|
|
3270
3157
|
label: (
|
|
3271
3158
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
3272
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ jsxs18(
|
|
3273
3160
|
"span",
|
|
3274
3161
|
{
|
|
3275
3162
|
onClick: () => hasDiscount && setIsDiscountOpen((o) => !o),
|
|
@@ -3278,8 +3165,8 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3278
3165
|
}),
|
|
3279
3166
|
"data-testid": "order-summary-discount-toggle",
|
|
3280
3167
|
children: [
|
|
3281
|
-
/* @__PURE__ */
|
|
3282
|
-
hasDiscount && /* @__PURE__ */
|
|
3168
|
+
/* @__PURE__ */ jsx18("span", { children: t("orders.summary.discountTotal") }),
|
|
3169
|
+
hasDiscount && /* @__PURE__ */ jsx18(
|
|
3283
3170
|
TriangleDownMini,
|
|
3284
3171
|
{
|
|
3285
3172
|
style: {
|
|
@@ -3294,41 +3181,41 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3294
3181
|
value: getLocaleAmount(order.discount_total, order.currency_code)
|
|
3295
3182
|
}
|
|
3296
3183
|
),
|
|
3297
|
-
isDiscountOpen && /* @__PURE__ */
|
|
3298
|
-
return /* @__PURE__ */
|
|
3184
|
+
isDiscountOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
|
|
3185
|
+
return /* @__PURE__ */ jsxs18(
|
|
3299
3186
|
"div",
|
|
3300
3187
|
{
|
|
3301
3188
|
className: "flex items-center justify-between gap-x-2",
|
|
3302
3189
|
children: [
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
/* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex gap-1", children: [
|
|
3191
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small", children: t(`fields.${type}`) }),
|
|
3192
|
+
/* @__PURE__ */ jsxs18("span", { className: "txt-small", children: [
|
|
3306
3193
|
"(",
|
|
3307
3194
|
codes.join(", "),
|
|
3308
3195
|
")"
|
|
3309
3196
|
] })
|
|
3310
3197
|
] }),
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3199
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
|
|
3313
3200
|
]
|
|
3314
3201
|
},
|
|
3315
3202
|
type
|
|
3316
3203
|
);
|
|
3317
3204
|
}) }),
|
|
3318
|
-
hasCreditLines && /* @__PURE__ */
|
|
3319
|
-
/* @__PURE__ */
|
|
3205
|
+
hasCreditLines && /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3206
|
+
/* @__PURE__ */ jsx18(
|
|
3320
3207
|
Cost,
|
|
3321
3208
|
{
|
|
3322
3209
|
label: (
|
|
3323
3210
|
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
3324
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsxs18(
|
|
3325
3212
|
"span",
|
|
3326
3213
|
{
|
|
3327
3214
|
onClick: () => setIsCreditLinesOpen((o) => !o),
|
|
3328
3215
|
className: "flex cursor-pointer items-center gap-1",
|
|
3329
3216
|
children: [
|
|
3330
|
-
/* @__PURE__ */
|
|
3331
|
-
/* @__PURE__ */
|
|
3217
|
+
/* @__PURE__ */ jsx18("span", { children: t("orders.creditLines.title") }),
|
|
3218
|
+
/* @__PURE__ */ jsx18(
|
|
3332
3219
|
TriangleDownMini,
|
|
3333
3220
|
{
|
|
3334
3221
|
style: {
|
|
@@ -3346,34 +3233,34 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3346
3233
|
)
|
|
3347
3234
|
}
|
|
3348
3235
|
),
|
|
3349
|
-
isCreditLinesOpen && /* @__PURE__ */
|
|
3236
|
+
isCreditLinesOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
|
|
3350
3237
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
3351
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsxs18(
|
|
3352
3239
|
"div",
|
|
3353
3240
|
{
|
|
3354
3241
|
className: "flex items-center justify-between gap-x-2",
|
|
3355
3242
|
children: [
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */
|
|
3358
|
-
|
|
3243
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center", children: [
|
|
3244
|
+
/* @__PURE__ */ jsx18(
|
|
3245
|
+
Text13,
|
|
3359
3246
|
{
|
|
3360
3247
|
size: "small",
|
|
3361
3248
|
leading: "compact",
|
|
3362
3249
|
weight: "plus",
|
|
3363
3250
|
className: "txt-small text-ui-fg-subtle font-medium",
|
|
3364
|
-
children: /* @__PURE__ */
|
|
3251
|
+
children: /* @__PURE__ */ jsx18(display_id_default, { id: creditLine.id })
|
|
3365
3252
|
}
|
|
3366
3253
|
),
|
|
3367
|
-
/* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3254
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
|
|
3255
|
+
/* @__PURE__ */ jsx18(
|
|
3369
3256
|
Tooltip6,
|
|
3370
3257
|
{
|
|
3371
3258
|
content: format3(
|
|
3372
3259
|
new Date(creditLine.created_at),
|
|
3373
3260
|
"dd MMM, yyyy, HH:mm:ss"
|
|
3374
3261
|
),
|
|
3375
|
-
children: /* @__PURE__ */
|
|
3376
|
-
|
|
3262
|
+
children: /* @__PURE__ */ jsx18(
|
|
3263
|
+
Text13,
|
|
3377
3264
|
{
|
|
3378
3265
|
size: "small",
|
|
3379
3266
|
leading: "compact",
|
|
@@ -3386,9 +3273,9 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3386
3273
|
)
|
|
3387
3274
|
}
|
|
3388
3275
|
),
|
|
3389
|
-
/* @__PURE__ */
|
|
3390
|
-
/* @__PURE__ */
|
|
3391
|
-
|
|
3276
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
|
|
3277
|
+
/* @__PURE__ */ jsxs18(
|
|
3278
|
+
Text13,
|
|
3392
3279
|
{
|
|
3393
3280
|
size: "small",
|
|
3394
3281
|
leading: "compact",
|
|
@@ -3401,8 +3288,8 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3401
3288
|
}
|
|
3402
3289
|
)
|
|
3403
3290
|
] }),
|
|
3404
|
-
/* @__PURE__ */
|
|
3405
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3292
|
+
/* @__PURE__ */ jsx18("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
|
|
3406
3293
|
creditLine.amount,
|
|
3407
3294
|
order.currency_code
|
|
3408
3295
|
) })
|
|
@@ -3412,10 +3299,10 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3412
3299
|
);
|
|
3413
3300
|
}) })
|
|
3414
3301
|
] }),
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3418
|
-
|
|
3302
|
+
/* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3303
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
|
|
3304
|
+
/* @__PURE__ */ jsx18(
|
|
3305
|
+
Text13,
|
|
3419
3306
|
{
|
|
3420
3307
|
className: "text-ui-fg-subtle text-bold",
|
|
3421
3308
|
size: "small",
|
|
@@ -3429,17 +3316,17 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3429
3316
|
);
|
|
3430
3317
|
};
|
|
3431
3318
|
var InventoryKitBreakdown = ({ item }) => {
|
|
3432
|
-
const { t } =
|
|
3319
|
+
const { t } = useTranslation18();
|
|
3433
3320
|
const [isOpen, setIsOpen] = useState6(false);
|
|
3434
3321
|
const inventory = item.variant?.inventory_items || [];
|
|
3435
|
-
return /* @__PURE__ */
|
|
3436
|
-
/* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3323
|
+
/* @__PURE__ */ jsxs18(
|
|
3437
3324
|
"div",
|
|
3438
3325
|
{
|
|
3439
3326
|
onClick: () => setIsOpen((o) => !o),
|
|
3440
3327
|
className: "flex cursor-pointer items-center gap-2 border-t border-dashed px-6 py-4",
|
|
3441
3328
|
children: [
|
|
3442
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx18(
|
|
3443
3330
|
TriangleDownMini,
|
|
3444
3331
|
{
|
|
3445
3332
|
style: {
|
|
@@ -3447,26 +3334,26 @@ var InventoryKitBreakdown = ({ item }) => {
|
|
|
3447
3334
|
}
|
|
3448
3335
|
}
|
|
3449
3336
|
),
|
|
3450
|
-
/* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsx18("span", { className: "text-ui-fg-muted txt-small select-none", children: t("orders.summary.inventoryKit", { count: inventory.length }) })
|
|
3451
3338
|
]
|
|
3452
3339
|
}
|
|
3453
3340
|
),
|
|
3454
|
-
isOpen && /* @__PURE__ */
|
|
3455
|
-
return /* @__PURE__ */
|
|
3341
|
+
isOpen && /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
|
|
3342
|
+
return /* @__PURE__ */ jsxs18(
|
|
3456
3343
|
"div",
|
|
3457
3344
|
{
|
|
3458
3345
|
className: "flex items-center justify-between gap-x-2",
|
|
3459
3346
|
children: [
|
|
3460
|
-
/* @__PURE__ */
|
|
3347
|
+
/* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs18("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
|
|
3461
3348
|
i.inventory.title,
|
|
3462
|
-
i.inventory.sku && /* @__PURE__ */
|
|
3349
|
+
i.inventory.sku && /* @__PURE__ */ jsxs18("span", { className: "text-ui-fg-subtle font-normal", children: [
|
|
3463
3350
|
" ",
|
|
3464
3351
|
"\u22C5 ",
|
|
3465
3352
|
i.inventory.sku
|
|
3466
3353
|
] })
|
|
3467
3354
|
] }) }),
|
|
3468
|
-
/* @__PURE__ */
|
|
3469
|
-
/* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ jsx18("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx18("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3356
|
+
/* @__PURE__ */ jsxs18("span", { className: "txt-small text-ui-fg-muted", children: [
|
|
3470
3357
|
i.required_quantity,
|
|
3471
3358
|
"x"
|
|
3472
3359
|
] })
|
|
@@ -3481,21 +3368,21 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3481
3368
|
orderReturn,
|
|
3482
3369
|
itemId
|
|
3483
3370
|
}) => {
|
|
3484
|
-
const { t } =
|
|
3371
|
+
const { t } = useTranslation18();
|
|
3485
3372
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3486
3373
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3487
|
-
return item && /* @__PURE__ */
|
|
3374
|
+
return item && /* @__PURE__ */ jsxs18(
|
|
3488
3375
|
"div",
|
|
3489
3376
|
{
|
|
3490
3377
|
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",
|
|
3491
3378
|
children: [
|
|
3492
|
-
/* @__PURE__ */
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3380
|
+
/* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3381
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
|
|
3495
3382
|
quantity: damagedQuantity
|
|
3496
3383
|
}) }),
|
|
3497
|
-
item?.note && /* @__PURE__ */
|
|
3498
|
-
item?.reason && /* @__PURE__ */
|
|
3384
|
+
item?.note && /* @__PURE__ */ jsx18(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
|
|
3385
|
+
item?.reason && /* @__PURE__ */ jsx18(
|
|
3499
3386
|
Badge4,
|
|
3500
3387
|
{
|
|
3501
3388
|
size: "2xsmall",
|
|
@@ -3505,9 +3392,9 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3505
3392
|
}
|
|
3506
3393
|
)
|
|
3507
3394
|
] }),
|
|
3508
|
-
/* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3509
3396
|
t(`orders.returns.damagedItemReceived`),
|
|
3510
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
|
|
3511
3398
|
] })
|
|
3512
3399
|
]
|
|
3513
3400
|
},
|
|
@@ -3518,7 +3405,7 @@ var ReturnBreakdown = ({
|
|
|
3518
3405
|
orderReturn,
|
|
3519
3406
|
itemId
|
|
3520
3407
|
}) => {
|
|
3521
|
-
const { t } =
|
|
3408
|
+
const { t } = useTranslation18();
|
|
3522
3409
|
const { getRelativeDate } = useDate();
|
|
3523
3410
|
if (!["requested", "received", "partially_received"].includes(
|
|
3524
3411
|
orderReturn.status || ""
|
|
@@ -3528,29 +3415,29 @@ var ReturnBreakdown = ({
|
|
|
3528
3415
|
const isRequested = orderReturn.status === "requested";
|
|
3529
3416
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3530
3417
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3531
|
-
return item && /* @__PURE__ */
|
|
3532
|
-
damagedQuantity > 0 && /* @__PURE__ */
|
|
3418
|
+
return item && /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3419
|
+
damagedQuantity > 0 && /* @__PURE__ */ jsx18(
|
|
3533
3420
|
ReturnBreakdownWithDamages,
|
|
3534
3421
|
{
|
|
3535
3422
|
orderReturn,
|
|
3536
3423
|
itemId
|
|
3537
3424
|
}
|
|
3538
3425
|
),
|
|
3539
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsxs18(
|
|
3540
3427
|
"div",
|
|
3541
3428
|
{
|
|
3542
3429
|
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",
|
|
3543
3430
|
children: [
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3546
|
-
/* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3432
|
+
/* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3433
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", children: t(
|
|
3547
3434
|
`orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
|
|
3548
3435
|
{
|
|
3549
3436
|
requestedItemsCount: item?.[isRequested ? "quantity" : "received_quantity"]
|
|
3550
3437
|
}
|
|
3551
3438
|
) }),
|
|
3552
|
-
item?.note && /* @__PURE__ */
|
|
3553
|
-
item?.reason && /* @__PURE__ */
|
|
3439
|
+
item?.note && /* @__PURE__ */ jsx18(Tooltip6, { content: item.note, children: /* @__PURE__ */ jsx18(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
|
|
3440
|
+
item?.reason && /* @__PURE__ */ jsx18(
|
|
3554
3441
|
Badge4,
|
|
3555
3442
|
{
|
|
3556
3443
|
size: "2xsmall",
|
|
@@ -3560,13 +3447,13 @@ var ReturnBreakdown = ({
|
|
|
3560
3447
|
}
|
|
3561
3448
|
)
|
|
3562
3449
|
] }),
|
|
3563
|
-
orderReturn && isRequested && /* @__PURE__ */
|
|
3450
|
+
orderReturn && isRequested && /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3564
3451
|
getRelativeDate(orderReturn.created_at),
|
|
3565
|
-
/* @__PURE__ */
|
|
3452
|
+
/* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
|
|
3566
3453
|
] }),
|
|
3567
|
-
orderReturn && !isRequested && /* @__PURE__ */
|
|
3454
|
+
orderReturn && !isRequested && /* @__PURE__ */ jsxs18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3568
3455
|
t(`orders.returns.itemReceived`),
|
|
3569
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ jsx18("span", { className: "ml-2", children: /* @__PURE__ */ jsx18(return_info_popover_default, { orderReturn }) })
|
|
3570
3457
|
] })
|
|
3571
3458
|
]
|
|
3572
3459
|
},
|
|
@@ -3578,26 +3465,26 @@ var ClaimBreakdown = ({
|
|
|
3578
3465
|
claim,
|
|
3579
3466
|
itemId
|
|
3580
3467
|
}) => {
|
|
3581
|
-
const { t } =
|
|
3468
|
+
const { t } = useTranslation18();
|
|
3582
3469
|
const { getRelativeDate } = useDate();
|
|
3583
3470
|
const items = claim.additional_items.filter(
|
|
3584
3471
|
(item) => item.item?.id === itemId
|
|
3585
3472
|
);
|
|
3586
|
-
return !!items.length && /* @__PURE__ */
|
|
3473
|
+
return !!items.length && /* @__PURE__ */ jsxs18(
|
|
3587
3474
|
"div",
|
|
3588
3475
|
{
|
|
3589
3476
|
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",
|
|
3590
3477
|
children: [
|
|
3591
|
-
/* @__PURE__ */
|
|
3592
|
-
/* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3479
|
+
/* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3480
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
|
|
3594
3481
|
itemsCount: items.reduce(
|
|
3595
3482
|
(acc, item) => acc = acc + item.quantity,
|
|
3596
3483
|
0
|
|
3597
3484
|
)
|
|
3598
3485
|
}) })
|
|
3599
3486
|
] }),
|
|
3600
|
-
/* @__PURE__ */
|
|
3487
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(claim.created_at) })
|
|
3601
3488
|
]
|
|
3602
3489
|
},
|
|
3603
3490
|
claim.id
|
|
@@ -3607,68 +3494,68 @@ var ExchangeBreakdown = ({
|
|
|
3607
3494
|
exchange,
|
|
3608
3495
|
itemId
|
|
3609
3496
|
}) => {
|
|
3610
|
-
const { t } =
|
|
3497
|
+
const { t } = useTranslation18();
|
|
3611
3498
|
const { getRelativeDate } = useDate();
|
|
3612
3499
|
const items = exchange.additional_items.filter(
|
|
3613
3500
|
(item) => item?.item?.id === itemId
|
|
3614
3501
|
);
|
|
3615
|
-
return !!items.length && /* @__PURE__ */
|
|
3502
|
+
return !!items.length && /* @__PURE__ */ jsxs18(
|
|
3616
3503
|
"div",
|
|
3617
3504
|
{
|
|
3618
3505
|
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",
|
|
3619
3506
|
children: [
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3507
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3508
|
+
/* @__PURE__ */ jsx18(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3509
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
|
|
3623
3510
|
itemsCount: items.reduce(
|
|
3624
3511
|
(acc, item) => acc = acc + item.quantity,
|
|
3625
3512
|
0
|
|
3626
3513
|
)
|
|
3627
3514
|
}) })
|
|
3628
3515
|
] }),
|
|
3629
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsx18(Text13, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: getRelativeDate(exchange.created_at) })
|
|
3630
3517
|
]
|
|
3631
3518
|
},
|
|
3632
3519
|
exchange.id
|
|
3633
3520
|
);
|
|
3634
3521
|
};
|
|
3635
3522
|
var Total2 = ({ order }) => {
|
|
3636
|
-
const { t } =
|
|
3637
|
-
return /* @__PURE__ */
|
|
3523
|
+
const { t } = useTranslation18();
|
|
3524
|
+
return /* @__PURE__ */ jsxs18(
|
|
3638
3525
|
"div",
|
|
3639
3526
|
{
|
|
3640
3527
|
className: " flex flex-col gap-y-2 px-6 py-4",
|
|
3641
3528
|
"data-testid": "order-summary-total",
|
|
3642
3529
|
children: [
|
|
3643
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ jsxs18(
|
|
3644
3531
|
"div",
|
|
3645
3532
|
{
|
|
3646
3533
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
3647
3534
|
"data-testid": "order-summary-paid-total",
|
|
3648
3535
|
children: [
|
|
3649
|
-
/* @__PURE__ */
|
|
3650
|
-
/* @__PURE__ */
|
|
3536
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.paidTotal") }),
|
|
3537
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
|
|
3651
3538
|
getTotalCaptured(order.payment_collections || []),
|
|
3652
3539
|
order.currency_code
|
|
3653
3540
|
) })
|
|
3654
3541
|
]
|
|
3655
3542
|
}
|
|
3656
3543
|
),
|
|
3657
|
-
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
/* @__PURE__ */
|
|
3544
|
+
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3545
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
|
|
3546
|
+
/* @__PURE__ */ jsx18(Text13, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
|
|
3660
3547
|
getTotalCreditLines(order.credit_lines ?? []),
|
|
3661
3548
|
order.currency_code
|
|
3662
3549
|
) })
|
|
3663
3550
|
] }),
|
|
3664
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ jsxs18(
|
|
3665
3552
|
"div",
|
|
3666
3553
|
{
|
|
3667
3554
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
3668
3555
|
"data-testid": "order-summary-outstanding-amount",
|
|
3669
3556
|
children: [
|
|
3670
|
-
/* @__PURE__ */
|
|
3671
|
-
|
|
3557
|
+
/* @__PURE__ */ jsx18(
|
|
3558
|
+
Text13,
|
|
3672
3559
|
{
|
|
3673
3560
|
className: "text-ui-fg-subtle text-semibold",
|
|
3674
3561
|
size: "small",
|
|
@@ -3676,8 +3563,8 @@ var Total2 = ({ order }) => {
|
|
|
3676
3563
|
children: t("orders.returns.outstandingAmount")
|
|
3677
3564
|
}
|
|
3678
3565
|
),
|
|
3679
|
-
/* @__PURE__ */
|
|
3680
|
-
|
|
3566
|
+
/* @__PURE__ */ jsx18(
|
|
3567
|
+
Text13,
|
|
3681
3568
|
{
|
|
3682
3569
|
className: "text-ui-fg-subtle text-bold",
|
|
3683
3570
|
size: "small",
|
|
@@ -3697,21 +3584,22 @@ var Total2 = ({ order }) => {
|
|
|
3697
3584
|
};
|
|
3698
3585
|
|
|
3699
3586
|
// src/pages/orders/order-detail/components/order-remaining-orders-group-section/order-remaining-orders-group-section.tsx
|
|
3700
|
-
import { Container as
|
|
3587
|
+
import { Container as Container12, Heading as Heading12 } from "@medusajs/ui";
|
|
3588
|
+
import { DisplayExtensionZone as DisplayExtensionZone7 } from "@mercurjs/dashboard-shared";
|
|
3701
3589
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
3702
|
-
import { useMemo as
|
|
3703
|
-
import { useTranslation as
|
|
3590
|
+
import { useMemo as useMemo5 } from "react";
|
|
3591
|
+
import { useTranslation as useTranslation19 } from "react-i18next";
|
|
3704
3592
|
import { useParams } from "react-router-dom";
|
|
3705
|
-
import { jsx as
|
|
3593
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3706
3594
|
var DEFAULT_FIELDS2 = "id,*orders,*orders.customer,*orders.seller,*orders.sales_channel";
|
|
3707
3595
|
var OrderRemainingOrdersGroupSection = () => {
|
|
3708
3596
|
const { id } = useParams();
|
|
3709
|
-
const { t } =
|
|
3597
|
+
const { t } = useTranslation19();
|
|
3710
3598
|
const { order_group, isLoading, isError, error } = useOrderGroupByOrderId(
|
|
3711
3599
|
id,
|
|
3712
3600
|
{ fields: DEFAULT_FIELDS2 }
|
|
3713
3601
|
);
|
|
3714
|
-
const orders =
|
|
3602
|
+
const orders = useMemo5(() => {
|
|
3715
3603
|
const group = order_group;
|
|
3716
3604
|
if (!group?.orders) return [];
|
|
3717
3605
|
return group.orders.filter((o) => o.id !== id);
|
|
@@ -3731,24 +3619,21 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3731
3619
|
if (!isLoading && orders.length === 0) {
|
|
3732
3620
|
return null;
|
|
3733
3621
|
}
|
|
3734
|
-
return /* @__PURE__ */
|
|
3735
|
-
|
|
3622
|
+
return /* @__PURE__ */ jsxs19(
|
|
3623
|
+
Container12,
|
|
3736
3624
|
{
|
|
3737
3625
|
className: "divide-y p-0",
|
|
3738
3626
|
"data-testid": "order-remaining-orders-group-section",
|
|
3739
3627
|
children: [
|
|
3740
|
-
/* @__PURE__ */
|
|
3628
|
+
/* @__PURE__ */ jsx19(
|
|
3741
3629
|
"div",
|
|
3742
3630
|
{
|
|
3743
3631
|
className: "flex items-center justify-between px-6 py-4",
|
|
3744
3632
|
"data-testid": "order-remaining-orders-group-header",
|
|
3745
|
-
children: /* @__PURE__ */
|
|
3746
|
-
t("orders.domain"),
|
|
3747
|
-
" in group"
|
|
3748
|
-
] })
|
|
3633
|
+
children: /* @__PURE__ */ jsx19(Heading12, { level: "h2", "data-testid": "order-remaining-orders-group-heading", children: t("orders.group.heading") })
|
|
3749
3634
|
}
|
|
3750
3635
|
),
|
|
3751
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__PURE__ */ jsx19(
|
|
3752
3637
|
_DataTable,
|
|
3753
3638
|
{
|
|
3754
3639
|
columns,
|
|
@@ -3758,9 +3643,17 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3758
3643
|
isLoading,
|
|
3759
3644
|
pageSize: orders.length,
|
|
3760
3645
|
noRecords: {
|
|
3761
|
-
message: "
|
|
3646
|
+
message: t("orders.group.noOtherOrders")
|
|
3762
3647
|
}
|
|
3763
3648
|
}
|
|
3649
|
+
),
|
|
3650
|
+
/* @__PURE__ */ jsx19(
|
|
3651
|
+
DisplayExtensionZone7,
|
|
3652
|
+
{
|
|
3653
|
+
model: "order",
|
|
3654
|
+
zone: "order-group",
|
|
3655
|
+
data: order_group
|
|
3656
|
+
}
|
|
3764
3657
|
)
|
|
3765
3658
|
]
|
|
3766
3659
|
}
|
|
@@ -3768,35 +3661,35 @@ var OrderRemainingOrdersGroupSection = () => {
|
|
|
3768
3661
|
};
|
|
3769
3662
|
var columnHelper = createColumnHelper();
|
|
3770
3663
|
var useColumns = () => {
|
|
3771
|
-
return
|
|
3664
|
+
return useMemo5(
|
|
3772
3665
|
() => [
|
|
3773
3666
|
columnHelper.accessor("display_id", {
|
|
3774
|
-
header: () => /* @__PURE__ */
|
|
3775
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3667
|
+
header: () => /* @__PURE__ */ jsx19(DisplayIdHeader, {}),
|
|
3668
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx19(DisplayIdCell, { displayId: getValue() })
|
|
3776
3669
|
}),
|
|
3777
3670
|
columnHelper.display({
|
|
3778
3671
|
id: "seller",
|
|
3779
|
-
header: () => /* @__PURE__ */
|
|
3672
|
+
header: () => /* @__PURE__ */ jsx19(TextHeader, { text: "Store" }),
|
|
3780
3673
|
cell: ({ row }) => {
|
|
3781
3674
|
const seller = row.original.seller;
|
|
3782
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ jsx19(TextCell, { text: seller?.name ?? "-" });
|
|
3783
3676
|
}
|
|
3784
3677
|
}),
|
|
3785
3678
|
columnHelper.accessor("created_at", {
|
|
3786
|
-
header: () => /* @__PURE__ */
|
|
3787
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3679
|
+
header: () => /* @__PURE__ */ jsx19(DateHeader, {}),
|
|
3680
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx19(DateCell, { date: new Date(getValue()) })
|
|
3788
3681
|
}),
|
|
3789
3682
|
columnHelper.accessor("payment_status", {
|
|
3790
|
-
header: () => /* @__PURE__ */
|
|
3791
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3683
|
+
header: () => /* @__PURE__ */ jsx19(PaymentStatusHeader, {}),
|
|
3684
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx19(PaymentStatusCell, { status: getValue() })
|
|
3792
3685
|
}),
|
|
3793
3686
|
columnHelper.accessor("fulfillment_status", {
|
|
3794
|
-
header: () => /* @__PURE__ */
|
|
3795
|
-
cell: ({ getValue }) => /* @__PURE__ */
|
|
3687
|
+
header: () => /* @__PURE__ */ jsx19(FulfillmentStatusHeader, {}),
|
|
3688
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx19(FulfillmentStatusCell, { status: getValue() })
|
|
3796
3689
|
}),
|
|
3797
3690
|
columnHelper.accessor("total", {
|
|
3798
|
-
header: () => /* @__PURE__ */
|
|
3799
|
-
cell: ({ getValue, row }) => /* @__PURE__ */
|
|
3691
|
+
header: () => /* @__PURE__ */ jsx19(TotalHeader, {}),
|
|
3692
|
+
cell: ({ getValue, row }) => /* @__PURE__ */ jsx19(
|
|
3800
3693
|
TotalCell,
|
|
3801
3694
|
{
|
|
3802
3695
|
currencyCode: row.original.currency_code,
|
|
@@ -3810,15 +3703,14 @@ var useColumns = () => {
|
|
|
3810
3703
|
};
|
|
3811
3704
|
|
|
3812
3705
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
3813
|
-
import { jsx as
|
|
3706
|
+
import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3814
3707
|
var Root = ({ children }) => {
|
|
3815
3708
|
const initialData = useLoaderData();
|
|
3816
3709
|
const { id } = useParams2();
|
|
3710
|
+
const query = useLinkQuery("order", DEFAULT_FIELDS);
|
|
3817
3711
|
const { order: rawOrder, isLoading, isError, error } = useOrder(
|
|
3818
3712
|
id,
|
|
3819
|
-
|
|
3820
|
-
fields: DEFAULT_FIELDS
|
|
3821
|
-
},
|
|
3713
|
+
query,
|
|
3822
3714
|
{
|
|
3823
3715
|
initialData
|
|
3824
3716
|
}
|
|
@@ -3839,12 +3731,12 @@ var Root = ({ children }) => {
|
|
|
3839
3731
|
id
|
|
3840
3732
|
);
|
|
3841
3733
|
if (isLoading || !order || isPreviewLoading) {
|
|
3842
|
-
return /* @__PURE__ */
|
|
3734
|
+
return /* @__PURE__ */ jsx20(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
|
|
3843
3735
|
}
|
|
3844
3736
|
if (isError) {
|
|
3845
3737
|
throw error;
|
|
3846
3738
|
}
|
|
3847
|
-
return Children.count(children) > 0 ? /* @__PURE__ */
|
|
3739
|
+
return Children.count(children) > 0 ? /* @__PURE__ */ jsx20(
|
|
3848
3740
|
TwoColumnPage,
|
|
3849
3741
|
{
|
|
3850
3742
|
data: order,
|
|
@@ -3854,7 +3746,7 @@ var Root = ({ children }) => {
|
|
|
3854
3746
|
"data-testid": "order-detail-page",
|
|
3855
3747
|
children
|
|
3856
3748
|
}
|
|
3857
|
-
) : /* @__PURE__ */
|
|
3749
|
+
) : /* @__PURE__ */ jsxs20(
|
|
3858
3750
|
TwoColumnPage,
|
|
3859
3751
|
{
|
|
3860
3752
|
data: order,
|
|
@@ -3863,21 +3755,22 @@ var Root = ({ children }) => {
|
|
|
3863
3755
|
hasOutlet: true,
|
|
3864
3756
|
"data-testid": "order-detail-page",
|
|
3865
3757
|
children: [
|
|
3866
|
-
/* @__PURE__ */
|
|
3867
|
-
/* @__PURE__ */
|
|
3868
|
-
/* @__PURE__ */
|
|
3869
|
-
/* @__PURE__ */
|
|
3870
|
-
/* @__PURE__ */
|
|
3871
|
-
/* @__PURE__ */
|
|
3872
|
-
/* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
3874
|
-
/* @__PURE__ */
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
/* @__PURE__ */
|
|
3879
|
-
/* @__PURE__ */
|
|
3880
|
-
|
|
3758
|
+
/* @__PURE__ */ jsx20(TwoColumnPage.Main, { "data-testid": "order-detail-main", children: /* @__PURE__ */ jsxs20(WidgetZone, { id: "orders.detail.main", data: order, children: [
|
|
3759
|
+
/* @__PURE__ */ jsx20(OrderActiveEditSection, { order }),
|
|
3760
|
+
/* @__PURE__ */ jsx20(ActiveOrderClaimSection, { orderPreview }),
|
|
3761
|
+
/* @__PURE__ */ jsx20(ActiveOrderExchangeSection, { orderPreview }),
|
|
3762
|
+
/* @__PURE__ */ jsx20(ActiveOrderReturnSection, { orderPreview }),
|
|
3763
|
+
/* @__PURE__ */ jsx20(OrderGeneralSection, { order }),
|
|
3764
|
+
/* @__PURE__ */ jsx20(OrderSummarySection, { order }),
|
|
3765
|
+
/* @__PURE__ */ jsx20(OrderCommissionSection, { order }),
|
|
3766
|
+
/* @__PURE__ */ jsx20(OrderPaymentSection, { order }),
|
|
3767
|
+
/* @__PURE__ */ jsx20(OrderFulfillmentSection, { order })
|
|
3768
|
+
] }) }),
|
|
3769
|
+
/* @__PURE__ */ jsx20(TwoColumnPage.Sidebar, { "data-testid": "order-detail-sidebar", children: /* @__PURE__ */ jsxs20(WidgetZone, { id: "orders.detail.side", data: order, children: [
|
|
3770
|
+
/* @__PURE__ */ jsx20(OrderCustomerSection, { order }),
|
|
3771
|
+
/* @__PURE__ */ jsx20(OrderActivitySection, { order }),
|
|
3772
|
+
/* @__PURE__ */ jsx20(OrderRemainingOrdersGroupSection, {})
|
|
3773
|
+
] }) })
|
|
3881
3774
|
]
|
|
3882
3775
|
}
|
|
3883
3776
|
);
|