@pisell/private-materials 3.2.38 → 3.3.0
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +76 -9
- package/es/components/appointmentBooking/components/Content/index.less +21 -0
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +131 -38
- package/es/components/appointmentBooking/components/Date/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.js +8 -2
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/index.js +200 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Guest/index.js +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +53 -19
- package/es/components/appointmentBooking/components/Resource/index.js +67 -12
- package/es/components/appointmentBooking/components/Services/index.js +213 -75
- package/es/components/appointmentBooking/components/Services/index.less +0 -14
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
- package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/es/components/appointmentBooking/context.d.ts +4 -4
- package/es/components/appointmentBooking/context.js +42 -33
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +57 -0
- package/es/components/appointmentBooking/hooks.d.ts +29 -1
- package/es/components/appointmentBooking/hooks.js +382 -114
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +9 -4
- package/es/components/appointmentBooking/locales.d.ts +51 -3
- package/es/components/appointmentBooking/locales.js +58 -4
- package/es/components/appointmentBooking/utils.d.ts +66 -1
- package/es/components/appointmentBooking/utils.js +226 -33
- package/es/components/booking/addons/index.js +10 -6
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +90 -72
- package/es/components/booking/components/footer/utils.d.ts +11 -0
- package/es/components/booking/components/footer/utils.js +72 -44
- package/es/components/booking/components/voucher/index.js +22 -6
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/es/components/booking/info/hooks/useAddHolder.js +70 -0
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
- package/es/components/booking/info/index.js +9 -2
- package/es/components/booking/info/main.js +1 -1
- package/es/components/booking/info/pet/index.js +18 -17
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +119 -0
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +7 -5
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +7 -5
- package/es/components/booking/info/service/index.js +2 -2
- package/es/components/booking/info/service/serviceList/index.js +1 -0
- package/es/components/booking/info/service/serviceManager/index.js +12 -7
- package/es/components/booking/info/service2/Group/utils.js +2 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
- package/es/components/booking/info/service2/utils.d.ts +5 -4
- package/es/components/booking/info/service2/utils.js +356 -88
- package/es/components/booking/info/utils.d.ts +2 -0
- package/es/components/booking/info/utils.js +45 -1
- package/es/components/booking/info2/index.js +9 -6
- package/es/components/booking/info2/serve.d.ts +2 -2
- package/es/components/booking/info2/serve.js +8 -15
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +13 -8
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +49 -14
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
- package/es/components/booking/info2/service/editService/index.js +4 -3
- package/es/components/booking/info2/service/index.js +18 -37
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utils.js +43 -0
- package/es/components/booking/info2/utilsByBooking.js +17 -4
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.js +2 -2
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/addNote/index.less +3 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +20 -8
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/components/TabProduct/index.js +176 -0
- package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/es/components/productSelect/components/gridLayout/index.js +28 -0
- package/es/components/productSelect/components/gridLayout/index.less +6 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/es/components/productSelect/components/productGroup/index.js +145 -0
- package/es/components/productSelect/components/productGroup/index.less +208 -0
- package/es/components/productSelect/hooks/useToken.d.ts +18 -0
- package/es/components/productSelect/hooks/useToken.js +35 -0
- package/es/components/productSelect/index.d.ts +23 -0
- package/es/components/productSelect/index.js +93 -0
- package/es/components/productSelect/index.less +69 -0
- package/es/components/productSelect/locales.d.ts +18 -0
- package/es/components/productSelect/locales.js +17 -0
- package/es/components/productSelect/mock.d.ts +134 -0
- package/es/components/productSelect/mock.js +202 -0
- package/es/components/productSelect/theme/token.d.ts +17 -0
- package/es/components/productSelect/theme/token.js +19 -0
- package/es/components/shoppingCart/Provider.d.ts +1 -1
- package/es/components/shoppingCart/Provider.js +3 -1
- package/es/components/shoppingCart/components/Cart/Product.js +15 -3
- package/es/components/shoppingCart/components/Cart/index.less +15 -15
- package/es/components/shoppingCart/components/Render/index.less +15 -0
- package/es/components/shoppingCart/hooks/useAddService.js +7 -1
- package/es/components/shoppingCart/index.d.ts +1 -2
- package/es/components/shoppingCart/index.js +3 -1
- package/es/components/shoppingCart/status.js +4 -1
- package/es/components/shoppingCart/type.d.ts +5 -0
- package/es/components/subTotal/index.d.ts +22 -0
- package/es/components/subTotal/index.js +234 -0
- package/es/components/subTotal/index.less +70 -0
- package/es/components/subTotal/locales.d.ts +42 -0
- package/es/components/subTotal/locales.js +41 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/menuBar/index.js +54 -0
- package/es/components/ticketBooking/components/menuBar/index.less +84 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/es/components/ticketBooking/components/timeBar/index.js +113 -0
- package/es/components/ticketBooking/components/timeBar/index.less +22 -0
- package/es/components/ticketBooking/data.d.ts +58 -0
- package/es/components/ticketBooking/data.js +58 -58
- package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
- package/es/components/ticketBooking/index.d.ts +3 -3
- package/es/components/ticketBooking/index.js +139 -5
- package/es/components/ticketBooking/index.less +4 -0
- package/es/components/ticketBooking/locales.d.ts +144 -0
- package/es/components/ticketBooking/locales.js +143 -0
- package/es/components/ticketBooking/miniRedux.d.ts +22 -0
- package/es/components/ticketBooking/miniRedux.js +105 -0
- package/es/components/ticketBooking/serve.d.ts +282 -0
- package/es/components/ticketBooking/serve.js +957 -0
- package/es/components/ticketBooking/utils/index.d.ts +14 -0
- package/es/components/ticketBooking/utils/index.js +102 -0
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +59 -5
- package/lib/components/appointmentBooking/components/Content/index.less +21 -0
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +47 -19
- package/lib/components/appointmentBooking/components/Date/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/index.js +157 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -13
- package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
- package/lib/components/appointmentBooking/components/Services/index.js +86 -63
- package/lib/components/appointmentBooking/components/Services/index.less +0 -14
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
- package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/lib/components/appointmentBooking/context.d.ts +4 -4
- package/lib/components/appointmentBooking/context.js +15 -10
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +57 -0
- package/lib/components/appointmentBooking/hooks.d.ts +29 -1
- package/lib/components/appointmentBooking/hooks.js +148 -22
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +6 -4
- package/lib/components/appointmentBooking/locales.d.ts +51 -3
- package/lib/components/appointmentBooking/locales.js +52 -4
- package/lib/components/appointmentBooking/utils.d.ts +66 -1
- package/lib/components/appointmentBooking/utils.js +158 -33
- package/lib/components/booking/addons/index.js +9 -5
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +94 -32
- package/lib/components/booking/components/footer/utils.d.ts +11 -0
- package/lib/components/booking/components/footer/utils.js +38 -14
- package/lib/components/booking/components/voucher/index.js +18 -2
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
- package/lib/components/booking/info/index.js +5 -1
- package/lib/components/booking/info/main.js +1 -1
- package/lib/components/booking/info/pet/index.js +3 -2
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +106 -0
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +6 -4
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +5 -3
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/serviceList/index.js +1 -0
- package/lib/components/booking/info/service/serviceManager/index.js +6 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -1
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
- package/lib/components/booking/info/service2/utils.d.ts +5 -4
- package/lib/components/booking/info/service2/utils.js +304 -30
- package/lib/components/booking/info/utils.d.ts +2 -0
- package/lib/components/booking/info/utils.js +40 -1
- package/lib/components/booking/info2/index.js +6 -1
- package/lib/components/booking/info2/serve.d.ts +2 -2
- package/lib/components/booking/info2/serve.js +3 -10
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +11 -6
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +50 -17
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
- package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
- package/lib/components/booking/info2/service/editService/index.js +3 -1
- package/lib/components/booking/info2/service/index.js +18 -28
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utils.js +65 -0
- package/lib/components/booking/info2/utilsByBooking.js +12 -3
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.js +2 -2
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +1 -1
- package/lib/components/booking/notes/addNote/index.less +3 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +25 -10
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/components/TabProduct/index.js +172 -0
- package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/lib/components/productSelect/components/gridLayout/index.js +58 -0
- package/lib/components/productSelect/components/gridLayout/index.less +6 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/lib/components/productSelect/components/productGroup/index.js +122 -0
- package/lib/components/productSelect/components/productGroup/index.less +208 -0
- package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/components/productSelect/hooks/useToken.js +51 -0
- package/lib/components/productSelect/index.d.ts +23 -0
- package/lib/components/productSelect/index.js +119 -0
- package/lib/components/productSelect/index.less +69 -0
- package/lib/components/productSelect/locales.d.ts +18 -0
- package/lib/components/productSelect/locales.js +41 -0
- package/lib/components/productSelect/mock.d.ts +134 -0
- package/lib/components/productSelect/mock.js +276 -0
- package/lib/components/productSelect/theme/token.d.ts +17 -0
- package/lib/components/productSelect/theme/token.js +47 -0
- package/lib/components/shoppingCart/Provider.d.ts +1 -1
- package/lib/components/shoppingCart/Provider.js +3 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
- package/lib/components/shoppingCart/components/Cart/index.less +15 -15
- package/lib/components/shoppingCart/components/Render/index.less +15 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
- package/lib/components/shoppingCart/index.d.ts +1 -2
- package/lib/components/shoppingCart/index.js +2 -0
- package/lib/components/shoppingCart/status.js +4 -1
- package/lib/components/shoppingCart/type.d.ts +5 -0
- package/lib/components/subTotal/index.d.ts +22 -0
- package/lib/components/subTotal/index.js +175 -0
- package/lib/components/subTotal/index.less +70 -0
- package/lib/components/subTotal/locales.d.ts +42 -0
- package/lib/components/subTotal/locales.js +65 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
- package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
- package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
- package/lib/components/ticketBooking/data.d.ts +58 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
- package/lib/components/ticketBooking/index.d.ts +3 -3
- package/lib/components/ticketBooking/index.js +159 -3
- package/lib/components/ticketBooking/index.less +4 -0
- package/lib/components/ticketBooking/locales.d.ts +144 -0
- package/lib/components/ticketBooking/locales.js +167 -0
- package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
- package/lib/components/ticketBooking/miniRedux.js +96 -0
- package/lib/components/ticketBooking/serve.d.ts +282 -0
- package/lib/components/ticketBooking/serve.js +214 -0
- package/lib/components/ticketBooking/utils/index.d.ts +14 -0
- package/lib/components/ticketBooking/utils/index.js +131 -0
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/lowcode/product-select/meta.ts +217 -0
- package/lowcode/sub-total/meta.ts +134 -0
- package/lowcode/ticket-booking/meta.ts +29 -0
- package/package.json +2 -2
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
|
@@ -41,4 +41,6 @@ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
|
|
|
41
41
|
* @Date: 2024-11-29 11:19
|
|
42
42
|
*/
|
|
43
43
|
export declare const isDayBooking: (shopId: number) => boolean;
|
|
44
|
+
export declare const isOpenAddTime: (state: any) => boolean;
|
|
45
|
+
export declare const isShowAddTime: (state: any, currentService: any) => boolean;
|
|
44
46
|
export {};
|
|
@@ -5,6 +5,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
6
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
7
|
import dayjs from "dayjs";
|
|
8
|
+
import { getIsEdit } from "../utils";
|
|
9
|
+
import { isUsableProduct } from "../info2/service/addTimeModal/utils";
|
|
8
10
|
// 商品是套餐或单规格多规格
|
|
9
11
|
export var getIsBundleOrCombination = function getIsBundleOrCombination(productDetail) {
|
|
10
12
|
var _productDetail$bundle;
|
|
@@ -93,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
|
93
95
|
if (renderType === 'eventBooking') {
|
|
94
96
|
return false;
|
|
95
97
|
}
|
|
96
|
-
var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581];
|
|
98
|
+
var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9];
|
|
97
99
|
return booking4Shops.includes(shopId);
|
|
98
100
|
};
|
|
99
101
|
function generateDateRange(start, end) {
|
|
@@ -127,4 +129,46 @@ export var getMultiDayPrices = function getMultiDayPrices(data) {
|
|
|
127
129
|
export var isDayBooking = function isDayBooking(shopId) {
|
|
128
130
|
var dayBookingShops = [9];
|
|
129
131
|
return dayBookingShops.includes(shopId);
|
|
132
|
+
};
|
|
133
|
+
var getAddTimeProducts = function getAddTimeProducts(state, currentService) {
|
|
134
|
+
return (state.addTimeProducts || []).some(function (item) {
|
|
135
|
+
return isUsableProduct(item.add_time, currentService);
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
export var isOpenAddTime = function isOpenAddTime(state) {
|
|
139
|
+
var _state$bookingConfig;
|
|
140
|
+
var appointment_card = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.information_tab) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.appointment_card) || {
|
|
141
|
+
quick_time: 1
|
|
142
|
+
};
|
|
143
|
+
// event预约不需要
|
|
144
|
+
if ((state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking') {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 禁止编辑
|
|
149
|
+
if (state !== null && state !== void 0 && state.disabledEdit) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 未开启加时
|
|
154
|
+
if (appointment_card.quick_time !== 1) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// 是否展示加时按钮
|
|
161
|
+
export var isShowAddTime = function isShowAddTime(state, currentService) {
|
|
162
|
+
if (!isOpenAddTime(state)) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 如果在编辑态, 不展示加时
|
|
167
|
+
if (getIsEdit(state)) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
if (!getAddTimeProducts(state, currentService)) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
130
174
|
};
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
import React, { useContext, useEffect, useMemo } from 'react';
|
|
10
|
+
import React, { useContext, useEffect, useMemo, useRef } from 'react';
|
|
11
11
|
import { Provider, Context } from "../info/model";
|
|
12
12
|
import Client from "../info/client";
|
|
13
13
|
import Service from "./service";
|
|
@@ -54,6 +54,8 @@ var Info = Provider(function (props) {
|
|
|
54
54
|
var _modal$state;
|
|
55
55
|
return ((_modal$state = modal.state) === null || _modal$state === void 0 || (_modal$state = _modal$state.bookingConfig) === null || _modal$state === void 0 || (_modal$state = _modal$state.config) === null || _modal$state === void 0 || (_modal$state = _modal$state.basic) === null || _modal$state === void 0 ? void 0 : _modal$state.appointment_subject) || {};
|
|
56
56
|
}, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 || (_modal$state2 = _modal$state2.bookingConfig) === null || _modal$state2 === void 0 || (_modal$state2 = _modal$state2.config) === null || _modal$state2 === void 0 || (_modal$state2 = _modal$state2.basic) === null || _modal$state2 === void 0 ? void 0 : _modal$state2.appointment_subject]);
|
|
57
|
+
var stateRef = useRef(globalState);
|
|
58
|
+
stateRef.current = globalState;
|
|
57
59
|
var _useCreateBookingPage = useCreateBookingPageHeader(globalState),
|
|
58
60
|
createHeader = _useCreateBookingPage.createHeader,
|
|
59
61
|
isBookingCreatePage = _useCreateBookingPage.isBookingCreatePage,
|
|
@@ -152,16 +154,17 @@ var Info = Provider(function (props) {
|
|
|
152
154
|
timeoutNumber = 200;
|
|
153
155
|
modal.dispatch({
|
|
154
156
|
type: 'setService',
|
|
155
|
-
payload: {
|
|
157
|
+
payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
|
|
156
158
|
resourcesOrigin: bookingResourceList.list || [],
|
|
157
159
|
resourcesOriginMap: bookingResourceList.listMap
|
|
158
|
-
}
|
|
160
|
+
})
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
try {
|
|
163
165
|
// 同步最新数据用, 增加延迟为了不和getProduct接口冲突
|
|
164
166
|
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
167
|
+
var _stateRef$current;
|
|
165
168
|
var data;
|
|
166
169
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
167
170
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -169,17 +172,17 @@ var Info = Provider(function (props) {
|
|
|
169
172
|
_context.next = 2;
|
|
170
173
|
return getResourceList({
|
|
171
174
|
date: currentDate
|
|
172
|
-
});
|
|
175
|
+
}, stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.bookingId);
|
|
173
176
|
case 2:
|
|
174
177
|
data = _context.sent;
|
|
175
178
|
data.date = currentDate;
|
|
176
179
|
localStorage.setItem('bookingResourceList', JSON.stringify(data));
|
|
177
180
|
modal.dispatch({
|
|
178
181
|
type: 'setService',
|
|
179
|
-
payload: {
|
|
182
|
+
payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
|
|
180
183
|
resourcesOrigin: data.list || [],
|
|
181
184
|
resourcesOriginMap: data.listMap
|
|
182
|
-
}
|
|
185
|
+
})
|
|
183
186
|
});
|
|
184
187
|
case 6:
|
|
185
188
|
case "end":
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const getResourceList: (params: any) => Promise<{
|
|
2
|
-
list: any;
|
|
1
|
+
export declare const getResourceList: (params: any, bookingId?: number) => Promise<{
|
|
2
|
+
list: any[];
|
|
3
3
|
listMap: any;
|
|
4
4
|
}>;
|
|
5
5
|
export declare const createBookings: (params: any) => Promise<any>;
|
|
@@ -3,10 +3,10 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import { request } from "../utils";
|
|
6
|
-
import {
|
|
6
|
+
import { getFormatResourceListAndMap } from "./utils";
|
|
7
7
|
export var getResourceList = /*#__PURE__*/function () {
|
|
8
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
9
|
-
var _yield$request$getReq, data
|
|
8
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, bookingId) {
|
|
9
|
+
var _yield$request$getReq, data;
|
|
10
10
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
11
|
while (1) switch (_context.prev = _context.next) {
|
|
12
12
|
case 0:
|
|
@@ -15,21 +15,14 @@ export var getResourceList = /*#__PURE__*/function () {
|
|
|
15
15
|
case 2:
|
|
16
16
|
_yield$request$getReq = _context.sent;
|
|
17
17
|
data = _yield$request$getReq.data;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
list: resourceList,
|
|
21
|
-
listMap: resourceList.reduce(function (prev, item) {
|
|
22
|
-
prev[item.id] = item;
|
|
23
|
-
return prev;
|
|
24
|
-
}, {})
|
|
25
|
-
});
|
|
26
|
-
case 6:
|
|
18
|
+
return _context.abrupt("return", getFormatResourceListAndMap(data, bookingId));
|
|
19
|
+
case 5:
|
|
27
20
|
case "end":
|
|
28
21
|
return _context.stop();
|
|
29
22
|
}
|
|
30
23
|
}, _callee);
|
|
31
24
|
}));
|
|
32
|
-
return function getResourceList(_x) {
|
|
25
|
+
return function getResourceList(_x, _x2) {
|
|
33
26
|
return _ref.apply(this, arguments);
|
|
34
27
|
};
|
|
35
28
|
}();
|
|
@@ -51,7 +44,7 @@ export var createBookings = /*#__PURE__*/function () {
|
|
|
51
44
|
}
|
|
52
45
|
}, _callee2);
|
|
53
46
|
}));
|
|
54
|
-
return function createBookings(
|
|
47
|
+
return function createBookings(_x3) {
|
|
55
48
|
return _ref2.apply(this, arguments);
|
|
56
49
|
};
|
|
57
50
|
}();
|
|
@@ -73,7 +66,7 @@ export var editBookings = /*#__PURE__*/function () {
|
|
|
73
66
|
}
|
|
74
67
|
}, _callee3);
|
|
75
68
|
}));
|
|
76
|
-
return function editBookings(
|
|
69
|
+
return function editBookings(_x4, _x5) {
|
|
77
70
|
return _ref3.apply(this, arguments);
|
|
78
71
|
};
|
|
79
72
|
}();
|
|
@@ -30,7 +30,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
|
30
30
|
import { getProductDetail } from "../../../info/service/serve";
|
|
31
31
|
import { getIsBundleOrCombination } from "../../../info/utils";
|
|
32
32
|
import { getProductExtend } from "./utils";
|
|
33
|
-
import { formatProductListByCategory, getProductTotalPrice, request } from "../../../utils";
|
|
33
|
+
import { formatProductListByCategory, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
|
|
34
34
|
import { locales, getUniqueId } from '@pisell/utils';
|
|
35
35
|
import { useUpdateEffect } from 'ahooks';
|
|
36
36
|
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
@@ -174,8 +174,8 @@ var Info = function Info(props) {
|
|
|
174
174
|
return state.apis.getServices(_objectSpread({
|
|
175
175
|
skip: 1,
|
|
176
176
|
num: 500,
|
|
177
|
-
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product'],
|
|
178
|
-
with: ['category'],
|
|
177
|
+
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product', 'session_product', 'session_ticket'],
|
|
178
|
+
with: ['category', 'resourceRelation'],
|
|
179
179
|
ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara2 = state.eventOtherParams) === null || _state$eventOtherPara2 === void 0 ? void 0 : _state$eventOtherPara2.productIds : undefined,
|
|
180
180
|
open_quotation: 1,
|
|
181
181
|
with_schedule: 1,
|
|
@@ -228,8 +228,9 @@ var Info = function Info(props) {
|
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
230
|
var handleSelectProduct = function handleSelectProduct(item, type) {
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
var isSession = isSessionProduct(item);
|
|
232
|
+
// 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
|
|
233
|
+
var isEject = type === 'detail' || item.bundle_group_count > 0 || isSession;
|
|
233
234
|
var lock = false;
|
|
234
235
|
state.action({
|
|
235
236
|
type: 'pisell1.handleOpenProductModal',
|
|
@@ -238,11 +239,12 @@ var Info = function Info(props) {
|
|
|
238
239
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
239
240
|
showConfig: {
|
|
240
241
|
option: false,
|
|
241
|
-
session:
|
|
242
|
+
session: isSession,
|
|
242
243
|
variant: false,
|
|
243
244
|
package: true
|
|
244
245
|
},
|
|
245
|
-
is_eject: isEject ? 1 : 0
|
|
246
|
+
is_eject: isEject ? 1 : 0,
|
|
247
|
+
isOS: isSession
|
|
246
248
|
},
|
|
247
249
|
callback: function callback(e, extension_type, detail) {
|
|
248
250
|
// 防止选择商品弹窗多次触发callback
|
|
@@ -256,6 +258,8 @@ var Info = function Info(props) {
|
|
|
256
258
|
lock = false;
|
|
257
259
|
}, 2000);
|
|
258
260
|
var _detail = detail || item;
|
|
261
|
+
var other = JSON.parse(JSON.stringify(e));
|
|
262
|
+
other.session = e.session;
|
|
259
263
|
var cacheItem = _objectSpread(_objectSpread({}, _detail), {}, {
|
|
260
264
|
product_id: item.id,
|
|
261
265
|
_id: getUniqueId(),
|
|
@@ -265,7 +269,7 @@ var Info = function Info(props) {
|
|
|
265
269
|
quantity: 1,
|
|
266
270
|
price: _detail.price,
|
|
267
271
|
product_name: item.title,
|
|
268
|
-
other:
|
|
272
|
+
other: other
|
|
269
273
|
},
|
|
270
274
|
new: 1
|
|
271
275
|
});
|
|
@@ -379,6 +383,7 @@ var Info = function Info(props) {
|
|
|
379
383
|
}
|
|
380
384
|
});
|
|
381
385
|
}
|
|
386
|
+
return null;
|
|
382
387
|
if (state.renderType === 'eventBooking') {
|
|
383
388
|
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
384
389
|
style: {
|
|
@@ -78,3 +78,11 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
|
|
|
78
78
|
* @Date: 2024-06-01 13:25
|
|
79
79
|
*/
|
|
80
80
|
export declare const getProductExtend: ({ cacheItem, state }: any) => any;
|
|
81
|
+
/**
|
|
82
|
+
* @title: 格式化服务列表
|
|
83
|
+
* @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
|
|
84
|
+
* 使用with resourceRelation后 返回的resource_relation是实时数据
|
|
85
|
+
* 这里做一次转换
|
|
86
|
+
* @param list
|
|
87
|
+
*/
|
|
88
|
+
export declare const transServiceList: (list: any[]) => any[];
|
|
@@ -382,16 +382,32 @@ var getResourceByIds = function getResourceByIds(resourcesOriginMap, cacheItem)
|
|
|
382
382
|
item.optional_resource = (item.optional_resource || []).filter(function (d) {
|
|
383
383
|
return item.default_resource.indexOf(d) == -1;
|
|
384
384
|
});
|
|
385
|
+
var getChildrenMetadata = function getChildrenMetadata(d) {
|
|
386
|
+
var combiningResources = [];
|
|
387
|
+
if (resourcesOriginMap[d].combined_resource && resourcesOriginMap[d].combined_resource.status === 1) {
|
|
388
|
+
resourcesOriginMap[d].combined_resource.resource_ids.forEach(function (id) {
|
|
389
|
+
if (resourcesOriginMap[id]) {
|
|
390
|
+
combiningResources.push(resourcesOriginMap[id]);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return {
|
|
395
|
+
children: combiningResources,
|
|
396
|
+
metadata: _objectSpread(_objectSpread({}, resourcesOriginMap[d].metadata), {}, {
|
|
397
|
+
combined_resource: resourcesOriginMap[d].combined_resource
|
|
398
|
+
})
|
|
399
|
+
};
|
|
400
|
+
};
|
|
385
401
|
|
|
386
402
|
// 可选项
|
|
387
403
|
var optional_resource = item.optional_resource.map(function (d) {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
);
|
|
404
|
+
if (!resourcesOriginMap[d]) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
return Object.assign({}, resourcesOriginMap[d], _objectSpread({
|
|
408
|
+
form_id: form_id,
|
|
409
|
+
resourceType: item.type
|
|
410
|
+
}, getChildrenMetadata(d)));
|
|
395
411
|
}).filter(function (d) {
|
|
396
412
|
return d;
|
|
397
413
|
}).concat(getNoResource2({
|
|
@@ -403,10 +419,10 @@ var getResourceByIds = function getResourceByIds(resourcesOriginMap, cacheItem)
|
|
|
403
419
|
var item = resourcesOriginMap[d];
|
|
404
420
|
if (item) {
|
|
405
421
|
item.is_default = 1;
|
|
406
|
-
return Object.assign({}, item, {
|
|
422
|
+
return Object.assign({}, item, _objectSpread({
|
|
407
423
|
form_id: form_id,
|
|
408
424
|
resourceType: item.type
|
|
409
|
-
});
|
|
425
|
+
}, getChildrenMetadata(d)));
|
|
410
426
|
} else {
|
|
411
427
|
return null;
|
|
412
428
|
}
|
|
@@ -432,11 +448,12 @@ var getResourceByIds = function getResourceByIds(resourcesOriginMap, cacheItem)
|
|
|
432
448
|
return _resources;
|
|
433
449
|
};
|
|
434
450
|
var getIsAutoClose = function getIsAutoClose(cacheItem) {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
var
|
|
451
|
+
var _cacheItem$_data;
|
|
452
|
+
if (((_cacheItem$_data = cacheItem._data) === null || _cacheItem$_data === void 0 || (_cacheItem$_data = _cacheItem$_data.capacitys) === null || _cacheItem$_data === void 0 ? void 0 : _cacheItem$_data.type) !== 'custom') {
|
|
453
|
+
var _cacheItem$_data2;
|
|
454
|
+
if ((cacheItem === null || cacheItem === void 0 || (_cacheItem$_data2 = cacheItem._data) === null || _cacheItem$_data2 === void 0 ? void 0 : _cacheItem$_data2.resources.length) === 1) {
|
|
455
|
+
var _cacheItem$_data3, _first$select_type;
|
|
456
|
+
var first = cacheItem === null || cacheItem === void 0 || (_cacheItem$_data3 = cacheItem._data) === null || _cacheItem$_data3 === void 0 ? void 0 : _cacheItem$_data3.resources[0];
|
|
440
457
|
if (((_first$select_type = first.select_type) === null || _first$select_type === void 0 ? void 0 : _first$select_type.type) === 'single') {
|
|
441
458
|
if (first.default_resource.length > 0) {
|
|
442
459
|
return true;
|
|
@@ -582,4 +599,22 @@ export var getProductExtend = function getProductExtend(_ref10) {
|
|
|
582
599
|
}
|
|
583
600
|
console.log('_cacheItem_cacheItem', _cacheItem);
|
|
584
601
|
return _cacheItem;
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* @title: 格式化服务列表
|
|
606
|
+
* @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
|
|
607
|
+
* 使用with resourceRelation后 返回的resource_relation是实时数据
|
|
608
|
+
* 这里做一次转换
|
|
609
|
+
* @param list
|
|
610
|
+
*/
|
|
611
|
+
export var transServiceList = function transServiceList(list) {
|
|
612
|
+
return list.map(function (item) {
|
|
613
|
+
var _item$product_resourc;
|
|
614
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
615
|
+
product_resource: _objectSpread(_objectSpread({}, item.product_resource), {}, {
|
|
616
|
+
resources: (item === null || item === void 0 ? void 0 : item.resource_relation) || (item === null || item === void 0 || (_item$product_resourc = item.product_resource) === null || _item$product_resourc === void 0 ? void 0 : _item$product_resourc.resources)
|
|
617
|
+
})
|
|
618
|
+
});
|
|
619
|
+
});
|
|
585
620
|
};
|
|
@@ -139,7 +139,7 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
139
139
|
var _loop = function _loop(form_id) {
|
|
140
140
|
arr = [].concat(_toConsumableArray(arr), _toConsumableArray(resource[form_id].map(function (d) {
|
|
141
141
|
var _state$service$cacheI2;
|
|
142
|
-
return (_state$service$cacheI2 = state.service.cacheItem) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2._data.resourceMaps) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2[form_id]) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2.renderListMaps) === null || _state$service$cacheI2 === void 0 ? void 0 : _state$service$cacheI2[d.relation_id];
|
|
142
|
+
return (_state$service$cacheI2 = state.service.cacheItem) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2._data) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2.resourceMaps) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2[form_id]) === null || _state$service$cacheI2 === void 0 || (_state$service$cacheI2 = _state$service$cacheI2.renderListMaps) === null || _state$service$cacheI2 === void 0 ? void 0 : _state$service$cacheI2[d.relation_id];
|
|
143
143
|
})));
|
|
144
144
|
};
|
|
145
145
|
for (var form_id in resource) {
|
|
@@ -84,7 +84,7 @@ var Resources = function Resources(_ref, ref) {
|
|
|
84
84
|
}, {}) : {};
|
|
85
85
|
// 重新赋值, 因为select返回的是数字列表, 需要补充额外的数据
|
|
86
86
|
_val[form_id] = val.map(function (d) {
|
|
87
|
-
var _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3;
|
|
87
|
+
var _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _currentForm$renderLi5;
|
|
88
88
|
var _d = maps[d];
|
|
89
89
|
if (_d) {
|
|
90
90
|
if (key === 'like_status') {
|
|
@@ -99,12 +99,13 @@ var Resources = function Resources(_ref, ref) {
|
|
|
99
99
|
form_id: form_id,
|
|
100
100
|
relation_id: d,
|
|
101
101
|
like_status: 'common',
|
|
102
|
+
children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[d]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
|
|
102
103
|
// 新添加的数据补充错误信息
|
|
103
|
-
errors: getErrorList((_currentForm$
|
|
104
|
-
metadata: {
|
|
104
|
+
errors: getErrorList((_currentForm$renderLi3 = currentForm.renderListMaps) === null || _currentForm$renderLi3 === void 0 ? void 0 : _currentForm$renderLi3[d], getCurrentCacheItem()),
|
|
105
|
+
metadata: _objectSpread(_objectSpread({}, (_currentForm$renderLi4 = currentForm.renderListMaps) === null || _currentForm$renderLi4 === void 0 || (_currentForm$renderLi4 = _currentForm$renderLi4[d]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.metadata), {}, {
|
|
105
106
|
form_name: currentForm.title,
|
|
106
|
-
resource_name: (_currentForm$
|
|
107
|
-
}
|
|
107
|
+
resource_name: (_currentForm$renderLi5 = currentForm.renderListMaps[d]) === null || _currentForm$renderLi5 === void 0 ? void 0 : _currentForm$renderLi5.main_field
|
|
108
|
+
})
|
|
108
109
|
}
|
|
109
110
|
);
|
|
110
111
|
});
|
|
@@ -29,7 +29,7 @@ import CollapsibleList from "../../../components/collapsibleList";
|
|
|
29
29
|
import { renderBundles } from "../../../components/collapsibleList/utils";
|
|
30
30
|
import { useUpdateEffect, useMemoizedFn } from 'ahooks';
|
|
31
31
|
// import SelectTime from "../../../../../../../materials/src/components/select-time";
|
|
32
|
-
import { getServiceTimes, deleteCacheParams, getProductTotalPrice } from "../../../utils";
|
|
32
|
+
import { getServiceTimes, deleteCacheParams, getProductTotalPrice, isSessionProduct } from "../../../utils";
|
|
33
33
|
import { getErrorList } from "../../utilsByBooking";
|
|
34
34
|
import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
|
|
35
35
|
import { PisellAdjustPriceInputNumber } from '@pisell/materials';
|
|
@@ -390,7 +390,7 @@ var Info = function Info(_, ref) {
|
|
|
390
390
|
|
|
391
391
|
// 表单数据
|
|
392
392
|
var values = form.getFieldsValue();
|
|
393
|
-
|
|
393
|
+
var isSession = isSessionProduct(item);
|
|
394
394
|
// 打开商品详情弹窗
|
|
395
395
|
state.action({
|
|
396
396
|
type: 'pisell1.handleOpenProductModal',
|
|
@@ -399,10 +399,11 @@ var Info = function Info(_, ref) {
|
|
|
399
399
|
date: state.date.value.format('YYYY-MM-DD'),
|
|
400
400
|
showConfig: {
|
|
401
401
|
option: false,
|
|
402
|
-
session:
|
|
402
|
+
session: isSession,
|
|
403
403
|
variant: false,
|
|
404
404
|
package: true
|
|
405
405
|
},
|
|
406
|
+
isOS: isSession,
|
|
406
407
|
value: item._extend.other
|
|
407
408
|
},
|
|
408
409
|
callback: function callback(e, extension_type, detail) {
|
|
@@ -1,57 +1,38 @@
|
|
|
1
|
-
import React, { useEffect, useContext
|
|
1
|
+
import React, { useEffect, useContext } from 'react';
|
|
2
2
|
import AddService from "./addService";
|
|
3
3
|
import { Context } from "../../info/model";
|
|
4
4
|
import EditService from "./editService";
|
|
5
5
|
import "../../info/service/index.less";
|
|
6
|
-
import ServiceList from "./serviceList";
|
|
7
6
|
import AddTimeModal from "./addTimeModal";
|
|
7
|
+
import useInfoHolder from "../../info/hooks/useInfoHolder";
|
|
8
|
+
import Lists from "../../info/service/Lists";
|
|
8
9
|
import useClearCart from "../../hooks/useClearCart";
|
|
9
10
|
var Service = function Service() {
|
|
10
|
-
var _state$bookingConfig2;
|
|
11
11
|
var _useContext = useContext(Context),
|
|
12
12
|
state = _useContext.state,
|
|
13
13
|
dispatch = _useContext.dispatch;
|
|
14
|
-
var
|
|
14
|
+
var _useInfoHolder = useInfoHolder(state, dispatch),
|
|
15
|
+
detailRef = _useInfoHolder.detailRef,
|
|
16
|
+
handleEdit = _useInfoHolder.handleEdit,
|
|
17
|
+
handleAction = _useInfoHolder.handleAction,
|
|
18
|
+
dispatchService = _useInfoHolder.dispatchService,
|
|
19
|
+
showAddTimeModal = _useInfoHolder.showAddTimeModal;
|
|
15
20
|
useEffect(function () {
|
|
16
21
|
document.body.id = 'body';
|
|
17
22
|
}, []);
|
|
18
|
-
var appointment_card = useMemo(function () {
|
|
19
|
-
var _state$bookingConfig;
|
|
20
|
-
return (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.information_tab) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.appointment_card) || {
|
|
21
|
-
quick_time: 1
|
|
22
|
-
};
|
|
23
|
-
}, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.information_tab]);
|
|
24
|
-
var showAddTimeModal = useMemo(function () {
|
|
25
|
-
// event预约不需要
|
|
26
|
-
if ((state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking') {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// 禁止编辑
|
|
31
|
-
if (state !== null && state !== void 0 && state.disabledEdit) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 未开启加时
|
|
36
|
-
if (appointment_card.quick_time !== 1) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return true;
|
|
40
|
-
}, [state, appointment_card.quick_time]);
|
|
41
|
-
var handleEdit = function handleEdit(cacheItem) {
|
|
42
|
-
setTimeout(function () {
|
|
43
|
-
var _detailRef$current, _detailRef$current$in;
|
|
44
|
-
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem);
|
|
45
|
-
}, 100);
|
|
46
|
-
};
|
|
47
23
|
var clearCart = useClearCart(state, dispatch);
|
|
48
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
49
25
|
className: "pisell-lowcode__booking-service-wrap"
|
|
50
|
-
}, clearCart, /*#__PURE__*/React.createElement(
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
}, clearCart, /*#__PURE__*/React.createElement(Lists, {
|
|
27
|
+
isParallelResource: true,
|
|
28
|
+
onEdit: handleEdit,
|
|
29
|
+
onAction: handleAction,
|
|
30
|
+
onChange: function onChange(e, type) {
|
|
31
|
+
return dispatchService(type || 'setService', e);
|
|
32
|
+
}
|
|
33
|
+
}), !state.isBookingCreatePage ? /*#__PURE__*/React.createElement(AddService, {
|
|
53
34
|
onEdit: handleEdit
|
|
54
|
-
})), /*#__PURE__*/React.createElement(EditService, {
|
|
35
|
+
}) : null), /*#__PURE__*/React.createElement(EditService, {
|
|
55
36
|
ref: detailRef
|
|
56
37
|
}), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null));
|
|
57
38
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { getNoResource2 } from "../mock";
|
|
8
|
+
export var getFormatResourceListAndMap = function getFormatResourceListAndMap(data, bookingId) {
|
|
9
|
+
var resourceList = (data || {}).concat([getNoResource2({})]);
|
|
10
|
+
var map = resourceList.reduce(function (prev, item) {
|
|
11
|
+
prev[item.id] = item;
|
|
12
|
+
return prev;
|
|
13
|
+
}, {});
|
|
14
|
+
var getCapacity = function getCapacity(item) {
|
|
15
|
+
var _item$combined_resour, _item$combined_resour2;
|
|
16
|
+
if (((_item$combined_resour = item.combined_resource) === null || _item$combined_resour === void 0 ? void 0 : _item$combined_resour.status) === 1 && (_item$combined_resour2 = item.combined_resource) !== null && _item$combined_resour2 !== void 0 && (_item$combined_resour2 = _item$combined_resour2.resource_ids) !== null && _item$combined_resour2 !== void 0 && _item$combined_resour2.length) {
|
|
17
|
+
var _item$combined_resour3;
|
|
18
|
+
return (_item$combined_resour3 = item.combined_resource) === null || _item$combined_resour3 === void 0 ? void 0 : _item$combined_resour3.resource_ids.reduce(function (pre, cur) {
|
|
19
|
+
var pax = 0;
|
|
20
|
+
map[cur].times.forEach(function (time) {
|
|
21
|
+
time.event_list.forEach(function (event) {
|
|
22
|
+
if (event.id !== bookingId) {
|
|
23
|
+
pax += (event === null || event === void 0 ? void 0 : event.pax) || 0;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return pre - pax;
|
|
28
|
+
}, item.capacity);
|
|
29
|
+
}
|
|
30
|
+
return item.capacity;
|
|
31
|
+
};
|
|
32
|
+
resourceList = resourceList.map(function (item) {
|
|
33
|
+
var newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
34
|
+
capacity: getCapacity(item)
|
|
35
|
+
});
|
|
36
|
+
map[item.id] = newItem;
|
|
37
|
+
return newItem;
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
list: resourceList,
|
|
41
|
+
listMap: map
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -9,7 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
import dayjs from 'dayjs';
|
|
11
11
|
import { locales } from "@pisell/utils";
|
|
12
|
-
import { getCacheParams, getServeStartTime, getLastServer, flexibleObj, getServiceTimes, findNextDuration } from "../utils";
|
|
12
|
+
import { getCacheParams, getServeStartTime, getLastServer, flexibleObj, getServiceTimes, findNextDuration, getDays, isSessionProduct } from "../utils";
|
|
13
13
|
|
|
14
14
|
// 获取当前剩余量
|
|
15
15
|
var getUseableEventCount = function getUseableEventCount(eventList, current) {
|
|
@@ -69,7 +69,9 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
// 已预约的列表
|
|
72
|
-
var eventList = time.event_list || []
|
|
72
|
+
var eventList = (time.event_list || []).filter(function (event) {
|
|
73
|
+
return event.id !== (cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.booking_id);
|
|
74
|
+
});
|
|
73
75
|
var endDate = null;
|
|
74
76
|
// 是否去计算数量
|
|
75
77
|
var isCalcCount = true;
|
|
@@ -113,7 +115,7 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
113
115
|
*/
|
|
114
116
|
|
|
115
117
|
// 取出已预约列表和当前预约重叠的时间段
|
|
116
|
-
var conflict = (
|
|
118
|
+
var conflict = (eventList || []).filter(function (d) {
|
|
117
119
|
return isConflict({
|
|
118
120
|
start_at: d.start_at,
|
|
119
121
|
end_at: d.end_at
|
|
@@ -293,7 +295,7 @@ export var formatResource = function formatResource(resourceItem, cacheItem, for
|
|
|
293
295
|
* @Date: 2024-01-26 14:09
|
|
294
296
|
*/
|
|
295
297
|
export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTime(state, cacheItem, timeObj) {
|
|
296
|
-
var _cacheItem$duration;
|
|
298
|
+
var _cacheItem$duration, _cacheItem$_extend;
|
|
297
299
|
// 获取上一个服务商品
|
|
298
300
|
var lastServer = getLastServer(state.service.value);
|
|
299
301
|
|
|
@@ -353,5 +355,16 @@ export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTim
|
|
|
353
355
|
endDate = _getServiceTimes2.endDate;
|
|
354
356
|
_extend.startDate = startDate;
|
|
355
357
|
_extend.endDate = endDate;
|
|
358
|
+
var session = cacheItem === null || cacheItem === void 0 || (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 || (_cacheItem$_extend = _cacheItem$_extend.other) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.session;
|
|
359
|
+
if (isSessionProduct(cacheItem) && session) {
|
|
360
|
+
_extend.start_date = session.start_at;
|
|
361
|
+
_extend.startDate = session.start_at;
|
|
362
|
+
_extend.start_time = session.start_time;
|
|
363
|
+
_extend.end_date = session.end_at;
|
|
364
|
+
_extend.endDate = session.end_at;
|
|
365
|
+
_extend.duration = getDays({
|
|
366
|
+
_extend: _extend
|
|
367
|
+
}, 'minutes');
|
|
368
|
+
}
|
|
356
369
|
return _extend;
|
|
357
370
|
};
|