@mercurjs/admin 2.0.2 → 2.1.0-canary.5
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-TA7QC32P.js → add-campaign-promotions-LE2WUOTX.js} +6 -6
- package/dist/{adjust-inventory-W4H5F2JA.js → adjust-inventory-TCBV3PCL.js} +33 -32
- package/dist/{api-key-management-create-FPBZMDBI.js → api-key-management-create-THDCXGWK.js} +5 -5
- package/dist/{api-key-management-detail-LMKKDTRJ.js → api-key-management-detail-LH3I7OZB.js} +34 -33
- package/dist/{api-key-management-edit-5EM4NJIM.js → api-key-management-edit-LTVNXP6T.js} +5 -5
- package/dist/{api-key-management-list-MRKJVQMI.js → api-key-management-list-4MCSXO5L.js} +5 -5
- package/dist/{api-key-management-sales-channels-AETOWQYM.js → api-key-management-sales-channels-SCIDNYW5.js} +5 -5
- package/dist/{attribute-create-IRJTPQCF.js → attribute-create-CJBFOEGI.js} +33 -32
- package/dist/{attribute-create-possible-value-RG4VA2DG.js → attribute-create-possible-value-BIU2L7AN.js} +3 -3
- package/dist/{attribute-detail-7FLCTP3I.js → attribute-detail-2RDAGHQB.js} +32 -31
- package/dist/{attribute-edit-6YNHG3QV.js → attribute-edit-TDMQJYAP.js} +36 -35
- package/dist/{attribute-edit-possible-value-IBJA53MJ.js → attribute-edit-possible-value-G2ON2AE3.js} +6 -6
- package/dist/{attribute-edit-ranking-BLMESGR5.js → attribute-edit-ranking-CEBR5LJ7.js} +3 -3
- package/dist/attribute-list-MK2EUELY.js +64 -0
- package/dist/{campaign-budget-edit-PL7DTWCM.js → campaign-budget-edit-WKSYXTBX.js} +3 -3
- package/dist/{campaign-configuration-D6ROERRH.js → campaign-configuration-ZTK46EB5.js} +3 -3
- package/dist/{campaign-create-LABYKFMI.js → campaign-create-QFNB5XZ2.js} +7 -7
- package/dist/{campaign-detail-E37P67AC.js → campaign-detail-GVJ3PO4I.js} +36 -35
- package/dist/{campaign-edit-PMJMUUDW.js → campaign-edit-ZGLDY4X4.js} +3 -3
- package/dist/{campaign-list-B42U6XNF.js → campaign-list-TXTMGE6H.js} +3 -3
- package/dist/{categories-metadata-34L5C2TK.js → categories-metadata-M3GDS27H.js} +34 -33
- package/dist/{category-create-AMHFSXJI.js → category-create-5WS4XGYI.js} +6 -6
- package/dist/{category-detail-B23F726Q.js → category-detail-TTJ6XGLM.js} +35 -34
- package/dist/{category-edit-VZL6ROLF.js → category-edit-GOB4ASBP.js} +4 -4
- package/dist/{category-list-R66T472I.js → category-list-DVDOBE7O.js} +5 -5
- package/dist/{category-organize-CLCNXQSJ.js → category-organize-NCH6A57L.js} +4 -4
- package/dist/{category-products-2LKOHEWO.js → category-products-NRPWJHDW.js} +34 -33
- package/dist/{chunk-DKA6GR53.js → chunk-2ASJQTGT.js} +1 -1
- package/dist/{chunk-YVCBMOJG.js → chunk-2EME4AWX.js} +1 -1
- package/dist/{chunk-T7MQFDTF.js → chunk-2FGRDEAD.js} +1 -1
- package/dist/{chunk-M3YP3NX4.js → chunk-2FLBJM53.js} +58 -33
- package/dist/{chunk-AG4ORND4.js → chunk-2KWNTJGL.js} +2 -2
- package/dist/{chunk-ZDZYRCVH.js → chunk-33BERJSG.js} +1 -1
- package/dist/{chunk-VXPWOEUS.js → chunk-34I4QIBD.js} +1 -1
- package/dist/{chunk-ZCLF2O6X.js → chunk-36NDTZIV.js} +1 -1
- package/dist/{chunk-IAT6UDKU.js → chunk-3BBG3LC3.js} +1 -1
- package/dist/{chunk-TCA3ZYNO.js → chunk-3CU7XPUR.js} +2 -2
- package/dist/{chunk-EI6JBJYB.js → chunk-3IN6MMKV.js} +3 -3
- package/dist/{chunk-XIHVSZ6I.js → chunk-3UZVMGC6.js} +1 -1
- package/dist/{chunk-5PUHROK4.js → chunk-46M463BR.js} +1 -1
- package/dist/{chunk-KA3VYXNA.js → chunk-4LXBQTFN.js} +1 -1
- package/dist/{chunk-BA2HXHTW.js → chunk-5CK6XEFV.js} +1 -1
- package/dist/{chunk-O4STPJR2.js → chunk-5TRY5IMZ.js} +2 -2
- package/dist/{chunk-EVGVH6CU.js → chunk-5XENZ4RY.js} +12 -12
- package/dist/{chunk-5VMJCLUP.js → chunk-6MJ5HPIP.js} +4 -4
- package/dist/{chunk-J555HFHV.js → chunk-6SND23WS.js} +2 -2
- package/dist/{chunk-U3OWJE7V.js → chunk-72Q2T2FK.js} +126 -45
- package/dist/{chunk-J24SOKSP.js → chunk-73JXHNUH.js} +3 -3
- package/dist/{chunk-XMVTX2EN.js → chunk-7O5NDICV.js} +1 -1
- package/dist/{chunk-SDPR7PGR.js → chunk-7URRKQIX.js} +1 -1
- package/dist/{chunk-4G5FEKRO.js → chunk-A3HOLGBF.js} +1 -1
- package/dist/{chunk-CBHNHLUZ.js → chunk-AEMDNTW5.js} +2 -2
- package/dist/{chunk-JSBQOQXC.js → chunk-AGB4RMSE.js} +1 -1
- package/dist/{chunk-SDQ6V2QY.js → chunk-ANHC5MBQ.js} +3 -3
- package/dist/{chunk-ZMDE5HEV.js → chunk-AQANSGTS.js} +107 -49
- package/dist/{chunk-UBTAADSY.js → chunk-ARMMSJ7L.js} +4 -4
- package/dist/{chunk-MMTCBVUV.js → chunk-AVUWXDRQ.js} +3 -3
- package/dist/{chunk-CGVHXNWH.js → chunk-AVW3A7X5.js} +2 -2
- package/dist/{chunk-22XJUSMM.js → chunk-B6FG7A6W.js} +2 -2
- package/dist/{chunk-G4LGZF5F.js → chunk-BH5LSB6O.js} +4 -4
- package/dist/{chunk-TBREETGZ.js → chunk-BJFFCELF.js} +4 -4
- package/dist/{chunk-MCEEC3VH.js → chunk-BOGOBZVM.js} +3 -3
- package/dist/{chunk-6NVEUQSL.js → chunk-C4JUURO5.js} +1 -1
- package/dist/{chunk-6D5BKKSQ.js → chunk-CDS2B2P6.js} +1 -1
- package/dist/{chunk-4QX7QEWY.js → chunk-CMLDMKSO.js} +11 -11
- package/dist/{chunk-R2KXIBCX.js → chunk-CQ7HSDCL.js} +1 -1
- package/dist/{chunk-FNBKEF54.js → chunk-DAXXLQKB.js} +1 -1
- package/dist/{chunk-K4BGK3CO.js → chunk-DBNPVU3L.js} +3 -3
- package/dist/{chunk-KERA6OZN.js → chunk-DGSPRILL.js} +1 -1
- package/dist/{chunk-NRKVFULI.js → chunk-DKIXS7MS.js} +567 -244
- package/dist/{chunk-N4JU7GWK.js → chunk-DL2ZIXBO.js} +2 -2
- package/dist/{chunk-SZVIRQZ2.js → chunk-DMWRKJV5.js} +4 -4
- package/dist/{chunk-DOZ3NXES.js → chunk-DSIZONVE.js} +1 -1
- package/dist/{chunk-FMGXDDBU.js → chunk-EA5ADIDK.js} +2 -2
- package/dist/{chunk-HVLPRHZS.js → chunk-EKMBY4QP.js} +2 -2
- package/dist/{chunk-PLDGQ5PO.js → chunk-ENFPDBSU.js} +3 -3
- package/dist/{chunk-OFKUNYQJ.js → chunk-EPHVGD5Z.js} +1 -1
- package/dist/{chunk-W5UPPL3W.js → chunk-ESPLVOFC.js} +2 -2
- package/dist/{chunk-3FNX54TD.js → chunk-FNJNVUXR.js} +2 -2
- package/dist/{chunk-NNI6QKKZ.js → chunk-FQFW3DUZ.js} +13 -1
- package/dist/{chunk-OV7R2AH5.js → chunk-FWJLS7XD.js} +60 -58
- package/dist/{chunk-LC6TM5OT.js → chunk-FXWKGNRV.js} +2 -2
- package/dist/{chunk-QG3EYUDB.js → chunk-GAD5DQOY.js} +3 -3
- package/dist/{chunk-QIZUNM6F.js → chunk-GBRUBIGE.js} +4 -4
- package/dist/{chunk-XKVXLDSJ.js → chunk-GKGLVDDV.js} +1 -1
- package/dist/{chunk-YTPCWCA3.js → chunk-GU4T2RAQ.js} +1 -1
- package/dist/{chunk-6TFS6ET5.js → chunk-I5THQVYP.js} +1 -1
- package/dist/{chunk-KMK4YAS2.js → chunk-IDBCFDIT.js} +1 -1
- package/dist/{chunk-OW6XTJ33.js → chunk-IF36RZZS.js} +3 -3
- package/dist/{chunk-5XWE6QZ3.js → chunk-IXWGJ4W7.js} +3 -3
- package/dist/{chunk-LW57KBYK.js → chunk-J73MGZ2C.js} +2 -2
- package/dist/{chunk-ZLBTDKSI.js → chunk-JCSPXBS3.js} +1 -1
- package/dist/{chunk-XRDP2SYY.js → chunk-JPNPTILP.js} +1 -1
- package/dist/{chunk-5WTGRSBC.js → chunk-JSLUA5Y4.js} +1 -1
- package/dist/{chunk-BE5QWX5N.js → chunk-KOURHC2N.js} +0 -4
- package/dist/{chunk-RVAVU222.js → chunk-KZE2BXFZ.js} +8 -8
- package/dist/{chunk-HHEQZTPC.js → chunk-L6LJB5HH.js} +2 -2
- package/dist/{chunk-UBS6VEGB.js → chunk-LAN52TLS.js} +1 -1
- package/dist/{chunk-XDZGOUCR.js → chunk-LAPEZATU.js} +1 -1
- package/dist/{chunk-DTUPDNN3.js → chunk-LNT72PI5.js} +4 -4
- package/dist/{chunk-N7QGYSFB.js → chunk-LRCMPXIA.js} +4 -4
- package/dist/{chunk-HAZURA7S.js → chunk-LVEROZU4.js} +2 -2
- package/dist/{chunk-VME3CJER.js → chunk-LYD3C73Z.js} +1 -1
- package/dist/{chunk-CA4XLTI7.js → chunk-N2Y3OWEV.js} +2 -2
- package/dist/{chunk-CMX37MSO.js → chunk-N46VH2AV.js} +5 -5
- package/dist/{chunk-DF3OGJAK.js → chunk-N6SI4IIT.js} +1 -1
- package/dist/{chunk-ZJNRM77Y.js → chunk-O6X4QXB5.js} +4 -4
- package/dist/{chunk-MFL2TZ3W.js → chunk-OH4AABUT.js} +1 -1
- package/dist/{chunk-EHQESDH2.js → chunk-OHOWEMHO.js} +1 -1
- package/dist/{chunk-BMC2HG53.js → chunk-OQMBWJPH.js} +2 -2
- package/dist/{chunk-PBMB2LY5.js → chunk-P5VTTPU2.js} +2 -2
- package/dist/{chunk-3MDRW5MA.js → chunk-PBQ5M44A.js} +2 -2
- package/dist/{chunk-UU2RQMXS.js → chunk-PRBE5CM3.js} +1 -1
- package/dist/{chunk-AVXOG7CE.js → chunk-PXZQSL5A.js} +3 -3
- package/dist/{chunk-WDASBBB5.js → chunk-Q4WP4LIW.js} +1 -1
- package/dist/{chunk-ZFEGVWHT.js → chunk-QFOEY6RN.js} +51 -31
- package/dist/{chunk-NDPTTHBH.js → chunk-QGXOLAXL.js} +2 -2
- package/dist/{chunk-4ESVWDQK.js → chunk-QJLICXCV.js} +2 -2
- package/dist/{chunk-5VBNFLG2.js → chunk-QP3ID4X3.js} +1 -1
- package/dist/{chunk-UI2BJVP5.js → chunk-R2FE3PBQ.js} +1 -1
- package/dist/{chunk-BUI5NC7I.js → chunk-RFYOW244.js} +1 -1
- package/dist/{chunk-GYKVLGU4.js → chunk-RXBYBQDN.js} +2 -2
- package/dist/{chunk-EG2Y5Z2K.js → chunk-SIM42VD3.js} +3 -3
- package/dist/{chunk-G5WS77NL.js → chunk-SMPTZ2RM.js} +4 -4
- package/dist/{chunk-NYWECWZJ.js → chunk-SNH3O6QM.js} +5 -5
- package/dist/{chunk-WSR2ZXAJ.js → chunk-SUQJGDPA.js} +4 -4
- package/dist/{chunk-RRAIAUBR.js → chunk-T3E6EVLQ.js} +8 -8
- package/dist/{chunk-7IPA3CRG.js → chunk-T62OEGJG.js} +4 -4
- package/dist/{chunk-R74OHYTB.js → chunk-TAKEQAZZ.js} +3 -3
- package/dist/{chunk-F7VTQIU7.js → chunk-TBRKUYQX.js} +7 -7
- package/dist/{chunk-WHLVH4RN.js → chunk-TFRTL5VZ.js} +2 -2
- package/dist/{chunk-RIC6PMBR.js → chunk-TGK2C73H.js} +8 -8
- package/dist/{chunk-34VX7KOL.js → chunk-TH4GYG3E.js} +4 -4
- package/dist/{chunk-A2TQNJZP.js → chunk-TLAUR5IR.js} +13 -12
- package/dist/{chunk-YYTI5JIC.js → chunk-U7WZYWGA.js} +2 -2
- package/dist/{chunk-6OTK5LAS.js → chunk-UROZLRSZ.js} +4 -4
- package/dist/{chunk-M4VLYKT5.js → chunk-UZ52KLQM.js} +2 -2
- package/dist/{chunk-7SJC6BWZ.js → chunk-VDKOJ5WD.js} +1 -1
- package/dist/{chunk-25YTS3TI.js → chunk-VIGX66F7.js} +2 -2
- package/dist/{chunk-SKV7U4GW.js → chunk-VXPWIJZV.js} +7 -7
- package/dist/{chunk-IJWG755C.js → chunk-VYMODH6P.js} +1 -1
- package/dist/{chunk-FB4JUZFB.js → chunk-VZVB3ZR3.js} +4 -4
- package/dist/chunk-WJJXUXSO.js +23 -0
- package/dist/{chunk-TIMWFAPD.js → chunk-WRRMBJBQ.js} +1 -1
- package/dist/{chunk-UYKWOC5A.js → chunk-X2X7M3B6.js} +1 -1
- package/dist/{chunk-UI2KUK3F.js → chunk-X3S5LZQO.js} +2 -2
- package/dist/{chunk-DYFB2ZZD.js → chunk-YEUUI6JF.js} +1 -1
- package/dist/{chunk-TPPONKYW.js → chunk-YFRC6GEN.js} +3 -3
- package/dist/{chunk-BBANQAF4.js → chunk-YFSTGK5R.js} +2 -2
- package/dist/{chunk-76FXHSMH.js → chunk-YHWY7YA3.js} +2 -2
- package/dist/{chunk-YNIIYGL4.js → chunk-YKDEE7ZL.js} +2 -2
- package/dist/{chunk-NJKJAYV2.js → chunk-YNHS5G26.js} +2 -2
- package/dist/{chunk-QLJKQS6P.js → chunk-YQ6JASMO.js} +6 -6
- package/dist/{chunk-HS322YUO.js → chunk-YSGXL7CX.js} +2 -2
- package/dist/{chunk-52BRBQMY.js → chunk-Z2QQZOG3.js} +2 -2
- package/dist/{chunk-5N6S5K57.js → chunk-Z6DBHMEN.js} +2 -2
- package/dist/{chunk-MRFW7VTW.js → chunk-ZBJ56XDB.js} +2 -2
- package/dist/{chunk-RIN4CBRB.js → chunk-ZBWL72TB.js} +2 -8
- package/dist/{chunk-7STT4ZVP.js → chunk-ZD46XW74.js} +1 -1
- package/dist/{chunk-HAFZQK53.js → chunk-ZN7LWXVC.js} +1 -1
- package/dist/{chunk-PQGIRNRF.js → chunk-ZTAKV4UY.js} +6 -6
- package/dist/{chunk-O7UECTZO.js → chunk-ZW34ZAIP.js} +1 -1
- package/dist/{collection-add-products-RHIQZ37R.js → collection-add-products-V34BC5KZ.js} +34 -33
- package/dist/{collection-create-EBAELCA2.js → collection-create-T3I4AQ6T.js} +4 -4
- package/dist/{collection-detail-SJ4ZZLWY.js → collection-detail-FBF245L5.js} +34 -33
- package/dist/{collection-edit-TGXPOOSX.js → collection-edit-L5GPFBBX.js} +4 -4
- package/dist/{collection-list-OFZGXVJA.js → collection-list-2NU2RHF6.js} +39 -37
- package/dist/{collection-metadata-3CDRKSCP.js → collection-metadata-4CATBMBR.js} +34 -33
- package/dist/{commission-rate-create-OOVFRTYM.js → commission-rate-create-BX5ON475.js} +40 -38
- package/dist/{commission-rate-detail-5XFV6XH2.js → commission-rate-detail-2FIUCRWQ.js} +33 -32
- package/dist/{commission-rate-edit-6B4P2GOV.js → commission-rate-edit-QO54ISLU.js} +40 -38
- package/dist/{commission-rate-list-OLAGFQNJ.js → commission-rate-list-TSEOC244.js} +3 -3
- package/dist/{customer-create-DT6MYVMQ.js → customer-create-QHA4KM6N.js} +3 -3
- package/dist/{customer-create-address-VIG65ALU.js → customer-create-address-TYWVWNUE.js} +3 -3
- package/dist/{customer-detail-Q4K56AZ4.js → customer-detail-X7RDPYCB.js} +34 -33
- package/dist/{customer-edit-MHNLUNUL.js → customer-edit-X4HQOUAE.js} +3 -3
- package/dist/{customer-group-add-customers-SI5TTT4S.js → customer-group-add-customers-Y4AIT37I.js} +4 -4
- package/dist/{customer-group-create-W3FV4OEH.js → customer-group-create-NA2UKCF6.js} +3 -3
- package/dist/{customer-group-detail-NSEFUNCF.js → customer-group-detail-LG45HYN7.js} +34 -33
- package/dist/{customer-group-edit-ZANHQ7RS.js → customer-group-edit-3O6HAYYN.js} +3 -3
- package/dist/customer-group-list-AKB2QL2I.js +59 -0
- package/dist/{customer-group-metadata-LXJK3IMS.js → customer-group-metadata-5EY56USK.js} +34 -33
- package/dist/{customer-list-CHRZJTNK.js → customer-list-MH5N6M5L.js} +4 -4
- package/dist/{customer-metadata-ZZSCYFHY.js → customer-metadata-UI7VJNBB.js} +34 -33
- package/dist/{customers-add-customer-group-TIBDJPYF.js → customers-add-customer-group-WXARGETR.js} +33 -32
- package/dist/{edit-inventory-item-Y3CIG6L5.js → edit-inventory-item-7LUBIEJG.js} +33 -32
- package/dist/{edit-inventory-item-attributes-CZNIVWXY.js → edit-inventory-item-attributes-GPWA3SHB.js} +33 -32
- package/dist/{edit-reservation-OQCAZUIS.js → edit-reservation-T6SKOG2F.js} +5 -5
- package/dist/{edit-rules-G7GRUQL6.js → edit-rules-MOJW3IY6.js} +34 -33
- package/dist/index.js +292 -287
- package/dist/inventory-create-G4PFD6IN.js +58 -0
- package/dist/{inventory-detail-6V43ZQDK.js → inventory-detail-N2YB6A4C.js} +33 -32
- package/dist/{inventory-list-TAJ4T5JG.js → inventory-list-HGWKI5CF.js} +4 -4
- package/dist/{inventory-metadata-PFXMJTSB.js → inventory-metadata-R35MGH5G.js} +34 -33
- package/dist/{inventory-stock-B4FYZAQB.js → inventory-stock-VKNHPP3I.js} +35 -34
- package/dist/{invite-YRARW3RW.js → invite-VQ2HR2OM.js} +3 -3
- package/dist/{location-create-GXPH4WZI.js → location-create-ZMNB7YKR.js} +3 -3
- package/dist/{location-detail-NOUHQA4M.js → location-detail-SHY5JFEP.js} +33 -32
- package/dist/{location-edit-GNKQAXJG.js → location-edit-DMBF3CYZ.js} +3 -3
- package/dist/{location-fulfillment-providers-A27CQMJN.js → location-fulfillment-providers-XJWKGU5I.js} +37 -36
- package/dist/location-list-B4EVW7LE.js +55 -0
- package/dist/{location-sales-channels-U3MVWUAT.js → location-sales-channels-D5SNTEWM.js} +5 -5
- package/dist/{location-service-zone-create-E4LW45D7.js → location-service-zone-create-AC4JW4Y4.js} +6 -6
- package/dist/{location-service-zone-edit-UIVVQVMW.js → location-service-zone-edit-MTGU2O4C.js} +5 -5
- package/dist/{location-service-zone-manage-areas-F3SOZGVW.js → location-service-zone-manage-areas-M52WHSWM.js} +6 -6
- package/dist/location-service-zone-shipping-option-create-VKRDPJY5.js +59 -0
- package/dist/{location-service-zone-shipping-option-edit-3KNW7UBD.js → location-service-zone-shipping-option-edit-PLEDWIY3.js} +5 -5
- package/dist/{location-service-zone-shipping-option-pricing-35SMJ6XP.js → location-service-zone-shipping-option-pricing-MZHMML32.js} +9 -9
- package/dist/{login-QCYKZCZP.js → login-GQ2TKLJX.js} +32 -31
- package/dist/{manage-locations-VIWHIN7B.js → manage-locations-BA7VMY3Q.js} +4 -4
- package/dist/{marketplace-add-currencies-Q4EJAXDN.js → marketplace-add-currencies-C6S4Z3VT.js} +5 -5
- package/dist/{marketplace-detail-CYMZCRWM.js → marketplace-detail-D5AXFDDY.js} +33 -32
- package/dist/{marketplace-edit-AMRUND2Q.js → marketplace-edit-U5B6WA56.js} +4 -4
- package/dist/{marketplace-metadata-LYNL3W6L.js → marketplace-metadata-6E3EUPQR.js} +34 -33
- package/dist/{order-allocate-items-AZ3FDELU.js → order-allocate-items-A365NKBM.js} +6 -6
- package/dist/{order-create-claim-HWZI4OEK.js → order-create-claim-TASIQWLS.js} +36 -35
- package/dist/{order-create-edit-VIIAC2AA.js → order-create-edit-AEWAUNSL.js} +34 -33
- package/dist/{order-create-exchange-KRGBFSCC.js → order-create-exchange-BZULQKWC.js} +36 -35
- package/dist/{order-create-fulfillment-K4LB6U6E.js → order-create-fulfillment-ZQLJDGCV.js} +33 -32
- package/dist/{order-create-refund-2OCPOAJS.js → order-create-refund-MPWH7PYP.js} +33 -32
- package/dist/{order-create-return-4PREWHB7.js → order-create-return-J35OSJJW.js} +9 -9
- package/dist/{order-create-shipment-BD3DKSJX.js → order-create-shipment-UDYZFTKL.js} +33 -32
- package/dist/{order-detail-GETGE7YJ.js → order-detail-43QRHVIH.js} +38 -37
- package/dist/{order-edit-billing-address-3GN3QU4Y.js → order-edit-billing-address-6PKPD4GI.js} +34 -33
- package/dist/{order-edit-email-D6KSNSY4.js → order-edit-email-TRDITOOM.js} +33 -32
- package/dist/{order-edit-shipping-address-Z7RP4UBB.js → order-edit-shipping-address-RU4NGJNM.js} +33 -32
- package/dist/{order-list-727TI7BS.js → order-list-DNYS57KP.js} +9 -8
- package/dist/{order-metadata-UCAS6KEK.js → order-metadata-AJZBUN36.js} +34 -33
- package/dist/{order-receive-return-YZGUVELT.js → order-receive-return-D5ZVVYMY.js} +34 -33
- package/dist/{order-request-transfer-DBXAIXEG.js → order-request-transfer-DAUOVTRI.js} +33 -32
- package/dist/pages/index.d.ts +165 -165
- package/dist/pages/index.js +136 -135
- package/dist/{payout-detail-SQKDY2F6.js → payout-detail-C5WLFRRT.js} +3 -3
- package/dist/{payout-list-HPMP3CJH.js → payout-list-KUFWUKTH.js} +3 -3
- package/dist/{price-list-configuration-XGX6HV4Q.js → price-list-configuration-JNMKFGCK.js} +6 -6
- package/dist/price-list-create-NVCPOU2Y.js +77 -0
- package/dist/{price-list-detail-VA4F6JQJ.js → price-list-detail-ANVE56H3.js} +35 -34
- package/dist/{price-list-edit-OYRI7KZD.js → price-list-edit-BVVLQ5WV.js} +5 -5
- package/dist/{price-list-list-27QDRHNY.js → price-list-list-NFS344UG.js} +6 -6
- package/dist/price-list-prices-add-JSWTZXIB.js +72 -0
- package/dist/{price-list-prices-edit-7WHKIZHY.js → price-list-prices-edit-5OKGMVHM.js} +35 -34
- package/dist/{product-attributes-BM54QUBZ.js → product-attributes-ASPKDH7H.js} +3 -3
- package/dist/product-create-B6OYB6QQ.js +71 -0
- package/dist/{product-create-option-53CW7HXH.js → product-create-option-WDFFZYTE.js} +3 -3
- package/dist/product-create-variant-HVY3YA5T.js +56 -0
- package/dist/{product-detail-Y24FRUWA.js → product-detail-IL6J7IDR.js} +33 -32
- package/dist/{product-edit-AY2UVE3V.js → product-edit-IASCMBET.js} +4 -4
- package/dist/{product-edit-option-ULBJKDOE.js → product-edit-option-UMOGVYLM.js} +3 -3
- package/dist/{product-export-4G44DDXA.js → product-export-FYASMR3R.js} +39 -37
- package/dist/{product-import-TIPIYEJJ.js → product-import-RDTWXZSA.js} +33 -32
- package/dist/{product-list-BLFQWHIA.js → product-list-E26DQCLM.js} +34 -33
- package/dist/{product-media-IKMGI2QA.js → product-media-FAZR34OC.js} +5 -5
- package/dist/{product-metadata-SKNZWKWO.js → product-metadata-RYDY2LBO.js} +34 -33
- package/dist/{product-organization-KHZQIBDK.js → product-organization-63ODFBLM.js} +5 -5
- package/dist/{product-prices-XCC26S77.js → product-prices-RLZBWN6C.js} +7 -7
- package/dist/{product-sales-channels-G22VD3VU.js → product-sales-channels-7HVGLKJQ.js} +4 -4
- package/dist/{product-shipping-profile-OPOM33SD.js → product-shipping-profile-X5CZJCET.js} +3 -3
- package/dist/{product-stock-WIPVYJUH.js → product-stock-NXLCWJ7S.js} +35 -34
- package/dist/{product-tag-create-3QK7MKMI.js → product-tag-create-5JKOHKHR.js} +33 -32
- package/dist/{product-tag-detail-LSMLNJW6.js → product-tag-detail-4P36B7AC.js} +40 -38
- package/dist/{product-tag-edit-NHRQ55DX.js → product-tag-edit-QZOCJSA3.js} +33 -32
- package/dist/{product-tag-list-UHBM6KBT.js → product-tag-list-IOUBMHTR.js} +40 -38
- package/dist/{product-tag-metadata-DGH7UF4L.js → product-tag-metadata-HDTR5225.js} +34 -33
- package/dist/{product-type-create-X6NFMD2J.js → product-type-create-RHG4KEAV.js} +3 -3
- package/dist/{product-type-detail-GNRN4KTB.js → product-type-detail-57S6OUU7.js} +35 -34
- package/dist/{product-type-edit-K5WDDPEY.js → product-type-edit-CABB7R7Y.js} +3 -3
- package/dist/{product-type-list-6CTXFZBZ.js → product-type-list-E2BUVXIT.js} +4 -4
- package/dist/{product-type-metadata-NFMNORIB.js → product-type-metadata-3XHYM7AO.js} +34 -33
- package/dist/{product-variant-detail-TGSUSOEB.js → product-variant-detail-Q6V67DO7.js} +33 -32
- package/dist/{product-variant-edit-6OJRQWC6.js → product-variant-edit-7RJL2DWH.js} +33 -32
- package/dist/{product-variant-manage-inventory-items-RFKTIM5A.js → product-variant-manage-inventory-items-WENX2QCZ.js} +3 -3
- package/dist/{product-variant-metadata-4MWJAXYI.js → product-variant-metadata-QHCUMQCQ.js} +34 -33
- package/dist/{profile-detail-C5BGWHSQ.js → profile-detail-IWSYAO67.js} +3 -3
- package/dist/{profile-edit-RXXHWORE.js → profile-edit-Y5UUUKVH.js} +3 -3
- package/dist/{promotion-add-campaign-TWE6G4R7.js → promotion-add-campaign-GBB6M2OB.js} +7 -7
- package/dist/promotion-create-RISO27OH.js +56 -0
- package/dist/{promotion-detail-KGIX6TA2.js → promotion-detail-BQOADUXZ.js} +35 -34
- package/dist/{promotion-edit-details-J2JWFT2L.js → promotion-edit-details-E2XKWY7L.js} +4 -4
- package/dist/{promotion-list-U7PXQLZT.js → promotion-list-6ILZBIJZ.js} +6 -6
- package/dist/{refund-reason-create-KYM2BCJ2.js → refund-reason-create-RWGVYY7U.js} +33 -32
- package/dist/{refund-reason-edit-JIG7FL7D.js → refund-reason-edit-F3AKUO4F.js} +33 -32
- package/dist/{refund-reason-list-IO4INIKF.js → refund-reason-list-LOEY5OHX.js} +35 -33
- package/dist/{region-add-countries-OBJOMTGC.js → region-add-countries-6HKFPVNE.js} +4 -4
- package/dist/{region-create-NI7QPOS5.js → region-create-BOHJGJCB.js} +5 -5
- package/dist/{region-detail-TR3IRW6L.js → region-detail-VR2RSHCW.js} +4 -4
- package/dist/{region-edit-AGC3N4RU.js → region-edit-QNJ2HT76.js} +5 -5
- package/dist/{region-list-D4VLAQXD.js → region-list-IHOCFATO.js} +4 -4
- package/dist/{region-metadata-NJUXGJJZ.js → region-metadata-S5X464KM.js} +34 -33
- package/dist/{reservation-create-3PQ56FKT.js → reservation-create-26QAWABA.js} +5 -5
- package/dist/{reservation-detail-TKILHE26.js → reservation-detail-CGAEHOZ6.js} +33 -32
- package/dist/{reservation-list-56EFZDRI.js → reservation-list-EKIR6AET.js} +5 -5
- package/dist/{reservation-metadata-V7BLDGSJ.js → reservation-metadata-55FYLG45.js} +34 -33
- package/dist/{reset-password-SXAC55FW.js → reset-password-VQXCSILN.js} +3 -3
- package/dist/{return-reason-create-2HPI654O.js → return-reason-create-KED7446I.js} +3 -3
- package/dist/{return-reason-edit-NJSTWTP3.js → return-reason-edit-57EU3XSE.js} +3 -3
- package/dist/{return-reason-list-RYRELICQ.js → return-reason-list-FHE2DTG6.js} +5 -4
- package/dist/{sales-channel-add-products-27YLUPZP.js → sales-channel-add-products-UNJBYNPM.js} +34 -33
- package/dist/{sales-channel-create-QJTXOKAM.js → sales-channel-create-NSZEHGZE.js} +4 -4
- package/dist/{sales-channel-detail-EW2YN7VL.js → sales-channel-detail-C62VVFTT.js} +34 -33
- package/dist/{sales-channel-edit-CDOQ5WR3.js → sales-channel-edit-W6Z2ERBJ.js} +4 -4
- package/dist/sales-channel-list-L233THQV.js +52 -0
- package/dist/{sales-channel-metadata-YABMFKT3.js → sales-channel-metadata-XL6OAO6S.js} +34 -33
- package/dist/{shipping-option-type-create-KXRPACLG.js → shipping-option-type-create-KSQX5DHV.js} +33 -32
- package/dist/{shipping-option-type-detail-KHX2BRFP.js → shipping-option-type-detail-NQFIUIZU.js} +34 -33
- package/dist/{shipping-option-type-edit-N3L4TPUK.js → shipping-option-type-edit-P5JP6TGA.js} +33 -32
- package/dist/shipping-option-type-list-NMG6FSD7.js +62 -0
- package/dist/{shipping-profile-create-T5WADNL2.js → shipping-profile-create-UJNCCKKK.js} +3 -3
- package/dist/{shipping-profile-detail-3II2GLOC.js → shipping-profile-detail-XKLW22RQ.js} +3 -3
- package/dist/{shipping-profile-metadata-WDM4Y653.js → shipping-profile-metadata-YEKUKBUJ.js} +34 -33
- package/dist/{shipping-profiles-list-DY4G7Z3K.js → shipping-profiles-list-CCMGZXHJ.js} +3 -3
- package/dist/{store-address-edit-7BBZSSIP.js → store-address-edit-YHL23NAM.js} +53 -72
- package/dist/store-bulk-edit-3WUPOXIX.js +194 -0
- package/dist/{store-closure-edit-CN5JR4F5.js → store-closure-edit-LNMWVVWG.js} +3 -3
- package/dist/{store-create-FUYTHJL5.js → store-create-TDHCGON2.js} +68 -75
- package/dist/{store-details-65JQK3M3.js → store-details-6THDNDJB.js} +45 -35
- package/dist/{store-edit-IQAVLFU5.js → store-edit-LJKBFRJG.js} +102 -50
- package/dist/{store-list-DWFAFCKV.js → store-list-UA2GXT7T.js} +39 -38
- package/dist/store-member-invite-K76O2YUD.js +206 -0
- package/dist/{store-payment-details-edit-Z3GLY4TO.js → store-payment-details-edit-VD76VCVF.js} +22 -14
- package/dist/{store-professional-details-edit-7KWQOK46.js → store-professional-details-edit-3QMC5OGO.js} +3 -3
- package/dist/{tax-region-create-6VHCIPP7.js → tax-region-create-NVE7TJVZ.js} +34 -33
- package/dist/tax-region-detail-6W6ZCFKH.js +70 -0
- package/dist/{tax-region-edit-7A6MZBXC.js → tax-region-edit-XIQISIV6.js} +33 -32
- package/dist/{tax-region-list-52PPICIL.js → tax-region-list-BU5TV5MS.js} +6 -6
- package/dist/{tax-region-metadata-UZYHKPTE.js → tax-region-metadata-C2IM452E.js} +34 -33
- package/dist/{tax-region-province-create-PU53RZPV.js → tax-region-province-create-OVLIZPNP.js} +4 -4
- package/dist/{tax-region-province-detail-7ERAOT3Y.js → tax-region-province-detail-EY77MY5Q.js} +35 -34
- package/dist/{tax-region-tax-override-create-TIPPPVTR.js → tax-region-tax-override-create-RJSVKZGY.js} +41 -39
- package/dist/{tax-region-tax-override-edit-HDQ4NS5I.js → tax-region-tax-override-edit-2UZSGMS2.js} +41 -39
- package/dist/{tax-region-tax-rate-create-4MTXOD2Z.js → tax-region-tax-rate-create-KDN6G52Y.js} +5 -5
- package/dist/{tax-region-tax-rate-edit-VUIEX4DT.js → tax-region-tax-rate-edit-D4BFDDJ7.js} +5 -5
- package/dist/{user-detail-C7ZG3JWC.js → user-detail-3KQDH6LZ.js} +4 -4
- package/dist/{user-edit-LSWGYWV3.js → user-edit-MXS2DV37.js} +3 -3
- package/dist/{user-invite-XYAU2UIS.js → user-invite-CTH3YNUV.js} +3 -3
- package/dist/{user-list-YXRP4JU5.js → user-list-2766SCTA.js} +3 -3
- package/dist/{user-metadata-JGCXU4OO.js → user-metadata-4FOEUIG2.js} +34 -33
- package/package.json +5 -5
- package/dist/attribute-list-C5NS26AD.js +0 -63
- package/dist/customer-group-list-GCEKCBUE.js +0 -58
- package/dist/inventory-create-MFCGCJFB.js +0 -57
- package/dist/location-list-AVCPUKBH.js +0 -54
- package/dist/location-service-zone-shipping-option-create-DREWJ7SR.js +0 -58
- package/dist/price-list-create-SJBCYSRX.js +0 -76
- package/dist/price-list-prices-add-BLORGT25.js +0 -71
- package/dist/product-create-KEJB3U44.js +0 -70
- package/dist/product-create-variant-YZODW67L.js +0 -55
- package/dist/promotion-create-CPRWDBDW.js +0 -55
- package/dist/sales-channel-list-JOSLAWUO.js +0 -51
- package/dist/shipping-option-type-list-5A676BZT.js +0 -61
- package/dist/store-member-invite-GAWCXSWL.js +0 -338
- package/dist/tax-region-detail-AZVNX4QN.js +0 -69
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
DateRangeDisplay
|
|
6
|
-
} from "./chunk-RK5N3XIX.js";
|
|
2
|
+
useOrderTableColumns
|
|
3
|
+
} from "./chunk-DBYUB2YI.js";
|
|
7
4
|
import {
|
|
8
5
|
DateCell
|
|
9
6
|
} from "./chunk-25LYVP3C.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
IconAvatar
|
|
15
12
|
} from "./chunk-U2EI2ZLM.js";
|
|
13
|
+
import {
|
|
14
|
+
useProductTableColumns
|
|
15
|
+
} from "./chunk-Z5I2Z6L3.js";
|
|
16
16
|
import {
|
|
17
17
|
TwoColumnPage
|
|
18
18
|
} from "./chunk-V5J73NPW.js";
|
|
@@ -29,22 +29,42 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
ActionMenu
|
|
31
31
|
} from "./chunk-BDGZ4EQO.js";
|
|
32
|
+
import {
|
|
33
|
+
useOrderTableFilters
|
|
34
|
+
} from "./chunk-VIGX66F7.js";
|
|
32
35
|
import {
|
|
33
36
|
useMemberTableQuery
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-FQFW3DUZ.js";
|
|
38
|
+
import {
|
|
39
|
+
require_dist
|
|
40
|
+
} from "./chunk-ZZO3INVE.js";
|
|
41
|
+
import {
|
|
42
|
+
useOrderTableQuery
|
|
43
|
+
} from "./chunk-3B6MTW5G.js";
|
|
44
|
+
import {
|
|
45
|
+
useProductTableFilters
|
|
46
|
+
} from "./chunk-SUQJGDPA.js";
|
|
47
|
+
import {
|
|
48
|
+
useProductTableQuery
|
|
49
|
+
} from "./chunk-VVWB3GIK.js";
|
|
35
50
|
import {
|
|
36
51
|
useSubscriptionPlans
|
|
37
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-PBQ5M44A.js";
|
|
38
53
|
import {
|
|
39
54
|
useApproveSeller,
|
|
55
|
+
useDeleteSellerInvite,
|
|
40
56
|
useRemoveSellerMember,
|
|
57
|
+
useResendSellerInvite,
|
|
41
58
|
useSeller,
|
|
59
|
+
useSellerInvites,
|
|
42
60
|
useSellerMembers,
|
|
61
|
+
useSellerProducts,
|
|
43
62
|
useSuspendSeller,
|
|
44
|
-
useTerminateSeller
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
useTerminateSeller
|
|
64
|
+
} from "./chunk-2FLBJM53.js";
|
|
65
|
+
import {
|
|
66
|
+
useOrders
|
|
67
|
+
} from "./chunk-TAKEQAZZ.js";
|
|
48
68
|
import {
|
|
49
69
|
__toESM
|
|
50
70
|
} from "./chunk-NBMM2TZK.js";
|
|
@@ -52,11 +72,11 @@ import {
|
|
|
52
72
|
// src/pages/stores/store-details/components/store-details.tsx
|
|
53
73
|
import { Children as Children3, useState as useState2 } from "react";
|
|
54
74
|
import { useParams } from "react-router-dom";
|
|
75
|
+
import { useTranslation as useTranslation13 } from "react-i18next";
|
|
55
76
|
var import_types3 = __toESM(require_dist(), 1);
|
|
56
77
|
|
|
57
78
|
// src/pages/stores/store-details/components/store-general-section.tsx
|
|
58
79
|
import { Children as Children2 } from "react";
|
|
59
|
-
import { Photo } from "@medusajs/icons";
|
|
60
80
|
import { Badge, Container, Text } from "@medusajs/ui";
|
|
61
81
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
62
82
|
|
|
@@ -65,11 +85,10 @@ import { Children } from "react";
|
|
|
65
85
|
import {
|
|
66
86
|
CheckCircleSolid,
|
|
67
87
|
PencilSquare,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
ArrowUturnLeft
|
|
88
|
+
Trash,
|
|
89
|
+
XCircleSolid
|
|
71
90
|
} from "@medusajs/icons";
|
|
72
|
-
import { Avatar, Heading, StatusBadge, toast, usePrompt } from "@medusajs/ui";
|
|
91
|
+
import { Avatar, Heading, StatusBadge, Tooltip, toast, usePrompt } from "@medusajs/ui";
|
|
73
92
|
import { useTranslation } from "react-i18next";
|
|
74
93
|
var import_types = __toESM(require_dist(), 1);
|
|
75
94
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -101,6 +120,7 @@ var getStatusLabel = (status, t) => {
|
|
|
101
120
|
}
|
|
102
121
|
};
|
|
103
122
|
var StoreDetailTitle = ({ seller }) => {
|
|
123
|
+
const { t } = useTranslation();
|
|
104
124
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-4", children: [
|
|
105
125
|
/* @__PURE__ */ jsx(
|
|
106
126
|
Avatar,
|
|
@@ -111,7 +131,10 @@ var StoreDetailTitle = ({ seller }) => {
|
|
|
111
131
|
fallback: seller.name.charAt(0).toUpperCase()
|
|
112
132
|
}
|
|
113
133
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
135
|
+
/* @__PURE__ */ jsx(Heading, { children: seller.name }),
|
|
136
|
+
seller.is_premium && /* @__PURE__ */ jsx(Tooltip, { content: t("stores.fields.premium"), children: /* @__PURE__ */ jsx(CheckCircleSolid, { className: "text-ui-tag-blue-icon" }) })
|
|
137
|
+
] })
|
|
115
138
|
] });
|
|
116
139
|
};
|
|
117
140
|
var StoreDetailEditButton = ({ seller }) => {
|
|
@@ -140,10 +163,7 @@ var StoreDetailActions = ({
|
|
|
140
163
|
const { t } = useTranslation();
|
|
141
164
|
const prompt = usePrompt();
|
|
142
165
|
const { mutateAsync: approveSeller } = useApproveSeller(seller.id);
|
|
143
|
-
const { mutateAsync: suspendSeller } = useSuspendSeller(seller.id);
|
|
144
|
-
const { mutateAsync: unsuspendSeller } = useUnsuspendSeller(seller.id);
|
|
145
166
|
const { mutateAsync: terminateSeller } = useTerminateSeller(seller.id);
|
|
146
|
-
const { mutateAsync: unterminateSeller } = useUnterminateSeller(seller.id);
|
|
147
167
|
const handleAction = async (action, label) => {
|
|
148
168
|
const res = await prompt({
|
|
149
169
|
title: label.title,
|
|
@@ -158,6 +178,15 @@ var StoreDetailActions = ({
|
|
|
158
178
|
(error) => toast.error(error.message)
|
|
159
179
|
);
|
|
160
180
|
};
|
|
181
|
+
const deleteAction = {
|
|
182
|
+
label: t("stores.actions.delete.label"),
|
|
183
|
+
onClick: () => handleAction(() => terminateSeller(), {
|
|
184
|
+
title: t("stores.actions.delete.title"),
|
|
185
|
+
description: t("stores.actions.delete.description"),
|
|
186
|
+
success: t("stores.actions.delete.success")
|
|
187
|
+
}),
|
|
188
|
+
icon: /* @__PURE__ */ jsx(Trash, {})
|
|
189
|
+
};
|
|
161
190
|
const statusActions = (() => {
|
|
162
191
|
switch (seller.status) {
|
|
163
192
|
case import_types.SellerStatus.PENDING_APPROVAL:
|
|
@@ -172,60 +201,18 @@ var StoreDetailActions = ({
|
|
|
172
201
|
icon: /* @__PURE__ */ jsx(CheckCircleSolid, {})
|
|
173
202
|
},
|
|
174
203
|
{
|
|
175
|
-
label: t("stores.actions.
|
|
204
|
+
label: t("stores.actions.reject.label"),
|
|
176
205
|
onClick: () => handleAction(() => terminateSeller(), {
|
|
177
|
-
title: t("stores.actions.
|
|
178
|
-
description: t("stores.actions.
|
|
179
|
-
success: t("stores.actions.
|
|
206
|
+
title: t("stores.actions.reject.title"),
|
|
207
|
+
description: t("stores.actions.reject.description"),
|
|
208
|
+
success: t("stores.actions.reject.success")
|
|
180
209
|
}),
|
|
181
210
|
icon: /* @__PURE__ */ jsx(XCircleSolid, {})
|
|
182
211
|
}
|
|
183
212
|
];
|
|
184
213
|
case import_types.SellerStatus.OPEN:
|
|
185
|
-
return [
|
|
186
|
-
{
|
|
187
|
-
label: t("stores.actions.suspend.label"),
|
|
188
|
-
onClick: () => handleAction(() => suspendSeller(), {
|
|
189
|
-
title: t("stores.actions.suspend.title"),
|
|
190
|
-
description: t("stores.actions.suspend.description"),
|
|
191
|
-
success: t("stores.actions.suspend.success")
|
|
192
|
-
}),
|
|
193
|
-
icon: /* @__PURE__ */ jsx(XMarkMini, {})
|
|
194
|
-
}
|
|
195
|
-
];
|
|
196
214
|
case import_types.SellerStatus.SUSPENDED:
|
|
197
|
-
return [
|
|
198
|
-
{
|
|
199
|
-
label: t("stores.actions.unsuspend.label"),
|
|
200
|
-
onClick: () => handleAction(() => unsuspendSeller(), {
|
|
201
|
-
title: t("stores.actions.unsuspend.title"),
|
|
202
|
-
description: t("stores.actions.unsuspend.description"),
|
|
203
|
-
success: t("stores.actions.unsuspend.success")
|
|
204
|
-
}),
|
|
205
|
-
icon: /* @__PURE__ */ jsx(ArrowUturnLeft, {})
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
label: t("stores.actions.terminate.label"),
|
|
209
|
-
onClick: () => handleAction(() => terminateSeller(), {
|
|
210
|
-
title: t("stores.actions.terminate.title"),
|
|
211
|
-
description: t("stores.actions.terminate.description"),
|
|
212
|
-
success: t("stores.actions.terminate.success")
|
|
213
|
-
}),
|
|
214
|
-
icon: /* @__PURE__ */ jsx(XCircleSolid, {})
|
|
215
|
-
}
|
|
216
|
-
];
|
|
217
|
-
case import_types.SellerStatus.TERMINATED:
|
|
218
|
-
return [
|
|
219
|
-
{
|
|
220
|
-
label: t("stores.actions.unterminate.label"),
|
|
221
|
-
onClick: () => handleAction(() => unterminateSeller(), {
|
|
222
|
-
title: t("stores.actions.unterminate.title"),
|
|
223
|
-
description: t("stores.actions.unterminate.description"),
|
|
224
|
-
success: t("stores.actions.unterminate.success")
|
|
225
|
-
}),
|
|
226
|
-
icon: /* @__PURE__ */ jsx(ArrowUturnLeft, {})
|
|
227
|
-
}
|
|
228
|
-
];
|
|
215
|
+
return [deleteAction];
|
|
229
216
|
default:
|
|
230
217
|
return [];
|
|
231
218
|
}
|
|
@@ -278,7 +265,21 @@ var StoreGeneralSection = ({
|
|
|
278
265
|
alt: seller.name,
|
|
279
266
|
className: "h-full w-full object-cover"
|
|
280
267
|
}
|
|
281
|
-
) : /* @__PURE__ */ jsx2("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx2(
|
|
268
|
+
) : /* @__PURE__ */ jsx2("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx2(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
className: "h-full w-full",
|
|
272
|
+
style: {
|
|
273
|
+
background: `repeating-linear-gradient(
|
|
274
|
+
-45deg,
|
|
275
|
+
transparent,
|
|
276
|
+
transparent 10px,
|
|
277
|
+
rgba(255,255,255,0.5) 10px,
|
|
278
|
+
rgba(255,255,255,0.5) 20px
|
|
279
|
+
)`
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
) }) }),
|
|
282
283
|
/* @__PURE__ */ jsx2(StoreDetailHeader, { seller }),
|
|
283
284
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
284
285
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.description") }),
|
|
@@ -292,6 +293,10 @@ var StoreGeneralSection = ({
|
|
|
292
293
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.email") }),
|
|
293
294
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.email || "-" })
|
|
294
295
|
] }),
|
|
296
|
+
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
297
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.phone") }),
|
|
298
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.phone || "-" })
|
|
299
|
+
] }),
|
|
295
300
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
296
301
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.website") }),
|
|
297
302
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.website_url || "-" })
|
|
@@ -300,20 +305,8 @@ var StoreGeneralSection = ({
|
|
|
300
305
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.currency") }),
|
|
301
306
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
302
307
|
/* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: seller.currency_code?.toUpperCase() }),
|
|
303
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: currencies[seller.currency_code
|
|
308
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: currencies[seller.currency_code?.toUpperCase()]?.name || "-" })
|
|
304
309
|
] })
|
|
305
|
-
] }),
|
|
306
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
307
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.premium") }),
|
|
308
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.is_premium ? t("general.yes") : t("general.no") })
|
|
309
|
-
] }),
|
|
310
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
311
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.createdAt") }),
|
|
312
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: new Date(seller.created_at).toLocaleDateString(void 0, {
|
|
313
|
-
year: "numeric",
|
|
314
|
-
month: "long",
|
|
315
|
-
day: "numeric"
|
|
316
|
-
}) })
|
|
317
310
|
] })
|
|
318
311
|
] }) });
|
|
319
312
|
};
|
|
@@ -351,10 +344,10 @@ var StorePaymentDetailsSection = ({
|
|
|
351
344
|
}
|
|
352
345
|
)
|
|
353
346
|
] }),
|
|
354
|
-
/* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx3("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-4", children: [
|
|
347
|
+
details ? /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx3("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-4", children: [
|
|
355
348
|
/* @__PURE__ */ jsx3(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx3(CreditCard, {}) }),
|
|
356
349
|
/* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col", children: [
|
|
357
|
-
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: details
|
|
350
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: details.holder_name || "-" }),
|
|
358
351
|
/* @__PURE__ */ jsx3(
|
|
359
352
|
Text2,
|
|
360
353
|
{
|
|
@@ -365,7 +358,10 @@ var StorePaymentDetailsSection = ({
|
|
|
365
358
|
}
|
|
366
359
|
)
|
|
367
360
|
] })
|
|
368
|
-
] }) }) })
|
|
361
|
+
] }) }) }) : /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
362
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: t("store.paymentDetails.empty.title") }),
|
|
363
|
+
/* @__PURE__ */ jsx3(Text2, { size: "small", className: "text-ui-fg-muted", children: t("store.paymentDetails.empty.message") })
|
|
364
|
+
] })
|
|
369
365
|
] });
|
|
370
366
|
};
|
|
371
367
|
|
|
@@ -379,6 +375,7 @@ var StoreCompanyDetailsSection = ({
|
|
|
379
375
|
}) => {
|
|
380
376
|
const { t } = useTranslation4();
|
|
381
377
|
const details = seller.professional_details;
|
|
378
|
+
const hasDetails = details?.corporate_name || details?.registration_number || details?.tax_id;
|
|
382
379
|
return /* @__PURE__ */ jsxs4(Container3, { className: "p-0", children: [
|
|
383
380
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
384
381
|
/* @__PURE__ */ jsx4(Heading3, { level: "h2", children: t("store.professionalDetails.header") }),
|
|
@@ -399,7 +396,7 @@ var StoreCompanyDetailsSection = ({
|
|
|
399
396
|
}
|
|
400
397
|
)
|
|
401
398
|
] }),
|
|
402
|
-
/* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx4("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-4", children: [
|
|
399
|
+
hasDetails ? /* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx4("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-4", children: [
|
|
403
400
|
/* @__PURE__ */ jsx4(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx4(Buildings, {}) }),
|
|
404
401
|
/* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col", children: [
|
|
405
402
|
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: details?.corporate_name || "-" }),
|
|
@@ -413,53 +410,43 @@ var StoreCompanyDetailsSection = ({
|
|
|
413
410
|
}
|
|
414
411
|
)
|
|
415
412
|
] })
|
|
416
|
-
] }) }) })
|
|
413
|
+
] }) }) }) : /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
414
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("store.professionalDetails.empty.title") }),
|
|
415
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", className: "text-ui-fg-muted", children: t("store.professionalDetails.empty.message") })
|
|
416
|
+
] })
|
|
417
417
|
] });
|
|
418
418
|
};
|
|
419
419
|
|
|
420
420
|
// src/pages/stores/store-details/components/store-configuration-section.tsx
|
|
421
|
-
import {
|
|
422
|
-
import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
|
|
421
|
+
import { Container as Container4, Heading as Heading4, Table, Text as Text4 } from "@medusajs/ui";
|
|
423
422
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
424
423
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
425
424
|
var StoreConfigurationSection = ({
|
|
426
425
|
seller
|
|
427
426
|
}) => {
|
|
428
427
|
const { t } = useTranslation5();
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
{
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
]
|
|
446
|
-
}
|
|
447
|
-
)
|
|
448
|
-
] }),
|
|
449
|
-
/* @__PURE__ */ jsx5(
|
|
450
|
-
DateRangeDisplay,
|
|
451
|
-
{
|
|
452
|
-
startsAt: seller.closed_from,
|
|
453
|
-
endsAt: seller.closed_to,
|
|
454
|
-
showTime: true
|
|
455
|
-
}
|
|
456
|
-
)
|
|
428
|
+
const hasTimeOff = Boolean(seller.closed_from || seller.closed_to);
|
|
429
|
+
return /* @__PURE__ */ jsxs5(Container4, { className: "divide-y p-0", children: [
|
|
430
|
+
/* @__PURE__ */ jsx5("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx5(Heading4, { level: "h2", children: t("store.timeOff.header") }) }),
|
|
431
|
+
hasTimeOff ? /* @__PURE__ */ jsxs5(Table, { children: [
|
|
432
|
+
/* @__PURE__ */ jsx5(Table.Header, { children: /* @__PURE__ */ jsxs5(Table.Row, { children: [
|
|
433
|
+
/* @__PURE__ */ jsx5(Table.HeaderCell, { children: t("fields.startDate") }),
|
|
434
|
+
/* @__PURE__ */ jsx5(Table.HeaderCell, { children: t("fields.endDate") })
|
|
435
|
+
] }) }),
|
|
436
|
+
/* @__PURE__ */ jsx5(Table.Body, { children: /* @__PURE__ */ jsxs5(Table.Row, { children: [
|
|
437
|
+
/* @__PURE__ */ jsx5(Table.Cell, { children: /* @__PURE__ */ jsx5(DateCell, { date: seller.closed_from ?? null }) }),
|
|
438
|
+
/* @__PURE__ */ jsx5(Table.Cell, { children: /* @__PURE__ */ jsx5(DateCell, { date: seller.closed_to ?? null }) })
|
|
439
|
+
] }) })
|
|
440
|
+
] }) : /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
441
|
+
/* @__PURE__ */ jsx5(Text4, { size: "small", leading: "compact", weight: "plus", children: t("store.timeOff.empty.title") }),
|
|
442
|
+
/* @__PURE__ */ jsx5(Text4, { size: "small", className: "text-ui-fg-muted", children: t("store.timeOff.empty.message") })
|
|
443
|
+
] })
|
|
457
444
|
] });
|
|
458
445
|
};
|
|
459
446
|
|
|
460
447
|
// src/pages/stores/store-details/components/store-address-section.tsx
|
|
461
|
-
import { BuildingStorefront, PencilSquare as
|
|
462
|
-
import { Container as Container5, Heading as Heading5, Text as
|
|
448
|
+
import { BuildingStorefront, PencilSquare as PencilSquare4 } from "@medusajs/icons";
|
|
449
|
+
import { Container as Container5, Heading as Heading5, Text as Text5 } from "@medusajs/ui";
|
|
463
450
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
464
451
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
465
452
|
var StoreAddressSection = ({ seller }) => {
|
|
@@ -486,7 +473,7 @@ var StoreAddressSection = ({ seller }) => {
|
|
|
486
473
|
actions: [
|
|
487
474
|
{
|
|
488
475
|
label: t("actions.edit"),
|
|
489
|
-
icon: /* @__PURE__ */ jsx6(
|
|
476
|
+
icon: /* @__PURE__ */ jsx6(PencilSquare4, {}),
|
|
490
477
|
to: `/stores/${seller.id}/edit-address`
|
|
491
478
|
}
|
|
492
479
|
]
|
|
@@ -495,27 +482,30 @@ var StoreAddressSection = ({ seller }) => {
|
|
|
495
482
|
}
|
|
496
483
|
)
|
|
497
484
|
] }),
|
|
498
|
-
/* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx6("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
|
|
485
|
+
formattedAddress ? /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx6("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
|
|
499
486
|
/* @__PURE__ */ jsx6(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx6(BuildingStorefront, {}) }),
|
|
500
487
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 flex-col", children: [
|
|
501
|
-
/* @__PURE__ */ jsx6(
|
|
488
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", leading: "compact", weight: "plus", children: address?.name || t("store.address.defaultName") }),
|
|
502
489
|
/* @__PURE__ */ jsx6(
|
|
503
|
-
|
|
490
|
+
Text5,
|
|
504
491
|
{
|
|
505
492
|
size: "small",
|
|
506
493
|
leading: "compact",
|
|
507
494
|
className: "text-ui-fg-subtle",
|
|
508
|
-
children: formattedAddress
|
|
495
|
+
children: formattedAddress
|
|
509
496
|
}
|
|
510
497
|
)
|
|
511
498
|
] })
|
|
512
|
-
] }) }) })
|
|
499
|
+
] }) }) }) : /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
500
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", leading: "compact", weight: "plus", children: t("store.address.empty.title") }),
|
|
501
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", className: "text-ui-fg-muted", children: t("store.address.empty.message") })
|
|
502
|
+
] })
|
|
513
503
|
] });
|
|
514
504
|
};
|
|
515
505
|
|
|
516
506
|
// src/pages/stores/store-details/components/store-subscription-section.tsx
|
|
517
507
|
import { CurrencyDollar, TriangleRightMini } from "@medusajs/icons";
|
|
518
|
-
import { Container as Container6, Heading as Heading6, Text as
|
|
508
|
+
import { Container as Container6, Heading as Heading6, Text as Text6 } from "@medusajs/ui";
|
|
519
509
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
520
510
|
import { Link } from "react-router-dom";
|
|
521
511
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -548,9 +538,9 @@ var StoreSubscriptionSection = ({
|
|
|
548
538
|
children: /* @__PURE__ */ jsx7("div", { className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-4", children: [
|
|
549
539
|
/* @__PURE__ */ jsx7(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx7(CurrencyDollar, {}) }),
|
|
550
540
|
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col", children: [
|
|
551
|
-
/* @__PURE__ */ jsx7(
|
|
541
|
+
/* @__PURE__ */ jsx7(Text6, { size: "small", leading: "compact", weight: "plus", children: plan.currency_code.toUpperCase() }),
|
|
552
542
|
/* @__PURE__ */ jsxs7(
|
|
553
|
-
|
|
543
|
+
Text6,
|
|
554
544
|
{
|
|
555
545
|
size: "small",
|
|
556
546
|
leading: "compact",
|
|
@@ -577,8 +567,8 @@ import { Link as Link2 } from "react-router-dom";
|
|
|
577
567
|
|
|
578
568
|
// src/pages/stores/store-details/components/store-members-section/store-members-data-table.tsx
|
|
579
569
|
import { useMemo } from "react";
|
|
580
|
-
import { Trash } from "@medusajs/icons";
|
|
581
|
-
import { toast as toast2 } from "@medusajs/ui";
|
|
570
|
+
import { ArrowPath, Link as LinkIcon, Trash as Trash2 } from "@medusajs/icons";
|
|
571
|
+
import { StatusBadge as StatusBadge2, toast as toast2 } from "@medusajs/ui";
|
|
582
572
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
583
573
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
584
574
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
@@ -596,18 +586,45 @@ var StoreMembersDataTable = ({
|
|
|
596
586
|
sellerId
|
|
597
587
|
}) => {
|
|
598
588
|
const { t } = useTranslation8();
|
|
599
|
-
const {
|
|
600
|
-
const {
|
|
601
|
-
|
|
602
|
-
|
|
589
|
+
const { raw } = useMemberTableQuery({ pageSize: PAGE_SIZE });
|
|
590
|
+
const {
|
|
591
|
+
seller_members,
|
|
592
|
+
isPending: isMembersPending,
|
|
593
|
+
isError,
|
|
594
|
+
error
|
|
595
|
+
} = useSellerMembers(
|
|
596
|
+
sellerId,
|
|
597
|
+
{ limit: 100, offset: 0 },
|
|
598
|
+
{ placeholderData: keepPreviousData }
|
|
599
|
+
);
|
|
600
|
+
const { member_invites, isPending: isInvitesPending } = useSellerInvites(sellerId);
|
|
601
|
+
const rows = useMemo(() => {
|
|
602
|
+
const members = (seller_members ?? []).map((m) => ({
|
|
603
|
+
kind: "member",
|
|
604
|
+
id: m.id,
|
|
605
|
+
email: m.member?.email ?? "-",
|
|
606
|
+
role_id: m.role_id,
|
|
607
|
+
created_at: m.created_at ?? null,
|
|
608
|
+
member: m
|
|
609
|
+
}));
|
|
610
|
+
const invites = (member_invites ?? []).filter((invite) => !invite.accepted).map((invite) => ({
|
|
611
|
+
kind: "invite",
|
|
612
|
+
id: invite.id,
|
|
613
|
+
email: invite.email,
|
|
614
|
+
role_id: invite.role_id,
|
|
615
|
+
created_at: invite.created_at ?? null,
|
|
616
|
+
invite_url: invite.invite_url ?? null
|
|
617
|
+
}));
|
|
618
|
+
return [...invites, ...members];
|
|
619
|
+
}, [seller_members, member_invites]);
|
|
603
620
|
const columns = useColumns(sellerId);
|
|
604
621
|
const { table } = useDataTable({
|
|
605
|
-
data:
|
|
622
|
+
data: rows,
|
|
606
623
|
columns,
|
|
607
624
|
enablePagination: true,
|
|
608
|
-
count,
|
|
625
|
+
count: rows.length,
|
|
609
626
|
pageSize: PAGE_SIZE,
|
|
610
|
-
getRowId: (row) => row.id
|
|
627
|
+
getRowId: (row) => `${row.kind}:${row.id}`
|
|
611
628
|
});
|
|
612
629
|
if (isError) {
|
|
613
630
|
throw error;
|
|
@@ -617,10 +634,10 @@ var StoreMembersDataTable = ({
|
|
|
617
634
|
{
|
|
618
635
|
table,
|
|
619
636
|
columns,
|
|
620
|
-
count,
|
|
637
|
+
count: rows.length,
|
|
621
638
|
pageSize: PAGE_SIZE,
|
|
622
639
|
pagination: true,
|
|
623
|
-
isLoading:
|
|
640
|
+
isLoading: isMembersPending || isInvitesPending,
|
|
624
641
|
queryObject: raw,
|
|
625
642
|
orderBy: [
|
|
626
643
|
{ key: "created_at", label: t("fields.createdAt") },
|
|
@@ -637,11 +654,9 @@ var useColumns = (sellerId) => {
|
|
|
637
654
|
const { t } = useTranslation8();
|
|
638
655
|
return useMemo(
|
|
639
656
|
() => [
|
|
640
|
-
columnHelper.accessor("
|
|
657
|
+
columnHelper.accessor("email", {
|
|
641
658
|
header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.email") }) }),
|
|
642
|
-
cell: ({ row }) => {
|
|
643
|
-
return /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx8("span", { className: "truncate", children: row.original.member?.email }) });
|
|
644
|
-
}
|
|
659
|
+
cell: ({ row }) => /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx8("span", { className: "truncate", children: row.original.email }) })
|
|
645
660
|
}),
|
|
646
661
|
columnHelper.accessor("role_id", {
|
|
647
662
|
header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.role") }) }),
|
|
@@ -652,6 +667,14 @@ var useColumns = (sellerId) => {
|
|
|
652
667
|
return /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx8("span", { className: "truncate", children: label }) });
|
|
653
668
|
}
|
|
654
669
|
}),
|
|
670
|
+
columnHelper.display({
|
|
671
|
+
id: "status",
|
|
672
|
+
header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.status") }) }),
|
|
673
|
+
cell: ({ row }) => {
|
|
674
|
+
const isPending = row.original.kind === "invite";
|
|
675
|
+
return /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center", children: /* @__PURE__ */ jsx8(StatusBadge2, { color: isPending ? "orange" : "green", children: isPending ? t("users.status.pending") : t("users.status.active") }) });
|
|
676
|
+
}
|
|
677
|
+
}),
|
|
655
678
|
columnHelper.accessor("created_at", {
|
|
656
679
|
header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.createdAt") }) }),
|
|
657
680
|
cell: ({ getValue }) => {
|
|
@@ -662,13 +685,105 @@ var useColumns = (sellerId) => {
|
|
|
662
685
|
columnHelper.display({
|
|
663
686
|
id: "actions",
|
|
664
687
|
cell: ({ row }) => {
|
|
665
|
-
|
|
688
|
+
const isAdminRole = row.original.role_id === import_types2.SellerRole.SELLER_ADMINISTRATION;
|
|
689
|
+
if (row.original.kind === "member") {
|
|
690
|
+
if (isAdminRole) return null;
|
|
691
|
+
return /* @__PURE__ */ jsx8(
|
|
692
|
+
MemberActions,
|
|
693
|
+
{
|
|
694
|
+
member: row.original.member,
|
|
695
|
+
sellerId
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
return /* @__PURE__ */ jsx8(
|
|
700
|
+
InviteActions,
|
|
701
|
+
{
|
|
702
|
+
invite: row.original,
|
|
703
|
+
sellerId,
|
|
704
|
+
allowDelete: !isAdminRole
|
|
705
|
+
}
|
|
706
|
+
);
|
|
666
707
|
}
|
|
667
708
|
})
|
|
668
709
|
],
|
|
669
710
|
[t, sellerId]
|
|
670
711
|
);
|
|
671
712
|
};
|
|
713
|
+
var InviteActions = ({
|
|
714
|
+
invite,
|
|
715
|
+
sellerId,
|
|
716
|
+
allowDelete = true
|
|
717
|
+
}) => {
|
|
718
|
+
const { t } = useTranslation8();
|
|
719
|
+
const { mutateAsync: resend } = useResendSellerInvite(sellerId);
|
|
720
|
+
const { mutateAsync: deleteInvite } = useDeleteSellerInvite(sellerId);
|
|
721
|
+
const handleResend = async () => {
|
|
722
|
+
try {
|
|
723
|
+
await resend({ invite_id: invite.id });
|
|
724
|
+
toast2.success(
|
|
725
|
+
t("stores.members.invite.resendSuccess", { email: invite.email })
|
|
726
|
+
);
|
|
727
|
+
} catch (e) {
|
|
728
|
+
toast2.error(e.message);
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
const handleCopyLink = async () => {
|
|
732
|
+
try {
|
|
733
|
+
let url = invite.invite_url;
|
|
734
|
+
if (!url) {
|
|
735
|
+
const response = await resend({ invite_id: invite.id });
|
|
736
|
+
url = response?.member_invite?.invite_url ?? null;
|
|
737
|
+
}
|
|
738
|
+
if (!url) {
|
|
739
|
+
toast2.error(t("stores.members.invite.noVendorUrl"));
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
await navigator.clipboard.writeText(url);
|
|
743
|
+
toast2.success(t("stores.members.invite.linkCopied"));
|
|
744
|
+
} catch (e) {
|
|
745
|
+
toast2.error(e.message);
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
const handleDelete = async () => {
|
|
749
|
+
try {
|
|
750
|
+
await deleteInvite({ invite_id: invite.id });
|
|
751
|
+
toast2.success(
|
|
752
|
+
t("stores.members.invite.deleteSuccess", { email: invite.email })
|
|
753
|
+
);
|
|
754
|
+
} catch (e) {
|
|
755
|
+
toast2.error(e.message);
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
const groups = [
|
|
759
|
+
{
|
|
760
|
+
actions: [
|
|
761
|
+
{
|
|
762
|
+
icon: /* @__PURE__ */ jsx8(ArrowPath, {}),
|
|
763
|
+
label: t("users.resendInvite"),
|
|
764
|
+
onClick: handleResend
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
icon: /* @__PURE__ */ jsx8(LinkIcon, {}),
|
|
768
|
+
label: t("users.copyInviteLink"),
|
|
769
|
+
onClick: handleCopyLink
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
}
|
|
773
|
+
];
|
|
774
|
+
if (allowDelete) {
|
|
775
|
+
groups.push({
|
|
776
|
+
actions: [
|
|
777
|
+
{
|
|
778
|
+
icon: /* @__PURE__ */ jsx8(Trash2, {}),
|
|
779
|
+
label: t("actions.delete"),
|
|
780
|
+
onClick: handleDelete
|
|
781
|
+
}
|
|
782
|
+
]
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
return /* @__PURE__ */ jsx8(ActionMenu, { groups });
|
|
786
|
+
};
|
|
672
787
|
var MemberActions = ({
|
|
673
788
|
member,
|
|
674
789
|
sellerId
|
|
@@ -697,7 +812,7 @@ var MemberActions = ({
|
|
|
697
812
|
{
|
|
698
813
|
actions: [
|
|
699
814
|
{
|
|
700
|
-
icon: /* @__PURE__ */ jsx8(
|
|
815
|
+
icon: /* @__PURE__ */ jsx8(Trash2, {}),
|
|
701
816
|
label: t("actions.remove"),
|
|
702
817
|
onClick: handleRemove
|
|
703
818
|
}
|
|
@@ -728,140 +843,348 @@ import {
|
|
|
728
843
|
Button as Button2,
|
|
729
844
|
Container as Container8,
|
|
730
845
|
Heading as Heading8,
|
|
731
|
-
Text as
|
|
846
|
+
Text as Text7,
|
|
732
847
|
Textarea,
|
|
733
848
|
toast as toast3
|
|
734
849
|
} from "@medusajs/ui";
|
|
735
850
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
736
|
-
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
851
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
737
852
|
var StoreRequestSection = ({ seller }) => {
|
|
738
853
|
const { t } = useTranslation10();
|
|
739
|
-
const [
|
|
854
|
+
const [pendingAction, setPendingAction] = useState(null);
|
|
855
|
+
const [note, setNote] = useState("");
|
|
740
856
|
const { mutateAsync: approveSeller, isPending: isApproving } = useApproveSeller(seller.id);
|
|
741
|
-
const { mutateAsync: suspendSeller, isPending:
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
t("stores.approve.successToast", "Store approved successfully")
|
|
747
|
-
);
|
|
748
|
-
} catch (error) {
|
|
749
|
-
toast3.error(error.message);
|
|
750
|
-
}
|
|
857
|
+
const { mutateAsync: suspendSeller, isPending: isRejecting } = useSuspendSeller(seller.id);
|
|
858
|
+
const requesterLabel = seller.email || seller.name;
|
|
859
|
+
const cancel = () => {
|
|
860
|
+
setPendingAction(null);
|
|
861
|
+
setNote("");
|
|
751
862
|
};
|
|
752
|
-
const
|
|
863
|
+
const submit = async () => {
|
|
753
864
|
try {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
t("stores.
|
|
757
|
-
)
|
|
865
|
+
if (pendingAction === "confirm") {
|
|
866
|
+
await approveSeller();
|
|
867
|
+
toast3.success(t("stores.request.confirmSuccess"));
|
|
868
|
+
} else if (pendingAction === "reject") {
|
|
869
|
+
await suspendSeller({ reason: note || void 0 });
|
|
870
|
+
toast3.success(t("stores.request.rejectSuccess"));
|
|
871
|
+
}
|
|
872
|
+
cancel();
|
|
758
873
|
} catch (error) {
|
|
759
874
|
toast3.error(error.message);
|
|
760
875
|
}
|
|
761
876
|
};
|
|
762
|
-
|
|
763
|
-
|
|
877
|
+
const isSubmitting = isApproving || isRejecting;
|
|
878
|
+
return /* @__PURE__ */ jsxs9(Container8, { className: "p-0", children: [
|
|
879
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-x-3 border-b border-ui-border-base px-6 py-4", children: [
|
|
880
|
+
/* @__PURE__ */ jsx10(ExclamationCircleSolid, { className: "text-ui-tag-blue-icon" }),
|
|
881
|
+
/* @__PURE__ */ jsx10(Heading8, { level: "h2", children: t("stores.request.title") })
|
|
882
|
+
] }),
|
|
883
|
+
/* @__PURE__ */ jsx10("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx10(Text7, { className: "text-ui-fg-subtle", children: t("stores.request.description", { requester: requesterLabel }) }) }),
|
|
884
|
+
pendingAction ? /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2 border-t border-ui-border-base px-6 py-4", children: [
|
|
885
|
+
/* @__PURE__ */ jsx10(Text7, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: pendingAction === "confirm" ? t("stores.request.confirmNoteLabel") : t("stores.request.rejectNoteLabel") }),
|
|
886
|
+
/* @__PURE__ */ jsx10(
|
|
887
|
+
Textarea,
|
|
888
|
+
{
|
|
889
|
+
placeholder: t("stores.request.notePlaceholder"),
|
|
890
|
+
value: note,
|
|
891
|
+
onChange: (e) => setNote(e.target.value)
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
] }) : null,
|
|
895
|
+
/* @__PURE__ */ jsx10("div", { className: "flex items-center justify-end gap-x-2 rounded-b-lg border-t border-ui-border-base bg-ui-bg-subtle px-6 py-4", children: pendingAction ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
896
|
+
/* @__PURE__ */ jsx10(
|
|
897
|
+
Button2,
|
|
898
|
+
{
|
|
899
|
+
size: "small",
|
|
900
|
+
variant: "secondary",
|
|
901
|
+
onClick: cancel,
|
|
902
|
+
disabled: isSubmitting,
|
|
903
|
+
children: t("actions.cancel")
|
|
904
|
+
}
|
|
905
|
+
),
|
|
906
|
+
/* @__PURE__ */ jsx10(
|
|
907
|
+
Button2,
|
|
908
|
+
{
|
|
909
|
+
size: "small",
|
|
910
|
+
variant: pendingAction === "reject" ? "danger" : "primary",
|
|
911
|
+
onClick: submit,
|
|
912
|
+
isLoading: isSubmitting,
|
|
913
|
+
children: pendingAction === "confirm" ? t("stores.request.confirm") : t("stores.request.reject")
|
|
914
|
+
}
|
|
915
|
+
)
|
|
916
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
917
|
+
/* @__PURE__ */ jsx10(
|
|
918
|
+
Button2,
|
|
919
|
+
{
|
|
920
|
+
size: "small",
|
|
921
|
+
variant: "secondary",
|
|
922
|
+
onClick: () => setPendingAction("confirm"),
|
|
923
|
+
children: t("stores.request.confirm")
|
|
924
|
+
}
|
|
925
|
+
),
|
|
926
|
+
/* @__PURE__ */ jsx10(
|
|
927
|
+
Button2,
|
|
928
|
+
{
|
|
929
|
+
size: "small",
|
|
930
|
+
variant: "secondary",
|
|
931
|
+
onClick: () => setPendingAction("reject"),
|
|
932
|
+
children: t("stores.request.reject")
|
|
933
|
+
}
|
|
934
|
+
)
|
|
935
|
+
] }) })
|
|
936
|
+
] });
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
// src/pages/stores/store-details/components/store-orders-section.tsx
|
|
940
|
+
import { Container as Container9, Heading as Heading9 } from "@medusajs/ui";
|
|
941
|
+
import { keepPreviousData as keepPreviousData2 } from "@tanstack/react-query";
|
|
942
|
+
import { useTranslation as useTranslation11 } from "react-i18next";
|
|
943
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
944
|
+
var PAGE_SIZE2 = 10;
|
|
945
|
+
var PREFIX = "store-orders";
|
|
946
|
+
var DEFAULT_RELATIONS = "*customer,*items,*sales_channel";
|
|
947
|
+
var DEFAULT_FIELDS = "id,status,display_id,created_at,email,fulfillment_status,payment_status,total,currency_code";
|
|
948
|
+
var StoreOrdersSection = ({ sellerId }) => {
|
|
949
|
+
const { t } = useTranslation11();
|
|
950
|
+
const { searchParams, raw } = useOrderTableQuery({
|
|
951
|
+
pageSize: PAGE_SIZE2,
|
|
952
|
+
prefix: PREFIX
|
|
953
|
+
});
|
|
954
|
+
const { orders, count, isLoading, isError, error } = useOrders(
|
|
764
955
|
{
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
/* @__PURE__ */ jsx10(ExclamationCircleSolid, { className: "text-orange-500" }),
|
|
772
|
-
/* @__PURE__ */ jsx10(Heading8, { level: "h2", children: t("stores.request.title", "Store request") })
|
|
773
|
-
] }),
|
|
774
|
-
/* @__PURE__ */ jsx10("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx10(Text6, { className: "text-ui-fg-subtle", children: t(
|
|
775
|
-
"stores.request.description",
|
|
776
|
-
"A new store request has been submitted. Review the details, make any necessary updates, and choose whether to confirm and publish the store or suspend the request."
|
|
777
|
-
) }) }),
|
|
778
|
-
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2 px-6 py-4", children: [
|
|
779
|
-
/* @__PURE__ */ jsx10(Text6, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: t("stores.request.reasonLabel", "Suspend reason") }),
|
|
780
|
-
/* @__PURE__ */ jsx10(
|
|
781
|
-
Textarea,
|
|
782
|
-
{
|
|
783
|
-
placeholder: t(
|
|
784
|
-
"stores.request.reasonPlaceholder",
|
|
785
|
-
"Optional reason for suspending this store..."
|
|
786
|
-
),
|
|
787
|
-
value: reason,
|
|
788
|
-
onChange: (e) => setReason(e.target.value)
|
|
789
|
-
}
|
|
790
|
-
)
|
|
791
|
-
] }),
|
|
792
|
-
/* @__PURE__ */ jsxs9("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
|
|
793
|
-
/* @__PURE__ */ jsx10(
|
|
794
|
-
Button2,
|
|
795
|
-
{
|
|
796
|
-
size: "small",
|
|
797
|
-
variant: "secondary",
|
|
798
|
-
onClick: handleConfirm,
|
|
799
|
-
isLoading: isApproving,
|
|
800
|
-
children: t("stores.request.confirm", "Confirm")
|
|
801
|
-
}
|
|
802
|
-
),
|
|
803
|
-
/* @__PURE__ */ jsx10(
|
|
804
|
-
Button2,
|
|
805
|
-
{
|
|
806
|
-
size: "small",
|
|
807
|
-
variant: "secondary",
|
|
808
|
-
onClick: handleReject,
|
|
809
|
-
isLoading: isSuspending,
|
|
810
|
-
children: t("stores.request.suspend", "Suspend")
|
|
811
|
-
}
|
|
812
|
-
)
|
|
813
|
-
] })
|
|
814
|
-
] }) })
|
|
956
|
+
...searchParams,
|
|
957
|
+
seller_id: [sellerId],
|
|
958
|
+
fields: `${DEFAULT_FIELDS},${DEFAULT_RELATIONS}`
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
placeholderData: keepPreviousData2
|
|
815
962
|
}
|
|
816
963
|
);
|
|
964
|
+
const columns = useOrderTableColumns({
|
|
965
|
+
exclude: ["sales_channel", "actions"]
|
|
966
|
+
});
|
|
967
|
+
const filters = useOrderTableFilters();
|
|
968
|
+
const { table } = useDataTable({
|
|
969
|
+
data: orders ?? [],
|
|
970
|
+
columns,
|
|
971
|
+
enablePagination: true,
|
|
972
|
+
count,
|
|
973
|
+
pageSize: PAGE_SIZE2,
|
|
974
|
+
prefix: PREFIX
|
|
975
|
+
});
|
|
976
|
+
if (isError) {
|
|
977
|
+
throw error;
|
|
978
|
+
}
|
|
979
|
+
return /* @__PURE__ */ jsxs10(Container9, { className: "divide-y p-0", "data-testid": "store-orders-section", children: [
|
|
980
|
+
/* @__PURE__ */ jsx11(
|
|
981
|
+
"div",
|
|
982
|
+
{
|
|
983
|
+
className: "flex items-center justify-between px-6 py-4",
|
|
984
|
+
"data-testid": "store-orders-section-header",
|
|
985
|
+
children: /* @__PURE__ */ jsx11(Heading9, { level: "h2", "data-testid": "store-orders-section-heading", children: t("orders.domain") })
|
|
986
|
+
}
|
|
987
|
+
),
|
|
988
|
+
/* @__PURE__ */ jsx11(
|
|
989
|
+
_DataTable,
|
|
990
|
+
{
|
|
991
|
+
columns,
|
|
992
|
+
table,
|
|
993
|
+
pagination: true,
|
|
994
|
+
navigateTo: (row) => `/orders/${row.original.id}`,
|
|
995
|
+
filters,
|
|
996
|
+
count,
|
|
997
|
+
isLoading,
|
|
998
|
+
pageSize: PAGE_SIZE2,
|
|
999
|
+
orderBy: [
|
|
1000
|
+
{ key: "display_id", label: t("orders.fields.displayId") },
|
|
1001
|
+
{ key: "created_at", label: t("fields.createdAt") },
|
|
1002
|
+
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
1003
|
+
],
|
|
1004
|
+
search: true,
|
|
1005
|
+
queryObject: raw,
|
|
1006
|
+
prefix: PREFIX,
|
|
1007
|
+
noRecords: {
|
|
1008
|
+
message: t("orders.list.noRecordsMessage")
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
] });
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
// src/pages/stores/store-details/components/store-products-section.tsx
|
|
1016
|
+
import { Container as Container10, Heading as Heading10 } from "@medusajs/ui";
|
|
1017
|
+
import { keepPreviousData as keepPreviousData3 } from "@tanstack/react-query";
|
|
1018
|
+
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
1019
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1020
|
+
var PAGE_SIZE3 = 10;
|
|
1021
|
+
var PREFIX2 = "store-products";
|
|
1022
|
+
var StoreProductsSection = ({
|
|
1023
|
+
sellerId
|
|
1024
|
+
}) => {
|
|
1025
|
+
const { t } = useTranslation12();
|
|
1026
|
+
const { searchParams, raw } = useProductTableQuery({
|
|
1027
|
+
pageSize: PAGE_SIZE3,
|
|
1028
|
+
prefix: PREFIX2
|
|
1029
|
+
});
|
|
1030
|
+
const { products, count, isPending, isError, error } = useSellerProducts(
|
|
1031
|
+
sellerId,
|
|
1032
|
+
searchParams,
|
|
1033
|
+
{
|
|
1034
|
+
placeholderData: keepPreviousData3
|
|
1035
|
+
}
|
|
1036
|
+
);
|
|
1037
|
+
const columns = useProductTableColumns();
|
|
1038
|
+
const filters = useProductTableFilters(["product_types"]);
|
|
1039
|
+
const { table } = useDataTable({
|
|
1040
|
+
columns,
|
|
1041
|
+
data: products ?? [],
|
|
1042
|
+
count,
|
|
1043
|
+
getRowId: (row) => row.id,
|
|
1044
|
+
pageSize: PAGE_SIZE3,
|
|
1045
|
+
prefix: PREFIX2
|
|
1046
|
+
});
|
|
1047
|
+
if (isError) {
|
|
1048
|
+
throw error;
|
|
1049
|
+
}
|
|
1050
|
+
return /* @__PURE__ */ jsxs11(Container10, { className: "divide-y p-0", "data-testid": "store-products-section", children: [
|
|
1051
|
+
/* @__PURE__ */ jsx12(
|
|
1052
|
+
"div",
|
|
1053
|
+
{
|
|
1054
|
+
className: "flex items-center justify-between px-6 py-4",
|
|
1055
|
+
"data-testid": "store-products-section-header",
|
|
1056
|
+
children: /* @__PURE__ */ jsx12(Heading10, { level: "h2", "data-testid": "store-products-section-heading", children: t("products.domain") })
|
|
1057
|
+
}
|
|
1058
|
+
),
|
|
1059
|
+
/* @__PURE__ */ jsx12(
|
|
1060
|
+
_DataTable,
|
|
1061
|
+
{
|
|
1062
|
+
table,
|
|
1063
|
+
filters,
|
|
1064
|
+
isLoading: isPending,
|
|
1065
|
+
columns,
|
|
1066
|
+
count,
|
|
1067
|
+
pageSize: PAGE_SIZE3,
|
|
1068
|
+
navigateTo: ({ original }) => `/products/${original.id}`,
|
|
1069
|
+
orderBy: [
|
|
1070
|
+
{ key: "title", label: t("fields.title") },
|
|
1071
|
+
{ key: "created_at", label: t("fields.createdAt") },
|
|
1072
|
+
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
1073
|
+
],
|
|
1074
|
+
queryObject: raw,
|
|
1075
|
+
search: true,
|
|
1076
|
+
pagination: true,
|
|
1077
|
+
prefix: PREFIX2,
|
|
1078
|
+
noRecords: {
|
|
1079
|
+
message: t("products.list.noRecordsMessage")
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
)
|
|
1083
|
+
] });
|
|
817
1084
|
};
|
|
818
1085
|
|
|
819
1086
|
// src/pages/stores/store-details/components/store-details.tsx
|
|
820
|
-
import { jsx as
|
|
821
|
-
var TABS = [
|
|
1087
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1088
|
+
var TABS = ["orders", "products", "users", "timeOff"];
|
|
822
1089
|
var TabBar = ({
|
|
823
1090
|
activeTab,
|
|
824
1091
|
onTabChange
|
|
825
1092
|
}) => {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1093
|
+
const { t } = useTranslation13();
|
|
1094
|
+
const labels = {
|
|
1095
|
+
orders: t("orders.domain"),
|
|
1096
|
+
users: t("users.domain"),
|
|
1097
|
+
products: t("products.domain"),
|
|
1098
|
+
timeOff: t("store.timeOff.header")
|
|
1099
|
+
};
|
|
1100
|
+
return /* @__PURE__ */ jsx13(
|
|
1101
|
+
"div",
|
|
1102
|
+
{
|
|
1103
|
+
role: "tablist",
|
|
1104
|
+
"aria-label": t("stores.domain"),
|
|
1105
|
+
className: "flex flex-wrap items-center gap-x-3 py-2",
|
|
1106
|
+
"data-testid": "store-detail-tabs",
|
|
1107
|
+
children: TABS.map((tab) => {
|
|
1108
|
+
const isActive = activeTab === tab;
|
|
1109
|
+
return /* @__PURE__ */ jsx13(
|
|
1110
|
+
"button",
|
|
1111
|
+
{
|
|
1112
|
+
type: "button",
|
|
1113
|
+
onClick: () => onTabChange(tab),
|
|
1114
|
+
role: "tab",
|
|
1115
|
+
"aria-selected": isActive,
|
|
1116
|
+
"aria-controls": `store-detail-tab-panel-${tab}`,
|
|
1117
|
+
id: `store-detail-tab-${tab}`,
|
|
1118
|
+
"data-testid": `store-detail-tab-${tab}`,
|
|
1119
|
+
className: `txt-compact-medium-plus rounded-full px-4 py-1.5 transition-colors ${isActive ? "border-ui-border-base bg-ui-bg-base shadow-borders-base text-ui-fg-base" : "text-ui-fg-subtle hover:text-ui-fg-base"}`,
|
|
1120
|
+
children: labels[tab]
|
|
1121
|
+
},
|
|
1122
|
+
tab
|
|
1123
|
+
);
|
|
1124
|
+
})
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
838
1127
|
};
|
|
839
1128
|
var Root = ({ children }) => {
|
|
840
1129
|
const { id } = useParams();
|
|
841
|
-
const [activeTab, setActiveTab] = useState2("
|
|
1130
|
+
const [activeTab, setActiveTab] = useState2("orders");
|
|
842
1131
|
const { seller, isLoading, isError, error } = useSeller(id);
|
|
843
1132
|
if (isLoading || !seller) {
|
|
844
|
-
return /* @__PURE__ */
|
|
1133
|
+
return /* @__PURE__ */ jsx13(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 3 });
|
|
845
1134
|
}
|
|
846
1135
|
if (isError) {
|
|
847
1136
|
throw error;
|
|
848
1137
|
}
|
|
849
1138
|
if (Children3.count(children) > 0) {
|
|
850
|
-
return /* @__PURE__ */
|
|
1139
|
+
return /* @__PURE__ */ jsx13(TwoColumnPage, { data: seller, hasOutlet: true, "data-testid": "store-detail-page", children });
|
|
851
1140
|
}
|
|
852
|
-
return /* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
-
seller.status === import_types3.SellerStatus.PENDING_APPROVAL && /* @__PURE__ */
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
activeTab === "
|
|
1141
|
+
return /* @__PURE__ */ jsxs12(TwoColumnPage, { data: seller, hasOutlet: true, "data-testid": "store-detail-page", children: [
|
|
1142
|
+
/* @__PURE__ */ jsxs12(TwoColumnPage.Main, { children: [
|
|
1143
|
+
seller.status === import_types3.SellerStatus.PENDING_APPROVAL && /* @__PURE__ */ jsx13(StoreRequestSection, { seller }),
|
|
1144
|
+
/* @__PURE__ */ jsx13(StoreGeneralSection, { seller }),
|
|
1145
|
+
/* @__PURE__ */ jsx13(TabBar, { activeTab, onTabChange: setActiveTab }),
|
|
1146
|
+
activeTab === "orders" && /* @__PURE__ */ jsx13(
|
|
1147
|
+
"div",
|
|
1148
|
+
{
|
|
1149
|
+
role: "tabpanel",
|
|
1150
|
+
id: "store-detail-tab-panel-orders",
|
|
1151
|
+
"aria-labelledby": "store-detail-tab-orders",
|
|
1152
|
+
children: /* @__PURE__ */ jsx13(StoreOrdersSection, { sellerId: seller.id })
|
|
1153
|
+
}
|
|
1154
|
+
),
|
|
1155
|
+
activeTab === "users" && /* @__PURE__ */ jsx13(
|
|
1156
|
+
"div",
|
|
1157
|
+
{
|
|
1158
|
+
role: "tabpanel",
|
|
1159
|
+
id: "store-detail-tab-panel-users",
|
|
1160
|
+
"aria-labelledby": "store-detail-tab-users",
|
|
1161
|
+
children: /* @__PURE__ */ jsx13(StoreMembersSection, { sellerId: seller.id })
|
|
1162
|
+
}
|
|
1163
|
+
),
|
|
1164
|
+
activeTab === "products" && /* @__PURE__ */ jsx13(
|
|
1165
|
+
"div",
|
|
1166
|
+
{
|
|
1167
|
+
role: "tabpanel",
|
|
1168
|
+
id: "store-detail-tab-panel-products",
|
|
1169
|
+
"aria-labelledby": "store-detail-tab-products",
|
|
1170
|
+
children: /* @__PURE__ */ jsx13(StoreProductsSection, { sellerId: seller.id })
|
|
1171
|
+
}
|
|
1172
|
+
),
|
|
1173
|
+
activeTab === "timeOff" && /* @__PURE__ */ jsx13(
|
|
1174
|
+
"div",
|
|
1175
|
+
{
|
|
1176
|
+
role: "tabpanel",
|
|
1177
|
+
id: "store-detail-tab-panel-timeOff",
|
|
1178
|
+
"aria-labelledby": "store-detail-tab-timeOff",
|
|
1179
|
+
children: /* @__PURE__ */ jsx13(StoreConfigurationSection, { seller })
|
|
1180
|
+
}
|
|
1181
|
+
)
|
|
858
1182
|
] }),
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */ jsx11(StoreSubscriptionSection, { seller })
|
|
1183
|
+
/* @__PURE__ */ jsxs12(TwoColumnPage.Sidebar, { children: [
|
|
1184
|
+
/* @__PURE__ */ jsx13(StoreAddressSection, { seller }),
|
|
1185
|
+
/* @__PURE__ */ jsx13(StoreCompanyDetailsSection, { seller }),
|
|
1186
|
+
/* @__PURE__ */ jsx13(StorePaymentDetailsSection, { seller }),
|
|
1187
|
+
/* @__PURE__ */ jsx13(StoreSubscriptionSection, { seller })
|
|
865
1188
|
] })
|
|
866
1189
|
] });
|
|
867
1190
|
};
|
|
@@ -869,9 +1192,9 @@ var StoreDetailPage = Object.assign(Root, {
|
|
|
869
1192
|
Main: TwoColumnPage.Main,
|
|
870
1193
|
Sidebar: TwoColumnPage.Sidebar,
|
|
871
1194
|
MainGeneralSection: StoreGeneralSection,
|
|
1195
|
+
MainConfigurationSection: StoreConfigurationSection,
|
|
872
1196
|
MainPaymentDetailsSection: StorePaymentDetailsSection,
|
|
873
1197
|
MainCompanyDetailsSection: StoreCompanyDetailsSection,
|
|
874
|
-
SidebarConfigurationSection: StoreConfigurationSection,
|
|
875
1198
|
SidebarAddressSection: StoreAddressSection,
|
|
876
1199
|
SidebarSubscriptionSection: StoreSubscriptionSection,
|
|
877
1200
|
SidebarMembersSection: StoreMembersSection,
|