@mercurjs/admin 2.0.0-canary.34 → 2.0.0-canary.35
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-UVEH25GZ.js → add-campaign-promotions-ZUXBF5G3.js} +10 -10
- package/dist/{adjust-inventory-6Q53EEFB.js → adjust-inventory-HZCWL6SC.js} +10 -10
- package/dist/api-key-management-detail-SKJNAZ5L.js +87 -0
- package/dist/api-key-management-list-2D4WKI6Y.js +33 -0
- package/dist/{campaign-create-2IIU3WTS.js → campaign-create-B7XM2FZM.js} +4 -4
- package/dist/campaign-detail-7U4CQHU5.js +105 -0
- package/dist/campaign-list-SC7FLTRM.js +31 -0
- package/dist/{categories-metadata-G7JDGW6O.js → categories-metadata-LPSJNCME.js} +12 -12
- package/dist/category-detail-HGHR3R2R.js +105 -0
- package/dist/category-list-QBBFGHQM.js +32 -0
- package/dist/{category-products-FH4RIZKA.js → category-products-XLCG2JR7.js} +14 -14
- package/dist/{chunk-36WVODFU.js → chunk-23663A2W.js} +1 -1
- package/dist/chunk-2IGCU3KP.js +170 -0
- package/dist/chunk-33FUPXJL.js +102 -0
- package/dist/{chunk-O5HZRJPB.js → chunk-3B6MTW5G.js} +9 -0
- package/dist/{shipping-profiles-list-FUW4FXLC.js → chunk-3H74EI2D.js} +11 -19
- package/dist/{shipping-profile-detail-WHKHB2OQ.js → chunk-3IYIS5UZ.js} +15 -61
- package/dist/{return-reason-list-MRYG7ZK7.js → chunk-3SAH3NUS.js} +12 -80
- package/dist/chunk-4GVHNYZR.js +294 -0
- package/dist/chunk-4WYBW3HK.js +209 -0
- package/dist/chunk-5GG65TKV.js +335 -0
- package/dist/{customer-group-detail-CPONLZRF.js → chunk-5VEYNZSW.js} +33 -119
- package/dist/{customer-group-list-V2CGT3FT.js → chunk-62ZRA6BZ.js} +2 -37
- package/dist/{category-list-YPRENMVF.js → chunk-66IHH2HG.js} +105 -89
- package/dist/chunk-6L2LSIPR.js +223 -0
- package/dist/{region-list-PGWUOULN.js → chunk-6PNMR6XP.js} +18 -32
- package/dist/{product-type-list-T5KO5J3W.js → chunk-7COSFMM7.js} +17 -30
- package/dist/{api-key-management-detail-RQW5RC5F.js → chunk-7TLEUIAL.js} +22 -80
- package/dist/{product-tag-list-I6M6TAYM.js → chunk-A2KURGQO.js} +16 -131
- package/dist/{chunk-GFZ7GOEU.js → chunk-A6Z2Q7D5.js} +2 -2
- package/dist/{customer-detail-YS265DZS.js → chunk-AOVEX4EM.js} +74 -158
- package/dist/{inventory-detail-42GK24BA.js → chunk-AOVJTW7M.js} +130 -196
- package/dist/{payout-list-GE7E637R.js → chunk-BHID7W3U.js} +12 -22
- package/dist/{price-list-list-VFHHTBLR.js → chunk-CR4E2DCR.js} +98 -78
- package/dist/{chunk-UZVYM65V.js → chunk-D44T5KAE.js} +6 -6
- package/dist/{chunk-BFCAJKRG.js → chunk-DBYUB2YI.js} +28 -56
- package/dist/{user-detail-Q7ST2YKP.js → chunk-DK3U2SRA.js} +17 -62
- package/dist/{refund-reason-list-ECQKWA2M.js → chunk-DP5U3GQU.js} +54 -105
- package/dist/chunk-E2AAYIHS.js +250 -0
- package/dist/{commission-rate-detail-ANI37QHI.js → chunk-EDQBUWY7.js} +46 -106
- package/dist/{region-detail-DIEFHHOM.js → chunk-ENMRRG4N.js} +48 -94
- package/dist/{chunk-UZJ2NQSN.js → chunk-FRRQW7BG.js} +4 -4
- package/dist/{order-detail-V2O5C4CX.js → chunk-FXU7SL6M.js} +413 -423
- package/dist/{product-type-detail-JI4DF7WR.js → chunk-FYB5MS4F.js} +29 -110
- package/dist/{chunk-QNGHZSK3.js → chunk-G644AXKV.js} +1 -1
- package/dist/chunk-GJTIHFXG.js +115 -0
- package/dist/{sales-channel-list-2ZUNUM2T.js → chunk-HHNJNKCB.js} +16 -54
- package/dist/{campaign-list-EAGDQZO3.js → chunk-HZKW7HRU.js} +14 -32
- package/dist/chunk-IXGP2EEN.js +425 -0
- package/dist/{profile-detail-AWZ4EZ6R.js → chunk-J7SR4GW5.js} +10 -15
- package/dist/{product-variant-detail-DXTUM4R7.js → chunk-JA2XIIIZ.js} +96 -178
- package/dist/{price-list-detail-324FZRK5.js → chunk-JRWB7VWP.js} +59 -130
- package/dist/{category-detail-2U65E3CX.js → chunk-KUDLPUWR.js} +70 -146
- package/dist/{collection-detail-Y4GGSHXX.js → chunk-KXPCEVFB.js} +44 -121
- package/dist/{location-list-KVFFPEIV.js → chunk-KYUXTS2L.js} +61 -86
- package/dist/{chunk-M3I52H3M.js → chunk-LU72QEQC.js} +4 -4
- package/dist/{location-detail-XO4RRCAU.js → chunk-LYT3RI4O.js} +90 -155
- package/dist/chunk-NOWUEJ74.js +44 -0
- package/dist/{product-detail-3UWUMNHC.js → chunk-NQPAEBSZ.js} +145 -195
- package/dist/{api-key-management-list-VYQ4AVSX.js → chunk-O6O22BN4.js} +9 -29
- package/dist/{tax-region-province-detail-PB7RFWJ4.js → chunk-OFRQZHVQ.js} +15 -99
- package/dist/{reservation-detail-J4M2EXRY.js → chunk-OSHCUDYY.js} +27 -93
- package/dist/{campaign-detail-4DO3S5UZ.js → chunk-Q6XCCONH.js} +118 -193
- package/dist/{payout-detail-PRYOQSGQ.js → chunk-QBOXELB5.js} +7 -41
- package/dist/chunk-QD6KYDYH.js +169 -0
- package/dist/{commission-rate-list-FCQ3HXC7.js → chunk-QP6XXG6A.js} +11 -20
- package/dist/{promotion-list-SJYMXQXT.js → chunk-RIMR3ULR.js} +14 -51
- package/dist/{shipping-option-type-list-4A7FT4P5.js → chunk-SFG7JTBH.js} +14 -51
- package/dist/{sales-channel-detail-RMU5QW3N.js → chunk-T25UE7SS.js} +39 -120
- package/dist/{tax-region-detail-L3EB6JSF.js → chunk-TE5VQBCL.js} +19 -60
- package/dist/{reservation-list-X33SIPG3.js → chunk-TKGZBTOS.js} +11 -20
- package/dist/{chunk-LQSLDDPT.js → chunk-TZSOL34K.js} +40 -1
- package/dist/{chunk-F5PEK3DA.js → chunk-U3SFHLUA.js} +1 -1
- package/dist/{chunk-IZ5RG5XI.js → chunk-UXD3VNBO.js} +1 -20
- package/dist/{chunk-XE6KSRKQ.js → chunk-V2DXJ75C.js} +1 -1
- package/dist/{marketplace-detail-OVWHCK5W.js → chunk-VBAAYYCS.js} +114 -172
- package/dist/{chunk-5POS4GBN.js → chunk-WZADCDDE.js} +4 -4
- package/dist/{chunk-HOZHWCST.js → chunk-XDVS4B7W.js} +1 -1
- package/dist/{promotion-detail-IO7V5CXR.js → chunk-XVKRTPVM.js} +147 -162
- package/dist/{inventory-list-UJNDJFJS.js → chunk-YH4VQBAA.js} +11 -19
- package/dist/{collection-add-products-RLTEE27D.js → collection-add-products-IQ7M63BA.js} +13 -13
- package/dist/collection-detail-YJ3FV2C6.js +96 -0
- package/dist/collection-list-WDQOBHQN.js +78 -0
- package/dist/{collection-metadata-CQWEZ4EQ.js → collection-metadata-UZ3VN625.js} +10 -10
- package/dist/{commission-rate-create-YK6GCP2R.js → commission-rate-create-VC72GTV4.js} +34 -34
- package/dist/commission-rate-detail-UQDIIMIK.js +82 -0
- package/dist/{commission-rate-edit-5MPI53CE.js → commission-rate-edit-AXJKJNFY.js} +34 -34
- package/dist/commission-rate-list-WTDZLKUR.js +27 -0
- package/dist/customer-detail-N7CS4IJU.js +106 -0
- package/dist/{customer-group-add-customers-FTRCJHE7.js → customer-group-add-customers-LCNDTLXR.js} +6 -6
- package/dist/customer-group-detail-UCTY4FF7.js +105 -0
- package/dist/customer-group-list-XOQ64CVR.js +48 -0
- package/dist/{customer-group-metadata-BITZXXFX.js → customer-group-metadata-FMAZBXIK.js} +11 -11
- package/dist/customer-list-BUUO6OF7.js +32 -0
- package/dist/{customer-metadata-6DDHIGDD.js → customer-metadata-7GW4JRZR.js} +11 -11
- package/dist/{customers-add-customer-group-SD3KK6JE.js → customers-add-customer-group-BKEV24N2.js} +15 -15
- package/dist/{edit-inventory-item-5PZZ3IAH.js → edit-inventory-item-RECBP7OX.js} +7 -7
- package/dist/{edit-inventory-item-attributes-7PJQCUXL.js → edit-inventory-item-attributes-2P3BMQJ5.js} +8 -8
- package/dist/{edit-rules-E2564ZQB.js → edit-rules-DPHJ7PQQ.js} +9 -9
- package/dist/index.d.ts +5 -0
- package/dist/index.js +564 -757
- package/dist/{inventory-create-LYXHQR7Y.js → inventory-create-QLEIHESO.js} +20 -20
- package/dist/inventory-detail-BJT5WEV5.js +106 -0
- package/dist/inventory-list-3LWBPWVK.js +29 -0
- package/dist/{inventory-metadata-OLR5ZMMN.js → inventory-metadata-ZNHZQEMX.js} +11 -11
- package/dist/{inventory-stock-ZOM2ANKJ.js → inventory-stock-G3GP4FZX.js} +17 -17
- package/dist/location-detail-N7J6PEAP.js +99 -0
- package/dist/{location-fulfillment-providers-6T27UNF7.js → location-fulfillment-providers-BHCY2MYC.js} +18 -18
- package/dist/location-list-UG6B47NP.js +52 -0
- package/dist/{location-service-zone-create-IYKQNCNO.js → location-service-zone-create-AIVG7HTM.js} +8 -8
- package/dist/{location-service-zone-manage-areas-L7BQTR7S.js → location-service-zone-manage-areas-EZSV25CP.js} +10 -10
- package/dist/{location-service-zone-shipping-option-create-PSPX634E.js → location-service-zone-shipping-option-create-GYPW6SSN.js} +18 -18
- package/dist/{location-service-zone-shipping-option-pricing-HC7Z4BVU.js → location-service-zone-shipping-option-pricing-7VMPXDWX.js} +8 -8
- package/dist/{login-U5WERLJC.js → login-2HSCF4ZB.js} +16 -10
- package/dist/{marketplace-add-currencies-XQPZT237.js → marketplace-add-currencies-CIGOPBO6.js} +7 -7
- package/dist/marketplace-detail-7KJMXXAJ.js +74 -0
- package/dist/{marketplace-metadata-GIYATM54.js → marketplace-metadata-PHZ4PUWM.js} +11 -11
- package/dist/{order-create-claim-UWNZUBL7.js → order-create-claim-7WW6MXTT.js} +34 -34
- package/dist/{order-create-edit-JD4UZ5GW.js → order-create-edit-KAH6ZPLX.js} +20 -20
- package/dist/{order-create-exchange-OTIDP47E.js → order-create-exchange-ELLWF3IY.js} +31 -31
- package/dist/{order-create-fulfillment-7OP64TNJ.js → order-create-fulfillment-E3J7ILOJ.js} +13 -13
- package/dist/{order-create-refund-U4UK5IZB.js → order-create-refund-5QZBOSCA.js} +13 -13
- package/dist/{order-create-return-LH4LW5BZ.js → order-create-return-L6DEDPJK.js} +17 -17
- package/dist/{order-create-shipment-URYCUNU6.js → order-create-shipment-NBQ226NM.js} +7 -7
- package/dist/order-detail-C25NQSZN.js +122 -0
- package/dist/{order-edit-billing-address-XRUEKX33.js → order-edit-billing-address-NVRMPZEU.js} +14 -14
- package/dist/{order-edit-email-CJ3MEZB6.js → order-edit-email-5FA7X52X.js} +7 -7
- package/dist/{order-edit-shipping-address-SV4UVNBQ.js → order-edit-shipping-address-BPU7OL2N.js} +11 -11
- package/dist/order-list-7NH7LROU.js +48 -0
- package/dist/{order-metadata-HIOSALZT.js → order-metadata-47FUKENZ.js} +10 -10
- package/dist/{order-receive-return-4SRRRBW6.js → order-receive-return-FW5QZJBM.js} +8 -8
- package/dist/{order-request-transfer-5AGKGFVY.js → order-request-transfer-WD327YGL.js} +7 -7
- package/dist/pages/index.d.ts +638 -0
- package/dist/pages/index.js +359 -0
- package/dist/payout-detail-MDD5SRK5.js +51 -0
- package/dist/payout-list-XY2A5KYS.js +28 -0
- package/dist/{price-list-configuration-GK4MA3BE.js → price-list-configuration-XK3IZLLX.js} +8 -8
- package/dist/{price-list-create-3NNWUS6L.js → price-list-create-OK7YYLAB.js} +22 -22
- package/dist/price-list-detail-IGFSM77P.js +102 -0
- package/dist/price-list-list-TBXQ5DOS.js +35 -0
- package/dist/{price-list-prices-add-IBSLTMNK.js → price-list-prices-add-7PGUONDK.js} +18 -18
- package/dist/{price-list-prices-edit-AAVPX34P.js → price-list-prices-edit-QVGBT6AI.js} +14 -14
- package/dist/{product-create-C4GHUEM5.js → product-create-NVBKO426.js} +218 -383
- package/dist/{product-create-variant-5MVBT5ST.js → product-create-variant-CJPECBV4.js} +68 -230
- package/dist/product-detail-ZC37BGPC.js +100 -0
- package/dist/{product-export-XTS7P5AD.js → product-export-ULTY2SNJ.js} +14 -14
- package/dist/{product-import-ZEZE2JE6.js → product-import-Q2CPHVNJ.js} +10 -10
- package/dist/product-list-635ZXM2D.js +85 -0
- package/dist/{product-media-Z2DCRZSU.js → product-media-ZMDAVPGI.js} +4 -4
- package/dist/{product-metadata-NBB5SRDN.js → product-metadata-36JNWKCJ.js} +10 -10
- package/dist/{product-stock-ZXNZZBJI.js → product-stock-HF42WRSC.js} +18 -18
- package/dist/{product-tag-create-LL35OFZM.js → product-tag-create-VCRDLR27.js} +7 -7
- package/dist/product-tag-detail-OJLYO3Q5.js +135 -0
- package/dist/{product-tag-edit-6XBZCCED.js → product-tag-edit-BYE7UP54.js} +7 -7
- package/dist/product-tag-list-XFHGJBRF.js +129 -0
- package/dist/{product-tag-metadata-UGO4RUFU.js → product-tag-metadata-ADHNZA2H.js} +10 -10
- package/dist/product-type-detail-J4UA4AEM.js +97 -0
- package/dist/product-type-list-H5EQHCXS.js +34 -0
- package/dist/{product-type-metadata-ZKOZNZE3.js → product-type-metadata-UY22KDAN.js} +10 -10
- package/dist/product-variant-detail-5WKYURFA.js +111 -0
- package/dist/{product-variant-edit-KGLW5GXD.js → product-variant-edit-66ZUIIMP.js} +10 -10
- package/dist/{product-variant-metadata-H7J7SZNU.js → product-variant-metadata-7N5F7DM5.js} +10 -10
- package/dist/profile-detail-EYNXOHGZ.js +17 -0
- package/dist/{promotion-add-campaign-OEMV62HF.js → promotion-add-campaign-B5SF72KC.js} +4 -4
- package/dist/{promotion-create-P2WR5RPH.js → promotion-create-D77SANLX.js} +17 -17
- package/dist/promotion-detail-MVFOMS4E.js +87 -0
- package/dist/promotion-list-IN4VWEQN.js +57 -0
- package/dist/{refund-reason-create-PTHFUT2D.js → refund-reason-create-BHI5XXZC.js} +7 -7
- package/dist/{refund-reason-edit-WEEQQGYO.js → refund-reason-edit-UWWYC4OB.js} +7 -7
- package/dist/refund-reason-list-DJZZC7KK.js +101 -0
- package/dist/{region-add-countries-GVOTB5YX.js → region-add-countries-YOGU74UR.js} +9 -9
- package/dist/{region-create-3BCYTIDB.js → region-create-UMJK3VGL.js} +14 -14
- package/dist/region-detail-OFZHX57G.js +73 -0
- package/dist/region-list-L4FKHVJJ.js +34 -0
- package/dist/{region-metadata-IYIHJCTK.js → region-metadata-JLHWQGTC.js} +11 -11
- package/dist/reservation-detail-LZYEM5NW.js +82 -0
- package/dist/reservation-list-OGPDB7WG.js +30 -0
- package/dist/{reservation-metadata-MMHE4TPO.js → reservation-metadata-WB42HSMD.js} +11 -11
- package/dist/{reset-password-WNANNJDX.js → reset-password-Q7Y4FWRE.js} +2 -2
- package/dist/return-reason-list-6ICMSVKF.js +80 -0
- package/dist/{sales-channel-add-products-GP7TMMKB.js → sales-channel-add-products-EOWFSO35.js} +14 -14
- package/dist/sales-channel-detail-RRJG7U7R.js +97 -0
- package/dist/sales-channel-list-LUZ4ZXCY.js +50 -0
- package/dist/{sales-channel-metadata-QF5KEN7C.js → sales-channel-metadata-5CLXRNQF.js} +12 -12
- package/dist/{seller-details-EUCYPH4Z.js → seller-details-KROISMQC.js} +48 -48
- package/dist/seller-list-664H4SI5.js +79 -0
- package/dist/{shipping-option-type-create-KBQMPNIW.js → shipping-option-type-create-42URKECR.js} +7 -7
- package/dist/shipping-option-type-detail-2RY3NHRO.js +81 -0
- package/dist/{shipping-option-type-edit-S3R6JBFV.js → shipping-option-type-edit-VLFV2AR4.js} +7 -7
- package/dist/shipping-option-type-list-IOSOE33S.js +59 -0
- package/dist/shipping-profile-detail-RIIAX7VE.js +56 -0
- package/dist/{shipping-profile-metadata-BJFUYS5L.js → shipping-profile-metadata-7WDHFEEH.js} +10 -10
- package/dist/shipping-profiles-list-AL4EJSJY.js +26 -0
- package/dist/{tax-region-create-KTFZNQCZ.js → tax-region-create-UOTLTCOP.js} +14 -14
- package/dist/tax-region-detail-CA2W5W6A.js +67 -0
- package/dist/{tax-region-edit-H2ORQVEW.js → tax-region-edit-7O2Z3EYC.js} +7 -7
- package/dist/tax-region-list-JTZ7KZCX.js +26 -0
- package/dist/{tax-region-metadata-2PYZ5ECB.js → tax-region-metadata-VQ57FSEM.js} +11 -11
- package/dist/tax-region-province-detail-ZHLX4FF4.js +98 -0
- package/dist/{tax-region-tax-override-create-IDGG732M.js → tax-region-tax-override-create-WIWUNXW6.js} +31 -31
- package/dist/{tax-region-tax-override-edit-NSBZBBZA.js → tax-region-tax-override-edit-SWROFQTP.js} +31 -31
- package/dist/user-detail-YNPBC5MN.js +54 -0
- package/dist/{user-invite-ATAF42EH.js → user-invite-OT73USBI.js} +10 -10
- package/dist/user-list-LNTZNT3D.js +27 -0
- package/dist/{user-metadata-QFVK2VJX.js → user-metadata-ZGTN4FRU.js} +11 -11
- package/package.json +1 -1
- package/dist/chunk-RW35OPIA.js +0 -45
- package/dist/collection-list-WUPG6AU2.js +0 -233
- package/dist/customer-list-DYQHKNJV.js +0 -153
- package/dist/order-list-ASHM44MM.js +0 -317
- package/dist/product-list-7WK2AWI2.js +0 -323
- package/dist/product-tag-detail-E7VYBISE.js +0 -288
- package/dist/seller-list-W76S2T27.js +0 -237
- package/dist/shipping-option-type-detail-CFGKF7NV.js +0 -173
- package/dist/tax-region-list-D7HWEZUR.js +0 -92
- package/dist/user-list-S6BMNMKL.js +0 -342
- package/dist/{api-key-management-sales-channels-RDE5YSYK.js → api-key-management-sales-channels-C7EWPHC2.js} +9 -9
- package/dist/{campaign-budget-edit-722ECPRI.js → campaign-budget-edit-AIXCDGG3.js} +3 -3
- package/dist/{category-create-VSH7BLNC.js → category-create-UWBJGIED.js} +7 -7
- package/dist/{category-edit-CCHWEQER.js → category-edit-ZDTTOXKZ.js} +3 -3
- package/dist/{chunk-JISYRXUS.js → chunk-B44E3LJT.js} +7 -7
- package/dist/{chunk-L22DLGNI.js → chunk-DEKJJ7NG.js} +3 -3
- package/dist/{chunk-2PZGY332.js → chunk-LQAAVRET.js} +3 -3
- package/dist/{chunk-GEVYE225.js → chunk-RA4UMZRP.js} +3 -3
- package/dist/{chunk-NIRWGTM3.js → chunk-RV6NZTNP.js} +3 -3
- package/dist/{chunk-SXC5ZMLI.js → chunk-TKEAOWBZ.js} +24 -24
- package/dist/{chunk-FLCYR7E5.js → chunk-ULJ3OMWU.js} +3 -3
- package/dist/{chunk-XDEVXAGC.js → chunk-VBBBIEVH.js} +3 -3
- package/dist/{chunk-FMOQNZFZ.js → chunk-YMKZS2HK.js} +12 -12
- package/dist/{customer-create-address-2LLOW6NZ.js → customer-create-address-GKWNPTZS.js} +1 -1
- package/dist/{customer-edit-F5UBFJIZ.js → customer-edit-WDRZ6YUO.js} +3 -3
- package/dist/{edit-reservation-SAKSTZTE.js → edit-reservation-7UOWKFMF.js} +3 -3
- package/dist/{invite-CSXH7VAO.js → invite-AXGDIENO.js} +1 -1
- package/dist/{location-create-HHOJPTDK.js → location-create-FQT3BJGV.js} +1 -1
- package/dist/{location-edit-2NAOR4DV.js → location-edit-RTPPP4KP.js} +1 -1
- package/dist/{location-sales-channels-BJUJNBQQ.js → location-sales-channels-3IGHCJEN.js} +9 -9
- package/dist/{location-service-zone-shipping-option-edit-SSMGORBF.js → location-service-zone-shipping-option-edit-E3GN4ZF5.js} +3 -3
- package/dist/{marketplace-edit-WPOSY2WN.js → marketplace-edit-GH2GQF3O.js} +3 -3
- package/dist/{order-allocate-items-DLVOSAC2.js → order-allocate-items-VEEANPH7.js} +3 -3
- package/dist/{price-list-edit-UU2XBKT3.js → price-list-edit-KK7SHR7O.js} +3 -3
- package/dist/{product-attributes-HNF4J53T.js → product-attributes-NG4OSBIV.js} +1 -1
- package/dist/{product-edit-6EL6US22.js → product-edit-LQJDUUVX.js} +4 -4
- package/dist/{product-organization-NWS3NMD6.js → product-organization-AFCELJ62.js} +1 -1
- package/dist/{product-prices-V63CFHI3.js → product-prices-WMRIC7WM.js} +7 -7
- package/dist/{product-sales-channels-WU3MSCV5.js → product-sales-channels-LSN5DVWZ.js} +5 -5
- package/dist/{product-variant-manage-inventory-items-C77QHYRT.js → product-variant-manage-inventory-items-CV2CC2PV.js} +3 -3
- package/dist/{profile-edit-3GIVUYUM.js → profile-edit-4HXBRWJ5.js} +6 -6
- package/dist/{promotion-edit-details-7Y2A5PPJ.js → promotion-edit-details-YKS24GBD.js} +6 -6
- package/dist/{region-edit-7XER3THY.js → region-edit-ODVSNJHM.js} +5 -5
- package/dist/{tax-region-province-create-7BMYABJ6.js → tax-region-province-create-RFYCUDER.js} +3 -3
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
By
|
|
3
3
|
} from "./chunk-M33NQCEV.js";
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
DisplayIdCell,
|
|
6
|
+
DisplayIdHeader,
|
|
7
|
+
TotalCell,
|
|
8
|
+
TotalHeader
|
|
9
|
+
} from "./chunk-NOWUEJ74.js";
|
|
5
10
|
import {
|
|
6
11
|
formatPercentage
|
|
7
12
|
} from "./chunk-QDPLZDMX.js";
|
|
13
|
+
import {
|
|
14
|
+
useCancelExchange,
|
|
15
|
+
useCancelExchangeRequest,
|
|
16
|
+
useExchanges
|
|
17
|
+
} from "./chunk-2YG2QABK.js";
|
|
8
18
|
import {
|
|
9
19
|
useCancelOrderEdit,
|
|
10
20
|
useConfirmOrderEdit
|
|
@@ -15,6 +25,19 @@ import {
|
|
|
15
25
|
import {
|
|
16
26
|
formatCurrency
|
|
17
27
|
} from "./chunk-XSX255FK.js";
|
|
28
|
+
import {
|
|
29
|
+
FulfillmentStatusCell,
|
|
30
|
+
FulfillmentStatusHeader,
|
|
31
|
+
PaymentStatusCell,
|
|
32
|
+
PaymentStatusHeader,
|
|
33
|
+
getCanceledOrderStatus,
|
|
34
|
+
getOrderFulfillmentStatus,
|
|
35
|
+
getOrderPaymentStatus
|
|
36
|
+
} from "./chunk-TZSOL34K.js";
|
|
37
|
+
import {
|
|
38
|
+
DateCell,
|
|
39
|
+
DateHeader
|
|
40
|
+
} from "./chunk-25LYVP3C.js";
|
|
18
41
|
import {
|
|
19
42
|
getPaymentsFromOrder,
|
|
20
43
|
getReservationsLimitCount
|
|
@@ -24,11 +47,6 @@ import {
|
|
|
24
47
|
useCancelClaimRequest,
|
|
25
48
|
useClaims
|
|
26
49
|
} from "./chunk-SMK5ZF5D.js";
|
|
27
|
-
import {
|
|
28
|
-
useCancelExchange,
|
|
29
|
-
useCancelExchangeRequest,
|
|
30
|
-
useExchanges
|
|
31
|
-
} from "./chunk-2YG2QABK.js";
|
|
32
50
|
import {
|
|
33
51
|
getReturnableQuantity
|
|
34
52
|
} from "./chunk-UM7ZR3VU.js";
|
|
@@ -41,27 +59,28 @@ import {
|
|
|
41
59
|
useReturns
|
|
42
60
|
} from "./chunk-GSXVQLRO.js";
|
|
43
61
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} from "./chunk-LQSLDDPT.js";
|
|
62
|
+
TextCell,
|
|
63
|
+
TextHeader
|
|
64
|
+
} from "./chunk-JHIMVLB2.js";
|
|
48
65
|
import {
|
|
49
66
|
getLocaleAmount,
|
|
50
67
|
getStylizedAmount,
|
|
51
68
|
isAmountLessThenRoundingError
|
|
52
69
|
} from "./chunk-PXYDR7WQ.js";
|
|
53
|
-
import {
|
|
54
|
-
Thumbnail
|
|
55
|
-
} from "./chunk-WIYFXWRI.js";
|
|
56
|
-
import "./chunk-IQPN4PZJ.js";
|
|
57
70
|
import {
|
|
58
71
|
getFormattedAddress,
|
|
59
72
|
isSameAddress
|
|
60
73
|
} from "./chunk-W6Y3PPU5.js";
|
|
61
|
-
import
|
|
74
|
+
import {
|
|
75
|
+
_DataTable,
|
|
76
|
+
useDataTable
|
|
77
|
+
} from "./chunk-ULJ3OMWU.js";
|
|
62
78
|
import {
|
|
63
79
|
TwoColumnPage
|
|
64
80
|
} from "./chunk-U2UCL2VG.js";
|
|
81
|
+
import {
|
|
82
|
+
Thumbnail
|
|
83
|
+
} from "./chunk-WIYFXWRI.js";
|
|
65
84
|
import {
|
|
66
85
|
Skeleton,
|
|
67
86
|
TwoColumnPageSkeleton
|
|
@@ -69,38 +88,20 @@ import {
|
|
|
69
88
|
import {
|
|
70
89
|
ActionMenu
|
|
71
90
|
} from "./chunk-BDGZ4EQO.js";
|
|
72
|
-
import "./chunk-LAVHRER2.js";
|
|
73
|
-
import "./chunk-Y7QKP6QU.js";
|
|
74
91
|
import {
|
|
75
92
|
useDate
|
|
76
93
|
} from "./chunk-UZWFZMOX.js";
|
|
77
|
-
import "./chunk-XQNVC4Q7.js";
|
|
78
94
|
import {
|
|
79
95
|
useCapturePayment,
|
|
80
96
|
useMarkPaymentCollectionAsPaid
|
|
81
97
|
} from "./chunk-XM6GCWNF.js";
|
|
82
|
-
import
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
import "./chunk-GPRBBA7S.js";
|
|
86
|
-
import "./chunk-E7ZBQO6E.js";
|
|
87
|
-
import "./chunk-XGHM75N2.js";
|
|
88
|
-
import "./chunk-U2GCSKW3.js";
|
|
89
|
-
import "./chunk-RTAIDSDS.js";
|
|
90
|
-
import "./chunk-LW3UWYZU.js";
|
|
91
|
-
import "./chunk-A4X5VP3G.js";
|
|
92
|
-
import "./chunk-NNZP4PYP.js";
|
|
93
|
-
import "./chunk-GF4QHVX3.js";
|
|
94
|
-
import "./chunk-JOQ3RTF5.js";
|
|
95
|
-
import "./chunk-V534K7G4.js";
|
|
98
|
+
import {
|
|
99
|
+
useOrderGroupByOrderId
|
|
100
|
+
} from "./chunk-LU72QEQC.js";
|
|
96
101
|
import {
|
|
97
102
|
useCustomer
|
|
98
103
|
} from "./chunk-A5XOYSDC.js";
|
|
99
|
-
import "./chunk-TQI3DOQ5.js";
|
|
100
|
-
import "./chunk-5PB7KCTF.js";
|
|
101
|
-
import "./chunk-YOIARITB.js";
|
|
102
104
|
import {
|
|
103
|
-
ordersQueryKeys,
|
|
104
105
|
useCancelOrder,
|
|
105
106
|
useCancelOrderFulfillment,
|
|
106
107
|
useCancelOrderTransfer,
|
|
@@ -116,59 +117,9 @@ import {
|
|
|
116
117
|
import {
|
|
117
118
|
useStockLocation
|
|
118
119
|
} from "./chunk-4YF3GAKE.js";
|
|
119
|
-
import {
|
|
120
|
-
useOrderGroup
|
|
121
|
-
} from "./chunk-M3I52H3M.js";
|
|
122
|
-
import "./chunk-LORVU5II.js";
|
|
123
|
-
import "./chunk-36ORDF7W.js";
|
|
124
|
-
import "./chunk-QSM56ZOP.js";
|
|
125
|
-
import "./chunk-MIHEJ6Y6.js";
|
|
126
|
-
import "./chunk-3VZV6SJQ.js";
|
|
127
|
-
import "./chunk-K357FGGP.js";
|
|
128
|
-
import {
|
|
129
|
-
queryClient
|
|
130
|
-
} from "./chunk-RHKRREUU.js";
|
|
131
|
-
import "./chunk-ZA2KFUFR.js";
|
|
132
|
-
import {
|
|
133
|
-
sdk
|
|
134
|
-
} from "./chunk-ZYNBKBY3.js";
|
|
135
|
-
import "./chunk-NBMM2TZK.js";
|
|
136
|
-
|
|
137
|
-
// src/pages/orders/order-detail/breadcrumb.tsx
|
|
138
|
-
import { jsxs } from "react/jsx-runtime";
|
|
139
|
-
var OrderDetailBreadcrumb = (props) => {
|
|
140
|
-
const { id } = props.params || {};
|
|
141
|
-
const { order } = useOrder(
|
|
142
|
-
id,
|
|
143
|
-
{
|
|
144
|
-
fields: DEFAULT_FIELDS
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
initialData: props.data,
|
|
148
|
-
enabled: Boolean(id)
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
if (!order) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
return /* @__PURE__ */ jsxs("span", { children: [
|
|
155
|
-
"#",
|
|
156
|
-
order.display_id
|
|
157
|
-
] });
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
// src/pages/orders/order-detail/loader.ts
|
|
161
|
-
var orderDetailQuery = (id) => ({
|
|
162
|
-
queryKey: ordersQueryKeys.detail(id),
|
|
163
|
-
queryFn: async () => sdk.admin.orders.$id.query({ $id: id, fields: DEFAULT_FIELDS })
|
|
164
|
-
});
|
|
165
|
-
var orderLoader = async ({ params }) => {
|
|
166
|
-
const id = params.id;
|
|
167
|
-
const query = orderDetailQuery(id);
|
|
168
|
-
return queryClient.ensureQueryData(query);
|
|
169
|
-
};
|
|
170
120
|
|
|
171
121
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
122
|
+
import { Children } from "react";
|
|
172
123
|
import { useLoaderData, useParams as useParams2 } from "react-router-dom";
|
|
173
124
|
|
|
174
125
|
// src/pages/orders/order-detail/components/active-order-claim-section/active-order-claim-section.tsx
|
|
@@ -176,7 +127,7 @@ import { ExclamationCircle } from "@medusajs/icons";
|
|
|
176
127
|
import { Button, Container, Heading, Text, toast } from "@medusajs/ui";
|
|
177
128
|
import { useTranslation } from "react-i18next";
|
|
178
129
|
import { useNavigate } from "react-router-dom";
|
|
179
|
-
import { jsx, jsxs
|
|
130
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
180
131
|
var ActiveOrderClaimSection = ({
|
|
181
132
|
orderPreview
|
|
182
133
|
}) => {
|
|
@@ -211,15 +162,15 @@ var ActiveOrderClaimSection = ({
|
|
|
211
162
|
},
|
|
212
163
|
className: "-m-4 mb-1 border-b border-l p-4",
|
|
213
164
|
"data-testid": "active-order-claim-section",
|
|
214
|
-
children: /* @__PURE__ */ jsx(Container, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ jsx(Container, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row justify-between", children: [
|
|
166
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
167
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", "data-testid": "active-order-claim-header", children: [
|
|
217
168
|
/* @__PURE__ */ jsx(ExclamationCircle, { className: "text-ui-fg-subtle" }),
|
|
218
169
|
/* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "active-order-claim-heading", children: t("orders.claims.panel.title") })
|
|
219
170
|
] }),
|
|
220
171
|
/* @__PURE__ */ jsx("div", { className: "gap-2 px-6 pb-4", "data-testid": "active-order-claim-description", children: /* @__PURE__ */ jsx(Text, { children: t("orders.claims.panel.description") }) })
|
|
221
172
|
] }),
|
|
222
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", "data-testid": "active-order-claim-actions", children: [
|
|
223
174
|
/* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: onCancelClaim, "data-testid": "active-order-claim-cancel-button", children: t("orders.claims.cancel.title") }),
|
|
224
175
|
/* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: onContinueClaim, "data-testid": "active-order-claim-continue-button", children: t("actions.continue") })
|
|
225
176
|
] })
|
|
@@ -233,7 +184,7 @@ import { ArrowPath } from "@medusajs/icons";
|
|
|
233
184
|
import { Button as Button2, Container as Container2, Heading as Heading2, Text as Text2, toast as toast2 } from "@medusajs/ui";
|
|
234
185
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
235
186
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
236
|
-
import { jsx as jsx2, jsxs as
|
|
187
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
237
188
|
var ActiveOrderExchangeSection = ({
|
|
238
189
|
orderPreview
|
|
239
190
|
}) => {
|
|
@@ -268,15 +219,15 @@ var ActiveOrderExchangeSection = ({
|
|
|
268
219
|
},
|
|
269
220
|
className: "-m-4 mb-1 border-b border-l p-4",
|
|
270
221
|
"data-testid": "active-order-exchange-section",
|
|
271
|
-
children: /* @__PURE__ */ jsx2(Container2, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ jsx2(Container2, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row justify-between", children: [
|
|
223
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
224
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", "data-testid": "active-order-exchange-header", children: [
|
|
274
225
|
/* @__PURE__ */ jsx2(ArrowPath, { className: "text-ui-fg-subtle" }),
|
|
275
226
|
/* @__PURE__ */ jsx2(Heading2, { level: "h2", "data-testid": "active-order-exchange-heading", children: t("orders.exchanges.panel.title") })
|
|
276
227
|
] }),
|
|
277
228
|
/* @__PURE__ */ jsx2("div", { className: "gap-2 px-6 pb-4", "data-testid": "active-order-exchange-description", children: /* @__PURE__ */ jsx2(Text2, { children: t("orders.exchanges.panel.description") }) })
|
|
278
229
|
] }),
|
|
279
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", "data-testid": "active-order-exchange-actions", children: [
|
|
280
231
|
/* @__PURE__ */ jsx2(Button2, { size: "small", variant: "secondary", onClick: onCancelExchange, "data-testid": "active-order-exchange-cancel-button", children: t("orders.exchanges.cancel.title") }),
|
|
281
232
|
/* @__PURE__ */ jsx2(
|
|
282
233
|
Button2,
|
|
@@ -299,7 +250,7 @@ import { ArrowUturnLeft } from "@medusajs/icons";
|
|
|
299
250
|
import { Button as Button3, Container as Container3, Heading as Heading3, Text as Text3, toast as toast3 } from "@medusajs/ui";
|
|
300
251
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
301
252
|
import { useNavigate as useNavigate3 } from "react-router-dom";
|
|
302
|
-
import { jsx as jsx3, jsxs as
|
|
253
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
303
254
|
var ActiveOrderReturnSection = ({
|
|
304
255
|
orderPreview
|
|
305
256
|
}) => {
|
|
@@ -336,15 +287,15 @@ var ActiveOrderReturnSection = ({
|
|
|
336
287
|
},
|
|
337
288
|
className: "-m-4 mb-1 border-b border-l p-4",
|
|
338
289
|
"data-testid": "active-order-return-section",
|
|
339
|
-
children: /* @__PURE__ */ jsx3(Container3, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ jsx3(Container3, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-row justify-between", children: [
|
|
291
|
+
/* @__PURE__ */ jsxs3("div", { children: [
|
|
292
|
+
/* @__PURE__ */ jsxs3("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", "data-testid": "active-order-return-header", children: [
|
|
342
293
|
/* @__PURE__ */ jsx3(ArrowUturnLeft, { className: "text-ui-fg-subtle" }),
|
|
343
294
|
/* @__PURE__ */ jsx3(Heading3, { level: "h2", "data-testid": "active-order-return-heading", children: t("orders.returns.panel.title") })
|
|
344
295
|
] }),
|
|
345
296
|
/* @__PURE__ */ jsx3("div", { className: "gap-2 px-6 pb-4", "data-testid": "active-order-return-description", children: /* @__PURE__ */ jsx3(Text3, { children: t("orders.returns.panel.description") }) })
|
|
346
297
|
] }),
|
|
347
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", "data-testid": "active-order-return-actions", children: [
|
|
348
299
|
/* @__PURE__ */ jsx3(Button3, { size: "small", variant: "secondary", onClick: onCancelReturn, "data-testid": "active-order-return-cancel-button", children: t("orders.returns.cancel.title") }),
|
|
349
300
|
/* @__PURE__ */ jsx3(Button3, { size: "small", variant: "secondary", onClick: onContinueReturn, "data-testid": "active-order-return-continue-button", children: t("actions.continue") })
|
|
350
301
|
] })
|
|
@@ -359,20 +310,20 @@ import { useTranslation as useTranslation4 } from "react-i18next";
|
|
|
359
310
|
import { ExclamationCircleSolid } from "@medusajs/icons";
|
|
360
311
|
import { useMemo } from "react";
|
|
361
312
|
import { useNavigate as useNavigate4 } from "react-router-dom";
|
|
362
|
-
import { jsx as jsx4, jsxs as
|
|
313
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
363
314
|
function EditItem({
|
|
364
315
|
item,
|
|
365
316
|
quantity
|
|
366
317
|
}) {
|
|
367
|
-
return /* @__PURE__ */ jsx4("div", { className: "text-ui-fg-subtle items-center gap-x-2", children: /* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ jsx4("div", { className: "text-ui-fg-subtle items-center gap-x-2", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
|
|
319
|
+
/* @__PURE__ */ jsxs4("div", { className: "w-fit min-w-[27px]", children: [
|
|
369
320
|
/* @__PURE__ */ jsx4("span", { className: "txt-small tabular-nums", children: quantity }),
|
|
370
321
|
"x"
|
|
371
322
|
] }),
|
|
372
323
|
/* @__PURE__ */ jsx4(Thumbnail, { src: item.thumbnail }),
|
|
373
324
|
/* @__PURE__ */ jsx4("span", { className: "txt-small text-ui-fg-subtle font-medium", children: item.title }),
|
|
374
325
|
item.variant_sku && " \xB7 ",
|
|
375
|
-
item.variant_sku && /* @__PURE__ */
|
|
326
|
+
item.variant_sku && /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-1", children: [
|
|
376
327
|
/* @__PURE__ */ jsx4("span", { className: "txt-small", children: item.variant_sku }),
|
|
377
328
|
/* @__PURE__ */ jsx4(Copy, { content: item.variant_sku, className: "text-ui-fg-muted" })
|
|
378
329
|
] })
|
|
@@ -439,52 +390,66 @@ var OrderActiveEditSection = ({
|
|
|
439
390
|
},
|
|
440
391
|
className: "-m-4 mb-1 border-b border-l p-4",
|
|
441
392
|
"data-testid": "order-active-edit-section",
|
|
442
|
-
children: /* @__PURE__ */ jsx4(Container4, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
393
|
+
children: /* @__PURE__ */ jsx4(Container4, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs4("div", { className: "flex w-full flex-col divide-y divide-dashed", children: [
|
|
394
|
+
/* @__PURE__ */ jsxs4(
|
|
395
|
+
"div",
|
|
396
|
+
{
|
|
397
|
+
className: "flex items-center gap-2 px-6 py-4",
|
|
398
|
+
"data-testid": "order-active-edit-header",
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ jsx4(ExclamationCircleSolid, { className: "text-blue-500" }),
|
|
401
|
+
/* @__PURE__ */ jsx4(Heading4, { level: "h2", "data-testid": "order-active-edit-heading", children: t(
|
|
402
|
+
isPending ? "orders.edits.panel.titlePending" : "orders.edits.panel.title"
|
|
403
|
+
) })
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
!!addedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
|
|
450
408
|
/* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.added") }),
|
|
451
409
|
/* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: addedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
|
|
452
410
|
] }),
|
|
453
|
-
!!removedItems.length && /* @__PURE__ */
|
|
411
|
+
!!removedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
|
|
454
412
|
/* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.removed") }),
|
|
455
413
|
/* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: removedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
|
|
456
414
|
] }),
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
415
|
+
/* @__PURE__ */ jsxs4(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4",
|
|
419
|
+
"data-testid": "order-active-edit-actions",
|
|
420
|
+
children: [
|
|
421
|
+
isPending ? /* @__PURE__ */ jsx4(
|
|
422
|
+
Button4,
|
|
423
|
+
{
|
|
424
|
+
size: "small",
|
|
425
|
+
variant: "secondary",
|
|
426
|
+
onClick: () => navigate(`/orders/${order.id}/edits`),
|
|
427
|
+
"data-testid": "order-active-edit-continue-button",
|
|
428
|
+
children: t("actions.continueEdit")
|
|
429
|
+
}
|
|
430
|
+
) : /* @__PURE__ */ jsx4(
|
|
431
|
+
Button4,
|
|
432
|
+
{
|
|
433
|
+
size: "small",
|
|
434
|
+
variant: "secondary",
|
|
435
|
+
onClick: onConfirmOrderEdit,
|
|
436
|
+
"data-testid": "order-active-edit-confirm-button",
|
|
437
|
+
children: t("actions.forceConfirm")
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
/* @__PURE__ */ jsx4(
|
|
441
|
+
Button4,
|
|
442
|
+
{
|
|
443
|
+
size: "small",
|
|
444
|
+
variant: "secondary",
|
|
445
|
+
onClick: onCancelOrderEdit,
|
|
446
|
+
"data-testid": "order-active-edit-cancel-button",
|
|
447
|
+
children: t("actions.cancel")
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
)
|
|
488
453
|
] }) })
|
|
489
454
|
}
|
|
490
455
|
);
|
|
@@ -504,7 +469,7 @@ import { useTranslation as useTranslation7 } from "react-i18next";
|
|
|
504
469
|
import { Popover, Text as Text4 } from "@medusajs/ui";
|
|
505
470
|
import { useState } from "react";
|
|
506
471
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
507
|
-
import { jsx as jsx5, jsxs as
|
|
472
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
508
473
|
function ActivityItems(props) {
|
|
509
474
|
const { t } = useTranslation5();
|
|
510
475
|
const [open, setOpen] = useState(false);
|
|
@@ -521,7 +486,7 @@ function ActivityItems(props) {
|
|
|
521
486
|
if (!itemsToSend?.length && !itemsToReturn?.length) {
|
|
522
487
|
return;
|
|
523
488
|
}
|
|
524
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ jsxs5(Popover, { open, children: [
|
|
525
490
|
/* @__PURE__ */ jsx5(
|
|
526
491
|
Popover.Trigger,
|
|
527
492
|
{
|
|
@@ -538,14 +503,14 @@ function ActivityItems(props) {
|
|
|
538
503
|
align: "center",
|
|
539
504
|
side: "top",
|
|
540
505
|
className: "bg-ui-bg-component max-w-[200px] p-0 focus-visible:outline-none",
|
|
541
|
-
children: /* @__PURE__ */
|
|
542
|
-
!!itemsToSend?.length && /* @__PURE__ */
|
|
506
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
|
|
507
|
+
!!itemsToSend?.length && /* @__PURE__ */ jsxs5("div", { className: "p-3", children: [
|
|
543
508
|
/* @__PURE__ */ jsx5("div", { className: "txt-compact-small-plus mb-1", children: t("orders.activity.events.common.toSend") }),
|
|
544
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
|
|
545
510
|
itemsToSend?.map((item) => {
|
|
546
511
|
const originalItem = itemsMap?.get(item.item_id);
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-x-3", children: [
|
|
513
|
+
/* @__PURE__ */ jsxs5(Text4, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
549
514
|
item.quantity,
|
|
550
515
|
"x"
|
|
551
516
|
] }),
|
|
@@ -556,13 +521,13 @@ function ActivityItems(props) {
|
|
|
556
521
|
/* @__PURE__ */ jsx5("div", { className: "flex flex-1 flex-row items-center gap-2" })
|
|
557
522
|
] })
|
|
558
523
|
] }),
|
|
559
|
-
!!itemsToReturn?.length && /* @__PURE__ */
|
|
524
|
+
!!itemsToReturn?.length && /* @__PURE__ */ jsxs5("div", { className: "border-t-2 border-dotted p-3", children: [
|
|
560
525
|
/* @__PURE__ */ jsx5("div", { className: "txt-compact-small-plus mb-1", children: t("orders.activity.events.common.toReturn") }),
|
|
561
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
|
|
562
527
|
itemsToReturn?.map((item) => {
|
|
563
528
|
const originalItem = itemsMap?.get(item.item_id);
|
|
564
|
-
return /* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
529
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-x-3", children: [
|
|
530
|
+
/* @__PURE__ */ jsxs5(Text4, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
566
531
|
item.quantity,
|
|
567
532
|
"x"
|
|
568
533
|
] }),
|
|
@@ -584,7 +549,7 @@ var activity_items_default = ActivityItems;
|
|
|
584
549
|
import { Popover as Popover2, Text as Text5 } from "@medusajs/ui";
|
|
585
550
|
import { useState as useState2 } from "react";
|
|
586
551
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
587
|
-
import { jsx as jsx6, jsxs as
|
|
552
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
588
553
|
function ChangeDetailsTooltip(props) {
|
|
589
554
|
const { t } = useTranslation6();
|
|
590
555
|
const [open, setOpen] = useState2(false);
|
|
@@ -600,7 +565,7 @@ function ChangeDetailsTooltip(props) {
|
|
|
600
565
|
if (!previous && !next) {
|
|
601
566
|
return null;
|
|
602
567
|
}
|
|
603
|
-
return /* @__PURE__ */
|
|
568
|
+
return /* @__PURE__ */ jsxs6(Popover2, { open, children: [
|
|
604
569
|
/* @__PURE__ */ jsx6(
|
|
605
570
|
Popover2.Trigger,
|
|
606
571
|
{
|
|
@@ -617,12 +582,12 @@ function ChangeDetailsTooltip(props) {
|
|
|
617
582
|
align: "center",
|
|
618
583
|
side: "top",
|
|
619
584
|
className: "bg-ui-bg-component max-w-[200px] p-0 focus-visible:outline-none",
|
|
620
|
-
children: /* @__PURE__ */
|
|
621
|
-
!!previous && /* @__PURE__ */
|
|
585
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
|
|
586
|
+
!!previous && /* @__PURE__ */ jsxs6("div", { className: "p-3", children: [
|
|
622
587
|
/* @__PURE__ */ jsx6("div", { className: "txt-compact-small-plus mb-1", children: t("labels.from") }),
|
|
623
588
|
/* @__PURE__ */ jsx6("p", { className: "txt-compact-small text-ui-fg-subtle", children: previous })
|
|
624
589
|
] }),
|
|
625
|
-
!!next && /* @__PURE__ */
|
|
590
|
+
!!next && /* @__PURE__ */ jsxs6("div", { className: "border-t-2 border-dotted p-3", children: [
|
|
626
591
|
/* @__PURE__ */ jsx6("div", { className: "txt-compact-small-plus mb-1", children: t("labels.to") }),
|
|
627
592
|
/* @__PURE__ */ jsx6("p", { className: "txt-compact-small text-ui-fg-subtle", children: next })
|
|
628
593
|
] })
|
|
@@ -634,7 +599,7 @@ function ChangeDetailsTooltip(props) {
|
|
|
634
599
|
var change_details_tooltip_default = ChangeDetailsTooltip;
|
|
635
600
|
|
|
636
601
|
// src/pages/orders/order-detail/components/order-activity-section/order-timeline.tsx
|
|
637
|
-
import { Fragment, jsx as jsx7, jsxs as
|
|
602
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
638
603
|
var NON_RMA_CHANGE_TYPES = ["transfer", "update_order"];
|
|
639
604
|
var OrderTimeline = ({ order }) => {
|
|
640
605
|
const items = useActivityItems(order);
|
|
@@ -658,7 +623,7 @@ var OrderTimeline = ({ order }) => {
|
|
|
658
623
|
const lastItems = items.slice(0, 2);
|
|
659
624
|
const collapsibleItems = items.slice(2, items.length - 1);
|
|
660
625
|
const firstItem = items[items.length - 1];
|
|
661
|
-
return /* @__PURE__ */
|
|
626
|
+
return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-y-0.5", "data-testid": "order-timeline", children: [
|
|
662
627
|
lastItems.map((item, index) => {
|
|
663
628
|
return /* @__PURE__ */ jsx7(
|
|
664
629
|
OrderActivityItem,
|
|
@@ -932,7 +897,7 @@ var useActivityItems = (order) => {
|
|
|
932
897
|
}
|
|
933
898
|
),
|
|
934
899
|
timestamp: update.created_at,
|
|
935
|
-
children: /* @__PURE__ */
|
|
900
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "text-ui-fg-subtle mt-2 flex gap-x-2 text-sm", children: [
|
|
936
901
|
t("fields.by"),
|
|
937
902
|
" ",
|
|
938
903
|
/* @__PURE__ */ jsx7(By, { id: update.created_by })
|
|
@@ -954,7 +919,7 @@ var useActivityItems = (order) => {
|
|
|
954
919
|
}
|
|
955
920
|
),
|
|
956
921
|
timestamp: update.created_at,
|
|
957
|
-
children: /* @__PURE__ */
|
|
922
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "text-ui-fg-subtle mt-2 flex gap-x-2 text-sm", children: [
|
|
958
923
|
t("fields.by"),
|
|
959
924
|
" ",
|
|
960
925
|
/* @__PURE__ */ jsx7(By, { id: update.created_by })
|
|
@@ -972,7 +937,7 @@ var useActivityItems = (order) => {
|
|
|
972
937
|
}
|
|
973
938
|
),
|
|
974
939
|
timestamp: update.created_at,
|
|
975
|
-
children: /* @__PURE__ */
|
|
940
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "text-ui-fg-subtle mt-2 flex gap-x-2 text-sm", children: [
|
|
976
941
|
t("fields.by"),
|
|
977
942
|
" ",
|
|
978
943
|
/* @__PURE__ */ jsx7(By, { id: update.created_by })
|
|
@@ -1016,12 +981,12 @@ var OrderActivityItem = ({
|
|
|
1016
981
|
itemsMap
|
|
1017
982
|
}) => {
|
|
1018
983
|
const { getFullDate, getRelativeDate } = useDate();
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-[20px_1fr] items-start gap-2", "data-testid": "order-activity-item", children: [
|
|
985
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex size-full flex-col items-center gap-y-0.5", "data-testid": "order-activity-item-indicator", children: [
|
|
1021
986
|
/* @__PURE__ */ jsx7("div", { className: "flex size-5 items-center justify-center", children: /* @__PURE__ */ jsx7("div", { className: "bg-ui-bg-base shadow-borders-base flex size-2.5 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx7("div", { className: "bg-ui-tag-neutral-icon size-1.5 rounded-full" }) }) }),
|
|
1022
987
|
!isFirst && /* @__PURE__ */ jsx7("div", { className: "bg-ui-border-base w-px flex-1" })
|
|
1023
988
|
] }),
|
|
1024
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ jsxs7(
|
|
1025
990
|
"div",
|
|
1026
991
|
{
|
|
1027
992
|
className: clx({
|
|
@@ -1029,7 +994,7 @@ var OrderActivityItem = ({
|
|
|
1029
994
|
}),
|
|
1030
995
|
"data-testid": "order-activity-item-content",
|
|
1031
996
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between", children: [
|
|
1033
998
|
itemsToSend?.length || itemsToReturn?.length ? /* @__PURE__ */ jsx7(
|
|
1034
999
|
activity_items_default,
|
|
1035
1000
|
{
|
|
@@ -1071,8 +1036,8 @@ var OrderActivityCollapsible = ({
|
|
|
1071
1036
|
if (!activities.length) {
|
|
1072
1037
|
return null;
|
|
1073
1038
|
}
|
|
1074
|
-
return /* @__PURE__ */
|
|
1075
|
-
!open && /* @__PURE__ */
|
|
1039
|
+
return /* @__PURE__ */ jsxs7(RadixCollapsible.Root, { open, onOpenChange: setOpen, children: [
|
|
1040
|
+
!open && /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-[20px_1fr] items-start gap-2", children: [
|
|
1076
1041
|
/* @__PURE__ */ jsx7("div", { className: "flex size-full flex-col items-center", children: /* @__PURE__ */ jsx7("div", { className: "border-ui-border-strong w-px flex-1 bg-[linear-gradient(var(--border-strong)_33%,rgba(255,255,255,0)_0%)] bg-[length:1px_3px] bg-right bg-repeat-y" }) }),
|
|
1077
1042
|
/* @__PURE__ */ jsx7("div", { className: "pb-4", children: /* @__PURE__ */ jsx7(RadixCollapsible.Trigger, { className: "text-left", children: /* @__PURE__ */ jsx7(
|
|
1078
1043
|
Text6,
|
|
@@ -1142,11 +1107,11 @@ var ReturnBody = ({
|
|
|
1142
1107
|
const numberOfItems = orderReturn.items.reduce((acc, item) => {
|
|
1143
1108
|
return acc + (isReceived ? item.received_quantity : item.quantity);
|
|
1144
1109
|
}, 0);
|
|
1145
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-1", children: [
|
|
1146
1111
|
/* @__PURE__ */ jsx7(Text6, { size: "small", className: "text-ui-fg-subtle", children: t("orders.activity.events.return.items", {
|
|
1147
1112
|
count: numberOfItems
|
|
1148
1113
|
}) }),
|
|
1149
|
-
isCreated && /* @__PURE__ */
|
|
1114
|
+
isCreated && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1150
1115
|
/* @__PURE__ */ jsx7("div", { className: "mt-[2px] flex items-center leading-none", children: "\u22C5" }),
|
|
1151
1116
|
/* @__PURE__ */ jsx7(
|
|
1152
1117
|
Button5,
|
|
@@ -1191,7 +1156,7 @@ var ClaimBody = ({
|
|
|
1191
1156
|
(acc, item) => acc + item.quantity,
|
|
1192
1157
|
0
|
|
1193
1158
|
);
|
|
1194
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
1195
1160
|
outboundItems > 0 && /* @__PURE__ */ jsx7(Text6, { size: "small", className: "text-ui-fg-subtle", children: t("orders.activity.events.claim.itemsInbound", {
|
|
1196
1161
|
count: outboundItems
|
|
1197
1162
|
}) }),
|
|
@@ -1243,7 +1208,7 @@ var ExchangeBody = ({
|
|
|
1243
1208
|
(acc, item) => acc + item.quantity,
|
|
1244
1209
|
0
|
|
1245
1210
|
);
|
|
1246
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
1247
1212
|
outboundItems > 0 && /* @__PURE__ */ jsx7(Text6, { size: "small", className: "text-ui-fg-subtle", children: t("orders.activity.events.exchange.itemsInbound", {
|
|
1248
1213
|
count: outboundItems
|
|
1249
1214
|
}) }),
|
|
@@ -1268,13 +1233,13 @@ var OrderEditBody = ({ edit }) => {
|
|
|
1268
1233
|
() => countItemsChange(edit.actions),
|
|
1269
1234
|
[edit]
|
|
1270
1235
|
);
|
|
1271
|
-
return /* @__PURE__ */
|
|
1272
|
-
itemsAdded > 0 && /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
1237
|
+
itemsAdded > 0 && /* @__PURE__ */ jsxs7(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
1273
1238
|
t("labels.added"),
|
|
1274
1239
|
": ",
|
|
1275
1240
|
itemsAdded
|
|
1276
1241
|
] }),
|
|
1277
|
-
itemsRemoved > 0 && /* @__PURE__ */
|
|
1242
|
+
itemsRemoved > 0 && /* @__PURE__ */ jsxs7(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
1278
1243
|
t("labels.removed"),
|
|
1279
1244
|
": ",
|
|
1280
1245
|
itemsRemoved
|
|
@@ -1306,13 +1271,13 @@ var TransferOrderRequestBody = ({
|
|
|
1306
1271
|
toast5.error(error.message);
|
|
1307
1272
|
});
|
|
1308
1273
|
};
|
|
1309
|
-
return /* @__PURE__ */
|
|
1310
|
-
/* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
1275
|
+
/* @__PURE__ */ jsxs7(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
1311
1276
|
t("orders.activity.from"),
|
|
1312
1277
|
": ",
|
|
1313
1278
|
action.details?.original_email
|
|
1314
1279
|
] }),
|
|
1315
|
-
/* @__PURE__ */
|
|
1280
|
+
/* @__PURE__ */ jsxs7(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
1316
1281
|
t("orders.activity.to"),
|
|
1317
1282
|
":",
|
|
1318
1283
|
" ",
|
|
@@ -1368,10 +1333,10 @@ function getMissingLineItemIds(order, changes) {
|
|
|
1368
1333
|
}
|
|
1369
1334
|
|
|
1370
1335
|
// src/pages/orders/order-detail/components/order-activity-section/order-activity-section.tsx
|
|
1371
|
-
import { jsx as jsx8, jsxs as
|
|
1336
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1372
1337
|
var OrderActivitySection = ({ order }) => {
|
|
1373
1338
|
const { t } = useTranslation8();
|
|
1374
|
-
return /* @__PURE__ */
|
|
1339
|
+
return /* @__PURE__ */ jsxs8(Container5, { className: "flex flex-col gap-y-8 px-6 py-4", "data-testid": "order-activity-section", children: [
|
|
1375
1340
|
/* @__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") }) }) }),
|
|
1376
1341
|
/* @__PURE__ */ jsx8(OrderTimeline, { order })
|
|
1377
1342
|
] });
|
|
@@ -1386,21 +1351,21 @@ import { useTranslation as useTranslation10 } from "react-i18next";
|
|
|
1386
1351
|
import { Avatar, Copy as Copy2, Text as Text7 } from "@medusajs/ui";
|
|
1387
1352
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
1388
1353
|
import { Link } from "react-router-dom";
|
|
1389
|
-
import { jsx as jsx9, jsxs as
|
|
1354
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1390
1355
|
var ID = ({ data }) => {
|
|
1391
1356
|
const { t } = useTranslation9();
|
|
1392
1357
|
const id = data.customer_id;
|
|
1393
1358
|
const name = getOrderCustomer(data);
|
|
1394
1359
|
const email = data.email;
|
|
1395
1360
|
const fallback = (name || email || "").charAt(0).toUpperCase();
|
|
1396
|
-
return /* @__PURE__ */
|
|
1361
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1397
1362
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
|
|
1398
1363
|
/* @__PURE__ */ jsx9(
|
|
1399
1364
|
Link,
|
|
1400
1365
|
{
|
|
1401
1366
|
to: `/customers/${id}`,
|
|
1402
1367
|
className: "focus:shadow-borders-focus rounded-[4px] outline-none transition-shadow",
|
|
1403
|
-
children: /* @__PURE__ */
|
|
1368
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
|
|
1404
1369
|
/* @__PURE__ */ jsx9(Avatar, { size: "2xsmall", fallback }),
|
|
1405
1370
|
/* @__PURE__ */ jsx9(
|
|
1406
1371
|
Text7,
|
|
@@ -1422,7 +1387,7 @@ var Company = ({ data }) => {
|
|
|
1422
1387
|
if (!company) {
|
|
1423
1388
|
return null;
|
|
1424
1389
|
}
|
|
1425
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1426
1391
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
|
|
1427
1392
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", className: "truncate", children: company })
|
|
1428
1393
|
] });
|
|
@@ -1431,10 +1396,10 @@ var Contact = ({ data }) => {
|
|
|
1431
1396
|
const { t } = useTranslation9();
|
|
1432
1397
|
const phone = data.shipping_address?.phone || data.billing_address?.phone;
|
|
1433
1398
|
const email = data.email || "";
|
|
1434
|
-
return /* @__PURE__ */
|
|
1399
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1435
1400
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2", children: [
|
|
1402
|
+
/* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1438
1403
|
/* @__PURE__ */ jsx9(
|
|
1439
1404
|
Text7,
|
|
1440
1405
|
{
|
|
@@ -1446,7 +1411,7 @@ var Contact = ({ data }) => {
|
|
|
1446
1411
|
),
|
|
1447
1412
|
/* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(Copy2, { content: email, className: "text-ui-fg-muted" }) })
|
|
1448
1413
|
] }),
|
|
1449
|
-
phone && /* @__PURE__ */
|
|
1414
|
+
phone && /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1450
1415
|
/* @__PURE__ */ jsx9(
|
|
1451
1416
|
Text7,
|
|
1452
1417
|
{
|
|
@@ -1466,11 +1431,11 @@ var AddressPrint = ({
|
|
|
1466
1431
|
type
|
|
1467
1432
|
}) => {
|
|
1468
1433
|
const { t } = useTranslation9();
|
|
1469
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsxs9("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1470
1435
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
|
|
1471
|
-
address ? /* @__PURE__ */
|
|
1436
|
+
address ? /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
|
|
1472
1437
|
/* @__PURE__ */ jsx9(Text7, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
|
|
1473
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ jsxs9("span", { className: "break-words", children: [
|
|
1474
1439
|
line,
|
|
1475
1440
|
/* @__PURE__ */ jsx9("br", {})
|
|
1476
1441
|
] }, i);
|
|
@@ -1487,9 +1452,9 @@ var AddressPrint = ({
|
|
|
1487
1452
|
};
|
|
1488
1453
|
var Addresses = ({ data }) => {
|
|
1489
1454
|
const { t } = useTranslation9();
|
|
1490
|
-
return /* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ jsxs9("div", { className: "divide-y", children: [
|
|
1491
1456
|
/* @__PURE__ */ jsx9(AddressPrint, { address: data.shipping_address, type: "shipping" }),
|
|
1492
|
-
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx9(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */
|
|
1457
|
+
!isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx9(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1493
1458
|
/* @__PURE__ */ jsx9(
|
|
1494
1459
|
Text7,
|
|
1495
1460
|
{
|
|
@@ -1525,9 +1490,9 @@ var getOrderCustomer = (obj) => {
|
|
|
1525
1490
|
};
|
|
1526
1491
|
|
|
1527
1492
|
// src/pages/orders/order-detail/components/order-customer-section/order-customer-section.tsx
|
|
1528
|
-
import { jsx as jsx10, jsxs as
|
|
1493
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1529
1494
|
var OrderCustomerSection = ({ order }) => {
|
|
1530
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ jsxs10(
|
|
1531
1496
|
Container6,
|
|
1532
1497
|
{
|
|
1533
1498
|
className: "divide-y p-0",
|
|
@@ -1544,7 +1509,7 @@ var OrderCustomerSection = ({ order }) => {
|
|
|
1544
1509
|
};
|
|
1545
1510
|
var Header = ({ order }) => {
|
|
1546
1511
|
const { t } = useTranslation10();
|
|
1547
|
-
return /* @__PURE__ */
|
|
1512
|
+
return /* @__PURE__ */ jsxs10(
|
|
1548
1513
|
"div",
|
|
1549
1514
|
{
|
|
1550
1515
|
className: "flex items-center justify-between px-6 py-4",
|
|
@@ -1620,12 +1585,12 @@ import {
|
|
|
1620
1585
|
import { format } from "date-fns";
|
|
1621
1586
|
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
1622
1587
|
import { Link as Link2, useNavigate as useNavigate5 } from "react-router-dom";
|
|
1623
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as
|
|
1588
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1624
1589
|
var OrderFulfillmentSection = ({
|
|
1625
1590
|
order
|
|
1626
1591
|
}) => {
|
|
1627
1592
|
const fulfillments = order.fulfillments || [];
|
|
1628
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-y-3", "data-testid": "order-fulfillment-section", children: [
|
|
1629
1594
|
/* @__PURE__ */ jsx11(UnfulfilledItemBreakdown, { order }),
|
|
1630
1595
|
fulfillments.map((f, index) => /* @__PURE__ */ jsx11(Fulfillment, { index, fulfillment: f, order }, f.id))
|
|
1631
1596
|
] });
|
|
@@ -1634,14 +1599,14 @@ var UnfulfilledItem = ({
|
|
|
1634
1599
|
item,
|
|
1635
1600
|
currencyCode
|
|
1636
1601
|
}) => {
|
|
1637
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsxs11(
|
|
1638
1603
|
"div",
|
|
1639
1604
|
{
|
|
1640
1605
|
className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4",
|
|
1641
1606
|
children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-x-4", children: [
|
|
1643
1608
|
/* @__PURE__ */ jsx11(Thumbnail, { src: item.thumbnail }),
|
|
1644
|
-
/* @__PURE__ */
|
|
1609
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
1645
1610
|
/* @__PURE__ */ jsx11(
|
|
1646
1611
|
Text8,
|
|
1647
1612
|
{
|
|
@@ -1652,16 +1617,16 @@ var UnfulfilledItem = ({
|
|
|
1652
1617
|
children: item.title
|
|
1653
1618
|
}
|
|
1654
1619
|
),
|
|
1655
|
-
item.variant_sku && /* @__PURE__ */
|
|
1620
|
+
item.variant_sku && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-1", children: [
|
|
1656
1621
|
/* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant_sku }),
|
|
1657
1622
|
/* @__PURE__ */ jsx11(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
|
|
1658
1623
|
] }),
|
|
1659
1624
|
/* @__PURE__ */ jsx11(Text8, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
|
|
1660
1625
|
] })
|
|
1661
1626
|
] }),
|
|
1662
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsxs11("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
|
|
1663
1628
|
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx11(Text8, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
|
|
1664
|
-
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs11(Text8, { children: [
|
|
1665
1630
|
/* @__PURE__ */ jsx11("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
|
|
1666
1631
|
"x"
|
|
1667
1632
|
] }) }),
|
|
@@ -1679,7 +1644,7 @@ var UnfulfilledItemBreakdown = ({ order }) => {
|
|
|
1679
1644
|
const unfulfilledItemsWithoutShipping = order.items.filter(
|
|
1680
1645
|
(i) => !i.requires_shipping && i.detail.fulfilled_quantity < i.quantity
|
|
1681
1646
|
);
|
|
1682
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1683
1648
|
!!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx11(
|
|
1684
1649
|
UnfulfilledItemDisplay,
|
|
1685
1650
|
{
|
|
@@ -1707,10 +1672,10 @@ var UnfulfilledItemDisplay = ({
|
|
|
1707
1672
|
if (order.status === "canceled") {
|
|
1708
1673
|
return;
|
|
1709
1674
|
}
|
|
1710
|
-
return /* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": "order-fulfillment-unfulfilled", children: [
|
|
1676
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-fulfillment-unfulfilled-header", children: [
|
|
1712
1677
|
/* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": "order-fulfillment-unfulfilled-heading", children: t("orders.fulfillment.unfulfilledItems") }),
|
|
1713
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-4", "data-testid": "order-fulfillment-unfulfilled-badges", children: [
|
|
1714
1679
|
requiresShipping && /* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-requires-shipping-badge", children: t("orders.fulfillment.requiresShipping") }),
|
|
1715
1680
|
/* @__PURE__ */ jsx11(StatusBadge, { color: "red", className: "text-nowrap", "data-testid": "order-fulfillment-unfulfilled-awaiting-badge", children: t("orders.fulfillment.awaitingFulfillmentBadge") }),
|
|
1716
1681
|
/* @__PURE__ */ jsx11(
|
|
@@ -1831,12 +1796,12 @@ var Fulfillment = ({
|
|
|
1831
1796
|
throw error;
|
|
1832
1797
|
}
|
|
1833
1798
|
const isValidUrl = (url) => url && url.length > 0 && url !== "#";
|
|
1834
|
-
return /* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ jsxs11(Container7, { className: "divide-y p-0", "data-testid": `order-fulfillment-${fulfillment.id}`, children: [
|
|
1800
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": `order-fulfillment-${fulfillment.id}-header`, children: [
|
|
1836
1801
|
/* @__PURE__ */ jsx11(Heading7, { level: "h2", "data-testid": `order-fulfillment-${fulfillment.id}-heading`, children: t("orders.fulfillment.number", {
|
|
1837
1802
|
number: index + 1
|
|
1838
1803
|
}) }),
|
|
1839
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-x-4", "data-testid": `order-fulfillment-${fulfillment.id}-status-container`, children: [
|
|
1840
1805
|
/* @__PURE__ */ jsx11(
|
|
1841
1806
|
Tooltip2,
|
|
1842
1807
|
{
|
|
@@ -1867,15 +1832,15 @@ var Fulfillment = ({
|
|
|
1867
1832
|
)
|
|
1868
1833
|
] })
|
|
1869
1834
|
] }),
|
|
1870
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1871
1836
|
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
|
|
1872
|
-
/* @__PURE__ */ jsx11("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ jsx11("ul", { children: fulfillment.items.map((f_item) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs11(Text8, { size: "small", leading: "compact", children: [
|
|
1873
1838
|
f_item.quantity,
|
|
1874
1839
|
"x ",
|
|
1875
1840
|
f_item.title
|
|
1876
1841
|
] }) }, f_item.line_item_id)) })
|
|
1877
1842
|
] }),
|
|
1878
|
-
showLocation && /* @__PURE__ */
|
|
1843
|
+
showLocation && /* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1879
1844
|
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
|
|
1880
1845
|
stock_location ? /* @__PURE__ */ jsx11(
|
|
1881
1846
|
Link2,
|
|
@@ -1886,17 +1851,17 @@ var Fulfillment = ({
|
|
|
1886
1851
|
}
|
|
1887
1852
|
) : /* @__PURE__ */ jsx11(Skeleton, { className: "w-16" })
|
|
1888
1853
|
] }),
|
|
1889
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
1890
1855
|
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
|
|
1891
1856
|
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
|
|
1892
1857
|
] }),
|
|
1893
|
-
/* @__PURE__ */
|
|
1858
|
+
/* @__PURE__ */ jsxs11("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
1894
1859
|
/* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
|
|
1895
1860
|
/* @__PURE__ */ jsx11("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx11("ul", { children: fulfillment.labels.map((tlink) => {
|
|
1896
1861
|
const hasTrackingUrl = isValidUrl(tlink.tracking_url);
|
|
1897
1862
|
const hasLabelUrl = isValidUrl(tlink.label_url);
|
|
1898
1863
|
if (hasTrackingUrl || hasLabelUrl) {
|
|
1899
|
-
return /* @__PURE__ */
|
|
1864
|
+
return /* @__PURE__ */ jsxs11("li", { children: [
|
|
1900
1865
|
hasTrackingUrl && /* @__PURE__ */ jsx11(
|
|
1901
1866
|
"a",
|
|
1902
1867
|
{
|
|
@@ -1923,7 +1888,7 @@ var Fulfillment = ({
|
|
|
1923
1888
|
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
|
|
1924
1889
|
}) }) : /* @__PURE__ */ jsx11(Text8, { size: "small", leading: "compact", children: "-" }) })
|
|
1925
1890
|
] }),
|
|
1926
|
-
(showShippingButton || showDeliveryButton) && /* @__PURE__ */
|
|
1891
|
+
(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: [
|
|
1927
1892
|
showDeliveryButton && /* @__PURE__ */ jsx11(Button6, { onClick: handleMarkAsDelivered, variant: "secondary", "data-testid": `order-fulfillment-${fulfillment.id}-mark-delivered-button`, children: t(
|
|
1928
1893
|
isPickUpFulfillment ? "orders.fulfillment.markAsPickedUp" : "orders.fulfillment.markAsDelivered"
|
|
1929
1894
|
) }),
|
|
@@ -1952,7 +1917,7 @@ import {
|
|
|
1952
1917
|
usePrompt as usePrompt3
|
|
1953
1918
|
} from "@medusajs/ui";
|
|
1954
1919
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
1955
|
-
import { jsx as jsx12, jsxs as
|
|
1920
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1956
1921
|
var OrderGeneralSection = ({ order }) => {
|
|
1957
1922
|
const { t } = useTranslation12();
|
|
1958
1923
|
const prompt = usePrompt3();
|
|
@@ -1979,10 +1944,10 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1979
1944
|
}
|
|
1980
1945
|
});
|
|
1981
1946
|
};
|
|
1982
|
-
return /* @__PURE__ */
|
|
1983
|
-
/* @__PURE__ */
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */
|
|
1947
|
+
return /* @__PURE__ */ jsxs12(Container8, { className: "flex items-center justify-between px-6 py-4", "data-testid": "order-general-section", children: [
|
|
1948
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
1949
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1", "data-testid": "order-general-section-id-container", children: [
|
|
1950
|
+
/* @__PURE__ */ jsxs12(Heading8, { "data-testid": "order-general-section-id-heading", children: [
|
|
1986
1951
|
"#",
|
|
1987
1952
|
order.display_id
|
|
1988
1953
|
] }),
|
|
@@ -1993,8 +1958,8 @@ var OrderGeneralSection = ({ order }) => {
|
|
|
1993
1958
|
salesChannel: order.sales_channel?.name
|
|
1994
1959
|
}) })
|
|
1995
1960
|
] }),
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-4", "data-testid": "order-general-section-badges-container", children: [
|
|
1962
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-x-1.5", "data-testid": "order-general-section-badges", children: [
|
|
1998
1963
|
/* @__PURE__ */ jsx12(OrderBadge, { order }),
|
|
1999
1964
|
/* @__PURE__ */ jsx12(PaymentBadge, { order }),
|
|
2000
1965
|
/* @__PURE__ */ jsx12(FulfillmentBadge, { order })
|
|
@@ -2047,7 +2012,7 @@ import { useTranslation as useTranslation13 } from "react-i18next";
|
|
|
2047
2012
|
import { useState as useState4 } from "react";
|
|
2048
2013
|
import copy from "copy-to-clipboard";
|
|
2049
2014
|
import { clx as clx2, toast as toast8, Tooltip as Tooltip3 } from "@medusajs/ui";
|
|
2050
|
-
import { jsx as jsx13, jsxs as
|
|
2015
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2051
2016
|
function DisplayId({ id, className }) {
|
|
2052
2017
|
const { t } = useTranslation13();
|
|
2053
2018
|
const [open, setOpen] = useState4(false);
|
|
@@ -2055,7 +2020,7 @@ function DisplayId({ id, className }) {
|
|
|
2055
2020
|
copy(id);
|
|
2056
2021
|
toast8.success(t("actions.idCopiedToClipboard"));
|
|
2057
2022
|
};
|
|
2058
|
-
return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs13("span", { onClick, className: clx2("cursor-pointer", className), children: [
|
|
2059
2024
|
"#",
|
|
2060
2025
|
id.slice(-7)
|
|
2061
2026
|
] }) });
|
|
@@ -2087,11 +2052,11 @@ import {
|
|
|
2087
2052
|
} from "@medusajs/ui";
|
|
2088
2053
|
import { format as format2 } from "date-fns";
|
|
2089
2054
|
import { Trans, useTranslation as useTranslation14 } from "react-i18next";
|
|
2090
|
-
import { jsx as jsx14, jsxs as
|
|
2055
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2091
2056
|
var OrderPaymentSection = ({ order }) => {
|
|
2092
2057
|
const payments = getPaymentsFromOrder(order);
|
|
2093
2058
|
const refunds = payments.map((payment) => payment?.refunds).flat(1).filter(Boolean);
|
|
2094
|
-
return /* @__PURE__ */
|
|
2059
|
+
return /* @__PURE__ */ jsxs14(
|
|
2095
2060
|
Container9,
|
|
2096
2061
|
{
|
|
2097
2062
|
className: "divide-y divide-dashed p-0",
|
|
@@ -2115,7 +2080,7 @@ var OrderPaymentSection = ({ order }) => {
|
|
|
2115
2080
|
var Header2 = ({ order }) => {
|
|
2116
2081
|
const { t } = useTranslation14();
|
|
2117
2082
|
const { label, color } = getOrderPaymentStatus(t, order.payment_status);
|
|
2118
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ jsxs14(
|
|
2119
2084
|
"div",
|
|
2120
2085
|
{
|
|
2121
2086
|
className: "flex items-center justify-between px-6 py-4",
|
|
@@ -2151,22 +2116,22 @@ var Refund = ({
|
|
|
2151
2116
|
}
|
|
2152
2117
|
);
|
|
2153
2118
|
const RefundNoteIndicator = refund.note && /* @__PURE__ */ jsx14(Tooltip4, { content: refund.note, children: /* @__PURE__ */ jsx14(DocumentText, { className: "ml-1 inline text-ui-tag-neutral-icon" }) });
|
|
2154
|
-
return /* @__PURE__ */
|
|
2155
|
-
/* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-x-4 bg-ui-bg-subtle px-6 py-4 text-ui-fg-subtle sm:items-center", children: [
|
|
2120
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-1 flex-col gap-3 sm:flex-row sm:items-center", children: [
|
|
2121
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 flex-row items-center gap-x-3", children: [
|
|
2157
2122
|
/* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
|
|
2158
|
-
/* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
2159
2124
|
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
|
|
2160
2125
|
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: format2(new Date(refund.created_at), "dd MMM, yyyy, HH:mm:ss") })
|
|
2161
2126
|
] })
|
|
2162
2127
|
] }),
|
|
2163
|
-
/* @__PURE__ */
|
|
2128
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-3", children: [
|
|
2164
2129
|
/* @__PURE__ */ jsx14("div", { className: "shrink-0", children: RefundNoteIndicator }),
|
|
2165
2130
|
RefundReasonBadge
|
|
2166
2131
|
] })
|
|
2167
2132
|
] }),
|
|
2168
|
-
/* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 items-center justify-end gap-4", children: [
|
|
2134
|
+
/* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", children: [
|
|
2170
2135
|
"- ",
|
|
2171
2136
|
getLocaleAmount(refund.amount, currencyCode)
|
|
2172
2137
|
] }),
|
|
@@ -2224,19 +2189,19 @@ var Payment = ({
|
|
|
2224
2189
|
const [status, color] = getPaymentStatusAttributes(payment);
|
|
2225
2190
|
const showCapture = payment.captured_at === null && payment.canceled_at === null;
|
|
2226
2191
|
const totalRefunded = payment.refunds?.reduce((acc, next) => next.amount + acc, 0) ?? 0;
|
|
2227
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ jsxs14(
|
|
2228
2193
|
"div",
|
|
2229
2194
|
{
|
|
2230
2195
|
className: "divide-y divide-dashed",
|
|
2231
2196
|
"data-testid": `order-payment-${payment.id}`,
|
|
2232
2197
|
children: [
|
|
2233
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ jsxs14(
|
|
2234
2199
|
"div",
|
|
2235
2200
|
{
|
|
2236
2201
|
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]",
|
|
2237
2202
|
"data-testid": `order-payment-${payment.id}-row`,
|
|
2238
2203
|
children: [
|
|
2239
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2240
2205
|
/* @__PURE__ */ jsx14(
|
|
2241
2206
|
Text10,
|
|
2242
2207
|
{
|
|
@@ -2307,13 +2272,13 @@ var Payment = ({
|
|
|
2307
2272
|
]
|
|
2308
2273
|
}
|
|
2309
2274
|
),
|
|
2310
|
-
showCapture && /* @__PURE__ */
|
|
2275
|
+
showCapture && /* @__PURE__ */ jsxs14(
|
|
2311
2276
|
"div",
|
|
2312
2277
|
{
|
|
2313
2278
|
className: "flex items-center justify-between bg-ui-bg-subtle px-6 py-4",
|
|
2314
2279
|
"data-testid": `order-payment-${payment.id}-capture-section`,
|
|
2315
2280
|
children: [
|
|
2316
|
-
/* @__PURE__ */
|
|
2281
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-2", children: [
|
|
2317
2282
|
/* @__PURE__ */ jsx14(ArrowDownRightMini, { className: "shrink-0 text-ui-fg-muted" }),
|
|
2318
2283
|
/* @__PURE__ */ jsx14(Text10, { size: "small", leading: "compact", children: /* @__PURE__ */ jsx14(
|
|
2319
2284
|
Trans,
|
|
@@ -2323,7 +2288,7 @@ var Payment = ({
|
|
|
2323
2288
|
}
|
|
2324
2289
|
) })
|
|
2325
2290
|
] }),
|
|
2326
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsxs14(
|
|
2327
2292
|
Button7,
|
|
2328
2293
|
{
|
|
2329
2294
|
className: "shrink-0",
|
|
@@ -2354,8 +2319,8 @@ var CreditLine = ({
|
|
|
2354
2319
|
}
|
|
2355
2320
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
2356
2321
|
const prettyReferenceId = creditLine.reference_id ? /* @__PURE__ */ jsx14(display_id_default, { id: creditLine.reference_id }) : null;
|
|
2357
|
-
return /* @__PURE__ */ jsx14("div", { className: "divide-y divide-dashed", children: /* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2322
|
+
return /* @__PURE__ */ jsx14("div", { className: "divide-y divide-dashed", children: /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-[1fr_1fr_20px] items-center gap-x-4 px-6 py-4 text-ui-fg-subtle sm:grid-cols-[1fr_1fr_1fr_20px]", children: [
|
|
2323
|
+
/* @__PURE__ */ jsxs14("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
|
|
2359
2324
|
/* @__PURE__ */ jsx14(
|
|
2360
2325
|
Text10,
|
|
2361
2326
|
{
|
|
@@ -2371,7 +2336,7 @@ var CreditLine = ({
|
|
|
2371
2336
|
"dd MMM, yyyy, HH:mm:ss"
|
|
2372
2337
|
) : "-" })
|
|
2373
2338
|
] }),
|
|
2374
|
-
/* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */
|
|
2339
|
+
/* @__PURE__ */ jsx14("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsxs14(Text10, { size: "small", leading: "compact", className: "capitalize", children: [
|
|
2375
2340
|
prettyReference,
|
|
2376
2341
|
" (",
|
|
2377
2342
|
prettyReferenceId,
|
|
@@ -2446,13 +2411,13 @@ var PaymentBreakdown = ({
|
|
|
2446
2411
|
var Total = ({ order }) => {
|
|
2447
2412
|
const { t } = useTranslation14();
|
|
2448
2413
|
const totalPending = getTotalPending(order.payment_collections);
|
|
2449
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ jsxs14(
|
|
2450
2415
|
"div",
|
|
2451
2416
|
{
|
|
2452
2417
|
className: "flex flex-col gap-y-4 px-6 py-4",
|
|
2453
2418
|
"data-testid": "order-payment-total",
|
|
2454
2419
|
children: [
|
|
2455
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsxs14(
|
|
2456
2421
|
"div",
|
|
2457
2422
|
{
|
|
2458
2423
|
className: "flex items-center justify-between",
|
|
@@ -2466,7 +2431,7 @@ var Total = ({ order }) => {
|
|
|
2466
2431
|
]
|
|
2467
2432
|
}
|
|
2468
2433
|
),
|
|
2469
|
-
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */
|
|
2434
|
+
order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs14(
|
|
2470
2435
|
"div",
|
|
2471
2436
|
{
|
|
2472
2437
|
className: "flex items-center justify-between",
|
|
@@ -2522,7 +2487,7 @@ import { InformationCircleSolid } from "@medusajs/icons";
|
|
|
2522
2487
|
import { Badge as Badge2, Popover as Popover3, Text as Text11 } from "@medusajs/ui";
|
|
2523
2488
|
import { useState as useState5 } from "react";
|
|
2524
2489
|
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
2525
|
-
import { jsx as jsx15, jsxs as
|
|
2490
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2526
2491
|
function ReturnInfoPopover({ orderReturn }) {
|
|
2527
2492
|
const { t } = useTranslation15();
|
|
2528
2493
|
const [open, setOpen] = useState5(false);
|
|
@@ -2546,7 +2511,7 @@ function ReturnInfoPopover({ orderReturn }) {
|
|
|
2546
2511
|
if (typeof orderReturn !== "object") {
|
|
2547
2512
|
return;
|
|
2548
2513
|
}
|
|
2549
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ jsxs15(Popover3, { open, children: [
|
|
2550
2515
|
/* @__PURE__ */ jsx15(
|
|
2551
2516
|
Popover3.Trigger,
|
|
2552
2517
|
{
|
|
@@ -2563,18 +2528,18 @@ function ReturnInfoPopover({ orderReturn }) {
|
|
|
2563
2528
|
align: "center",
|
|
2564
2529
|
side: "top",
|
|
2565
2530
|
className: "bg-ui-bg-component p-2 focus-visible:outline-none",
|
|
2566
|
-
children: /* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2531
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "", children: [
|
|
2532
|
+
/* @__PURE__ */ jsxs15(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
|
|
2568
2533
|
returnType,
|
|
2569
2534
|
": #",
|
|
2570
2535
|
returnTypeId.slice(-7)
|
|
2571
2536
|
] }),
|
|
2572
|
-
/* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
|
|
2573
2538
|
/* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.returnRequested`) }),
|
|
2574
2539
|
" \xB7 ",
|
|
2575
2540
|
getFullDate({ date: orderReturn.requested_at, includeTime: true })
|
|
2576
2541
|
] }),
|
|
2577
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ jsxs15(Text11, { size: "xsmall", children: [
|
|
2578
2543
|
/* @__PURE__ */ jsx15("span", { className: "text-ui-fg-subtle", children: t(`orders.returns.itemReceived`) }),
|
|
2579
2544
|
" \xB7 ",
|
|
2580
2545
|
orderReturn.received_at ? getFullDate({
|
|
@@ -2593,7 +2558,7 @@ var return_info_popover_default = ReturnInfoPopover;
|
|
|
2593
2558
|
import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
|
|
2594
2559
|
import { Badge as Badge3, Tooltip as Tooltip5 } from "@medusajs/ui";
|
|
2595
2560
|
import { useTranslation as useTranslation16 } from "react-i18next";
|
|
2596
|
-
import { jsx as jsx16, jsxs as
|
|
2561
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2597
2562
|
function ShippingInfoPopover({ shippingMethod }) {
|
|
2598
2563
|
const { t } = useTranslation16();
|
|
2599
2564
|
const shippingDetail = shippingMethod?.detail;
|
|
@@ -2616,7 +2581,7 @@ function ShippingInfoPopover({ shippingMethod }) {
|
|
|
2616
2581
|
return /* @__PURE__ */ jsx16(
|
|
2617
2582
|
Tooltip5,
|
|
2618
2583
|
{
|
|
2619
|
-
content: /* @__PURE__ */
|
|
2584
|
+
content: /* @__PURE__ */ jsxs16(Badge3, { size: "2xsmall", rounded: "full", children: [
|
|
2620
2585
|
rmaType,
|
|
2621
2586
|
": #",
|
|
2622
2587
|
rmaId.slice(-7)
|
|
@@ -2628,7 +2593,7 @@ function ShippingInfoPopover({ shippingMethod }) {
|
|
|
2628
2593
|
var shipping_info_popover_default = ShippingInfoPopover;
|
|
2629
2594
|
|
|
2630
2595
|
// src/pages/orders/order-detail/components/order-summary-section/order-summary-section.tsx
|
|
2631
|
-
import { Fragment as Fragment3, jsx as jsx17, jsxs as
|
|
2596
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2632
2597
|
var OrderSummarySection = ({ order }) => {
|
|
2633
2598
|
const { t } = useTranslation17();
|
|
2634
2599
|
const prompt = usePrompt5();
|
|
@@ -2717,7 +2682,7 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2717
2682
|
}
|
|
2718
2683
|
);
|
|
2719
2684
|
};
|
|
2720
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ jsxs17(
|
|
2721
2686
|
Container10,
|
|
2722
2687
|
{
|
|
2723
2688
|
className: "divide-y divide-dashed p-0",
|
|
@@ -2728,7 +2693,7 @@ var OrderSummarySection = ({ order }) => {
|
|
|
2728
2693
|
/* @__PURE__ */ jsx17(CostBreakdown, { order }),
|
|
2729
2694
|
/* @__PURE__ */ jsx17(DiscountAndTotalBreakdown, { order }),
|
|
2730
2695
|
/* @__PURE__ */ jsx17(Total2, { order }),
|
|
2731
|
-
(showAllocateButton || showReturns || showPayment || showRefund) && /* @__PURE__ */
|
|
2696
|
+
(showAllocateButton || showReturns || showPayment || showRefund) && /* @__PURE__ */ jsxs17(
|
|
2732
2697
|
"div",
|
|
2733
2698
|
{
|
|
2734
2699
|
className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4",
|
|
@@ -2832,7 +2797,7 @@ var Header3 = ({
|
|
|
2832
2797
|
);
|
|
2833
2798
|
const isOrderEditActive = orderPreview?.order_change?.change_type === "edit";
|
|
2834
2799
|
const isOrderEditPending = orderPreview?.order_change?.change_type === "edit" && orderPreview?.order_change?.status === "pending";
|
|
2835
|
-
return /* @__PURE__ */
|
|
2800
|
+
return /* @__PURE__ */ jsxs17(
|
|
2836
2801
|
"div",
|
|
2837
2802
|
{
|
|
2838
2803
|
className: "flex items-center justify-between px-6 py-4",
|
|
@@ -2897,21 +2862,21 @@ var Item = ({
|
|
|
2897
2862
|
const isInventoryManaged = item.variant?.manage_inventory;
|
|
2898
2863
|
const hasInventoryKit = isInventoryManaged && ((item.variant?.inventory_items?.length || 0) > 1 || item.variant?.inventory_items?.some((i) => i.required_quantity > 1));
|
|
2899
2864
|
const hasUnfulfilledItems = item.quantity - item.detail.fulfilled_quantity > 0;
|
|
2900
|
-
return /* @__PURE__ */
|
|
2901
|
-
/* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
2866
|
+
/* @__PURE__ */ jsxs17(
|
|
2902
2867
|
"div",
|
|
2903
2868
|
{
|
|
2904
2869
|
className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
|
|
2905
2870
|
"data-testid": `order-summary-item-${item.id}`,
|
|
2906
2871
|
children: [
|
|
2907
|
-
/* @__PURE__ */
|
|
2872
|
+
/* @__PURE__ */ jsxs17(
|
|
2908
2873
|
"div",
|
|
2909
2874
|
{
|
|
2910
2875
|
className: "flex items-start gap-x-4",
|
|
2911
2876
|
"data-testid": `order-summary-item-${item.id}-info`,
|
|
2912
2877
|
children: [
|
|
2913
2878
|
/* @__PURE__ */ jsx17(Thumbnail, { src: item.thumbnail }),
|
|
2914
|
-
/* @__PURE__ */
|
|
2879
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
2915
2880
|
/* @__PURE__ */ jsx17(
|
|
2916
2881
|
Text12,
|
|
2917
2882
|
{
|
|
@@ -2922,7 +2887,7 @@ var Item = ({
|
|
|
2922
2887
|
children: item.title
|
|
2923
2888
|
}
|
|
2924
2889
|
),
|
|
2925
|
-
item.variant_sku && /* @__PURE__ */
|
|
2890
|
+
item.variant_sku && /* @__PURE__ */ jsxs17(
|
|
2926
2891
|
"div",
|
|
2927
2892
|
{
|
|
2928
2893
|
className: "flex items-center gap-x-1",
|
|
@@ -2945,7 +2910,7 @@ var Item = ({
|
|
|
2945
2910
|
]
|
|
2946
2911
|
}
|
|
2947
2912
|
),
|
|
2948
|
-
/* @__PURE__ */
|
|
2913
|
+
/* @__PURE__ */ jsxs17(
|
|
2949
2914
|
"div",
|
|
2950
2915
|
{
|
|
2951
2916
|
className: "grid grid-cols-3 items-center gap-x-4",
|
|
@@ -2959,13 +2924,13 @@ var Item = ({
|
|
|
2959
2924
|
children: getLocaleAmount(item.unit_price, currencyCode)
|
|
2960
2925
|
}
|
|
2961
2926
|
) }),
|
|
2962
|
-
/* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ jsxs17(
|
|
2963
2928
|
"div",
|
|
2964
2929
|
{
|
|
2965
2930
|
className: "flex items-center gap-x-2",
|
|
2966
2931
|
"data-testid": `order-summary-item-${item.id}-quantity`,
|
|
2967
2932
|
children: [
|
|
2968
|
-
/* @__PURE__ */ jsx17("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ jsx17("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs17(Text12, { size: "small", children: [
|
|
2969
2934
|
/* @__PURE__ */ jsx17("span", { className: "tabular-nums", children: item.quantity }),
|
|
2970
2935
|
"x"
|
|
2971
2936
|
] }) }),
|
|
@@ -3051,8 +3016,8 @@ var Cost = ({
|
|
|
3051
3016
|
value,
|
|
3052
3017
|
secondaryValue,
|
|
3053
3018
|
tooltip
|
|
3054
|
-
}) => /* @__PURE__ */
|
|
3055
|
-
/* @__PURE__ */
|
|
3019
|
+
}) => /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-3 items-center", children: [
|
|
3020
|
+
/* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", children: [
|
|
3056
3021
|
label,
|
|
3057
3022
|
" ",
|
|
3058
3023
|
tooltip
|
|
@@ -3091,7 +3056,7 @@ var CostBreakdown = ({
|
|
|
3091
3056
|
return taxCodeMap;
|
|
3092
3057
|
}, [order]);
|
|
3093
3058
|
const hasTaxes = !!Object.keys(taxCodes).length;
|
|
3094
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsxs17(
|
|
3095
3060
|
"div",
|
|
3096
3061
|
{
|
|
3097
3062
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
@@ -3107,7 +3072,7 @@ var CostBreakdown = ({
|
|
|
3107
3072
|
/* @__PURE__ */ jsx17(
|
|
3108
3073
|
Cost,
|
|
3109
3074
|
{
|
|
3110
|
-
label: /* @__PURE__ */
|
|
3075
|
+
label: /* @__PURE__ */ jsxs17(
|
|
3111
3076
|
"div",
|
|
3112
3077
|
{
|
|
3113
3078
|
onClick: () => setIsShippingOpen((o) => !o),
|
|
@@ -3131,12 +3096,12 @@ var CostBreakdown = ({
|
|
|
3131
3096
|
isShippingOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
|
|
3132
3097
|
(m1, m2) => m1.created_at.localeCompare(m2.created_at)
|
|
3133
3098
|
).map((sm, i) => {
|
|
3134
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ jsxs17(
|
|
3135
3100
|
"div",
|
|
3136
3101
|
{
|
|
3137
3102
|
className: "flex items-center justify-between gap-x-2",
|
|
3138
3103
|
children: [
|
|
3139
|
-
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */
|
|
3104
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3140
3105
|
sm.name,
|
|
3141
3106
|
sm.detail.return_id && ` (${t("fields.returnShipping")})`,
|
|
3142
3107
|
" ",
|
|
@@ -3149,9 +3114,9 @@ var CostBreakdown = ({
|
|
|
3149
3114
|
sm.id
|
|
3150
3115
|
);
|
|
3151
3116
|
}) }),
|
|
3152
|
-
/* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3117
|
+
/* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3118
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between", children: [
|
|
3119
|
+
/* @__PURE__ */ jsxs17(
|
|
3155
3120
|
"div",
|
|
3156
3121
|
{
|
|
3157
3122
|
onClick: () => hasTaxes && setIsTaxOpen((o) => !o),
|
|
@@ -3174,14 +3139,14 @@ var CostBreakdown = ({
|
|
|
3174
3139
|
/* @__PURE__ */ jsx17("div", { className: "text-right", children: /* @__PURE__ */ jsx17(Text12, { size: "small", leading: "compact", children: getLocaleAmount(order.original_tax_total, order.currency_code) }) })
|
|
3175
3140
|
] }),
|
|
3176
3141
|
isTaxOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, { total, rate }]) => {
|
|
3177
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ jsxs17(
|
|
3178
3143
|
"div",
|
|
3179
3144
|
{
|
|
3180
3145
|
className: "flex items-center justify-between gap-x-2",
|
|
3181
3146
|
children: [
|
|
3182
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
|
|
3183
3148
|
/* @__PURE__ */ jsx17("span", { className: "txt-small", children: code }),
|
|
3184
|
-
/* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3185
3150
|
"(",
|
|
3186
3151
|
formatPercentage(rate),
|
|
3187
3152
|
")"
|
|
@@ -3195,7 +3160,7 @@ var CostBreakdown = ({
|
|
|
3195
3160
|
);
|
|
3196
3161
|
}) })
|
|
3197
3162
|
] }),
|
|
3198
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3199
3164
|
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.total") }),
|
|
3200
3165
|
/* @__PURE__ */ jsx17(
|
|
3201
3166
|
Text12,
|
|
@@ -3246,7 +3211,7 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3246
3211
|
}, [order]);
|
|
3247
3212
|
const hasDiscount = discounts.length > 0;
|
|
3248
3213
|
const hasCreditLines = creditLines.length > 0;
|
|
3249
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ jsxs17(
|
|
3250
3215
|
"div",
|
|
3251
3216
|
{
|
|
3252
3217
|
className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4",
|
|
@@ -3255,7 +3220,7 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3255
3220
|
/* @__PURE__ */ jsx17(
|
|
3256
3221
|
Cost,
|
|
3257
3222
|
{
|
|
3258
|
-
label: /* @__PURE__ */
|
|
3223
|
+
label: /* @__PURE__ */ jsxs17(
|
|
3259
3224
|
"div",
|
|
3260
3225
|
{
|
|
3261
3226
|
onClick: () => hasDiscount && setIsDiscountOpen((o) => !o),
|
|
@@ -3280,14 +3245,14 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3280
3245
|
}
|
|
3281
3246
|
),
|
|
3282
3247
|
isDiscountOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: discounts.map(({ type, total, codes }) => {
|
|
3283
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsxs17(
|
|
3284
3249
|
"div",
|
|
3285
3250
|
{
|
|
3286
3251
|
className: "flex items-center justify-between gap-x-2",
|
|
3287
3252
|
children: [
|
|
3288
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
|
|
3289
3254
|
/* @__PURE__ */ jsx17("span", { className: "txt-small", children: t(`fields.${type}`) }),
|
|
3290
|
-
/* @__PURE__ */
|
|
3255
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small", children: [
|
|
3291
3256
|
"(",
|
|
3292
3257
|
codes.join(", "),
|
|
3293
3258
|
")"
|
|
@@ -3300,11 +3265,11 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3300
3265
|
type
|
|
3301
3266
|
);
|
|
3302
3267
|
}) }),
|
|
3303
|
-
hasCreditLines && /* @__PURE__ */
|
|
3268
|
+
hasCreditLines && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3304
3269
|
/* @__PURE__ */ jsx17(
|
|
3305
3270
|
Cost,
|
|
3306
3271
|
{
|
|
3307
|
-
label: /* @__PURE__ */
|
|
3272
|
+
label: /* @__PURE__ */ jsxs17(
|
|
3308
3273
|
"div",
|
|
3309
3274
|
{
|
|
3310
3275
|
onClick: () => setIsCreditLinesOpen((o) => !o),
|
|
@@ -3330,12 +3295,12 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3330
3295
|
),
|
|
3331
3296
|
isCreditLinesOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 pl-5", children: creditLines.map((creditLine) => {
|
|
3332
3297
|
const prettyReference = creditLine.reference?.split("_").join(" ").split("-").join(" ");
|
|
3333
|
-
return /* @__PURE__ */
|
|
3298
|
+
return /* @__PURE__ */ jsxs17(
|
|
3334
3299
|
"div",
|
|
3335
3300
|
{
|
|
3336
3301
|
className: "flex items-center justify-between gap-x-2",
|
|
3337
3302
|
children: [
|
|
3338
|
-
/* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center", children: [
|
|
3339
3304
|
/* @__PURE__ */ jsx17(
|
|
3340
3305
|
Text12,
|
|
3341
3306
|
{
|
|
@@ -3369,7 +3334,7 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3369
3334
|
}
|
|
3370
3335
|
),
|
|
3371
3336
|
/* @__PURE__ */ jsx17("span", { className: "txt-small text-ui-fg-subtle mx-1", children: "-" }),
|
|
3372
|
-
/* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsxs17(
|
|
3373
3338
|
Text12,
|
|
3374
3339
|
{
|
|
3375
3340
|
size: "small",
|
|
@@ -3394,7 +3359,7 @@ var DiscountAndTotalBreakdown = ({
|
|
|
3394
3359
|
);
|
|
3395
3360
|
}) })
|
|
3396
3361
|
] }),
|
|
3397
|
-
/* @__PURE__ */
|
|
3362
|
+
/* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3398
3363
|
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("orders.summary.totalAfterDiscount") }),
|
|
3399
3364
|
/* @__PURE__ */ jsx17(
|
|
3400
3365
|
Text12,
|
|
@@ -3414,8 +3379,8 @@ var InventoryKitBreakdown = ({ item }) => {
|
|
|
3414
3379
|
const { t } = useTranslation17();
|
|
3415
3380
|
const [isOpen, setIsOpen] = useState6(false);
|
|
3416
3381
|
const inventory = item.variant?.inventory_items || [];
|
|
3417
|
-
return /* @__PURE__ */
|
|
3418
|
-
/* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3383
|
+
/* @__PURE__ */ jsxs17(
|
|
3419
3384
|
"div",
|
|
3420
3385
|
{
|
|
3421
3386
|
onClick: () => setIsOpen((o) => !o),
|
|
@@ -3434,21 +3399,21 @@ var InventoryKitBreakdown = ({ item }) => {
|
|
|
3434
3399
|
}
|
|
3435
3400
|
),
|
|
3436
3401
|
isOpen && /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-1 px-6 pb-4", children: inventory.map((i) => {
|
|
3437
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsxs17(
|
|
3438
3403
|
"div",
|
|
3439
3404
|
{
|
|
3440
3405
|
className: "flex items-center justify-between gap-x-2",
|
|
3441
3406
|
children: [
|
|
3442
|
-
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */
|
|
3407
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
|
|
3443
3408
|
i.inventory.title,
|
|
3444
|
-
i.inventory.sku && /* @__PURE__ */
|
|
3409
|
+
i.inventory.sku && /* @__PURE__ */ jsxs17("span", { className: "text-ui-fg-subtle font-normal", children: [
|
|
3445
3410
|
" ",
|
|
3446
3411
|
"\u22C5 ",
|
|
3447
3412
|
i.inventory.sku
|
|
3448
3413
|
] })
|
|
3449
3414
|
] }) }),
|
|
3450
3415
|
/* @__PURE__ */ jsx17("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx17("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
|
|
3451
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsxs17("span", { className: "txt-small text-ui-fg-muted", children: [
|
|
3452
3417
|
i.required_quantity,
|
|
3453
3418
|
"x"
|
|
3454
3419
|
] })
|
|
@@ -3466,12 +3431,12 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3466
3431
|
const { t } = useTranslation17();
|
|
3467
3432
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3468
3433
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3469
|
-
return item && /* @__PURE__ */
|
|
3434
|
+
return item && /* @__PURE__ */ jsxs17(
|
|
3470
3435
|
"div",
|
|
3471
3436
|
{
|
|
3472
3437
|
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",
|
|
3473
3438
|
children: [
|
|
3474
|
-
/* @__PURE__ */
|
|
3439
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3475
3440
|
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3476
3441
|
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.returns.damagedItemsReturned`, {
|
|
3477
3442
|
quantity: damagedQuantity
|
|
@@ -3487,7 +3452,7 @@ var ReturnBreakdownWithDamages = ({
|
|
|
3487
3452
|
}
|
|
3488
3453
|
)
|
|
3489
3454
|
] }),
|
|
3490
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3491
3456
|
t(`orders.returns.damagedItemReceived`),
|
|
3492
3457
|
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3493
3458
|
] })
|
|
@@ -3510,7 +3475,7 @@ var ReturnBreakdown = ({
|
|
|
3510
3475
|
const isRequested = orderReturn.status === "requested";
|
|
3511
3476
|
const item = orderReturn?.items?.find((ri) => ri.item_id === itemId);
|
|
3512
3477
|
const damagedQuantity = item?.damaged_quantity || 0;
|
|
3513
|
-
return item && /* @__PURE__ */
|
|
3478
|
+
return item && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3514
3479
|
damagedQuantity > 0 && /* @__PURE__ */ jsx17(
|
|
3515
3480
|
ReturnBreakdownWithDamages,
|
|
3516
3481
|
{
|
|
@@ -3518,12 +3483,12 @@ var ReturnBreakdown = ({
|
|
|
3518
3483
|
itemId
|
|
3519
3484
|
}
|
|
3520
3485
|
),
|
|
3521
|
-
/* @__PURE__ */
|
|
3486
|
+
/* @__PURE__ */ jsxs17(
|
|
3522
3487
|
"div",
|
|
3523
3488
|
{
|
|
3524
3489
|
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",
|
|
3525
3490
|
children: [
|
|
3526
|
-
/* @__PURE__ */
|
|
3491
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3527
3492
|
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3528
3493
|
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(
|
|
3529
3494
|
`orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
|
|
@@ -3542,11 +3507,11 @@ var ReturnBreakdown = ({
|
|
|
3542
3507
|
}
|
|
3543
3508
|
)
|
|
3544
3509
|
] }),
|
|
3545
|
-
orderReturn && isRequested && /* @__PURE__ */
|
|
3510
|
+
orderReturn && isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3546
3511
|
getRelativeDate(orderReturn.created_at),
|
|
3547
3512
|
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3548
3513
|
] }),
|
|
3549
|
-
orderReturn && !isRequested && /* @__PURE__ */
|
|
3514
|
+
orderReturn && !isRequested && /* @__PURE__ */ jsxs17(Text12, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
|
|
3550
3515
|
t(`orders.returns.itemReceived`),
|
|
3551
3516
|
/* @__PURE__ */ jsx17("span", { className: "ml-2", children: /* @__PURE__ */ jsx17(return_info_popover_default, { orderReturn }) })
|
|
3552
3517
|
] })
|
|
@@ -3565,12 +3530,12 @@ var ClaimBreakdown = ({
|
|
|
3565
3530
|
const items = claim.additional_items.filter(
|
|
3566
3531
|
(item) => item.item?.id === itemId
|
|
3567
3532
|
);
|
|
3568
|
-
return !!items.length && /* @__PURE__ */
|
|
3533
|
+
return !!items.length && /* @__PURE__ */ jsxs17(
|
|
3569
3534
|
"div",
|
|
3570
3535
|
{
|
|
3571
3536
|
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",
|
|
3572
3537
|
children: [
|
|
3573
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3574
3539
|
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3575
3540
|
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.claims.outboundItemAdded`, {
|
|
3576
3541
|
itemsCount: items.reduce(
|
|
@@ -3594,12 +3559,12 @@ var ExchangeBreakdown = ({
|
|
|
3594
3559
|
const items = exchange.additional_items.filter(
|
|
3595
3560
|
(item) => item?.item?.id === itemId
|
|
3596
3561
|
);
|
|
3597
|
-
return !!items.length && /* @__PURE__ */
|
|
3562
|
+
return !!items.length && /* @__PURE__ */ jsxs17(
|
|
3598
3563
|
"div",
|
|
3599
3564
|
{
|
|
3600
3565
|
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",
|
|
3601
3566
|
children: [
|
|
3602
|
-
/* @__PURE__ */
|
|
3567
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
3603
3568
|
/* @__PURE__ */ jsx17(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
|
|
3604
3569
|
/* @__PURE__ */ jsx17(Text12, { size: "small", children: t(`orders.exchanges.outboundItemAdded`, {
|
|
3605
3570
|
itemsCount: items.reduce(
|
|
@@ -3616,13 +3581,13 @@ var ExchangeBreakdown = ({
|
|
|
3616
3581
|
};
|
|
3617
3582
|
var Total2 = ({ order }) => {
|
|
3618
3583
|
const { t } = useTranslation17();
|
|
3619
|
-
return /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ jsxs17(
|
|
3620
3585
|
"div",
|
|
3621
3586
|
{
|
|
3622
3587
|
className: " flex flex-col gap-y-2 px-6 py-4",
|
|
3623
3588
|
"data-testid": "order-summary-total",
|
|
3624
3589
|
children: [
|
|
3625
|
-
/* @__PURE__ */
|
|
3590
|
+
/* @__PURE__ */ jsxs17(
|
|
3626
3591
|
"div",
|
|
3627
3592
|
{
|
|
3628
3593
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
@@ -3636,14 +3601,14 @@ var Total2 = ({ order }) => {
|
|
|
3636
3601
|
]
|
|
3637
3602
|
}
|
|
3638
3603
|
),
|
|
3639
|
-
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */
|
|
3604
|
+
getTotalCreditLines(order.credit_lines ?? []) > 0 && /* @__PURE__ */ jsxs17("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
|
|
3640
3605
|
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: t("fields.creditTotal") }),
|
|
3641
3606
|
/* @__PURE__ */ jsx17(Text12, { className: "text-ui-fg-subtle", size: "small", leading: "compact", children: getStylizedAmount(
|
|
3642
3607
|
getTotalCreditLines(order.credit_lines ?? []),
|
|
3643
3608
|
order.currency_code
|
|
3644
3609
|
) })
|
|
3645
3610
|
] }),
|
|
3646
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ jsxs17(
|
|
3647
3612
|
"div",
|
|
3648
3613
|
{
|
|
3649
3614
|
className: "text-ui-fg-base flex items-center justify-between",
|
|
@@ -3679,110 +3644,120 @@ var Total2 = ({ order }) => {
|
|
|
3679
3644
|
};
|
|
3680
3645
|
|
|
3681
3646
|
// src/pages/orders/order-detail/components/order-remaining-orders-group-section/order-remaining-orders-group-section.tsx
|
|
3682
|
-
import {
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
Container as Container11,
|
|
3686
|
-
Heading as Heading11,
|
|
3687
|
-
StatusBadge as StatusBadge5,
|
|
3688
|
-
Text as Text13
|
|
3689
|
-
} from "@medusajs/ui";
|
|
3690
|
-
import { useNavigate as useNavigate6, useParams } from "react-router-dom";
|
|
3647
|
+
import { Container as Container11, Heading as Heading11 } from "@medusajs/ui";
|
|
3648
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
3649
|
+
import { useMemo as useMemo4 } from "react";
|
|
3691
3650
|
import { useTranslation as useTranslation18 } from "react-i18next";
|
|
3692
|
-
import {
|
|
3693
|
-
|
|
3651
|
+
import { useParams } from "react-router-dom";
|
|
3652
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3653
|
+
var DEFAULT_FIELDS2 = "id,*orders,*orders.customer,*orders.seller,*orders.sales_channel";
|
|
3654
|
+
var OrderRemainingOrdersGroupSection = () => {
|
|
3655
|
+
const { id } = useParams();
|
|
3694
3656
|
const { t } = useTranslation18();
|
|
3695
|
-
const
|
|
3696
|
-
|
|
3657
|
+
const { order_group, isLoading, isError, error } = useOrderGroupByOrderId(
|
|
3658
|
+
id,
|
|
3659
|
+
{ fields: DEFAULT_FIELDS2 }
|
|
3660
|
+
);
|
|
3661
|
+
const orders = useMemo4(() => {
|
|
3662
|
+
const group = order_group;
|
|
3663
|
+
if (!group?.orders) return [];
|
|
3664
|
+
return group.orders.filter((o) => o.id !== id);
|
|
3665
|
+
}, [order_group, id]);
|
|
3666
|
+
const columns = useColumns();
|
|
3667
|
+
const { table } = useDataTable({
|
|
3668
|
+
data: orders,
|
|
3669
|
+
columns,
|
|
3670
|
+
count: orders.length,
|
|
3671
|
+
enablePagination: false,
|
|
3672
|
+
getRowId: (row) => row.id
|
|
3673
|
+
});
|
|
3674
|
+
if (isError) {
|
|
3675
|
+
throw error;
|
|
3676
|
+
}
|
|
3677
|
+
if (!isLoading && orders.length === 0) {
|
|
3697
3678
|
return null;
|
|
3698
3679
|
}
|
|
3699
|
-
return /* @__PURE__ */
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3680
|
+
return /* @__PURE__ */ jsxs18(
|
|
3681
|
+
Container11,
|
|
3682
|
+
{
|
|
3683
|
+
className: "divide-y p-0",
|
|
3684
|
+
"data-testid": "order-remaining-orders-group-section",
|
|
3685
|
+
children: [
|
|
3686
|
+
/* @__PURE__ */ jsx18(
|
|
3687
|
+
"div",
|
|
3688
|
+
{
|
|
3689
|
+
className: "flex items-center justify-between px-6 py-4",
|
|
3690
|
+
"data-testid": "order-remaining-orders-group-header",
|
|
3691
|
+
children: /* @__PURE__ */ jsxs18(Heading11, { level: "h2", "data-testid": "order-remaining-orders-group-heading", children: [
|
|
3692
|
+
t("orders.domain"),
|
|
3693
|
+
" in group"
|
|
3694
|
+
] })
|
|
3695
|
+
}
|
|
3696
|
+
),
|
|
3697
|
+
/* @__PURE__ */ jsx18(
|
|
3698
|
+
_DataTable,
|
|
3699
|
+
{
|
|
3700
|
+
columns,
|
|
3701
|
+
table,
|
|
3702
|
+
navigateTo: (row) => `/orders/${row.original.id}`,
|
|
3703
|
+
count: orders.length,
|
|
3704
|
+
isLoading,
|
|
3705
|
+
pageSize: orders.length,
|
|
3706
|
+
noRecords: {
|
|
3707
|
+
message: "No other orders in this group"
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
)
|
|
3711
|
+
]
|
|
3712
|
+
}
|
|
3713
|
+
);
|
|
3705
3714
|
};
|
|
3706
|
-
var
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
{
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
}
|
|
3748
|
-
),
|
|
3749
|
-
/* @__PURE__ */ jsxs19(
|
|
3750
|
-
"div",
|
|
3751
|
-
{
|
|
3752
|
-
className: "flex w-2/3",
|
|
3753
|
-
"data-testid": `order-remaining-orders-group-item-${order.id}-badges`,
|
|
3754
|
-
children: [
|
|
3755
|
-
/* @__PURE__ */ jsxs19(Badge5, { className: "scale-75 -mr-8", children: [
|
|
3756
|
-
/* @__PURE__ */ jsx18("span", { className: "text-xs mr-2", children: "Payment" }),
|
|
3757
|
-
/* @__PURE__ */ jsx18(PaymentBadge2, { order })
|
|
3758
|
-
] }),
|
|
3759
|
-
/* @__PURE__ */ jsxs19(Badge5, { className: "scale-75 -mr-4", children: [
|
|
3760
|
-
/* @__PURE__ */ jsx18("span", { className: "text-xs mr-2", children: "Order" }),
|
|
3761
|
-
/* @__PURE__ */ jsx18(OrderBadge2, { order })
|
|
3762
|
-
] })
|
|
3763
|
-
]
|
|
3764
|
-
}
|
|
3765
|
-
)
|
|
3766
|
-
] }),
|
|
3767
|
-
/* @__PURE__ */ jsx18(
|
|
3768
|
-
Text13,
|
|
3769
|
-
{
|
|
3770
|
-
className: "truncate",
|
|
3771
|
-
"data-testid": `order-remaining-orders-group-item-${order.id}-items`,
|
|
3772
|
-
children: items
|
|
3773
|
-
}
|
|
3774
|
-
)
|
|
3775
|
-
] })
|
|
3776
|
-
},
|
|
3777
|
-
order.id
|
|
3778
|
-
);
|
|
3779
|
-
}) })
|
|
3780
|
-
] });
|
|
3715
|
+
var columnHelper = createColumnHelper();
|
|
3716
|
+
var useColumns = () => {
|
|
3717
|
+
return useMemo4(
|
|
3718
|
+
() => [
|
|
3719
|
+
columnHelper.accessor("display_id", {
|
|
3720
|
+
header: () => /* @__PURE__ */ jsx18(DisplayIdHeader, {}),
|
|
3721
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(DisplayIdCell, { displayId: getValue() })
|
|
3722
|
+
}),
|
|
3723
|
+
columnHelper.display({
|
|
3724
|
+
id: "seller",
|
|
3725
|
+
header: () => /* @__PURE__ */ jsx18(TextHeader, { text: "Seller" }),
|
|
3726
|
+
cell: ({ row }) => {
|
|
3727
|
+
const seller = row.original.seller;
|
|
3728
|
+
return /* @__PURE__ */ jsx18(TextCell, { text: seller?.name ?? "-" });
|
|
3729
|
+
}
|
|
3730
|
+
}),
|
|
3731
|
+
columnHelper.accessor("created_at", {
|
|
3732
|
+
header: () => /* @__PURE__ */ jsx18(DateHeader, {}),
|
|
3733
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(DateCell, { date: new Date(getValue()) })
|
|
3734
|
+
}),
|
|
3735
|
+
columnHelper.accessor("payment_status", {
|
|
3736
|
+
header: () => /* @__PURE__ */ jsx18(PaymentStatusHeader, {}),
|
|
3737
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(PaymentStatusCell, { status: getValue() })
|
|
3738
|
+
}),
|
|
3739
|
+
columnHelper.accessor("fulfillment_status", {
|
|
3740
|
+
header: () => /* @__PURE__ */ jsx18(FulfillmentStatusHeader, {}),
|
|
3741
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx18(FulfillmentStatusCell, { status: getValue() })
|
|
3742
|
+
}),
|
|
3743
|
+
columnHelper.accessor("total", {
|
|
3744
|
+
header: () => /* @__PURE__ */ jsx18(TotalHeader, {}),
|
|
3745
|
+
cell: ({ getValue, row }) => /* @__PURE__ */ jsx18(
|
|
3746
|
+
TotalCell,
|
|
3747
|
+
{
|
|
3748
|
+
currencyCode: row.original.currency_code,
|
|
3749
|
+
total: getValue()
|
|
3750
|
+
}
|
|
3751
|
+
)
|
|
3752
|
+
})
|
|
3753
|
+
],
|
|
3754
|
+
[]
|
|
3755
|
+
);
|
|
3781
3756
|
};
|
|
3782
3757
|
|
|
3783
3758
|
// src/pages/orders/order-detail/order-detail.tsx
|
|
3784
|
-
import { jsx as jsx19, jsxs as
|
|
3785
|
-
var
|
|
3759
|
+
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3760
|
+
var Root = ({ children }) => {
|
|
3786
3761
|
const initialData = useLoaderData();
|
|
3787
3762
|
const { id } = useParams2();
|
|
3788
3763
|
const { order, isLoading, isError, error } = useOrder(
|
|
@@ -3814,7 +3789,7 @@ var OrderDetail = () => {
|
|
|
3814
3789
|
if (isError) {
|
|
3815
3790
|
throw error;
|
|
3816
3791
|
}
|
|
3817
|
-
return /* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ jsx19(Fragment4, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs19(
|
|
3818
3793
|
TwoColumnPage,
|
|
3819
3794
|
{
|
|
3820
3795
|
data: order,
|
|
@@ -3823,7 +3798,7 @@ var OrderDetail = () => {
|
|
|
3823
3798
|
hasOutlet: true,
|
|
3824
3799
|
"data-testid": "order-detail-page",
|
|
3825
3800
|
children: [
|
|
3826
|
-
/* @__PURE__ */
|
|
3801
|
+
/* @__PURE__ */ jsxs19(TwoColumnPage.Main, { "data-testid": "order-detail-main", children: [
|
|
3827
3802
|
/* @__PURE__ */ jsx19(OrderActiveEditSection, { order }),
|
|
3828
3803
|
/* @__PURE__ */ jsx19(ActiveOrderClaimSection, { orderPreview }),
|
|
3829
3804
|
/* @__PURE__ */ jsx19(ActiveOrderExchangeSection, { orderPreview }),
|
|
@@ -3833,17 +3808,32 @@ var OrderDetail = () => {
|
|
|
3833
3808
|
/* @__PURE__ */ jsx19(OrderPaymentSection, { order }),
|
|
3834
3809
|
/* @__PURE__ */ jsx19(OrderFulfillmentSection, { order })
|
|
3835
3810
|
] }),
|
|
3836
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsxs19(TwoColumnPage.Sidebar, { "data-testid": "order-detail-sidebar", children: [
|
|
3837
3812
|
/* @__PURE__ */ jsx19(OrderCustomerSection, { order }),
|
|
3838
3813
|
/* @__PURE__ */ jsx19(OrderActivitySection, { order }),
|
|
3839
3814
|
/* @__PURE__ */ jsx19(OrderRemainingOrdersGroupSection, {})
|
|
3840
3815
|
] })
|
|
3841
3816
|
]
|
|
3842
3817
|
}
|
|
3843
|
-
);
|
|
3818
|
+
) });
|
|
3844
3819
|
};
|
|
3820
|
+
var OrderDetail = Root;
|
|
3821
|
+
var OrderDetailPage = Object.assign(Root, {
|
|
3822
|
+
Main: TwoColumnPage.Main,
|
|
3823
|
+
Sidebar: TwoColumnPage.Sidebar,
|
|
3824
|
+
MainActiveEditSection: OrderActiveEditSection,
|
|
3825
|
+
MainActiveClaimSection: ActiveOrderClaimSection,
|
|
3826
|
+
MainActiveExchangeSection: ActiveOrderExchangeSection,
|
|
3827
|
+
MainActiveReturnSection: ActiveOrderReturnSection,
|
|
3828
|
+
MainGeneralSection: OrderGeneralSection,
|
|
3829
|
+
MainSummarySection: OrderSummarySection,
|
|
3830
|
+
MainPaymentSection: OrderPaymentSection,
|
|
3831
|
+
MainFulfillmentSection: OrderFulfillmentSection,
|
|
3832
|
+
SidebarCustomerSection: OrderCustomerSection,
|
|
3833
|
+
SidebarActivitySection: OrderActivitySection,
|
|
3834
|
+
SidebarOrderGroupSection: OrderRemainingOrdersGroupSection
|
|
3835
|
+
});
|
|
3836
|
+
|
|
3845
3837
|
export {
|
|
3846
|
-
|
|
3847
|
-
OrderDetail as Component,
|
|
3848
|
-
orderLoader as loader
|
|
3838
|
+
OrderDetail
|
|
3849
3839
|
};
|