@mercurjs/admin 2.2.0-canary.2 → 2.2.0-canary.20
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-OLNTDP26.js → add-campaign-promotions-BNLH6QN5.js} +4 -4
- package/dist/{adjust-inventory-CVWSBMHU.js → adjust-inventory-2LHBQAWK.js} +20 -21
- package/dist/{api-key-management-create-7RWOCVAO.js → api-key-management-create-7SIKAXEH.js} +4 -4
- package/dist/{api-key-management-detail-ZIIDMHFI.js → api-key-management-detail-R5QQPNOD.js} +23 -23
- package/dist/{api-key-management-edit-ACH6TJAX.js → api-key-management-edit-C4FYJZGH.js} +4 -4
- package/dist/{api-key-management-list-JHBBXGHH.js → api-key-management-list-FVOOICQR.js} +4 -4
- package/dist/{api-key-management-sales-channels-XEBTUB5V.js → api-key-management-sales-channels-JLSDZRG6.js} +8 -7
- package/dist/{attribute-create-2PNEX4PM.js → attribute-create-JW7OXOK2.js} +65 -44
- package/dist/{attribute-detail-3QBRIF6Q.js → attribute-detail-3Z6MTMJT.js} +25 -23
- package/dist/{attribute-edit-5G7P3LP2.js → attribute-edit-4YPWXZRX.js} +3 -3
- package/dist/{attribute-edit-possible-value-VQ7MEFZA.js → attribute-edit-possible-value-YHEWXK6L.js} +3 -3
- package/dist/{attribute-list-OHU2QMUG.js → attribute-list-WRTXTFED.js} +19 -20
- package/dist/breadcrumb-CO5DVI72.js +26 -0
- package/dist/breadcrumb-RYIHOYZE.js +27 -0
- package/dist/{campaign-budget-edit-WKSYXTBX.js → campaign-budget-edit-N2WWGO2G.js} +1 -1
- package/dist/{campaign-configuration-ZTK46EB5.js → campaign-configuration-MFFZXUEN.js} +1 -1
- package/dist/{campaign-create-VFFIIRE4.js → campaign-create-NMIOUGXQ.js} +3 -3
- package/dist/{campaign-detail-AZKBPDLC.js → campaign-detail-ROTJ4SWD.js} +22 -23
- package/dist/{campaign-edit-ZGLDY4X4.js → campaign-edit-PA7FGIY3.js} +1 -1
- package/dist/{categories-metadata-YZUP43OH.js → categories-metadata-EPKUI3R4.js} +20 -21
- package/dist/{category-create-2MRYTSYM.js → category-create-AR33DJYX.js} +8 -5
- package/dist/{category-detail-PBGZSZRK.js → category-detail-ICACLNJ3.js} +28 -27
- package/dist/{category-edit-QLOS2LBA.js → category-edit-XKANIIH5.js} +3 -3
- package/dist/category-icon-edit-4GXAK4JZ.js +117 -0
- package/dist/{category-list-U7ZQBSZN.js → category-list-PFOINLTU.js} +7 -4
- package/dist/category-media-7SLAXXXM.js +654 -0
- package/dist/{category-organize-TIKTYJFZ.js → category-organize-U6UO35Y3.js} +2 -2
- package/dist/{category-products-4V2CKLVW.js → category-products-V4H3B6ML.js} +25 -26
- package/dist/{chunk-3JSAS7QP.js → chunk-22EOFXNK.js} +16 -0
- package/dist/{chunk-GJ6WPZQG.js → chunk-2HMWS5UW.js} +4 -4
- package/dist/{chunk-BVZAGCTV.js → chunk-2L4W75VS.js} +3 -3
- package/dist/{chunk-DKMBAZ5P.js → chunk-2MYHGOPY.js} +7 -7
- package/dist/{chunk-637OFDFC.js → chunk-2NA54XKC.js} +186 -78
- package/dist/{chunk-26UTIAAZ.js → chunk-32URSQ4F.js} +1 -1
- package/dist/{chunk-CKACZXMP.js → chunk-3FN3YH2F.js} +4 -4
- package/dist/{chunk-5POK3PM3.js → chunk-3JN4WUVU.js} +4 -8
- package/dist/{chunk-XODRTI2W.js → chunk-47TXYMFT.js} +1 -1
- package/dist/chunk-4FHHNYIV.js +280 -0
- package/dist/{chunk-ZHOI4QMK.js → chunk-4OEYCLBE.js} +1 -1
- package/dist/{chunk-2LQ5SCPB.js → chunk-4Q5JHL4V.js} +18 -6
- package/dist/{chunk-HDRFPI6V.js → chunk-4UWPTSZK.js} +346 -424
- package/dist/{chunk-NXLOYMWF.js → chunk-4VXYPZMT.js} +7 -7
- package/dist/{chunk-IRTI3AS3.js → chunk-5T45PYWI.js} +4 -4
- package/dist/{chunk-DZIXC7OE.js → chunk-6FLSBL4Q.js} +30 -85
- package/dist/{chunk-3EDQIZV6.js → chunk-6LG3VL3Q.js} +2 -2
- package/dist/{chunk-2S6VXFBZ.js → chunk-6PTZK4CH.js} +4 -4
- package/dist/{chunk-6LZAVEHW.js → chunk-7JZVZ5EX.js} +2 -2
- package/dist/{chunk-P25PIADJ.js → chunk-7VPJ4C6F.js} +1 -1
- package/dist/{chunk-HRGC5JHU.js → chunk-7XBB24GO.js} +107 -411
- package/dist/{chunk-G4PROEJI.js → chunk-7ZL46D3W.js} +4 -4
- package/dist/{chunk-EJTB2SLE.js → chunk-A7RM5JXC.js} +1 -1
- package/dist/{chunk-EREXPX6I.js → chunk-AGXO2H4E.js} +23 -37
- package/dist/{chunk-UXD3VNBO.js → chunk-AJLGY3LQ.js} +1 -2
- package/dist/{chunk-WYA62MUL.js → chunk-AROCMF45.js} +1 -1
- package/dist/chunk-AWLDIHXR.js +204 -0
- package/dist/{chunk-BHOZKBYY.js → chunk-B5OMHYJ5.js} +6 -4
- package/dist/{chunk-LYZT5REU.js → chunk-C4XKPQ6T.js} +14 -1
- package/dist/{chunk-NQBSSM5V.js → chunk-CKQPO2SN.js} +2 -2
- package/dist/{chunk-54RTJBYO.js → chunk-DGCPYCHU.js} +8 -63
- package/dist/{chunk-HLPCO2OQ.js → chunk-EAC3J2Z4.js} +5 -5
- package/dist/chunk-EG45GIE3.js +368 -0
- package/dist/{chunk-TP7L6M7V.js → chunk-FBD7WJPO.js} +1 -1
- package/dist/{chunk-K4TGNN4P.js → chunk-FCLS6CKW.js} +2 -2
- package/dist/{chunk-FTAR3BDS.js → chunk-FJHAAROU.js} +1 -1
- package/dist/chunk-FNGPOGDR.js +213 -0
- package/dist/{chunk-4LXBQTFN.js → chunk-FREUYHMS.js} +1 -1
- package/dist/{chunk-Q2QFNTNX.js → chunk-FWWPSH6V.js} +1 -1
- package/dist/{chunk-PXTJJQKJ.js → chunk-FYKG35MR.js} +1 -1
- package/dist/{chunk-BAYORQYD.js → chunk-FZHLRCBV.js} +4 -4
- package/dist/{chunk-GNLPUGYK.js → chunk-GHGOOZEL.js} +2 -2
- package/dist/{chunk-ZSFJVRRS.js → chunk-GQUGCSJV.js} +2 -2
- package/dist/chunk-GVEF6UDT.js +8 -0
- package/dist/{chunk-V6OGMYAI.js → chunk-HHW4PPNH.js} +159 -169
- package/dist/{chunk-AB2LHP3M.js → chunk-HI6L7DXI.js} +1 -1
- package/dist/{chunk-TITPJHIL.js → chunk-IER5BQNC.js} +1 -1
- package/dist/{chunk-GKW445WA.js → chunk-IHTQOPB6.js} +13 -187
- package/dist/{chunk-DRJAKRTI.js → chunk-ISS4LS3E.js} +1 -1
- package/dist/{chunk-JQBSPUH2.js → chunk-J3AMUGGZ.js} +14 -1
- package/dist/chunk-JEJQKTZO.js +191 -0
- package/dist/{chunk-Y2M536WR.js → chunk-JHBNG7OD.js} +17 -0
- package/dist/{chunk-N2LH7A4X.js → chunk-JR4T4OQU.js} +10 -10
- package/dist/{chunk-WKCYMDTV.js → chunk-JRLDKKCM.js} +3 -3
- package/dist/{chunk-XFQH5HPP.js → chunk-JZBVDH6A.js} +3 -3
- package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
- package/dist/{chunk-SRDK3XX7.js → chunk-KNB55WE4.js} +2 -2
- package/dist/{chunk-QABGBGAE.js → chunk-KNZ6ICKB.js} +6 -6
- package/dist/{chunk-H5PYBIOZ.js → chunk-KYFWVLWO.js} +1 -1
- package/dist/chunk-KZB7LCF2.js +82 -0
- package/dist/{chunk-BE6JLTMI.js → chunk-L5Z4JGRD.js} +1 -1
- package/dist/{chunk-CKNQJPAG.js → chunk-LEHS6RED.js} +4 -2
- package/dist/{chunk-FB7DDNCA.js → chunk-LHVXXHPO.js} +1 -1
- package/dist/{chunk-UPNMDPFX.js → chunk-LLHYICP5.js} +18 -6
- package/dist/{chunk-YGAX72XV.js → chunk-LO2ZWQGL.js} +0 -2
- package/dist/{chunk-3P4VTL4S.js → chunk-LTAQZW2L.js} +6 -6
- package/dist/{chunk-S72BD7TM.js → chunk-LYCKVPWQ.js} +12 -4
- package/dist/{chunk-2YYXP6XI.js → chunk-M2E3PKA4.js} +196 -212
- package/dist/{chunk-YLKG7W4P.js → chunk-M3YII6OB.js} +73 -20
- package/dist/{chunk-PQI4UJ6F.js → chunk-MASXQMJY.js} +3 -3
- package/dist/{chunk-6FIU2V6Y.js → chunk-MHVZVF6O.js} +1 -1
- package/dist/{chunk-H5EOOXPA.js → chunk-N6R2WOJ7.js} +1 -2
- package/dist/{chunk-ZF3WBVOB.js → chunk-NEZ35LWM.js} +3 -3
- package/dist/{chunk-QIU6DJY6.js → chunk-NZOB3LPA.js} +1 -1
- package/dist/{chunk-S5BJ5CMF.js → chunk-OKWGPKVK.js} +1 -1
- package/dist/{chunk-6GWCDARX.js → chunk-ORENI3LP.js} +3 -3
- package/dist/{chunk-AXTQMIIK.js → chunk-PJR6W35H.js} +8 -27
- package/dist/chunk-PN5C4AND.js +115 -0
- package/dist/{chunk-UXQAHUGZ.js → chunk-POSHDM4L.js} +1 -1
- package/dist/{chunk-3IVTUFBM.js → chunk-PWFZCT6H.js} +1 -1
- package/dist/chunk-PZ27H46M.js +358 -0
- package/dist/{chunk-XZZTC7E5.js → chunk-QKJGSZI2.js} +1 -1
- package/dist/{chunk-N7KTSXS5.js → chunk-QPLEFEOZ.js} +1 -1
- package/dist/chunk-QR3GYYX6.js +0 -0
- package/dist/{chunk-3B6MTW5G.js → chunk-QUHSHIAC.js} +3 -0
- package/dist/{chunk-B3EEDC47.js → chunk-RMAQKNBA.js} +10 -94
- package/dist/{chunk-ED7XNGZD.js → chunk-RWW3TAJQ.js} +4 -4
- package/dist/chunk-RXRDZ47F.js +103 -0
- package/dist/chunk-S6A4FVM2.js +170 -0
- package/dist/{chunk-XQBPW3A4.js → chunk-S6E7XAWX.js} +2 -2
- package/dist/{chunk-CBGXKU7Z.js → chunk-SEY52XON.js} +4 -4
- package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
- package/dist/{chunk-6MJ6ZSJF.js → chunk-SJKLYS3R.js} +5 -5
- package/dist/{chunk-RQPDD3RI.js → chunk-SKKF3CU6.js} +1 -1
- package/dist/{chunk-Q6I2IKJB.js → chunk-SNCZQATG.js} +2 -2
- package/dist/{chunk-BLYJZMNE.js → chunk-TLOJG7LK.js} +2 -2
- package/dist/chunk-UIVWOKWT.js +63 -0
- package/dist/chunk-UKLRBS4W.js +61 -0
- package/dist/{chunk-WS63IRBI.js → chunk-UUTACMA5.js} +6 -6
- package/dist/{chunk-BECQJZQ4.js → chunk-V3ATA433.js} +17 -8
- package/dist/{chunk-4KX6CBJ4.js → chunk-VSLHL2AZ.js} +2 -0
- package/dist/{chunk-BGGUVHDG.js → chunk-WETV577Q.js} +604 -744
- package/dist/{chunk-WDH5C2NS.js → chunk-WJGABDWC.js} +1 -1
- package/dist/{chunk-YZW5JD5A.js → chunk-WTPWO7KS.js} +116 -181
- package/dist/{chunk-A772RAKB.js → chunk-XGUUM3S6.js} +1 -1
- package/dist/chunk-XVSJKCCQ.js +142 -0
- package/dist/chunk-Y3RABQC4.js +33 -0
- package/dist/{chunk-S4SVK5DE.js → chunk-YVLANFBK.js} +29 -1
- package/dist/{chunk-OSEIN4Y2.js → chunk-Z2UBJXTU.js} +1 -1
- package/dist/{chunk-BCVUMATY.js → chunk-Z3SUMFDT.js} +7 -7
- package/dist/{chunk-OHOWEMHO.js → chunk-ZIFHQXP3.js} +31 -25
- package/dist/{chunk-U7AZOXPV.js → chunk-ZLETFDWJ.js} +205 -110
- package/dist/{collection-add-products-33MYCTBF.js → collection-add-products-PBCIG33C.js} +24 -25
- package/dist/{collection-create-HUNYHKUJ.js → collection-create-7G3MHBVQ.js} +3 -3
- package/dist/{collection-detail-ACN5GFHC.js → collection-detail-3OLBOV24.js} +24 -25
- package/dist/{collection-edit-OQGYTQDO.js → collection-edit-LQEQ6YGD.js} +3 -3
- package/dist/{collection-list-M4MFNMXL.js → collection-list-S4ICG5T6.js} +24 -25
- package/dist/{collection-metadata-47N7TUOH.js → collection-metadata-VUOECEP4.js} +20 -21
- package/dist/commission-rule-commission-edit-TA3H3EEN.js +196 -0
- package/dist/commission-rule-create-O7Z25SC7.js +412 -0
- package/dist/commission-rule-detail-I7LVSNAM.js +45 -0
- package/dist/commission-rule-edit-YSHDTYZY.js +342 -0
- package/dist/{product-brand-list-ZBPBSRQN.js → commissions-list-OUGVPED6.js} +12 -7
- package/dist/{constants-26tEckuq.d.ts → constants-Bahlh59D.d.ts} +8 -4
- package/dist/{customer-create-QHA4KM6N.js → customer-create-RW63XPQ6.js} +1 -1
- package/dist/{customer-create-address-TYWVWNUE.js → customer-create-address-SZCOIGDP.js} +1 -1
- package/dist/{customer-detail-D5SSLNFT.js → customer-detail-MT2R7DFI.js} +24 -25
- package/dist/{customer-edit-JZ4PQTIN.js → customer-edit-ZBIZ4FKT.js} +1 -1
- package/dist/{customer-group-add-customers-VJUBEN7M.js → customer-group-add-customers-SG7EU4D7.js} +1 -1
- package/dist/{customer-group-create-NA2UKCF6.js → customer-group-create-LFGY5HR6.js} +1 -1
- package/dist/{customer-group-detail-KRT7E2JA.js → customer-group-detail-MCAEXZYM.js} +18 -19
- package/dist/{customer-group-edit-3O6HAYYN.js → customer-group-edit-CXWQSMDZ.js} +1 -1
- package/dist/{customer-group-list-KKDIESQ6.js → customer-group-list-V4PW33M5.js} +18 -19
- package/dist/{customer-group-metadata-J6JY7DZ3.js → customer-group-metadata-J622TR4I.js} +20 -21
- package/dist/{customer-metadata-AH2LBK4T.js → customer-metadata-SFS5VRK5.js} +20 -21
- package/dist/{customers-add-customer-group-AHGAPEIS.js → customers-add-customer-group-G6FIKKUP.js} +19 -20
- package/dist/{edit-inventory-item-ADNLKLCN.js → edit-inventory-item-OFPVTJ4I.js} +19 -20
- package/dist/{edit-inventory-item-attributes-XVR2WLDU.js → edit-inventory-item-attributes-Z37AFIYM.js} +19 -20
- package/dist/{edit-reservation-HQQL42QX.js → edit-reservation-TBZL2REV.js} +3 -3
- package/dist/{edit-rules-YMKM5JPI.js → edit-rules-JG62MLUS.js} +20 -21
- package/dist/global-commission-edit-LCD6JJUX.js +194 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +613 -631
- package/dist/{inventory-create-IVESXFSV.js → inventory-create-3IM54ZO3.js} +23 -24
- package/dist/{inventory-detail-TINIAFVB.js → inventory-detail-POKYZVLA.js} +19 -20
- package/dist/{inventory-list-YLIAKQXI.js → inventory-list-SCRYOBZV.js} +2 -2
- package/dist/{inventory-metadata-6INRH2JC.js → inventory-metadata-XXYKRUNP.js} +20 -21
- package/dist/{inventory-stock-6YGTATID.js → inventory-stock-CXPPGARO.js} +204 -43
- package/dist/loader-S77URTQS.js +32 -0
- package/dist/loader-XPJWDZU3.js +32 -0
- package/dist/{location-create-ZMNB7YKR.js → location-create-SO2CURZL.js} +1 -1
- package/dist/{location-detail-EK2S7WOK.js → location-detail-PHT367V5.js} +21 -22
- package/dist/{location-edit-DMBF3CYZ.js → location-edit-XA53657R.js} +1 -1
- package/dist/{location-fulfillment-providers-V26OWDAI.js → location-fulfillment-providers-EZOVLJWL.js} +23 -24
- package/dist/{location-list-IV323QW2.js → location-list-HVSRDHOW.js} +20 -21
- package/dist/{location-sales-channels-EYUXMTW7.js → location-sales-channels-46SPET7R.js} +7 -6
- package/dist/{location-service-zone-create-ZS3UWJAA.js → location-service-zone-create-IOB7DWBR.js} +1 -1
- package/dist/{location-service-zone-edit-MTGU2O4C.js → location-service-zone-edit-X37BNDRP.js} +1 -1
- package/dist/{location-service-zone-manage-areas-S7QZTIFT.js → location-service-zone-manage-areas-CWWABV5M.js} +1 -1
- package/dist/{location-service-zone-shipping-option-create-36JZFRGY.js → location-service-zone-shipping-option-create-VZBL7MK6.js} +23 -24
- package/dist/{location-service-zone-shipping-option-edit-3PGSNKYT.js → location-service-zone-shipping-option-edit-WRSLBO23.js} +4 -4
- package/dist/{location-service-zone-shipping-option-pricing-JLGCOZGS.js → location-service-zone-shipping-option-pricing-FZNCTVT6.js} +8 -8
- package/dist/{login-6L3RMREO.js → login-LJMTSRAG.js} +18 -19
- package/dist/{manage-locations-CFTM6DNH.js → manage-locations-WW35SVOX.js} +1 -1
- package/dist/{marketplace-add-currencies-6ANNBGZM.js → marketplace-add-currencies-YVJA6G6V.js} +1 -1
- package/dist/{marketplace-detail-BAU2MEJT.js → marketplace-detail-WINAJJDB.js} +21 -22
- package/dist/{marketplace-edit-6Q3G2OY5.js → marketplace-edit-QNFCTDUC.js} +1 -1
- package/dist/{marketplace-metadata-KRCGKOCA.js → marketplace-metadata-CCUK2B4Q.js} +22 -23
- package/dist/offer-detail-page-2DG3W7VG.js +572 -0
- package/dist/offer-variant-detail-page-U4LDYFE3.js +143 -0
- package/dist/{offers-J2SFSNF3.js → offers-5LSNWJ6B.js} +287 -124
- package/dist/{order-create-claim-RMDDCUZ6.js → order-create-claim-2MO3LM6J.js} +271 -246
- package/dist/{order-create-edit-PQ54JFZZ.js → order-create-edit-UFD26FE2.js} +206 -111
- package/dist/{order-create-exchange-T6DBVS75.js → order-create-exchange-6IQJFYUK.js} +279 -252
- package/dist/{order-create-refund-OW3MIXBY.js → order-create-refund-DUVGD54U.js} +24 -25
- package/dist/{order-create-return-YCX6C3VP.js → order-create-return-Y7QS52UL.js} +46 -19
- package/dist/{order-detail-2OAEGBQG.js → order-detail-Y6SFV44C.js} +30 -32
- package/dist/{order-edit-billing-address-VGZBQHF5.js → order-edit-billing-address-IW6UIARN.js} +22 -23
- package/dist/{order-edit-email-OOCXVRET.js → order-edit-email-D5XIYASI.js} +21 -22
- package/dist/{order-edit-shipping-address-B4F3E5RE.js → order-edit-shipping-address-4VJDVGKJ.js} +21 -22
- package/dist/{order-list-ERQWQ6UI.js → order-list-KWHMMX2M.js} +7 -7
- package/dist/{order-metadata-AN6MPHHT.js → order-metadata-QSTGFW66.js} +21 -22
- package/dist/{order-request-transfer-A2NJSQ4H.js → order-request-transfer-GYBTSHU4.js} +21 -22
- package/dist/pages/index.d.ts +134 -339
- package/dist/pages/index.js +172 -176
- package/dist/{price-list-configuration-XAHXLCXR.js → price-list-configuration-SNL2LNV2.js} +3 -3
- package/dist/{price-list-create-XCP32SJZ.js → price-list-create-LPJWSOBP.js} +29 -30
- package/dist/{price-list-detail-26RLU4G3.js → price-list-detail-7AUDNRSM.js} +25 -26
- package/dist/{price-list-edit-ZVLD4M5T.js → price-list-edit-BOEBNVGM.js} +3 -3
- package/dist/{price-list-list-ER4TOZTY.js → price-list-list-AX7ZW6LL.js} +4 -4
- package/dist/{price-list-prices-add-H4E2IVBC.js → price-list-prices-add-5IOYBCXV.js} +28 -29
- package/dist/{price-list-prices-edit-WHCIGSB2.js → price-list-prices-edit-DT2DLFTO.js} +21 -22
- package/dist/{product-add-existing-attributes-MSJD3GOP.js → product-add-existing-attributes-LNZK2LHX.js} +65 -29
- package/dist/{product-attributes-MHRXZK5S.js → product-attributes-2LAKXXX6.js} +3 -3
- package/dist/{product-bulk-edit-J6ZP7GGM.js → product-bulk-edit-G7QTYQHG.js} +6 -8
- package/dist/{product-create-WOCQFTMZ.js → product-create-QYEZHBTC.js} +31 -32
- package/dist/{product-create-attribute-ZT3VZDNZ.js → product-create-attribute-ELMLVRUB.js} +75 -47
- package/dist/product-create-variant-FQSREC66.js +20 -0
- package/dist/{product-detail-AOMYROBE.js → product-detail-Q6YF7IYX.js} +25 -25
- package/dist/{product-edit-EKAZRIJ6.js → product-edit-3Q5E5E5L.js} +3 -5
- package/dist/product-edit-attribute-WW4LCYD7.js +175 -0
- package/dist/{product-list-J7RDCTOW.js → product-list-IDRT4WUK.js} +25 -26
- package/dist/{product-media-KREKRDOC.js → product-media-6H34CVXJ.js} +9 -8
- package/dist/{product-metadata-O3BAEUYB.js → product-metadata-VJMZL753.js} +21 -22
- package/dist/{product-organization-SBQY44IF.js → product-organization-ILQCXL7B.js} +5 -48
- package/dist/{product-sales-channels-TFOGXCMI.js → product-sales-channels-7QCAABL4.js} +7 -6
- package/dist/{product-shipping-profile-E4HJ4EYW.js → product-shipping-profile-4K7LTJ5K.js} +3 -3
- package/dist/{product-tag-create-7JBM6I3V.js → product-tag-create-4FYE46PE.js} +19 -20
- package/dist/{product-tag-detail-FCVZLJ7N.js → product-tag-detail-WF34TUQR.js} +35 -36
- package/dist/{product-tag-edit-O2ADFDD6.js → product-tag-edit-HRWMMCUC.js} +19 -20
- package/dist/{product-tag-list-N44OW4BR.js → product-tag-list-PK43EMMH.js} +35 -36
- package/dist/{product-tag-metadata-SBOUTUXY.js → product-tag-metadata-ONSEQTEW.js} +20 -21
- package/dist/{product-type-create-RHG4KEAV.js → product-type-create-A7SUR2OX.js} +1 -1
- package/dist/{product-type-detail-II4RYMUP.js → product-type-detail-J466AJUQ.js} +25 -26
- package/dist/{product-type-edit-CABB7R7Y.js → product-type-edit-DM4U2VB4.js} +1 -1
- package/dist/{product-type-metadata-KN5OXR6J.js → product-type-metadata-CXYKP2OF.js} +21 -22
- package/dist/{product-variant-detail-H2YRFDAU.js → product-variant-detail-FXQZLB7Q.js} +23 -33
- package/dist/{product-variant-edit-3HKWOCHQ.js → product-variant-edit-CYEISGII.js} +170 -261
- package/dist/{product-variant-metadata-QESZ7VS2.js → product-variant-metadata-YQ2GKWW7.js} +20 -21
- package/dist/{profile-edit-HQTWYWZ7.js → profile-edit-H5QZ66PF.js} +1 -1
- package/dist/{promotion-add-campaign-O3RTMS3W.js → promotion-add-campaign-V3RJ634F.js} +4 -4
- package/dist/{promotion-create-TGC6BVWF.js → promotion-create-KNK57JWD.js} +24 -25
- package/dist/{promotion-detail-VYIXZMMD.js → promotion-detail-EUQ5LK2V.js} +21 -22
- package/dist/{promotion-edit-details-TKRC5HES.js → promotion-edit-details-NWOBD3YD.js} +1 -1
- package/dist/{promotion-list-C3SKV5BJ.js → promotion-list-M5SAE7A3.js} +4 -4
- package/dist/{refund-reason-create-2KEQFOID.js → refund-reason-create-ANAVZO2N.js} +19 -20
- package/dist/{refund-reason-edit-E7CB7SM3.js → refund-reason-edit-HKEVJ6A5.js} +19 -20
- package/dist/{refund-reason-list-CB2FZPDK.js → refund-reason-list-FBH43XVP.js} +32 -33
- package/dist/{region-add-countries-COXN4LP3.js → region-add-countries-5I2UDAJU.js} +1 -1
- package/dist/{region-create-P66Q65XY.js → region-create-SIB6WZPV.js} +1 -1
- package/dist/{region-edit-XFE54SAO.js → region-edit-YQZCZIX3.js} +1 -1
- package/dist/region-list-2XXKCDDX.js +1 -1
- package/dist/{region-metadata-723RQGHS.js → region-metadata-XHT3A6D7.js} +23 -24
- package/dist/{reservation-create-Y3HG4AZA.js → reservation-create-F6YDCLCG.js} +3 -3
- package/dist/{reservation-detail-HQMADZ56.js → reservation-detail-T3VHDWP6.js} +20 -21
- package/dist/{reservation-list-YKC3JJ6K.js → reservation-list-RGD6O4RY.js} +3 -3
- package/dist/{reservation-metadata-UG4YTEMY.js → reservation-metadata-4LVLM4UW.js} +21 -22
- package/dist/{reset-password-2VNU52CE.js → reset-password-RF5J4RIU.js} +1 -1
- package/dist/{return-reason-create-KED7446I.js → return-reason-create-G7ON7U3A.js} +1 -1
- package/dist/{return-reason-edit-57EU3XSE.js → return-reason-edit-77RVRFF6.js} +1 -1
- package/dist/{return-reason-list-47DFQ3NX.js → return-reason-list-4JWWSFOS.js} +16 -16
- package/dist/{sales-channel-add-products-KKU2AR5R.js → sales-channel-add-products-FNJQKCQQ.js} +24 -25
- package/dist/{sales-channel-create-BSNCLZWR.js → sales-channel-create-TAKKGGK3.js} +3 -3
- package/dist/{sales-channel-detail-5WPD5VKT.js → sales-channel-detail-HXJAR6M4.js} +24 -25
- package/dist/{sales-channel-edit-FUDXMZYV.js → sales-channel-edit-HEESIKZH.js} +3 -3
- package/dist/{sales-channel-list-GYLGH4U7.js → sales-channel-list-YYIH254X.js} +23 -23
- package/dist/{sales-channel-metadata-H6RSHKVP.js → sales-channel-metadata-YF5AV2XX.js} +20 -21
- package/dist/{shipping-option-type-create-QAOW7753.js → shipping-option-type-create-TOONS7EC.js} +19 -20
- package/dist/{shipping-option-type-detail-QGWVDTDU.js → shipping-option-type-detail-VXZ4UQQI.js} +20 -21
- package/dist/{shipping-option-type-edit-WXYBDRNY.js → shipping-option-type-edit-6WO2XRLE.js} +19 -20
- package/dist/{shipping-option-type-list-YSWP6DSC.js → shipping-option-type-list-S7TW7Q3R.js} +20 -21
- package/dist/{shipping-profile-create-UJNCCKKK.js → shipping-profile-create-JYRXTOBF.js} +1 -1
- package/dist/{shipping-profile-metadata-UE53IA3J.js → shipping-profile-metadata-SVD3WK7H.js} +21 -22
- package/dist/{store-address-edit-PKIBRFH4.js → store-address-edit-SWLACMPC.js} +1 -1
- package/dist/{store-bulk-edit-6SQX7OV2.js → store-bulk-edit-JAOT5GY2.js} +3 -3
- package/dist/{store-closure-edit-OK7MTUHY.js → store-closure-edit-Y3FOCDRX.js} +1 -1
- package/dist/{store-create-WNFRHXWR.js → store-create-7A5OSRIV.js} +23 -24
- package/dist/{store-details-RS3SPTXC.js → store-details-LSGSI4QU.js} +30 -45
- package/dist/{store-edit-34CPYPM3.js → store-edit-TP5CQHV7.js} +8 -8
- package/dist/{store-list-Q5X3JB3R.js → store-list-KQGPNQQ4.js} +24 -25
- package/dist/{store-member-invite-7PAPHDOK.js → store-member-invite-MNRTPHUB.js} +2 -2
- package/dist/{store-payment-details-edit-HOGHZMZC.js → store-payment-details-edit-DF2WURRI.js} +1 -1
- package/dist/{store-professional-details-edit-DPJ4ZFDR.js → store-professional-details-edit-FPOLORSE.js} +1 -1
- package/dist/{tax-region-create-3KVECMFN.js → tax-region-create-JR7OHOJ5.js} +20 -21
- package/dist/{tax-region-detail-AOT4X4DZ.js → tax-region-detail-2E56T5C2.js} +23 -24
- package/dist/{tax-region-edit-5T7VHKIA.js → tax-region-edit-7SBQFGPY.js} +19 -20
- package/dist/{tax-region-metadata-RSZCJGJT.js → tax-region-metadata-4NUEQV3N.js} +20 -21
- package/dist/{tax-region-province-create-OVLIZPNP.js → tax-region-province-create-SEPY4OAZ.js} +1 -1
- package/dist/{tax-region-province-detail-XEMIX5SQ.js → tax-region-province-detail-5Q5E5OP7.js} +22 -23
- package/dist/{tax-region-tax-override-create-KPFXMSPH.js → tax-region-tax-override-create-S5S5JZEJ.js} +38 -41
- package/dist/{tax-region-tax-override-edit-RMMHCFXN.js → tax-region-tax-override-edit-JBG3MRNC.js} +40 -43
- package/dist/{tax-region-tax-rate-create-KDN6G52Y.js → tax-region-tax-rate-create-ZITIAU3K.js} +1 -1
- package/dist/{tax-region-tax-rate-edit-D4BFDDJ7.js → tax-region-tax-rate-edit-RQLUPHD4.js} +1 -1
- package/dist/{user-detail-W7DGVXDZ.js → user-detail-6CCQQPFR.js} +1 -1
- package/dist/{user-edit-MXS2DV37.js → user-edit-DVIMNODF.js} +1 -1
- package/dist/{user-invite-HLZJ7FST.js → user-invite-NJZWT4M5.js} +1 -1
- package/dist/{user-metadata-3AFZX3DM.js → user-metadata-2D552EAR.js} +20 -21
- package/package.json +2 -2
- package/dist/[id]-YI7UXOO2.js +0 -499
- package/dist/chunk-AKTAFKIU.js +0 -228
- package/dist/chunk-ALATTLBM.js +0 -390
- package/dist/chunk-IEPNHH7Z.js +0 -170
- package/dist/chunk-J65IXAGI.js +0 -292
- package/dist/chunk-QSGR43JM.js +0 -30
- package/dist/chunk-RQ4NMLSS.js +0 -8
- package/dist/chunk-RXM4B6HR.js +0 -8
- package/dist/chunk-SWL7ZCP3.js +0 -11
- package/dist/chunk-TIMU6K63.js +0 -207
- package/dist/chunk-TTERSO37.js +0 -652
- package/dist/chunk-U7XILJH6.js +0 -423
- package/dist/chunk-UM7ZR3VU.js +0 -14
- package/dist/chunk-V5XHY5LP.js +0 -39
- package/dist/chunk-WV4SQ57G.js +0 -141
- package/dist/chunk-ZZ3XFIEM.js +0 -84
- package/dist/commission-rate-create-DCMGZS3D.js +0 -783
- package/dist/commission-rate-detail-LAZZLZVX.js +0 -86
- package/dist/commission-rate-edit-VL4TUE3M.js +0 -768
- package/dist/commission-rate-list-Y5XLEO67.js +0 -26
- package/dist/loader-6KDBTRVR.js +0 -26
- package/dist/order-allocate-items-DJ2V4B7A.js +0 -563
- package/dist/order-create-fulfillment-SMSUJSBN.js +0 -644
- package/dist/order-create-shipment-5ZAWH5CZ.js +0 -215
- package/dist/order-receive-return-DZ4IUOHY.js +0 -563
- package/dist/product-brand-create-B3ZJGHUQ.js +0 -171
- package/dist/product-brand-detail-QBWHNBYM.js +0 -100
- package/dist/product-brand-edit-3TQDHZNN.js +0 -179
- package/dist/product-brand-metadata-EAMW6PQJ.js +0 -87
- package/dist/product-create-option-NIAP75EE.js +0 -130
- package/dist/product-create-variant-QODC7MZ7.js +0 -60
- package/dist/product-edit-option-OZUZGMIM.js +0 -166
- package/dist/product-prices-R5JOHVGS.js +0 -267
- package/dist/product-stock-EIP2XJUR.js +0 -545
- package/dist/product-variant-manage-inventory-items-Q5MJG3EJ.js +0 -337
- package/dist/{chunk-WVKVPGJW.js → chunk-FNKBJCNF.js} +3 -3
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-U2L77ZDR.js";
|
|
4
4
|
import {
|
|
5
5
|
OutboundShippingPlaceholder,
|
|
6
|
-
ReturnShippingPlaceholder
|
|
7
|
-
|
|
6
|
+
ReturnShippingPlaceholder,
|
|
7
|
+
getOfferRestockPreview
|
|
8
|
+
} from "./chunk-YVLANFBK.js";
|
|
8
9
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
useOffers
|
|
11
|
+
} from "./chunk-UIVWOKWT.js";
|
|
11
12
|
import {
|
|
12
13
|
useAddClaimInboundItems,
|
|
13
14
|
useAddClaimInboundShipping,
|
|
@@ -25,23 +26,24 @@ import {
|
|
|
25
26
|
useUpdateClaimInboundShipping,
|
|
26
27
|
useUpdateClaimOutboundItems,
|
|
27
28
|
useUpdateClaimOutboundShipping
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6LG3VL3Q.js";
|
|
30
|
+
import {
|
|
31
|
+
getFormattedShippingOptionLocationName
|
|
32
|
+
} from "./chunk-HC25LNX7.js";
|
|
29
33
|
import {
|
|
30
34
|
useReturnReasons
|
|
31
35
|
} from "./chunk-2FGRDEAD.js";
|
|
32
36
|
import {
|
|
33
|
-
getReturnableQuantity
|
|
34
|
-
|
|
37
|
+
getReturnableQuantity,
|
|
38
|
+
useReturn,
|
|
39
|
+
useUpdateReturn
|
|
40
|
+
} from "./chunk-IHTQOPB6.js";
|
|
35
41
|
import {
|
|
36
42
|
MoneyAmountCell
|
|
37
43
|
} from "./chunk-2Y3WMGN6.js";
|
|
38
44
|
import {
|
|
39
45
|
DEFAULT_FIELDS
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import {
|
|
42
|
-
useReturn,
|
|
43
|
-
useUpdateReturn
|
|
44
|
-
} from "./chunk-GKW445WA.js";
|
|
46
|
+
} from "./chunk-JHBNG7OD.js";
|
|
45
47
|
import {
|
|
46
48
|
getStylizedAmount
|
|
47
49
|
} from "./chunk-PXYDR7WQ.js";
|
|
@@ -49,7 +51,9 @@ import {
|
|
|
49
51
|
ProductCell,
|
|
50
52
|
ProductHeader
|
|
51
53
|
} from "./chunk-FWPGOIFA.js";
|
|
52
|
-
import
|
|
54
|
+
import {
|
|
55
|
+
PlaceholderCell
|
|
56
|
+
} from "./chunk-PHOCVOZ5.js";
|
|
53
57
|
import "./chunk-FQERBIVS.js";
|
|
54
58
|
import {
|
|
55
59
|
_DataTable,
|
|
@@ -66,7 +70,7 @@ import {
|
|
|
66
70
|
} from "./chunk-IQPN4PZJ.js";
|
|
67
71
|
import {
|
|
68
72
|
KeyboundForm
|
|
69
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SITRHMZZ.js";
|
|
70
74
|
import {
|
|
71
75
|
RouteFocusModal,
|
|
72
76
|
StackedFocusModal,
|
|
@@ -94,25 +98,21 @@ import {
|
|
|
94
98
|
useOrder,
|
|
95
99
|
useOrderPreview,
|
|
96
100
|
useOrderShippingOptions
|
|
97
|
-
} from "./chunk-
|
|
98
|
-
import "./chunk-A772RAKB.js";
|
|
101
|
+
} from "./chunk-RMAQKNBA.js";
|
|
99
102
|
import {
|
|
100
103
|
ActionMenu
|
|
101
104
|
} from "./chunk-BDGZ4EQO.js";
|
|
102
105
|
import "./chunk-LAVHRER2.js";
|
|
103
106
|
import "./chunk-Y7QKP6QU.js";
|
|
104
107
|
import "./chunk-INNFZYX2.js";
|
|
105
|
-
import "./chunk-2YYXP6XI.js";
|
|
106
108
|
import "./chunk-RHKRREUU.js";
|
|
107
109
|
import "./chunk-ZA2KFUFR.js";
|
|
108
|
-
import
|
|
109
|
-
sdk
|
|
110
|
-
} from "./chunk-ZBWL72TB.js";
|
|
110
|
+
import "./chunk-ZBWL72TB.js";
|
|
111
111
|
import "./chunk-NBMM2TZK.js";
|
|
112
112
|
|
|
113
113
|
// src/pages/orders/order-create-claim/claim-create.tsx
|
|
114
114
|
import { toast as toast3 } from "@medusajs/ui";
|
|
115
|
-
import { useEffect as useEffect3, useState as
|
|
115
|
+
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
116
116
|
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
117
117
|
import { useNavigate, useParams } from "react-router-dom";
|
|
118
118
|
|
|
@@ -120,7 +120,6 @@ import { useNavigate, useParams } from "react-router-dom";
|
|
|
120
120
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
121
121
|
import { PencilSquare } from "@medusajs/icons";
|
|
122
122
|
import {
|
|
123
|
-
Alert as Alert2,
|
|
124
123
|
Button as Button2,
|
|
125
124
|
CurrencyInput,
|
|
126
125
|
Heading as Heading2,
|
|
@@ -130,7 +129,7 @@ import {
|
|
|
130
129
|
toast as toast2,
|
|
131
130
|
usePrompt
|
|
132
131
|
} from "@medusajs/ui";
|
|
133
|
-
import { useEffect as useEffect2, useMemo as
|
|
132
|
+
import { useEffect as useEffect2, useMemo as useMemo6, useState as useState3 } from "react";
|
|
134
133
|
import { useFieldArray as useFieldArray2, useForm } from "react-hook-form";
|
|
135
134
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
136
135
|
|
|
@@ -494,13 +493,20 @@ function ClaimInboundItem({
|
|
|
494
493
|
form,
|
|
495
494
|
onRemove,
|
|
496
495
|
onUpdate,
|
|
497
|
-
index
|
|
496
|
+
index,
|
|
497
|
+
locationId,
|
|
498
|
+
locationName
|
|
498
499
|
}) {
|
|
499
500
|
const { t } = useTranslation4();
|
|
500
501
|
const { return_reasons = [] } = useReturnReasons({ fields: "+label" });
|
|
501
502
|
const formItem = form.watch(`inbound_items.${index}`);
|
|
502
503
|
const showReturnReason = typeof formItem.reason_id === "string";
|
|
503
504
|
const showNote = typeof formItem.note === "string";
|
|
505
|
+
const restockRows = locationId ? getOfferRestockPreview(
|
|
506
|
+
item,
|
|
507
|
+
formItem?.quantity ?? 0
|
|
508
|
+
) : [];
|
|
509
|
+
const offerSku = item.offer?.sku ?? item.variant_sku ?? null;
|
|
504
510
|
return /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: [
|
|
505
511
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 border-b p-3 text-sm md:flex-row", children: [
|
|
506
512
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-x-3", children: [
|
|
@@ -589,6 +595,22 @@ function ClaimInboundItem({
|
|
|
589
595
|
)
|
|
590
596
|
] })
|
|
591
597
|
] }),
|
|
598
|
+
restockRows.length > 0 && /* @__PURE__ */ jsx3("div", { className: "bg-ui-bg-subtle flex flex-col gap-y-1 rounded-md px-3 py-2", children: restockRows.map((row) => /* @__PURE__ */ jsx3(
|
|
599
|
+
Text,
|
|
600
|
+
{
|
|
601
|
+
size: "xsmall",
|
|
602
|
+
className: "text-ui-fg-subtle",
|
|
603
|
+
"data-testid": `claim-inbound-item-${item.id}-restock-${row.inventoryItemId}`,
|
|
604
|
+
children: t("orders.returns.restockPreview", {
|
|
605
|
+
quantity: formItem?.quantity ?? 0,
|
|
606
|
+
offerSku: offerSku ?? "\u2014",
|
|
607
|
+
delta: row.delta,
|
|
608
|
+
inventoryItem: row.inventoryItemLabel,
|
|
609
|
+
location: locationName ?? "\u2014"
|
|
610
|
+
})
|
|
611
|
+
},
|
|
612
|
+
row.inventoryItemId
|
|
613
|
+
)) }),
|
|
592
614
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
593
615
|
showReturnReason && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2 p-3 md:grid-cols-2", children: [
|
|
594
616
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -712,37 +734,35 @@ var ClaimCreateSchema = z.object({
|
|
|
712
734
|
});
|
|
713
735
|
|
|
714
736
|
// src/pages/orders/order-create-claim/components/claim-create-form/claim-outbound-section.tsx
|
|
715
|
-
import {
|
|
716
|
-
import { useEffect, useMemo as
|
|
737
|
+
import { Button, Heading, toast } from "@medusajs/ui";
|
|
738
|
+
import { useEffect, useMemo as useMemo5 } from "react";
|
|
717
739
|
import { useFieldArray } from "react-hook-form";
|
|
718
740
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
719
741
|
|
|
720
742
|
// src/pages/orders/order-create-claim/components/add-claim-outbound-items-table/add-claim-outbound-items-table.tsx
|
|
721
|
-
import { useState as useState2 } from "react";
|
|
743
|
+
import { useMemo as useMemo4, useState as useState2 } from "react";
|
|
722
744
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
723
745
|
|
|
724
746
|
// src/pages/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-columns.tsx
|
|
725
|
-
import { Checkbox as Checkbox2 } from "@medusajs/ui";
|
|
747
|
+
import { Checkbox as Checkbox2, Text as Text2 } from "@medusajs/ui";
|
|
726
748
|
import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
|
|
727
749
|
import { useMemo as useMemo3 } from "react";
|
|
728
750
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
729
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
751
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
730
752
|
var columnHelper2 = createColumnHelper2();
|
|
731
|
-
var useClaimOutboundItemTableColumns = (
|
|
753
|
+
var useClaimOutboundItemTableColumns = () => {
|
|
732
754
|
const { t } = useTranslation5();
|
|
733
755
|
return useMemo3(
|
|
734
756
|
() => [
|
|
735
757
|
columnHelper2.display({
|
|
736
758
|
id: "select",
|
|
737
|
-
header: ({ table }) =>
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
);
|
|
745
|
-
},
|
|
759
|
+
header: ({ table }) => /* @__PURE__ */ jsx4(
|
|
760
|
+
Checkbox2,
|
|
761
|
+
{
|
|
762
|
+
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
763
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
|
|
764
|
+
}
|
|
765
|
+
),
|
|
746
766
|
cell: ({ row }) => {
|
|
747
767
|
const isSelectable = row.getCanSelect();
|
|
748
768
|
return /* @__PURE__ */ jsx4(
|
|
@@ -760,19 +780,44 @@ var useClaimOutboundItemTableColumns = (_currencyCode) => {
|
|
|
760
780
|
}),
|
|
761
781
|
columnHelper2.display({
|
|
762
782
|
id: "product",
|
|
763
|
-
header: ()
|
|
783
|
+
header: t("fields.product"),
|
|
764
784
|
cell: ({ row }) => {
|
|
765
|
-
|
|
785
|
+
const variant = row.original.product_variant;
|
|
786
|
+
const productTitle = variant?.product?.title;
|
|
787
|
+
if (!productTitle) {
|
|
788
|
+
return /* @__PURE__ */ jsx4(PlaceholderCell, {});
|
|
789
|
+
}
|
|
790
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-full max-w-[300px] items-center gap-x-3 overflow-hidden", children: [
|
|
791
|
+
/* @__PURE__ */ jsx4(Thumbnail, { src: variant?.product?.thumbnail }),
|
|
792
|
+
/* @__PURE__ */ jsx4(
|
|
793
|
+
Text2,
|
|
794
|
+
{
|
|
795
|
+
size: "small",
|
|
796
|
+
leading: "compact",
|
|
797
|
+
className: "truncate",
|
|
798
|
+
title: productTitle,
|
|
799
|
+
children: productTitle
|
|
800
|
+
}
|
|
801
|
+
)
|
|
802
|
+
] });
|
|
766
803
|
}
|
|
767
804
|
}),
|
|
768
805
|
columnHelper2.accessor("sku", {
|
|
769
806
|
header: t("fields.sku"),
|
|
770
807
|
cell: ({ getValue }) => {
|
|
771
|
-
|
|
808
|
+
const sku = getValue();
|
|
809
|
+
if (!sku) return /* @__PURE__ */ jsx4(PlaceholderCell, {});
|
|
810
|
+
return /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "truncate", children: sku });
|
|
772
811
|
}
|
|
773
812
|
}),
|
|
774
|
-
columnHelper2.
|
|
775
|
-
|
|
813
|
+
columnHelper2.display({
|
|
814
|
+
id: "variant_title",
|
|
815
|
+
header: t("fields.title"),
|
|
816
|
+
cell: ({ row }) => {
|
|
817
|
+
const title = row.original.product_variant?.title;
|
|
818
|
+
if (!title) return /* @__PURE__ */ jsx4(PlaceholderCell, {});
|
|
819
|
+
return /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "truncate", children: title });
|
|
820
|
+
}
|
|
776
821
|
})
|
|
777
822
|
],
|
|
778
823
|
[t]
|
|
@@ -822,10 +867,44 @@ var useClaimOutboundItemTableQuery = ({
|
|
|
822
867
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
823
868
|
var PAGE_SIZE2 = 50;
|
|
824
869
|
var PREFIX2 = "rit";
|
|
870
|
+
var OFFER_PICKER_FIELDS = [
|
|
871
|
+
"id",
|
|
872
|
+
"sku",
|
|
873
|
+
"variant_id",
|
|
874
|
+
"seller_id",
|
|
875
|
+
"prices.amount",
|
|
876
|
+
"prices.currency_code",
|
|
877
|
+
"product_variant.id",
|
|
878
|
+
"product_variant.title",
|
|
879
|
+
"product_variant.product.id",
|
|
880
|
+
"product_variant.product.title",
|
|
881
|
+
"product_variant.product.thumbnail",
|
|
882
|
+
"product_variant.manage_inventory",
|
|
883
|
+
"product_variant.inventory_quantity",
|
|
884
|
+
"product_variant.inventory_items.required_quantity",
|
|
885
|
+
"product_variant.inventory_items.inventory.location_levels.available_quantity"
|
|
886
|
+
].join(",");
|
|
887
|
+
var offerHasInventory = (offer) => {
|
|
888
|
+
const variant = offer.product_variant;
|
|
889
|
+
if (!variant) return false;
|
|
890
|
+
if (variant.manage_inventory === false) return true;
|
|
891
|
+
const links = variant.inventory_items ?? [];
|
|
892
|
+
if (!links.length) {
|
|
893
|
+
return (variant.inventory_quantity ?? 0) > 0;
|
|
894
|
+
}
|
|
895
|
+
return links.every((link) => {
|
|
896
|
+
const available = (link.inventory?.location_levels ?? []).reduce(
|
|
897
|
+
(acc, lvl) => acc + (lvl.available_quantity ?? 0),
|
|
898
|
+
0
|
|
899
|
+
);
|
|
900
|
+
const required = link.required_quantity ?? 1;
|
|
901
|
+
return required > 0 && available >= required;
|
|
902
|
+
});
|
|
903
|
+
};
|
|
825
904
|
var AddClaimOutboundItemsTable = ({
|
|
905
|
+
currencyCode,
|
|
826
906
|
onSelectionChange,
|
|
827
|
-
selectedItems
|
|
828
|
-
currencyCode
|
|
907
|
+
selectedItems = []
|
|
829
908
|
}) => {
|
|
830
909
|
const { t } = useTranslation7();
|
|
831
910
|
const [rowSelection, setRowSelection] = useState2(
|
|
@@ -834,60 +913,96 @@ var AddClaimOutboundItemsTable = ({
|
|
|
834
913
|
return acc;
|
|
835
914
|
}, {})
|
|
836
915
|
);
|
|
837
|
-
const updater = (fn) => {
|
|
838
|
-
const newState = typeof fn === "function" ? fn(rowSelection) : fn;
|
|
839
|
-
setRowSelection(newState);
|
|
840
|
-
onSelectionChange(Object.keys(newState));
|
|
841
|
-
};
|
|
842
916
|
const { searchParams, raw } = useClaimOutboundItemTableQuery({
|
|
843
917
|
pageSize: PAGE_SIZE2,
|
|
844
918
|
prefix: PREFIX2
|
|
845
919
|
});
|
|
846
|
-
const
|
|
920
|
+
const offersResponse = useOffers({
|
|
921
|
+
...searchParams,
|
|
922
|
+
fields: OFFER_PICKER_FIELDS
|
|
923
|
+
});
|
|
924
|
+
const rawCount = offersResponse.count ?? 0;
|
|
925
|
+
const offers = useMemo4(() => {
|
|
926
|
+
const rawOffers = offersResponse.offers ?? [];
|
|
927
|
+
return rawOffers.filter((offer) => {
|
|
928
|
+
if (currencyCode) {
|
|
929
|
+
const hasPrice = (offer.prices ?? []).some(
|
|
930
|
+
(p) => p.currency_code === currencyCode
|
|
931
|
+
);
|
|
932
|
+
if (!hasPrice) return false;
|
|
933
|
+
}
|
|
934
|
+
return offerHasInventory(offer);
|
|
935
|
+
});
|
|
936
|
+
}, [offersResponse.offers, currencyCode]);
|
|
937
|
+
const count = offers.length;
|
|
938
|
+
void rawCount;
|
|
939
|
+
const columns = useClaimOutboundItemTableColumns();
|
|
847
940
|
const filters = useClaimOutboundItemTableFilters();
|
|
941
|
+
const selectionByOfferId = useMemo4(() => {
|
|
942
|
+
const map = /* @__PURE__ */ new Map();
|
|
943
|
+
for (const offer of offers) {
|
|
944
|
+
if (offer.id && offer.variant_id) {
|
|
945
|
+
map.set(offer.id, { variantId: offer.variant_id, offerId: offer.id });
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
return map;
|
|
949
|
+
}, [offers]);
|
|
950
|
+
const updater = (fn) => {
|
|
951
|
+
const newState = typeof fn === "function" ? fn(rowSelection) : fn;
|
|
952
|
+
setRowSelection(newState);
|
|
953
|
+
const pairs = Object.keys(newState).map((offerId) => selectionByOfferId.get(offerId)).filter((p) => !!p);
|
|
954
|
+
onSelectionChange(pairs);
|
|
955
|
+
};
|
|
848
956
|
const { table } = useDataTable({
|
|
849
|
-
data:
|
|
957
|
+
data: offers,
|
|
850
958
|
columns,
|
|
851
|
-
count
|
|
959
|
+
count,
|
|
852
960
|
enablePagination: true,
|
|
853
|
-
|
|
961
|
+
// Row id is the offer id so each offer surfaces as a distinct row and the
|
|
962
|
+
// selection can be turned back into `{ variantId, offerId }` pairs.
|
|
963
|
+
getRowId: (row) => row.id ?? row.variant_id,
|
|
854
964
|
pageSize: PAGE_SIZE2,
|
|
855
|
-
enableRowSelection: (
|
|
856
|
-
return true;
|
|
857
|
-
},
|
|
965
|
+
enableRowSelection: () => true,
|
|
858
966
|
rowSelection: {
|
|
859
967
|
state: rowSelection,
|
|
860
968
|
updater
|
|
861
969
|
},
|
|
862
970
|
prefix: PREFIX2
|
|
863
971
|
});
|
|
864
|
-
return /* @__PURE__ */ jsx5(
|
|
865
|
-
|
|
972
|
+
return /* @__PURE__ */ jsx5(
|
|
973
|
+
"div",
|
|
866
974
|
{
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
975
|
+
className: "flex size-full flex-col overflow-hidden",
|
|
976
|
+
"data-testid": "add-offers-picker",
|
|
977
|
+
children: /* @__PURE__ */ jsx5(
|
|
978
|
+
_DataTable,
|
|
979
|
+
{
|
|
980
|
+
table,
|
|
981
|
+
columns,
|
|
982
|
+
pageSize: PAGE_SIZE2,
|
|
983
|
+
count,
|
|
984
|
+
filters,
|
|
985
|
+
pagination: true,
|
|
986
|
+
layout: "fill",
|
|
987
|
+
search: true,
|
|
988
|
+
orderBy: [
|
|
989
|
+
{ key: "sku", label: t("fields.sku") },
|
|
990
|
+
{ key: "created_at", label: t("fields.createdAt") },
|
|
991
|
+
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
992
|
+
],
|
|
993
|
+
prefix: PREFIX2,
|
|
994
|
+
queryObject: raw
|
|
995
|
+
}
|
|
996
|
+
)
|
|
882
997
|
}
|
|
883
|
-
)
|
|
998
|
+
);
|
|
884
999
|
};
|
|
885
1000
|
|
|
886
1001
|
// src/pages/orders/order-create-claim/components/claim-create-form/claim-outbound-item.tsx
|
|
887
1002
|
import { XCircle as XCircle2 } from "@medusajs/icons";
|
|
888
|
-
import { Input as Input2, Text as
|
|
1003
|
+
import { Input as Input2, Text as Text3 } from "@medusajs/ui";
|
|
889
1004
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
890
|
-
import { jsx as jsx6, jsxs as
|
|
1005
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
891
1006
|
function ClaimOutboundItem({
|
|
892
1007
|
previewItem,
|
|
893
1008
|
currencyCode,
|
|
@@ -897,33 +1012,33 @@ function ClaimOutboundItem({
|
|
|
897
1012
|
index
|
|
898
1013
|
}) {
|
|
899
1014
|
const { t } = useTranslation8();
|
|
900
|
-
return /* @__PURE__ */ jsx6("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: /* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ jsx6("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 border-b p-3 text-sm md:flex-row", children: [
|
|
1016
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-1 items-center gap-x-3", children: [
|
|
902
1017
|
/* @__PURE__ */ jsx6(Thumbnail, { src: previewItem.thumbnail }),
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
|
|
1019
|
+
/* @__PURE__ */ jsxs3("div", { children: [
|
|
1020
|
+
/* @__PURE__ */ jsxs3(Text3, { className: "txt-small", as: "span", weight: "plus", children: [
|
|
906
1021
|
previewItem.title,
|
|
907
1022
|
" "
|
|
908
1023
|
] }),
|
|
909
|
-
previewItem.variant_sku && /* @__PURE__ */
|
|
1024
|
+
previewItem.variant_sku && /* @__PURE__ */ jsxs3("span", { children: [
|
|
910
1025
|
"(",
|
|
911
1026
|
previewItem.variant_sku,
|
|
912
1027
|
")"
|
|
913
1028
|
] })
|
|
914
1029
|
] }),
|
|
915
|
-
/* @__PURE__ */ jsx6(
|
|
1030
|
+
/* @__PURE__ */ jsx6(Text3, { as: "div", className: "text-ui-fg-subtle txt-small", children: previewItem.subtitle })
|
|
916
1031
|
] })
|
|
917
1032
|
] }),
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-1 justify-between", children: [
|
|
1034
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-grow items-center gap-2", children: [
|
|
920
1035
|
/* @__PURE__ */ jsx6(
|
|
921
1036
|
Form.Field,
|
|
922
1037
|
{
|
|
923
1038
|
control: form.control,
|
|
924
1039
|
name: `outbound_items.${index}.quantity`,
|
|
925
1040
|
render: ({ field }) => {
|
|
926
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ jsxs3(Form.Item, { children: [
|
|
927
1042
|
/* @__PURE__ */ jsx6(Form.Control, { children: /* @__PURE__ */ jsx6(
|
|
928
1043
|
Input2,
|
|
929
1044
|
{
|
|
@@ -946,7 +1061,7 @@ function ClaimOutboundItem({
|
|
|
946
1061
|
}
|
|
947
1062
|
}
|
|
948
1063
|
),
|
|
949
|
-
/* @__PURE__ */ jsx6(
|
|
1064
|
+
/* @__PURE__ */ jsx6(Text3, { className: "txt-small text-ui-fg-subtle", children: t("fields.qty") })
|
|
950
1065
|
] }),
|
|
951
1066
|
/* @__PURE__ */ jsx6("div", { className: "text-ui-fg-subtle txt-small mr-2 flex flex-shrink-0", children: /* @__PURE__ */ jsx6(
|
|
952
1067
|
MoneyAmountCell,
|
|
@@ -976,7 +1091,7 @@ function ClaimOutboundItem({
|
|
|
976
1091
|
}
|
|
977
1092
|
|
|
978
1093
|
// src/pages/orders/order-create-claim/components/claim-create-form/claim-outbound-section.tsx
|
|
979
|
-
import { jsx as jsx7, jsxs as
|
|
1094
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
980
1095
|
var itemsToAdd = [];
|
|
981
1096
|
var itemsToRemove = [];
|
|
982
1097
|
var ClaimOutboundSection = ({
|
|
@@ -987,7 +1102,6 @@ var ClaimOutboundSection = ({
|
|
|
987
1102
|
}) => {
|
|
988
1103
|
const { t } = useTranslation9();
|
|
989
1104
|
const { setIsOpen } = useStackedModal();
|
|
990
|
-
const [inventoryMap, setInventoryMap] = useState3({});
|
|
991
1105
|
const { shipping_options = [] } = useOrderShippingOptions(order.id);
|
|
992
1106
|
const outboundShippingOptions = shipping_options.filter(
|
|
993
1107
|
(so) => !so.rules?.find((r) => r.attribute === "is_return" && r.value === "true")
|
|
@@ -1009,7 +1123,7 @@ var ClaimOutboundSection = ({
|
|
|
1009
1123
|
claim.id,
|
|
1010
1124
|
order.id
|
|
1011
1125
|
);
|
|
1012
|
-
const previewOutboundItems =
|
|
1126
|
+
const previewOutboundItems = useMemo5(
|
|
1013
1127
|
() => preview?.items?.filter(
|
|
1014
1128
|
(i) => !!i.actions?.find(
|
|
1015
1129
|
(a) => a.claim_id === claim.id && a.action === "ITEM_ADD"
|
|
@@ -1017,10 +1131,6 @@ var ClaimOutboundSection = ({
|
|
|
1017
1131
|
),
|
|
1018
1132
|
[preview.items, claim.id]
|
|
1019
1133
|
);
|
|
1020
|
-
const variantItemMap = useMemo4(
|
|
1021
|
-
() => new Map(order?.items?.map((i) => [i.variant_id, i])),
|
|
1022
|
-
[order.items]
|
|
1023
|
-
);
|
|
1024
1134
|
const {
|
|
1025
1135
|
fields: outboundItems,
|
|
1026
1136
|
append,
|
|
@@ -1030,7 +1140,7 @@ var ClaimOutboundSection = ({
|
|
|
1030
1140
|
name: "outbound_items",
|
|
1031
1141
|
control: form.control
|
|
1032
1142
|
});
|
|
1033
|
-
const variantOutboundMap =
|
|
1143
|
+
const variantOutboundMap = useMemo5(
|
|
1034
1144
|
() => new Map(previewOutboundItems.map((i) => [i.variant_id, i])),
|
|
1035
1145
|
[previewOutboundItems]
|
|
1036
1146
|
);
|
|
@@ -1069,15 +1179,15 @@ var ClaimOutboundSection = ({
|
|
|
1069
1179
|
append,
|
|
1070
1180
|
update
|
|
1071
1181
|
]);
|
|
1072
|
-
const locationId = form.watch("location_id");
|
|
1073
1182
|
const showOutboundItemsPlaceholder = !outboundItems.length;
|
|
1074
1183
|
const onItemsSelected = async () => {
|
|
1075
1184
|
if (itemsToAdd.length) {
|
|
1076
1185
|
await addOutboundItem(
|
|
1077
1186
|
{
|
|
1078
|
-
items: itemsToAdd.map((variantId) => ({
|
|
1187
|
+
items: itemsToAdd.map(({ variantId, offerId }) => ({
|
|
1079
1188
|
variant_id: variantId,
|
|
1080
|
-
quantity: 1
|
|
1189
|
+
quantity: 1,
|
|
1190
|
+
metadata: { offer_id: offerId }
|
|
1081
1191
|
}))
|
|
1082
1192
|
},
|
|
1083
1193
|
{
|
|
@@ -1126,73 +1236,33 @@ var ClaimOutboundSection = ({
|
|
|
1126
1236
|
);
|
|
1127
1237
|
}
|
|
1128
1238
|
};
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
return false;
|
|
1132
|
-
}
|
|
1133
|
-
const allItemsHaveLocation = outboundItems.map((i) => {
|
|
1134
|
-
const item = variantItemMap.get(i.variant_id);
|
|
1135
|
-
if (!item?.variant_id || !item?.variant) {
|
|
1136
|
-
return true;
|
|
1137
|
-
}
|
|
1138
|
-
if (!item.variant?.manage_inventory) {
|
|
1139
|
-
return true;
|
|
1140
|
-
}
|
|
1141
|
-
return inventoryMap[item.variant_id]?.find(
|
|
1142
|
-
(l) => l.location_id === locationId
|
|
1143
|
-
);
|
|
1144
|
-
}).every(Boolean);
|
|
1145
|
-
return !allItemsHaveLocation;
|
|
1146
|
-
}, [
|
|
1147
|
-
outboundItems,
|
|
1148
|
-
inventoryMap,
|
|
1149
|
-
locationId,
|
|
1150
|
-
variantItemMap
|
|
1151
|
-
]);
|
|
1152
|
-
useEffect(() => {
|
|
1153
|
-
const getInventoryMap = async () => {
|
|
1154
|
-
const ret = {};
|
|
1155
|
-
if (!outboundItems.length) {
|
|
1156
|
-
return ret;
|
|
1157
|
-
}
|
|
1158
|
-
const variantIds = outboundItems.map((item) => item?.variant_id).filter(Boolean);
|
|
1159
|
-
const variants = (await sdk.admin.productVariants.query({
|
|
1160
|
-
id: variantIds,
|
|
1161
|
-
fields: "*inventory.location_levels"
|
|
1162
|
-
})).variants;
|
|
1163
|
-
variants.forEach((variant) => {
|
|
1164
|
-
ret[variant.id] = variant.inventory?.[0]?.location_levels || [];
|
|
1165
|
-
});
|
|
1166
|
-
return ret;
|
|
1167
|
-
};
|
|
1168
|
-
getInventoryMap().then((map) => {
|
|
1169
|
-
setInventoryMap(map);
|
|
1170
|
-
});
|
|
1171
|
-
}, [outboundItems]);
|
|
1172
|
-
return /* @__PURE__ */ jsxs3("div", { children: [
|
|
1173
|
-
/* @__PURE__ */ jsxs3("div", { className: "mt-8 flex items-center justify-between", children: [
|
|
1239
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
1240
|
+
/* @__PURE__ */ jsxs4("div", { className: "mt-8 flex items-center justify-between", children: [
|
|
1174
1241
|
/* @__PURE__ */ jsx7(Heading, { level: "h2", children: t("orders.returns.outbound") }),
|
|
1175
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ jsxs4(StackedFocusModal, { id: "outbound-items", children: [
|
|
1176
1243
|
/* @__PURE__ */ jsx7(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx7("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
|
|
1177
|
-
/* @__PURE__ */
|
|
1244
|
+
/* @__PURE__ */ jsxs4(StackedFocusModal.Content, { children: [
|
|
1178
1245
|
/* @__PURE__ */ jsx7(StackedFocusModal.Header, {}),
|
|
1179
1246
|
/* @__PURE__ */ jsx7(
|
|
1180
1247
|
AddClaimOutboundItemsTable,
|
|
1181
1248
|
{
|
|
1182
|
-
selectedItems: outboundItems.map(
|
|
1249
|
+
selectedItems: outboundItems.map(
|
|
1250
|
+
(i) => (typeof i.metadata?.offer_id === "string" ? i.metadata.offer_id : null) ?? i.variant_id
|
|
1251
|
+
).filter((v) => !!v),
|
|
1183
1252
|
currencyCode: order.currency_code,
|
|
1184
1253
|
onSelectionChange: (finalSelection) => {
|
|
1185
|
-
const
|
|
1254
|
+
const alreadyVariantIds = outboundItems.map((i) => i.variant_id).filter((v) => !!v);
|
|
1186
1255
|
itemsToAdd = finalSelection.filter(
|
|
1187
|
-
(
|
|
1256
|
+
({ variantId }) => !alreadyVariantIds.includes(variantId)
|
|
1188
1257
|
);
|
|
1189
|
-
|
|
1190
|
-
|
|
1258
|
+
const finalVariantIds = finalSelection.map((s) => s.variantId);
|
|
1259
|
+
itemsToRemove = alreadyVariantIds.filter(
|
|
1260
|
+
(variantId) => !finalVariantIds.includes(variantId)
|
|
1191
1261
|
);
|
|
1192
1262
|
}
|
|
1193
1263
|
}
|
|
1194
1264
|
),
|
|
1195
|
-
/* @__PURE__ */ jsx7(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx7("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ jsx7(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx7("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
1196
1266
|
/* @__PURE__ */ jsx7(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx7(Button, { type: "button", variant: "secondary", size: "small", children: t("actions.cancel") }) }),
|
|
1197
1267
|
/* @__PURE__ */ jsx7(
|
|
1198
1268
|
Button,
|
|
@@ -1247,8 +1317,8 @@ var ClaimOutboundSection = ({
|
|
|
1247
1317
|
item.id
|
|
1248
1318
|
)
|
|
1249
1319
|
),
|
|
1250
|
-
!showOutboundItemsPlaceholder && /* @__PURE__ */ jsx7("div", { className: "mt-8 flex flex-col gap-y-4", children: /* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1320
|
+
!showOutboundItemsPlaceholder && /* @__PURE__ */ jsx7("div", { className: "mt-8 flex flex-col gap-y-4", children: /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
|
|
1321
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1252
1322
|
/* @__PURE__ */ jsx7(Form.Label, { children: t("orders.claims.outboundShipping") }),
|
|
1253
1323
|
/* @__PURE__ */ jsx7(Form.Hint, { className: "!mt-1", children: t("orders.claims.outboundShippingHint") })
|
|
1254
1324
|
] }),
|
|
@@ -1279,16 +1349,12 @@ var ClaimOutboundSection = ({
|
|
|
1279
1349
|
}
|
|
1280
1350
|
}
|
|
1281
1351
|
)
|
|
1282
|
-
] }) })
|
|
1283
|
-
showLevelsWarning && /* @__PURE__ */ jsxs3(Alert, { variant: "warning", dismissible: true, className: "mt-4 p-5", children: [
|
|
1284
|
-
/* @__PURE__ */ jsx7("div", { className: "text-ui-fg-subtle txt-small pb-2 font-medium leading-[20px]", children: t("orders.returns.noInventoryLevel") }),
|
|
1285
|
-
/* @__PURE__ */ jsx7(Text3, { className: "text-ui-fg-subtle txt-small leading-normal", children: t("orders.returns.noInventoryLevelDesc") })
|
|
1286
|
-
] })
|
|
1352
|
+
] }) })
|
|
1287
1353
|
] });
|
|
1288
1354
|
};
|
|
1289
1355
|
|
|
1290
1356
|
// src/pages/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx
|
|
1291
|
-
import { jsx as jsx8, jsxs as
|
|
1357
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1292
1358
|
var itemsToAdd2 = [];
|
|
1293
1359
|
var itemsToRemove2 = [];
|
|
1294
1360
|
var IS_CANCELING = false;
|
|
@@ -1301,17 +1367,16 @@ var ClaimCreateForm = ({
|
|
|
1301
1367
|
const { t } = useTranslation10();
|
|
1302
1368
|
const { handleSuccess } = useRouteModal();
|
|
1303
1369
|
const { setIsOpen } = useStackedModal();
|
|
1304
|
-
const [isShippingInboundPriceEdit, setIsShippingInboundPriceEdit] =
|
|
1305
|
-
const [isShippingOutboundPriceEdit, setIsShippingOutboundPriceEdit] =
|
|
1306
|
-
const [customInboundShippingAmount, setCustomInboundShippingAmount] =
|
|
1370
|
+
const [isShippingInboundPriceEdit, setIsShippingInboundPriceEdit] = useState3(false);
|
|
1371
|
+
const [isShippingOutboundPriceEdit, setIsShippingOutboundPriceEdit] = useState3(false);
|
|
1372
|
+
const [customInboundShippingAmount, setCustomInboundShippingAmount] = useState3({
|
|
1307
1373
|
value: "0",
|
|
1308
1374
|
float: 0
|
|
1309
1375
|
});
|
|
1310
|
-
const [customOutboundShippingAmount, setCustomOutboundShippingAmount] =
|
|
1376
|
+
const [customOutboundShippingAmount, setCustomOutboundShippingAmount] = useState3({
|
|
1311
1377
|
value: "0",
|
|
1312
1378
|
float: 0
|
|
1313
1379
|
});
|
|
1314
|
-
const [inventoryMap, setInventoryMap] = useState4({});
|
|
1315
1380
|
const { mutateAsync: confirmClaimRequest, isPending: isConfirming } = useClaimConfirmRequest(claim.id, order.id);
|
|
1316
1381
|
const { mutateAsync: cancelClaimRequest, isPending: isCanceling } = useCancelClaimRequest(claim.id, order.id);
|
|
1317
1382
|
const { mutateAsync: updateReturn, isPending: isUpdating } = useUpdateReturn(
|
|
@@ -1338,7 +1403,7 @@ var ClaimCreateForm = ({
|
|
|
1338
1403
|
const { mutateAsync: updateInboundItem, isPending: isUpdatingInboundItem } = useUpdateClaimInboundItem(claim.id, order.id);
|
|
1339
1404
|
const { mutateAsync: removeInboundItem, isPending: isRemovingInboundItem } = useRemoveClaimInboundItem(claim.id, order.id);
|
|
1340
1405
|
const isRequestLoading = isConfirming || isCanceling || isAddingInboundShipping || isUpdatingInboundShipping || isDeletingInboundShipping || isUpdatingOutboundShipping || isAddingInboundItem || isRemovingInboundItem || isUpdatingInboundItem || isUpdating;
|
|
1341
|
-
const previewItems =
|
|
1406
|
+
const previewItems = useMemo6(
|
|
1342
1407
|
() => preview?.items?.filter(
|
|
1343
1408
|
(i) => !!i.actions?.find((a) => a.claim_id === claim.id)
|
|
1344
1409
|
),
|
|
@@ -1350,7 +1415,7 @@ var ClaimCreateForm = ({
|
|
|
1350
1415
|
const outboundPreviewItems = previewItems.filter(
|
|
1351
1416
|
(item) => !!item.actions?.find((a) => a.action === "ITEM_ADD")
|
|
1352
1417
|
);
|
|
1353
|
-
const itemsMap =
|
|
1418
|
+
const itemsMap = useMemo6(
|
|
1354
1419
|
() => new Map(order?.items?.map((i) => [i.id, i])),
|
|
1355
1420
|
[order.items]
|
|
1356
1421
|
);
|
|
@@ -1393,12 +1458,17 @@ var ClaimCreateForm = ({
|
|
|
1393
1458
|
resolver: zodResolver(ClaimCreateSchema)
|
|
1394
1459
|
});
|
|
1395
1460
|
const locationId = form.watch("location_id");
|
|
1396
|
-
const
|
|
1461
|
+
const sellerId = order.seller?.id;
|
|
1462
|
+
const { stock_locations = [] } = useStockLocations({
|
|
1463
|
+
limit: 999,
|
|
1464
|
+
...sellerId ? { seller_id: sellerId } : {}
|
|
1465
|
+
});
|
|
1397
1466
|
const { shipping_options = [] } = useShippingOptions(
|
|
1398
1467
|
{
|
|
1399
1468
|
limit: 999,
|
|
1400
1469
|
fields: "*prices,+service_zone.fulfillment_set.location.id",
|
|
1401
|
-
stock_location_id: locationId
|
|
1470
|
+
stock_location_id: locationId,
|
|
1471
|
+
...sellerId ? { seller_id: sellerId } : {}
|
|
1402
1472
|
},
|
|
1403
1473
|
{
|
|
1404
1474
|
enabled: !!locationId
|
|
@@ -1448,7 +1518,7 @@ var ClaimCreateForm = ({
|
|
|
1448
1518
|
name: "inbound_items",
|
|
1449
1519
|
control: form.control
|
|
1450
1520
|
});
|
|
1451
|
-
const previewItemsMap =
|
|
1521
|
+
const previewItemsMap = useMemo6(
|
|
1452
1522
|
() => new Map(previewItems.map((i) => [i.id, i])),
|
|
1453
1523
|
[previewItems]
|
|
1454
1524
|
);
|
|
@@ -1607,49 +1677,6 @@ var ClaimCreateForm = ({
|
|
|
1607
1677
|
document.getElementById("js-shipping-outbound-input")?.focus();
|
|
1608
1678
|
}
|
|
1609
1679
|
}, [isShippingOutboundPriceEdit]);
|
|
1610
|
-
const showLevelsWarning = useMemo5(() => {
|
|
1611
|
-
if (!locationId) {
|
|
1612
|
-
return false;
|
|
1613
|
-
}
|
|
1614
|
-
const allItemsHaveLocation = inboundItems.map((_i) => {
|
|
1615
|
-
const item = itemsMap.get(_i.item_id);
|
|
1616
|
-
if (!item?.variant_id || !item?.variant) {
|
|
1617
|
-
return true;
|
|
1618
|
-
}
|
|
1619
|
-
if (!item.variant?.manage_inventory) {
|
|
1620
|
-
return true;
|
|
1621
|
-
}
|
|
1622
|
-
return inventoryMap[item.variant_id]?.find(
|
|
1623
|
-
(l) => l.location_id === locationId
|
|
1624
|
-
);
|
|
1625
|
-
}).every(Boolean);
|
|
1626
|
-
return !allItemsHaveLocation;
|
|
1627
|
-
}, [
|
|
1628
|
-
inboundItems,
|
|
1629
|
-
inventoryMap,
|
|
1630
|
-
locationId,
|
|
1631
|
-
itemsMap
|
|
1632
|
-
]);
|
|
1633
|
-
useEffect2(() => {
|
|
1634
|
-
const getInventoryMap = async () => {
|
|
1635
|
-
const ret = {};
|
|
1636
|
-
if (!inboundItems.length) {
|
|
1637
|
-
return ret;
|
|
1638
|
-
}
|
|
1639
|
-
const variantIds = inboundItems.map((item) => item?.variant_id).filter(Boolean);
|
|
1640
|
-
const variants = (await sdk.admin.productVariants.query({
|
|
1641
|
-
id: variantIds,
|
|
1642
|
-
fields: "*inventory.location_levels"
|
|
1643
|
-
})).variants;
|
|
1644
|
-
variants.forEach((variant) => {
|
|
1645
|
-
ret[variant.id] = variant.inventory?.[0]?.location_levels || [];
|
|
1646
|
-
});
|
|
1647
|
-
return ret;
|
|
1648
|
-
};
|
|
1649
|
-
getInventoryMap().then((map) => {
|
|
1650
|
-
setInventoryMap(map);
|
|
1651
|
-
});
|
|
1652
|
-
}, [inboundItems]);
|
|
1653
1680
|
useEffect2(() => {
|
|
1654
1681
|
return () => {
|
|
1655
1682
|
if (IS_CANCELING) {
|
|
@@ -1665,32 +1692,32 @@ var ClaimCreateForm = ({
|
|
|
1665
1692
|
}
|
|
1666
1693
|
};
|
|
1667
1694
|
}, [t, cancelClaimRequest]);
|
|
1668
|
-
const inboundShippingTotal =
|
|
1695
|
+
const inboundShippingTotal = useMemo6(() => {
|
|
1669
1696
|
const method = preview.shipping_methods.find(
|
|
1670
1697
|
(sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
|
|
1671
1698
|
);
|
|
1672
1699
|
return method?.total || 0;
|
|
1673
1700
|
}, [preview.shipping_methods]);
|
|
1674
|
-
const outboundShippingTotal =
|
|
1701
|
+
const outboundShippingTotal = useMemo6(() => {
|
|
1675
1702
|
const method = preview.shipping_methods.find(
|
|
1676
1703
|
(sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !a.return_id)
|
|
1677
1704
|
);
|
|
1678
1705
|
return method?.total || 0;
|
|
1679
1706
|
}, [preview.shipping_methods]);
|
|
1680
|
-
return /* @__PURE__ */ jsx8(RouteFocusModal.Form, { form, "data-testid": "order-create-claim-form", children: /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ jsx8(RouteFocusModal.Form, { form, "data-testid": "order-create-claim-form", children: /* @__PURE__ */ jsxs5(KeyboundForm, { onSubmit: handleSubmit, className: "flex h-full flex-col", children: [
|
|
1681
1708
|
/* @__PURE__ */ jsx8(RouteFocusModal.Header, { "data-testid": "order-create-claim-header" }),
|
|
1682
1709
|
/* @__PURE__ */ jsx8(
|
|
1683
1710
|
RouteFocusModal.Body,
|
|
1684
1711
|
{
|
|
1685
1712
|
className: "flex size-full justify-center overflow-y-auto",
|
|
1686
1713
|
"data-testid": "order-create-claim-body",
|
|
1687
|
-
children: /* @__PURE__ */
|
|
1714
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "mt-16 w-[720px] max-w-[100%] px-4 md:p-0", children: [
|
|
1688
1715
|
/* @__PURE__ */ jsx8(Heading2, { level: "h1", "data-testid": "order-create-claim-heading", children: t("orders.claims.create") }),
|
|
1689
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ jsxs5("div", { className: "mt-8 flex items-center justify-between", children: [
|
|
1690
1717
|
/* @__PURE__ */ jsx8(Heading2, { level: "h2", children: t("orders.returns.inbound") }),
|
|
1691
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ jsxs5(StackedFocusModal, { id: "inbound-items", children: [
|
|
1692
1719
|
/* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
|
|
1693
|
-
/* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ jsxs5(StackedFocusModal.Content, { children: [
|
|
1694
1721
|
/* @__PURE__ */ jsx8(StackedFocusModal.Header, {}),
|
|
1695
1722
|
/* @__PURE__ */ jsx8(
|
|
1696
1723
|
AddClaimItemsTable,
|
|
@@ -1711,7 +1738,7 @@ var ClaimCreateForm = ({
|
|
|
1711
1738
|
}
|
|
1712
1739
|
}
|
|
1713
1740
|
),
|
|
1714
|
-
/* @__PURE__ */ jsx8(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */
|
|
1741
|
+
/* @__PURE__ */ jsx8(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
1715
1742
|
/* @__PURE__ */ jsx8(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx8(
|
|
1716
1743
|
Button2,
|
|
1717
1744
|
{
|
|
@@ -1747,6 +1774,8 @@ var ClaimCreateForm = ({
|
|
|
1747
1774
|
previewItem: previewItemsMap.get(item.item_id),
|
|
1748
1775
|
currencyCode: order.currency_code,
|
|
1749
1776
|
form,
|
|
1777
|
+
locationId,
|
|
1778
|
+
locationName: stock_locations.find((l) => l.id === locationId)?.name,
|
|
1750
1779
|
onRemove: () => {
|
|
1751
1780
|
const actionId = previewItems.find((i) => i.id === item.item_id)?.actions?.find((a) => a.action === "RETURN_ITEM")?.id;
|
|
1752
1781
|
if (actionId) {
|
|
@@ -1781,9 +1810,9 @@ var ClaimCreateForm = ({
|
|
|
1781
1810
|
item.id
|
|
1782
1811
|
)
|
|
1783
1812
|
),
|
|
1784
|
-
!showInboundItemsPlaceholder && /* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1813
|
+
!showInboundItemsPlaceholder && /* @__PURE__ */ jsxs5("div", { className: "mt-8 flex flex-col gap-y-4", children: [
|
|
1814
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
|
|
1815
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
1787
1816
|
/* @__PURE__ */ jsx8(Form.Label, { children: t("orders.returns.location") }),
|
|
1788
1817
|
/* @__PURE__ */ jsx8(Form.Hint, { className: "!mt-1", children: t("orders.returns.locationHint") })
|
|
1789
1818
|
] }),
|
|
@@ -1814,11 +1843,11 @@ var ClaimCreateForm = ({
|
|
|
1814
1843
|
}
|
|
1815
1844
|
)
|
|
1816
1845
|
] }),
|
|
1817
|
-
/* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */
|
|
1819
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
|
|
1847
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
1848
|
+
/* @__PURE__ */ jsxs5(Form.Label, { children: [
|
|
1820
1849
|
t("orders.returns.inboundShipping"),
|
|
1821
|
-
/* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ jsxs5(
|
|
1822
1851
|
Text4,
|
|
1823
1852
|
{
|
|
1824
1853
|
size: "small",
|
|
@@ -1863,10 +1892,6 @@ var ClaimCreateForm = ({
|
|
|
1863
1892
|
)
|
|
1864
1893
|
] })
|
|
1865
1894
|
] }),
|
|
1866
|
-
showLevelsWarning && /* @__PURE__ */ jsxs4(Alert2, { variant: "warning", dismissible: true, className: "mt-4 p-5", children: [
|
|
1867
|
-
/* @__PURE__ */ jsx8("div", { className: "text-ui-fg-subtle txt-small pb-2 font-medium leading-[20px]", children: t("orders.returns.noInventoryLevel") }),
|
|
1868
|
-
/* @__PURE__ */ jsx8(Text4, { className: "text-ui-fg-subtle txt-small leading-normal", children: t("orders.returns.noInventoryLevelDesc") })
|
|
1869
|
-
] }),
|
|
1870
1895
|
/* @__PURE__ */ jsx8(
|
|
1871
1896
|
ClaimOutboundSection,
|
|
1872
1897
|
{
|
|
@@ -1876,13 +1901,13 @@ var ClaimCreateForm = ({
|
|
|
1876
1901
|
claim
|
|
1877
1902
|
}
|
|
1878
1903
|
),
|
|
1879
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ jsxs5(
|
|
1880
1905
|
"div",
|
|
1881
1906
|
{
|
|
1882
1907
|
className: "mt-8 border-y border-dotted py-4",
|
|
1883
1908
|
"data-testid": "order-create-claim-totals",
|
|
1884
1909
|
children: [
|
|
1885
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ jsxs5(
|
|
1886
1911
|
"div",
|
|
1887
1912
|
{
|
|
1888
1913
|
className: "mb-2 flex items-center justify-between",
|
|
@@ -1902,7 +1927,7 @@ var ClaimCreateForm = ({
|
|
|
1902
1927
|
]
|
|
1903
1928
|
}
|
|
1904
1929
|
),
|
|
1905
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ jsxs5(
|
|
1906
1931
|
"div",
|
|
1907
1932
|
{
|
|
1908
1933
|
className: "mb-2 flex items-center justify-between",
|
|
@@ -1922,9 +1947,9 @@ var ClaimCreateForm = ({
|
|
|
1922
1947
|
]
|
|
1923
1948
|
}
|
|
1924
1949
|
),
|
|
1925
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
1926
1951
|
/* @__PURE__ */ jsx8("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.returns.inboundShipping") }),
|
|
1927
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ jsxs5("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
|
|
1928
1953
|
!isShippingInboundPriceEdit && /* @__PURE__ */ jsx8(
|
|
1929
1954
|
IconButton2,
|
|
1930
1955
|
{
|
|
@@ -1980,9 +2005,9 @@ var ClaimCreateForm = ({
|
|
|
1980
2005
|
) : getStylizedAmount(inboundShippingTotal, order.currency_code)
|
|
1981
2006
|
] })
|
|
1982
2007
|
] }),
|
|
1983
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between", children: [
|
|
1984
2009
|
/* @__PURE__ */ jsx8("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.claims.outboundShipping") }),
|
|
1985
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsxs5("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
|
|
1986
2011
|
!isShippingOutboundPriceEdit && /* @__PURE__ */ jsx8(
|
|
1987
2012
|
IconButton2,
|
|
1988
2013
|
{
|
|
@@ -2041,7 +2066,7 @@ var ClaimCreateForm = ({
|
|
|
2041
2066
|
)
|
|
2042
2067
|
] })
|
|
2043
2068
|
] }),
|
|
2044
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ jsxs5(
|
|
2045
2070
|
"div",
|
|
2046
2071
|
{
|
|
2047
2072
|
className: "mt-4 flex items-center justify-between border-t border-dotted pt-4",
|
|
@@ -2069,8 +2094,8 @@ var ClaimCreateForm = ({
|
|
|
2069
2094
|
control: form.control,
|
|
2070
2095
|
name: "send_notification",
|
|
2071
2096
|
render: ({ field: { onChange, value, ...field } }) => {
|
|
2072
|
-
return /* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ jsxs5(Form.Item, { "data-testid": "order-create-claim-notification-item", children: [
|
|
2098
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center", children: [
|
|
2074
2099
|
/* @__PURE__ */ jsx8(
|
|
2075
2100
|
Form.Control,
|
|
2076
2101
|
{
|
|
@@ -2089,7 +2114,7 @@ var ClaimCreateForm = ({
|
|
|
2089
2114
|
)
|
|
2090
2115
|
}
|
|
2091
2116
|
),
|
|
2092
|
-
/* @__PURE__ */
|
|
2117
|
+
/* @__PURE__ */ jsxs5("div", { className: "block", children: [
|
|
2093
2118
|
/* @__PURE__ */ jsx8(Form.Label, { "data-testid": "order-create-claim-notification-label", children: t("orders.returns.sendNotification") }),
|
|
2094
2119
|
/* @__PURE__ */ jsx8(
|
|
2095
2120
|
Form.Hint,
|
|
@@ -2112,7 +2137,7 @@ var ClaimCreateForm = ({
|
|
|
2112
2137
|
] })
|
|
2113
2138
|
}
|
|
2114
2139
|
),
|
|
2115
|
-
/* @__PURE__ */ jsx8(RouteFocusModal.Footer, { "data-testid": "order-create-claim-footer", children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ jsx8(RouteFocusModal.Footer, { "data-testid": "order-create-claim-footer", children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
2116
2141
|
/* @__PURE__ */ jsx8(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx8(
|
|
2117
2142
|
Button2,
|
|
2118
2143
|
{
|
|
@@ -2151,7 +2176,7 @@ var ClaimCreate = () => {
|
|
|
2151
2176
|
fields: DEFAULT_FIELDS
|
|
2152
2177
|
});
|
|
2153
2178
|
const { order: preview } = useOrderPreview(id);
|
|
2154
|
-
const [activeClaimId, setActiveClaimId] =
|
|
2179
|
+
const [activeClaimId, setActiveClaimId] = useState4();
|
|
2155
2180
|
const { mutateAsync: createClaim } = useCreateClaim(order.id);
|
|
2156
2181
|
const { claim } = useClaim(activeClaimId, void 0, {
|
|
2157
2182
|
enabled: !!activeClaimId
|