@mercurjs/vendor 2.2.1 → 2.3.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/[id]-3TCOLUQH.js +197 -0
- package/dist/{[id]-YB3DBBXT.js → [id]-4QVLDR3S.js} +13 -10
- package/dist/{[id]-RJRAZN3T.js → [id]-4VX7CTRZ.js} +8 -6
- package/dist/{[id]-OE5TUWNF.js → [id]-5FP6JZM3.js} +9 -7
- package/dist/[id]-6FEVCKQU.js +949 -0
- package/dist/{[id]-47SUX5X3.js → [id]-7QVJAIDU.js} +13 -10
- package/dist/{[id]-BHU5BSQT.js → [id]-CFVBH66J.js} +20 -17
- package/dist/{[id]-SKU5SFBG.js → [id]-HAJ3735Z.js} +137 -204
- package/dist/{[id]-NGRV5I2A.js → [id]-PBNGQSNY.js} +9 -7
- package/dist/[id]-QGZ26C6D.js +286 -0
- package/dist/{[id]-ZD5HBP2R.js → [id]-RAJUZUNH.js} +13 -10
- package/dist/[id]-RJ3MUR4M.js +697 -0
- package/dist/{[id]-PIB2DEVI.js → [id]-RRVYKA7U.js} +12 -9
- package/dist/{[id]-BPQNQFVE.js → [id]-Y4HRAAV2.js} +75 -124
- package/dist/{[province_id]-CUWKNPBW.js → [province_id]-VWN4OOGM.js} +9 -7
- package/dist/{add-MYV5IOGP.js → add-57LM6WKL.js} +157 -227
- package/dist/{add-YEUSE5QA.js → add-7HIVF77P.js} +10 -8
- package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-VJYI5J5Z.js} +8 -6
- package/dist/{add-products-WVNYODC6.js → add-products-XWU5ZUTZ.js} +13 -10
- package/dist/{add-promotions-F62YE3BE.js → add-promotions-DOJS6CEE.js} +27 -9
- package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
- package/dist/{address-ZMZ4ST5T.js → address-X4TXBPUG.js} +7 -5
- package/dist/{adjust-inventory-QUGKDXOC.js → adjust-inventory-2OKDFVLK.js} +2 -3
- package/dist/{allocate-items-7NSBGXSF.js → allocate-items-QAYROQMK.js} +4 -2
- package/dist/{areas-EJCZBY2E.js → areas-WQ44GWQO.js} +2 -2
- package/dist/{breadcrumb-M657ZCG6.js → breadcrumb-4I7MU2QY.js} +1 -1
- package/dist/{breadcrumb-KNBZ3JNR.js → breadcrumb-7ZFC43R4.js} +1 -1
- package/dist/{breadcrumb-C7M5PG2Q.js → breadcrumb-HMW2K4DW.js} +7 -5
- package/dist/{breadcrumb-KLNC72RI.js → breadcrumb-MH2L34OD.js} +2 -2
- package/dist/{breadcrumb-QPV566YX.js → breadcrumb-Q7FS3IDL.js} +8 -6
- package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
- package/dist/{breadcrumb-M6NW3DRQ.js → breadcrumb-WBUUK3AP.js} +1 -1
- package/dist/breadcrumb-XCPUUZUO.js +26 -0
- package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-Z2QUGZM3.js} +7 -5
- package/dist/{campaigns-BPLAE6QQ.js → campaigns-LIPKZKI7.js} +5 -4
- package/dist/{categories-H2XAJCGC.js → categories-D2U6VLH5.js} +2 -2
- package/dist/{chunk-4RVWITM2.js → chunk-3JWHERV7.js} +76 -23
- package/dist/{chunk-BCXREBMV.js → chunk-4ATO577Q.js} +1 -1
- package/dist/{chunk-VHFKJLDH.js → chunk-4JVORTN4.js} +1 -1
- package/dist/{chunk-HHD2VUED.js → chunk-4UKAKFKL.js} +1 -1
- package/dist/{chunk-3L7WHWKB.js → chunk-5DRYAIOY.js} +3 -3
- package/dist/{chunk-7TIZP4YG.js → chunk-5RWK4U4V.js} +26 -0
- package/dist/{chunk-XQUF3WIS.js → chunk-5ZHZVKNQ.js} +4 -0
- package/dist/{chunk-IWAL74YU.js → chunk-6GQLSWOO.js} +1 -1
- package/dist/{chunk-HCUIYIIY.js → chunk-6OZQTHCR.js} +1 -1
- package/dist/chunk-6XMUN2BZ.js +0 -0
- package/dist/{chunk-RLRWDHME.js → chunk-6YQR2AWM.js} +3 -20
- package/dist/{chunk-26OOAKQ6.js → chunk-7H6NMQ6U.js} +8 -1
- package/dist/{chunk-OKJHUQBY.js → chunk-7JVJIAWS.js} +17 -29
- package/dist/chunk-7LIENHWP.js +26 -0
- package/dist/{chunk-EPSRO7C5.js → chunk-7LIT4GXO.js} +2 -2
- package/dist/chunk-7POOMBIN.js +108 -0
- package/dist/{chunk-PF7R7LMW.js → chunk-AHR2FIMC.js} +22 -0
- package/dist/{chunk-EJBOBB4B.js → chunk-AQT2G6K2.js} +46 -46
- package/dist/{chunk-UEKRQS5Q.js → chunk-ATYOOL7K.js} +2 -2
- package/dist/chunk-BR6PEFXX.js +27 -0
- package/dist/{chunk-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
- package/dist/{chunk-3XW55FZY.js → chunk-CRVVPIFZ.js} +6 -6
- package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
- package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
- package/dist/{chunk-UUBGLS7U.js → chunk-EWJTXSKI.js} +211 -36
- package/dist/chunk-FKKI62AC.js +282 -0
- package/dist/{chunk-VBKW4GWP.js → chunk-FPBXQIFJ.js} +1 -1
- package/dist/{chunk-SI55QRZ4.js → chunk-G5NNOOHR.js} +59 -6
- package/dist/chunk-G6J5ZKM3.js +31 -0
- package/dist/{chunk-U5V6HNVW.js → chunk-GL3XVUAY.js} +1 -1
- package/dist/{chunk-RJE4MAYB.js → chunk-GYLRZXWS.js} +1 -1
- package/dist/{chunk-SVYBMLVN.js → chunk-HHCLMWXT.js} +1 -1
- package/dist/{chunk-YUQA6TUA.js → chunk-JOCO7JOB.js} +3 -3
- package/dist/{chunk-OGUTFP6B.js → chunk-JYUHDM23.js} +13 -51
- package/dist/{chunk-QB7BI4B7.js → chunk-K2DXXPNA.js} +153 -86
- package/dist/{chunk-XG76XXM2.js → chunk-KKMA6VPG.js} +1 -1
- package/dist/chunk-KVAD5JGS.js +11 -0
- package/dist/{chunk-YRZ53SAN.js → chunk-L26J5MO2.js} +2 -2
- package/dist/{chunk-63XYNXUL.js → chunk-LYP7XK5O.js} +1 -1
- package/dist/chunk-MVVFD2JT.js +51 -0
- package/dist/{chunk-RVFPWOR2.js → chunk-MY5H7C3A.js} +2 -2
- package/dist/{chunk-3GSR455R.js → chunk-NQMHP2LC.js} +1 -1
- package/dist/{chunk-2S2WK2OG.js → chunk-NV2RZAHW.js} +1 -10
- package/dist/{chunk-4IIATKG7.js → chunk-O7OWHKWA.js} +6 -6
- package/dist/{chunk-GIKVFOQL.js → chunk-OJCMHDZI.js} +2 -2
- package/dist/chunk-QLOJNFUE.js +53 -0
- package/dist/{chunk-GTNCNKTC.js → chunk-RBWIHKUF.js} +1 -1
- package/dist/{chunk-XVBONKRV.js → chunk-RCMKDW6O.js} +1 -1
- package/dist/{chunk-WJF24CGA.js → chunk-RDLVH6CM.js} +33 -5
- package/dist/chunk-SF5N2HX4.js +268 -0
- package/dist/{chunk-MQR26KYT.js → chunk-SYHA2RVL.js} +1 -1
- package/dist/{chunk-ZXDMPIXN.js → chunk-U3OEGBHH.js} +2 -2
- package/dist/chunk-UTGI6R2X.js +334 -0
- package/dist/{chunk-VBRTC2VU.js → chunk-VAFGNDAP.js} +4 -3
- package/dist/{chunk-4UQMRTSC.js → chunk-VH3TGSWE.js} +46 -2
- package/dist/{chunk-ZEKV7LGF.js → chunk-VV2K3EBF.js} +1 -1
- package/dist/{chunk-S2VYK3YC.js → chunk-WI2ZAFZF.js} +1 -1
- package/dist/chunk-WP3B4NEU.js +32 -0
- package/dist/{chunk-DY3XQPHC.js → chunk-WW2XYOHJ.js} +5 -3
- package/dist/{chunk-IVYIMGQC.js → chunk-X44P463Q.js} +45 -10
- package/dist/{chunk-FEVCBT24.js → chunk-X4G64W5Q.js} +2 -2
- package/dist/{chunk-R5KN6IFB.js → chunk-XHWBTV72.js} +2 -2
- package/dist/{chunk-OVHIUZ3K.js → chunk-XQ47NZJC.js} +1 -1
- package/dist/{chunk-LN7XHEPJ.js → chunk-YT4RAUWM.js} +2 -2
- package/dist/{chunk-6VKJM537.js → chunk-ZK4DIDXG.js} +1 -1
- package/dist/{collections-52DJLHWW.js → collections-5TH7H2QP.js} +14 -13
- package/dist/{configuration-UMRBE5RQ.js → configuration-QK2FW2CV.js} +2 -2
- package/dist/{configuration-QEDVL2WF.js → configuration-RYH3VUBV.js} +15 -48
- package/dist/{create-ALUKAFJS.js → create-5M66YUYY.js} +2 -2
- package/dist/{create-ABRPUMHQ.js → create-A6KZEZMH.js} +7 -6
- package/dist/{create-LYNWCP2N.js → create-BTODQ4T4.js} +6 -5
- package/dist/{create-2I3GAX4C.js → create-FI6H4AJE.js} +16 -7
- package/dist/{create-6IRD2CVC.js → create-GF76Z5I7.js} +15 -13
- package/dist/create-ICCAEOSA.js +343 -0
- package/dist/{create-NTZH45DW.js → create-JZLU44WB.js} +14 -12
- package/dist/{create-GEYXN6SW.js → create-ME43PNL6.js} +7 -5
- package/dist/{create-MFGMTZ5A.js → create-MIYJCLAJ.js} +8 -6
- package/dist/{create-7SJ5DSQK.js → create-PRDQJ5WI.js} +20 -17
- package/dist/{create-S7VYYTUD.js → create-Q6B6JR4K.js} +10 -8
- package/dist/{create-5RQ32XPT.js → create-SKQAJNDF.js} +287 -287
- package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
- package/dist/{create-H77ZUZG5.js → create-XBGN6XEF.js} +10 -8
- package/dist/{create-G76MVCJU.js → create-ZVGYET6W.js} +5 -4
- package/dist/customer-availability-VAOKKCTK.js +164 -0
- package/dist/{customer-group-add-customers-T7OYWJCB.js → customer-group-add-customers-BSMUKWVO.js} +1 -1
- package/dist/{customer-group-detail-E7HRZ3LE.js → customer-group-detail-QCPC2YWK.js} +2 -2
- package/dist/{customer-groups-26HJ55MF.js → customer-groups-6WGUNFHG.js} +2 -2
- package/dist/{customers-EXFRZX5F.js → customers-7OGYQSGA.js} +2 -2
- package/dist/edit-2BKYNGYL.js +262 -0
- package/dist/{edit-WHGYNDEB.js → edit-3S3EH372.js} +20 -17
- package/dist/{edit-MPOTIGUY.js → edit-4WP5SGH6.js} +23 -39
- package/dist/{edit-QBUYHSE7.js → edit-7D2OZBJS.js} +8 -6
- package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
- package/dist/edit-AK4E63X6.js +179 -0
- package/dist/{edit-NB5VN2E4.js → edit-DRT6VOAA.js} +5 -4
- package/dist/{edit-EGBVEWXS.js → edit-GBDHDJK4.js} +9 -7
- package/dist/{edit-TIBQEQVV.js → edit-P7FNRVGB.js} +10 -8
- package/dist/{edit-6VJWRZHQ.js → edit-PZN7UAJI.js} +7 -5
- package/dist/{edit-M4AP65HO.js → edit-RNSXXJVU.js} +8 -6
- package/dist/edit-SKRFQ4WN.js +81 -0
- package/dist/{edit-H5FJ45ZT.js → edit-ZM7NJVRE.js} +1 -1
- package/dist/{edit-budget-PYPHUJPW.js → edit-budget-MOZETGZV.js} +1 -1
- package/dist/{edit-inventory-item-BCVECCLT.js → edit-inventory-item-HFGHS732.js} +17 -14
- package/dist/{edit-inventory-item-attributes-GWEMP67O.js → edit-inventory-item-attributes-5ORZJF4I.js} +18 -1
- package/dist/{edit-price-GLAEAO7R.js → edit-price-KY7LX5QA.js} +2 -2
- package/dist/edit-reservation-LSYQUDYQ.js +294 -0
- package/dist/{edit-stock-E3PM2YOP.js → edit-stock-77VKJR4Z.js} +2 -2
- package/dist/extension-targets.d.ts +6 -3
- package/dist/{fulfillment-HDU7GATG.js → fulfillment-DEGKZL42.js} +7 -5
- package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-LDFPZGNX.js} +12 -11
- package/dist/index.css +17 -14
- package/dist/index.js +265 -155
- package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
- package/dist/{inventory-CKA34HWM.js → inventory-RKAUTQAU.js} +2 -2
- package/dist/{invite-755AJC3M.js → invite-KAHF2MCE.js} +7 -5
- package/dist/{invite-FD2TXZTW.js → invite-S5O7LFEY.js} +10 -8
- package/dist/{loader-UUSAVCK6.js → loader-3BXYSKPT.js} +1 -1
- package/dist/{loader-B4T2VBGV.js → loader-CF54CDM6.js} +2 -2
- package/dist/{login-UGKYRKMD.js → login-CRSALS6Y.js} +9 -7
- package/dist/manage-items-63FPRK7Z.js +302 -0
- package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
- package/dist/{media-TGFAHFBV.js → media-74PEXOLV.js} +8 -6
- package/dist/{media-2KEHXPRU.js → media-NKCXFG6X.js} +11 -9
- package/dist/{metadata-7JWZ4VFM.js → metadata-22BCBKVE.js} +7 -5
- package/dist/{metadata-BQQFHVKF.js → metadata-E3BDAMIO.js} +7 -5
- package/dist/{metadata-5TVRCKWX.js → metadata-FRXIY35J.js} +7 -5
- package/dist/{metadata-4ZZ4ZIWJ.js → metadata-L6IA2Z26.js} +7 -5
- package/dist/metadata-WN6Y35RV.js +69 -0
- package/dist/{metadata-G73TILNE.js → metadata-ZZMJNWS3.js} +7 -5
- package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-N5CKYGSS.js} +12 -9
- package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-AJG6TMJC.js} +3 -3
- package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-CEOS2MVM.js} +40 -8
- package/dist/{offers-7I67VSHI.js → offers-WFJ6UGVG.js} +15 -11
- package/dist/{onboarding-7MURQYXX.js → onboarding-2AZ2KEWJ.js} +7 -5
- package/dist/{orders-D7NZNDUS.js → orders-NWYLN6BE.js} +13 -12
- package/dist/{organization-T6ZTYMMW.js → organization-PAWIWKHV.js} +9 -7
- package/dist/pages/index.d.ts +9 -1
- package/dist/pages/index.js +57 -48
- package/dist/{payment-details-UQ65D5AY.js → payment-details-O57HNHWS.js} +7 -5
- package/dist/{payouts-A336D2HG.js → payouts-26ZOYDRP.js} +2 -2
- package/dist/{price-lists-3WRT4TR2.js → price-lists-U5ASDHMI.js} +5 -8
- package/dist/{pricing-3NLEJYRP.js → pricing-C425JTFQ.js} +2 -2
- package/dist/{pricing-CPPIL627.js → pricing-PDOCJEDS.js} +9 -7
- package/dist/{product-tags-7DTA73YT.js → product-tags-MMQ4ZR4W.js} +20 -17
- package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
- package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-D73ILATK.js} +7 -5
- package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-XN6WGKI2.js} +10 -8
- package/dist/{products-RYXTZFGT.js → products-OZJHGW2K.js} +19 -16
- package/dist/{products-GJ2KTGBZ.js → products-VWH5TAFY.js} +13 -10
- package/dist/{professional-details-UN5B4YDJ.js → professional-details-ZJT6YKZB.js} +7 -5
- package/dist/{profile-6MIDTK52.js → profile-EU46MXFW.js} +7 -5
- package/dist/{promotions-SQ47TCZL.js → promotions-ALWQ7J7A.js} +5 -5
- package/dist/{receive-ZG6FFN7H.js → receive-RRZK3FP2.js} +4 -3
- package/dist/{refund-KJX74N6T.js → refund-FLCZAMPR.js} +3 -2
- package/dist/{register-RDSK4E4D.js → register-C6ON6OL2.js} +9 -7
- package/dist/reservations-C326XEVA.js +350 -0
- package/dist/{reset-password-C462PDN2.js → reset-password-ASLKY3GK.js} +1 -1
- package/dist/respond-IPRDCH57.js +132 -0
- package/dist/{return-reasons-MY63HNF6.js → return-reasons-2BUKIQBO.js} +9 -7
- package/dist/reviews-LBLCFBRQ.js +14 -0
- package/dist/{settings-TJ6HPHMK.js → settings-Q5GAL2LK.js} +28 -25
- package/dist/{shipment-6CTA2GHU.js → shipment-XOU6F7AS.js} +7 -5
- package/dist/{shipping-TKKMYQHJ.js → shipping-IMCP7UDV.js} +2 -2
- package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
- package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-647FLCNK.js} +9 -7
- package/dist/{stock-465GEUY3.js → stock-D3HCV5UR.js} +22 -8
- package/dist/{store-2PQB2XWE.js → store-XBNFP6O4.js} +8 -6
- package/dist/{store-closure-DYW54VHB.js → store-closure-55EUSKE4.js} +7 -5
- package/dist/{store-select-6A5YR7WH.js → store-select-DEOEGT2O.js} +8 -6
- package/dist/{team-GXEBC57M.js → team-7MJ3NJUT.js} +10 -8
- package/package.json +12 -9
- package/dist/[id]-HEVGSOAV.js +0 -598
- package/dist/[id]-MU7A6SZO.js +0 -526
- package/dist/chunk-2ZFELO2L.js +0 -13
- package/dist/chunk-6IJMSVC6.js +0 -16
- package/dist/chunk-BNOKKKUU.js +0 -88
- package/dist/chunk-BX3JE7IE.js +0 -247
- package/dist/edit-4B364HGZ.js +0 -222
- package/dist/edit-735HBYH2.js +0 -103
- package/dist/edit-SQU5UOGE.js +0 -105
- package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
useRemoveClaimInboundItem,
|
|
19
19
|
useUpdateClaimInboundItem,
|
|
20
20
|
useUpdateClaimInboundShipping
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7LIT4GXO.js";
|
|
22
22
|
import {
|
|
23
23
|
getReturnableQuantity
|
|
24
24
|
} from "./chunk-UM7ZR3VU.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
useReturn,
|
|
30
30
|
useUpdateReturn
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RCMKDW6O.js";
|
|
32
32
|
import {
|
|
33
33
|
MoneyAmountCell
|
|
34
34
|
} from "./chunk-5YZ3G5EZ.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
import "./chunk-IQPN4PZJ.js";
|
|
46
46
|
import {
|
|
47
47
|
Combobox
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VAFGNDAP.js";
|
|
49
49
|
import "./chunk-TKGWSUEI.js";
|
|
50
50
|
import {
|
|
51
51
|
KeyboundForm
|
|
@@ -63,7 +63,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
63
63
|
import {
|
|
64
64
|
_DataTable,
|
|
65
65
|
useDataTable
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-6GQLSWOO.js";
|
|
67
67
|
import "./chunk-YN3FGNJM.js";
|
|
68
68
|
import "./chunk-KCHYLLVG.js";
|
|
69
69
|
import "./chunk-3EF54XFY.js";
|
|
@@ -89,11 +89,12 @@ import {
|
|
|
89
89
|
} from "./chunk-O72AIZUN.js";
|
|
90
90
|
import {
|
|
91
91
|
useOffers
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-AHR2FIMC.js";
|
|
93
93
|
import {
|
|
94
94
|
useOrder,
|
|
95
95
|
useOrderPreview
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-JYUHDM23.js";
|
|
97
|
+
import "./chunk-7POOMBIN.js";
|
|
97
98
|
import "./chunk-EMUCGKHP.js";
|
|
98
99
|
import "./chunk-A5DJIOHN.js";
|
|
99
100
|
import "./chunk-RHKRREUU.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useRequestExchange,
|
|
20
20
|
useUpdateExchangeInboundItem,
|
|
21
21
|
useUpdateExchangeOutboundItem
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CSEB2RNO.js";
|
|
23
23
|
import {
|
|
24
24
|
getReturnableQuantity
|
|
25
25
|
} from "./chunk-UM7ZR3VU.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
import "./chunk-IQPN4PZJ.js";
|
|
43
43
|
import {
|
|
44
44
|
Combobox
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-VAFGNDAP.js";
|
|
46
46
|
import "./chunk-TKGWSUEI.js";
|
|
47
47
|
import {
|
|
48
48
|
KeyboundForm
|
|
@@ -60,7 +60,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
60
60
|
import {
|
|
61
61
|
_DataTable,
|
|
62
62
|
useDataTable
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-6GQLSWOO.js";
|
|
64
64
|
import "./chunk-YN3FGNJM.js";
|
|
65
65
|
import "./chunk-KCHYLLVG.js";
|
|
66
66
|
import "./chunk-3EF54XFY.js";
|
|
@@ -86,11 +86,12 @@ import {
|
|
|
86
86
|
} from "./chunk-O72AIZUN.js";
|
|
87
87
|
import {
|
|
88
88
|
useOffers
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-AHR2FIMC.js";
|
|
90
90
|
import {
|
|
91
91
|
useOrder,
|
|
92
92
|
useOrderPreview
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-JYUHDM23.js";
|
|
94
|
+
import "./chunk-7POOMBIN.js";
|
|
94
95
|
import "./chunk-EMUCGKHP.js";
|
|
95
96
|
import "./chunk-A5DJIOHN.js";
|
|
96
97
|
import "./chunk-RHKRREUU.js";
|
|
@@ -35,13 +35,14 @@ import "./chunk-WIYFXWRI.js";
|
|
|
35
35
|
import "./chunk-INNFZYX2.js";
|
|
36
36
|
import "./chunk-LAVHRER2.js";
|
|
37
37
|
import "./chunk-Y7QKP6QU.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-6YQR2AWM.js";
|
|
39
39
|
import "./chunk-K5324KIX.js";
|
|
40
40
|
import "./chunk-FV76G2D7.js";
|
|
41
41
|
import "./chunk-GHDLST2P.js";
|
|
42
42
|
import "./chunk-YVYYOBAE.js";
|
|
43
43
|
import "./chunk-L2NJPDUD.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-7LIENHWP.js";
|
|
45
|
+
import "./chunk-NV2RZAHW.js";
|
|
45
46
|
import "./chunk-MR6REQKT.js";
|
|
46
47
|
import "./chunk-EPSDO2MJ.js";
|
|
47
48
|
import "./chunk-BHEU34FL.js";
|
|
@@ -54,9 +55,10 @@ import "./chunk-VWPNMEOE.js";
|
|
|
54
55
|
import {
|
|
55
56
|
useStockLocations
|
|
56
57
|
} from "./chunk-O72AIZUN.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-GL3XVUAY.js";
|
|
59
|
+
import "./chunk-AHR2FIMC.js";
|
|
60
|
+
import "./chunk-JYUHDM23.js";
|
|
61
|
+
import "./chunk-7POOMBIN.js";
|
|
60
62
|
import "./chunk-4U2BLH45.js";
|
|
61
63
|
import {
|
|
62
64
|
inventoryItemsQueryKeys,
|
|
@@ -81,6 +83,7 @@ import {
|
|
|
81
83
|
Heading,
|
|
82
84
|
Input,
|
|
83
85
|
ProgressTabs,
|
|
86
|
+
Text,
|
|
84
87
|
Textarea,
|
|
85
88
|
toast
|
|
86
89
|
} from "@medusajs/ui";
|
|
@@ -155,6 +158,9 @@ var CreateInventoryItemSchema = z.object({
|
|
|
155
158
|
thumbnail: z.string().optional(),
|
|
156
159
|
locations: z.record(z.string(), optionalInt).optional()
|
|
157
160
|
});
|
|
161
|
+
var buildCreateInventoryItemSchema = (t) => CreateInventoryItemSchema.extend({
|
|
162
|
+
title: z.string().min(1, t("inventory.create.errors.titleRequired"))
|
|
163
|
+
});
|
|
158
164
|
|
|
159
165
|
// src/pages/inventory/create/inventory-create-form/inventory-create-form.tsx
|
|
160
166
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
@@ -181,7 +187,7 @@ function InventoryCreateForm({ locations }) {
|
|
|
181
187
|
locations.map((location) => [location.id, ""])
|
|
182
188
|
)
|
|
183
189
|
},
|
|
184
|
-
resolver: zodResolver(
|
|
190
|
+
resolver: zodResolver(buildCreateInventoryItemSchema(t))
|
|
185
191
|
});
|
|
186
192
|
const {
|
|
187
193
|
trigger,
|
|
@@ -398,7 +404,10 @@ function InventoryCreateForm({ locations }) {
|
|
|
398
404
|
] }),
|
|
399
405
|
/* @__PURE__ */ jsx2(Divider, {}),
|
|
400
406
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-6", children: [
|
|
401
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-1", children: [
|
|
408
|
+
/* @__PURE__ */ jsx2(Heading, { level: "h2", children: t("inventory.create.attributes") }),
|
|
409
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("inventory.create.attributesHint") })
|
|
410
|
+
] }),
|
|
402
411
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-x-4 gap-y-4 lg:grid-cols-2 lg:gap-y-8", children: [
|
|
403
412
|
/* @__PURE__ */ jsx2(
|
|
404
413
|
Form.Field,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeprecatedPercentageInput
|
|
3
|
+
} from "./chunk-MAEP2UCK.js";
|
|
1
4
|
import {
|
|
2
5
|
AddCampaignPromotionFields
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4JVORTN4.js";
|
|
4
7
|
import {
|
|
5
8
|
RulesFormField
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XQ47NZJC.js";
|
|
7
10
|
import {
|
|
8
11
|
CreateCampaignSchema,
|
|
9
12
|
DEFAULT_CAMPAIGN_VALUES
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-RDLVH6CM.js";
|
|
14
|
+
import "./chunk-G5NNOOHR.js";
|
|
12
15
|
import "./chunk-54TMLQH3.js";
|
|
13
|
-
import {
|
|
14
|
-
DeprecatedPercentageInput
|
|
15
|
-
} from "./chunk-MAEP2UCK.js";
|
|
16
16
|
import {
|
|
17
17
|
getCurrencySymbol
|
|
18
18
|
} from "./chunk-IQPN4PZJ.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
SwitchBox
|
|
21
21
|
} from "./chunk-YVCBMOJG.js";
|
|
22
22
|
import "./chunk-OVPAOBZB.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-VAFGNDAP.js";
|
|
24
24
|
import "./chunk-TKGWSUEI.js";
|
|
25
25
|
import {
|
|
26
26
|
KeyboundForm
|
|
@@ -32,13 +32,14 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
Form
|
|
34
34
|
} from "./chunk-3QSRE5LS.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-6YQR2AWM.js";
|
|
36
36
|
import "./chunk-K5324KIX.js";
|
|
37
37
|
import "./chunk-FV76G2D7.js";
|
|
38
38
|
import "./chunk-GHDLST2P.js";
|
|
39
39
|
import "./chunk-YVYYOBAE.js";
|
|
40
40
|
import "./chunk-L2NJPDUD.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-7LIENHWP.js";
|
|
42
|
+
import "./chunk-NV2RZAHW.js";
|
|
42
43
|
import {
|
|
43
44
|
useCampaigns,
|
|
44
45
|
useCreatePromotion
|
|
@@ -52,9 +53,10 @@ import "./chunk-J2XUEO2E.js";
|
|
|
52
53
|
import "./chunk-DETQ6IBQ.js";
|
|
53
54
|
import "./chunk-VWPNMEOE.js";
|
|
54
55
|
import "./chunk-O72AIZUN.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-GL3XVUAY.js";
|
|
57
|
+
import "./chunk-AHR2FIMC.js";
|
|
58
|
+
import "./chunk-JYUHDM23.js";
|
|
59
|
+
import "./chunk-7POOMBIN.js";
|
|
58
60
|
import "./chunk-4U2BLH45.js";
|
|
59
61
|
import "./chunk-EMUCGKHP.js";
|
|
60
62
|
import "./chunk-A5DJIOHN.js";
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Combobox
|
|
3
|
+
} from "./chunk-VAFGNDAP.js";
|
|
4
|
+
import "./chunk-TKGWSUEI.js";
|
|
5
|
+
import {
|
|
6
|
+
KeyboundForm
|
|
7
|
+
} from "./chunk-SITRHMZZ.js";
|
|
8
|
+
import {
|
|
9
|
+
RouteFocusModal,
|
|
10
|
+
useRouteModal
|
|
11
|
+
} from "./chunk-GDWBOQI5.js";
|
|
12
|
+
import {
|
|
13
|
+
Form
|
|
14
|
+
} from "./chunk-3QSRE5LS.js";
|
|
15
|
+
import {
|
|
16
|
+
useStockLocations
|
|
17
|
+
} from "./chunk-O72AIZUN.js";
|
|
18
|
+
import {
|
|
19
|
+
useCreateReservationItem
|
|
20
|
+
} from "./chunk-7POOMBIN.js";
|
|
21
|
+
import {
|
|
22
|
+
useInventoryItems
|
|
23
|
+
} from "./chunk-EMUCGKHP.js";
|
|
24
|
+
import "./chunk-A5DJIOHN.js";
|
|
25
|
+
import "./chunk-RHKRREUU.js";
|
|
26
|
+
import "./chunk-ZA2KFUFR.js";
|
|
27
|
+
import "./chunk-DTGEFKK4.js";
|
|
28
|
+
import "./chunk-NBMM2TZK.js";
|
|
29
|
+
|
|
30
|
+
// src/pages/reservations/create/index.tsx
|
|
31
|
+
import { useSearchParams } from "react-router-dom";
|
|
32
|
+
|
|
33
|
+
// src/pages/reservations/create/reservation-create-from/reservation-create-from.tsx
|
|
34
|
+
import * as zod from "zod";
|
|
35
|
+
import { Button, Heading, Input, Text, Textarea, toast } from "@medusajs/ui";
|
|
36
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
37
|
+
import React from "react";
|
|
38
|
+
import { useForm } from "react-hook-form";
|
|
39
|
+
import { useTranslation } from "react-i18next";
|
|
40
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
+
var AttributeGridRow = ({
|
|
42
|
+
title,
|
|
43
|
+
value
|
|
44
|
+
}) => {
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 divide-x", children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Text, { className: "px-2 py-1.5", size: "small", leading: "compact", children: title }),
|
|
47
|
+
/* @__PURE__ */ jsx(Text, { className: "px-2 py-1.5", size: "small", leading: "compact", children: value })
|
|
48
|
+
] });
|
|
49
|
+
};
|
|
50
|
+
var getProductTitle = (inventoryItem) => {
|
|
51
|
+
const item = inventoryItem;
|
|
52
|
+
return item.offers?.[0]?.product?.title ?? void 0;
|
|
53
|
+
};
|
|
54
|
+
var buildCreateReservationSchema = (t) => zod.object({
|
|
55
|
+
inventory_item_id: zod.string().min(1, t("inventory.reservation.errors.idRequired")),
|
|
56
|
+
location_id: zod.string().min(1, t("inventory.reservation.errors.selectLocation")),
|
|
57
|
+
quantity: zod.number().min(1, t("inventory.reservation.errors.enterQuantity")),
|
|
58
|
+
description: zod.string().optional()
|
|
59
|
+
});
|
|
60
|
+
var ReservationCreateForm = (props) => {
|
|
61
|
+
const { t } = useTranslation();
|
|
62
|
+
const { handleSuccess } = useRouteModal();
|
|
63
|
+
const [inventorySearch, setInventorySearch] = React.useState(
|
|
64
|
+
null
|
|
65
|
+
);
|
|
66
|
+
const CreateReservationSchema = buildCreateReservationSchema(t);
|
|
67
|
+
const form = useForm({
|
|
68
|
+
defaultValues: {
|
|
69
|
+
inventory_item_id: props.inventoryItemId || "",
|
|
70
|
+
location_id: "",
|
|
71
|
+
quantity: 0,
|
|
72
|
+
description: ""
|
|
73
|
+
},
|
|
74
|
+
resolver: zodResolver(CreateReservationSchema)
|
|
75
|
+
});
|
|
76
|
+
const { inventory_items: searchedItems } = useInventoryItems({
|
|
77
|
+
fields: "id,sku,title,*location_levels,offers.product.title",
|
|
78
|
+
// Only send `q` when there is an actual search term. Passing `undefined`
|
|
79
|
+
// serializes to the literal `q=undefined`, which the backend treats as a
|
|
80
|
+
// search for "undefined" and returns nothing.
|
|
81
|
+
...inventorySearch ? { q: inventorySearch } : {}
|
|
82
|
+
});
|
|
83
|
+
const { inventory_items: presetItems } = useInventoryItems(
|
|
84
|
+
{
|
|
85
|
+
id: props.inventoryItemId ? [props.inventoryItemId] : void 0,
|
|
86
|
+
fields: "id,sku,title,*location_levels,offers.product.title"
|
|
87
|
+
},
|
|
88
|
+
{ enabled: !!props.inventoryItemId }
|
|
89
|
+
);
|
|
90
|
+
const inventory_items = React.useMemo(() => {
|
|
91
|
+
const byId = /* @__PURE__ */ new Map();
|
|
92
|
+
[...presetItems ?? [], ...searchedItems ?? []].forEach(
|
|
93
|
+
(it) => byId.set(it.id, it)
|
|
94
|
+
);
|
|
95
|
+
return Array.from(byId.values());
|
|
96
|
+
}, [presetItems, searchedItems]);
|
|
97
|
+
const inventoryItemId = form.watch("inventory_item_id");
|
|
98
|
+
const selectedInventoryItem = inventory_items?.find(
|
|
99
|
+
(it) => it.id === inventoryItemId
|
|
100
|
+
);
|
|
101
|
+
const locationId = form.watch("location_id");
|
|
102
|
+
const selectedLocationLevel = selectedInventoryItem?.location_levels?.find(
|
|
103
|
+
(it) => it.location_id === locationId
|
|
104
|
+
);
|
|
105
|
+
const quantity = form.watch("quantity");
|
|
106
|
+
const { stock_locations } = useStockLocations(
|
|
107
|
+
{
|
|
108
|
+
id: selectedInventoryItem?.location_levels?.map(
|
|
109
|
+
(level) => level.location_id
|
|
110
|
+
) ?? []
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
enabled: !!selectedInventoryItem
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
const { mutateAsync, isPending } = useCreateReservationItem();
|
|
117
|
+
const handleSubmit = form.handleSubmit(async (data) => {
|
|
118
|
+
const min = 1;
|
|
119
|
+
const max = selectedLocationLevel?.available_quantity ? selectedLocationLevel.available_quantity : 0;
|
|
120
|
+
if (!selectedLocationLevel?.available_quantity) {
|
|
121
|
+
form.setError("quantity", {
|
|
122
|
+
type: "manual",
|
|
123
|
+
message: t("inventory.reservation.errors.noAvaliableQuantity")
|
|
124
|
+
});
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (data.quantity < min || data.quantity > max) {
|
|
128
|
+
form.setError("quantity", {
|
|
129
|
+
type: "manual",
|
|
130
|
+
message: t("inventory.reservation.errors.quantityOutOfRange", {
|
|
131
|
+
max
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
await mutateAsync(data, {
|
|
137
|
+
onSuccess: ({ reservation }) => {
|
|
138
|
+
toast.success(t("inventory.reservation.successToast"));
|
|
139
|
+
handleSuccess(
|
|
140
|
+
props.inventoryItemId ? `/inventory/${props.inventoryItemId}` : `/reservations/${reservation.id}`
|
|
141
|
+
);
|
|
142
|
+
},
|
|
143
|
+
onError: (e) => {
|
|
144
|
+
toast.error(e.message);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
return /* @__PURE__ */ jsx(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
149
|
+
KeyboundForm,
|
|
150
|
+
{
|
|
151
|
+
onSubmit: handleSubmit,
|
|
152
|
+
className: "flex size-full flex-col overflow-hidden",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Header, {}),
|
|
155
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Body, { className: "flex flex-1 flex-col items-center overflow-auto py-16", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
|
|
156
|
+
/* @__PURE__ */ jsx(Heading, { children: t("inventory.reservation.create") }),
|
|
157
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
158
|
+
/* @__PURE__ */ jsx(
|
|
159
|
+
Form.Field,
|
|
160
|
+
{
|
|
161
|
+
control: form.control,
|
|
162
|
+
name: "inventory_item_id",
|
|
163
|
+
render: ({ field: { value, onChange, ...field } }) => {
|
|
164
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("inventory.reservation.itemToReserve") }),
|
|
166
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
167
|
+
Combobox,
|
|
168
|
+
{
|
|
169
|
+
onSearchValueChange: (value2) => setInventorySearch(value2),
|
|
170
|
+
value,
|
|
171
|
+
onChange: (v) => {
|
|
172
|
+
onChange(v);
|
|
173
|
+
},
|
|
174
|
+
...field,
|
|
175
|
+
placeholder: t(
|
|
176
|
+
"inventory.reservation.itemPlaceholder"
|
|
177
|
+
),
|
|
178
|
+
disabled: !!props.inventoryItemId,
|
|
179
|
+
options: (inventory_items ?? []).map(
|
|
180
|
+
(inventoryItem) => ({
|
|
181
|
+
label: inventoryItem.title ?? inventoryItem.sku,
|
|
182
|
+
secondaryLabel: getProductTitle(inventoryItem),
|
|
183
|
+
value: inventoryItem.id
|
|
184
|
+
})
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
) }),
|
|
188
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
189
|
+
] });
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"inventory_item_id"
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ jsx(
|
|
195
|
+
Form.Field,
|
|
196
|
+
{
|
|
197
|
+
control: form.control,
|
|
198
|
+
name: "location_id",
|
|
199
|
+
render: ({ field: { value, onChange, ...field } }) => {
|
|
200
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
201
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("fields.location") }),
|
|
202
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
203
|
+
Combobox,
|
|
204
|
+
{
|
|
205
|
+
value,
|
|
206
|
+
onChange: (v) => {
|
|
207
|
+
onChange(v);
|
|
208
|
+
},
|
|
209
|
+
...field,
|
|
210
|
+
placeholder: t(
|
|
211
|
+
"inventory.reservation.locationPlaceholder"
|
|
212
|
+
),
|
|
213
|
+
disabled: !inventoryItemId,
|
|
214
|
+
options: (stock_locations ?? []).map(
|
|
215
|
+
(stockLocation) => ({
|
|
216
|
+
label: stockLocation.name,
|
|
217
|
+
value: stockLocation.id
|
|
218
|
+
})
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
) }),
|
|
222
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
223
|
+
] });
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"location_id"
|
|
227
|
+
)
|
|
228
|
+
] }),
|
|
229
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle shadow-elevation-card-rest grid grid-rows-4 divide-y rounded-lg", children: [
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
AttributeGridRow,
|
|
232
|
+
{
|
|
233
|
+
title: t("fields.title"),
|
|
234
|
+
value: selectedInventoryItem?.title ?? selectedInventoryItem?.sku ?? "-"
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
AttributeGridRow,
|
|
239
|
+
{
|
|
240
|
+
title: t("fields.sku"),
|
|
241
|
+
value: selectedInventoryItem?.sku ?? "-"
|
|
242
|
+
}
|
|
243
|
+
),
|
|
244
|
+
/* @__PURE__ */ jsx(
|
|
245
|
+
AttributeGridRow,
|
|
246
|
+
{
|
|
247
|
+
title: t("fields.inStock"),
|
|
248
|
+
value: selectedLocationLevel?.stocked_quantity ?? "-"
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
/* @__PURE__ */ jsx(
|
|
252
|
+
AttributeGridRow,
|
|
253
|
+
{
|
|
254
|
+
title: t("inventory.available"),
|
|
255
|
+
value: selectedLocationLevel?.available_quantity ? selectedLocationLevel.available_quantity - (quantity || 0) : "-"
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ jsx("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ jsx(
|
|
260
|
+
Form.Field,
|
|
261
|
+
{
|
|
262
|
+
control: form.control,
|
|
263
|
+
name: "quantity",
|
|
264
|
+
render: ({ field: { onChange, value, ...field } }) => {
|
|
265
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
266
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("fields.quantity") }),
|
|
267
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
268
|
+
Input,
|
|
269
|
+
{
|
|
270
|
+
type: "number",
|
|
271
|
+
placeholder: t(
|
|
272
|
+
"inventory.reservation.quantityPlaceholder"
|
|
273
|
+
),
|
|
274
|
+
value: value || "",
|
|
275
|
+
onChange: (e) => {
|
|
276
|
+
const value2 = e.target.value;
|
|
277
|
+
if (value2 === "") {
|
|
278
|
+
onChange(null);
|
|
279
|
+
} else {
|
|
280
|
+
onChange(parseFloat(value2));
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
...field,
|
|
284
|
+
disabled: !inventoryItemId || !locationId
|
|
285
|
+
}
|
|
286
|
+
) }),
|
|
287
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
288
|
+
] });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
) }),
|
|
292
|
+
/* @__PURE__ */ jsx(
|
|
293
|
+
Form.Field,
|
|
294
|
+
{
|
|
295
|
+
control: form.control,
|
|
296
|
+
name: "description",
|
|
297
|
+
render: ({ field }) => {
|
|
298
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
299
|
+
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("fields.description") }),
|
|
300
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
301
|
+
Textarea,
|
|
302
|
+
{
|
|
303
|
+
...field,
|
|
304
|
+
disabled: !inventoryItemId || !locationId,
|
|
305
|
+
placeholder: t(
|
|
306
|
+
"inventory.reservation.descriptionPlaceholder"
|
|
307
|
+
)
|
|
308
|
+
}
|
|
309
|
+
) }),
|
|
310
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
311
|
+
] });
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
)
|
|
315
|
+
] }) }),
|
|
316
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
317
|
+
/* @__PURE__ */ jsx(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
|
|
318
|
+
/* @__PURE__ */ jsx(
|
|
319
|
+
Button,
|
|
320
|
+
{
|
|
321
|
+
type: "submit",
|
|
322
|
+
variant: "primary",
|
|
323
|
+
size: "small",
|
|
324
|
+
isLoading: isPending,
|
|
325
|
+
children: t("actions.create")
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
] }) })
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
) });
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// src/pages/reservations/create/index.tsx
|
|
335
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
336
|
+
var Component = () => {
|
|
337
|
+
const [params] = useSearchParams();
|
|
338
|
+
const inventoryItemId = params.get("item_id");
|
|
339
|
+
return /* @__PURE__ */ jsx2(RouteFocusModal, { children: /* @__PURE__ */ jsx2(ReservationCreateForm, { inventoryItemId: inventoryItemId ?? void 0 }) });
|
|
340
|
+
};
|
|
341
|
+
export {
|
|
342
|
+
Component
|
|
343
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProductCreate,
|
|
3
3
|
ProductCreatePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CRVVPIFZ.js";
|
|
5
5
|
import "./chunk-LEWA4BPH.js";
|
|
6
6
|
import "./chunk-5FBQOAXU.js";
|
|
7
7
|
import "./chunk-HJ56YXBU.js";
|
|
@@ -9,46 +9,47 @@ import "./chunk-IQPN4PZJ.js";
|
|
|
9
9
|
import "./chunk-YVCBMOJG.js";
|
|
10
10
|
import "./chunk-BTQN4KKH.js";
|
|
11
11
|
import "./chunk-OVPAOBZB.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-HHCLMWXT.js";
|
|
13
13
|
import {
|
|
14
14
|
EditProductMediaSchema,
|
|
15
15
|
MediaSchema,
|
|
16
16
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
17
17
|
ProductCreateSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ATYOOL7K.js";
|
|
19
19
|
import "./chunk-AJLGY3LQ.js";
|
|
20
20
|
import "./chunk-SMQT3ZNO.js";
|
|
21
21
|
import "./chunk-KDE4HKH2.js";
|
|
22
22
|
import "./chunk-4OQLPIUZ.js";
|
|
23
23
|
import "./chunk-NWU7EGGF.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-VAFGNDAP.js";
|
|
25
25
|
import "./chunk-WJ5EU3KW.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-EWJTXSKI.js";
|
|
27
27
|
import "./chunk-TKGWSUEI.js";
|
|
28
28
|
import "./chunk-SITRHMZZ.js";
|
|
29
29
|
import "./chunk-GDWBOQI5.js";
|
|
30
30
|
import "./chunk-3QSRE5LS.js";
|
|
31
31
|
import "./chunk-FQERBIVS.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-6GQLSWOO.js";
|
|
33
33
|
import "./chunk-YN3FGNJM.js";
|
|
34
34
|
import "./chunk-KCHYLLVG.js";
|
|
35
35
|
import "./chunk-3EF54XFY.js";
|
|
36
36
|
import "./chunk-THHRRYRS.js";
|
|
37
37
|
import "./chunk-LRD242C7.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-VH3TGSWE.js";
|
|
39
39
|
import "./chunk-WIYFXWRI.js";
|
|
40
40
|
import "./chunk-INNFZYX2.js";
|
|
41
41
|
import "./chunk-BDGZ4EQO.js";
|
|
42
42
|
import "./chunk-LAVHRER2.js";
|
|
43
43
|
import "./chunk-QHQWEERJ.js";
|
|
44
44
|
import "./chunk-Y7QKP6QU.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-6YQR2AWM.js";
|
|
46
46
|
import "./chunk-K5324KIX.js";
|
|
47
47
|
import "./chunk-FV76G2D7.js";
|
|
48
48
|
import "./chunk-GHDLST2P.js";
|
|
49
49
|
import "./chunk-YVYYOBAE.js";
|
|
50
50
|
import "./chunk-L2NJPDUD.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-7LIENHWP.js";
|
|
52
|
+
import "./chunk-NV2RZAHW.js";
|
|
52
53
|
import "./chunk-MR6REQKT.js";
|
|
53
54
|
import "./chunk-EPSDO2MJ.js";
|
|
54
55
|
import "./chunk-BHEU34FL.js";
|
|
@@ -59,9 +60,10 @@ import "./chunk-J2XUEO2E.js";
|
|
|
59
60
|
import "./chunk-DETQ6IBQ.js";
|
|
60
61
|
import "./chunk-VWPNMEOE.js";
|
|
61
62
|
import "./chunk-O72AIZUN.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-GL3XVUAY.js";
|
|
64
|
+
import "./chunk-AHR2FIMC.js";
|
|
65
|
+
import "./chunk-JYUHDM23.js";
|
|
66
|
+
import "./chunk-7POOMBIN.js";
|
|
65
67
|
import "./chunk-4U2BLH45.js";
|
|
66
68
|
import "./chunk-EMUCGKHP.js";
|
|
67
69
|
import "./chunk-A5DJIOHN.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
Form
|
|
19
19
|
} from "./chunk-3QSRE5LS.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-6YQR2AWM.js";
|
|
21
21
|
import "./chunk-K5324KIX.js";
|
|
22
22
|
import "./chunk-FV76G2D7.js";
|
|
23
23
|
import {
|
|
@@ -25,7 +25,8 @@ import {
|
|
|
25
25
|
} from "./chunk-GHDLST2P.js";
|
|
26
26
|
import "./chunk-YVYYOBAE.js";
|
|
27
27
|
import "./chunk-L2NJPDUD.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-7LIENHWP.js";
|
|
29
|
+
import "./chunk-NV2RZAHW.js";
|
|
29
30
|
import "./chunk-MR6REQKT.js";
|
|
30
31
|
import "./chunk-EPSDO2MJ.js";
|
|
31
32
|
import "./chunk-BHEU34FL.js";
|
|
@@ -36,9 +37,10 @@ import "./chunk-J2XUEO2E.js";
|
|
|
36
37
|
import "./chunk-DETQ6IBQ.js";
|
|
37
38
|
import "./chunk-VWPNMEOE.js";
|
|
38
39
|
import "./chunk-O72AIZUN.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-GL3XVUAY.js";
|
|
41
|
+
import "./chunk-AHR2FIMC.js";
|
|
42
|
+
import "./chunk-JYUHDM23.js";
|
|
43
|
+
import "./chunk-7POOMBIN.js";
|
|
42
44
|
import "./chunk-4U2BLH45.js";
|
|
43
45
|
import "./chunk-EMUCGKHP.js";
|
|
44
46
|
import "./chunk-A5DJIOHN.js";
|