@pisell/private-materials 6.8.7 → 6.8.9
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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +16 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +34 -16
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +67 -35
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +66 -42
- package/es/components/booking/components/voucher/index.js +58 -14
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +8 -2
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +21 -0
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +84 -36
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +23 -5
- package/es/components/booking/info2/service/addService/index.js +146 -88
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +78 -9
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +332 -76
- package/es/components/booking/info2/utilsByBooking.js +14 -5
- package/es/components/booking/locales.d.ts +30 -0
- package/es/components/booking/locales.js +39 -3
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +11 -3
- package/es/components/booking/utils.js +24 -1
- package/es/components/checkout/PaymentModal.js +15 -10
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/{wallet/Detail/serve.js → ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js} +112 -57
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +19 -15
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +14 -11
- package/es/components/ticketBooking/utils/index.d.ts +10 -2
- package/es/components/ticketBooking/utils/index.js +37 -7
- package/es/components/walletList/index.d.ts +0 -24
- package/es/components/walletList/index.js +173 -41
- package/es/components/walletList/locales.d.ts +9 -0
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.d.ts +9 -0
- package/es/plus/walletEditor/locales.js +12 -3
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/index.js +223 -41
- package/es/plus/walletPassGallery/locales.d.ts +15 -0
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +17 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +11 -0
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +25 -4
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +41 -29
- package/lib/components/booking/components/voucher/index.js +48 -6
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +4 -2
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +5 -0
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +32 -16
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +11 -0
- package/lib/components/booking/info2/service/addService/index.js +22 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +47 -9
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +273 -38
- package/lib/components/booking/info2/utilsByBooking.js +19 -8
- package/lib/components/booking/locales.d.ts +30 -0
- package/lib/components/booking/locales.js +33 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +11 -3
- package/lib/components/booking/utils.js +15 -0
- package/lib/components/checkout/PaymentModal.js +5 -2
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +10 -9
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
- package/lib/components/ticketBooking/utils/index.d.ts +10 -2
- package/lib/components/ticketBooking/utils/index.js +31 -6
- package/lib/components/walletList/index.d.ts +0 -24
- package/lib/components/walletList/index.js +100 -4
- package/lib/components/walletList/locales.d.ts +9 -0
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +17 -14
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.d.ts +9 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/index.js +154 -27
- package/lib/plus/walletPassGallery/locales.d.ts +15 -0
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +290 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{components/wallet/components → pro/multiDayTimeSelect}/index.js +6 -16
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +4 -4
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/serve.js +0 -205
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.booking-holder-field {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
|
|
6
|
+
&__header {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__title {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
line-height: 20px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__required {
|
|
24
|
+
color: #ff4d4f;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__count {
|
|
28
|
+
color: #667085;
|
|
29
|
+
font-size: 12px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__actions {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__action-button {
|
|
39
|
+
padding: 0;
|
|
40
|
+
border: none;
|
|
41
|
+
background: transparent;
|
|
42
|
+
color: #7f56d9;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
line-height: 16px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
span {
|
|
47
|
+
text-decoration: underline;
|
|
48
|
+
text-underline-offset: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
color: #6941c6;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:disabled,
|
|
56
|
+
&.booking-holder-field__action--disabled {
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
opacity: 0.5;
|
|
59
|
+
color: #c2a9f1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -40,6 +40,7 @@ var import_model = require("../../../info/model");
|
|
|
40
40
|
var import_duration = __toESM(require("../../../materiels/duration"));
|
|
41
41
|
var import_Capacity = __toESM(require("./Capacity"));
|
|
42
42
|
var import_Resources = __toESM(require("./Resources"));
|
|
43
|
+
var import_Holder = __toESM(require("./Holder"));
|
|
43
44
|
var import_antd = require("antd");
|
|
44
45
|
var import_index = require("./index.less");
|
|
45
46
|
var import_collapsibleList = __toESM(require("../../../components/collapsibleList"));
|
|
@@ -56,20 +57,29 @@ var import_utils7 = require("../addService/utils");
|
|
|
56
57
|
var import_utils8 = require("./utils");
|
|
57
58
|
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
|
58
59
|
var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
|
|
60
|
+
var import_EditTabs = __toESM(require("../../../info/service/editService/EditTabs"));
|
|
61
|
+
var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
|
|
62
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
63
|
+
var import_utils9 = require("../../../info/service2/Group/utils");
|
|
59
64
|
var submitLock = false;
|
|
60
65
|
var Info = (_, ref) => {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I;
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
62
67
|
const [form] = import_antd.Form.useForm();
|
|
63
68
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
64
69
|
const useResource = import_antd.Form.useWatch("resource", form);
|
|
65
70
|
const useStartTime = import_antd.Form.useWatch("start_time", form);
|
|
66
71
|
const useDuration = import_antd.Form.useWatch("duration", form);
|
|
72
|
+
const useHolder = import_antd.Form.useWatch("holder", form);
|
|
73
|
+
const useHolderId = import_antd.Form.useWatch("holder_id", form);
|
|
67
74
|
const useNote = import_antd.Form.useWatch("note", form);
|
|
75
|
+
const useStartDate = import_antd.Form.useWatch("start_date", form);
|
|
76
|
+
const useEndDate = import_antd.Form.useWatch("end_date", form);
|
|
68
77
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
69
78
|
const resourcesRef = (0, import_react.useRef)(null);
|
|
70
79
|
const isChangeTotal = (0, import_react.useRef)(false);
|
|
71
80
|
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
|
72
81
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
82
|
+
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
73
83
|
(0, import_react.useEffect)(() => {
|
|
74
84
|
window.openBookingEditModal = () => {
|
|
75
85
|
setOpen(true);
|
|
@@ -124,6 +134,7 @@ var Info = (_, ref) => {
|
|
|
124
134
|
}, [durationProps, import_utils.locales.locale]);
|
|
125
135
|
const timeObj = (0, import_react.useMemo)(() => {
|
|
126
136
|
const val2 = (0, import_utils7.getTimeObj)({
|
|
137
|
+
cacheItem: getCurrentCacheItem(),
|
|
127
138
|
durationProps,
|
|
128
139
|
useStartTime,
|
|
129
140
|
currentResource,
|
|
@@ -188,7 +199,7 @@ var Info = (_, ref) => {
|
|
|
188
199
|
form.setFieldsValue({ discount });
|
|
189
200
|
};
|
|
190
201
|
const onFinish = (values) => {
|
|
191
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
202
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
192
203
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
193
204
|
if (isShowTimeAndResource && !isSuccess) {
|
|
194
205
|
return;
|
|
@@ -213,37 +224,67 @@ var Info = (_, ref) => {
|
|
|
213
224
|
},
|
|
214
225
|
...values
|
|
215
226
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
227
|
+
if (isEditGroup) {
|
|
228
|
+
_extend.quantity = 1;
|
|
229
|
+
_extend.startDate = _extend == null ? void 0 : _extend.start_date;
|
|
230
|
+
_extend.endDate = _extend == null ? void 0 : _extend.end_date;
|
|
231
|
+
} else {
|
|
232
|
+
const { startDate, endDate } = (0, import_utils6.getServiceTimes)({ _extend });
|
|
233
|
+
_extend.startDate = startDate;
|
|
234
|
+
_extend.endDate = endDate;
|
|
235
|
+
}
|
|
219
236
|
if (_extend.bundle_edit !== void 0) {
|
|
220
237
|
_extend.bundle_edit = 1;
|
|
221
238
|
}
|
|
222
239
|
_item._extend = _extend;
|
|
223
240
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
224
241
|
_item._serviceKey = (0, import_utils3.genServiceKey)(_item);
|
|
242
|
+
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
243
|
+
if (((_d2 = (_c2 = _item._extend) == null ? void 0 : _c2.holder_id) == null ? void 0 : _d2.length) > 1 || ((_e2 = _item._extend) == null ? void 0 : _e2.quantity) > 1 && ((_g2 = (_f2 = _item._extend) == null ? void 0 : _f2.holder_id) == null ? void 0 : _g2.length) >= 1) {
|
|
244
|
+
let holder_ids = _item._extend.holder_id;
|
|
245
|
+
_item._extend.holder_id = holder_ids[0];
|
|
246
|
+
holder_ids = holder_ids.slice(1);
|
|
247
|
+
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
248
|
+
holder_ids.forEach((holder_id) => {
|
|
249
|
+
const newItem = { ..._item, _id: (0, import_utils.getUniqueId)(), _extend: { ..._item._extend, holder_id: [holder_id], quantity: 1 } };
|
|
250
|
+
newItem._holderKey = (0, import_utils3.genHolderKey)(newItem);
|
|
251
|
+
_list.unshift(newItem);
|
|
252
|
+
_item._extend.quantity -= 1;
|
|
253
|
+
});
|
|
254
|
+
if (_item._extend.quantity > 1) {
|
|
255
|
+
const newItem = { ..._item, _id: (0, import_utils.getUniqueId)(), _extend: { ..._item._extend, holder_id: void 0, quantity: _item._extend.quantity - 1 } };
|
|
256
|
+
newItem._holderKey = (0, import_utils3.genHolderKey)(newItem);
|
|
257
|
+
_list.unshift(newItem);
|
|
258
|
+
_item._extend.quantity = 1;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
225
261
|
let _id = _item == null ? void 0 : _item._id;
|
|
262
|
+
let groupId = (_h2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _h2.groupId;
|
|
226
263
|
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
227
264
|
newTotal: values.total,
|
|
228
|
-
origin_total: (
|
|
265
|
+
origin_total: (_i2 = _item._extend) == null ? void 0 : _i2.origin_total
|
|
229
266
|
});
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
267
|
+
if (groupId) {
|
|
268
|
+
_list = _list.filter((d) => {
|
|
269
|
+
var _a3;
|
|
270
|
+
return ((_a3 = d._extend) == null ? void 0 : _a3.groupId) !== groupId;
|
|
271
|
+
});
|
|
272
|
+
_list = _list.concat((0, import_utils9.createBookingItemsByGroup)(_item, true));
|
|
233
273
|
} else {
|
|
234
|
-
if (
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
274
|
+
if (!_list.some((d) => d._id === _id)) {
|
|
275
|
+
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
276
|
+
_list = detail.list;
|
|
277
|
+
} else {
|
|
278
|
+
if (isChangeTotal.current) {
|
|
279
|
+
delete _item.discount_list;
|
|
280
|
+
}
|
|
281
|
+
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
240
282
|
}
|
|
241
|
-
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
242
283
|
}
|
|
243
284
|
(0, import_utils6.deleteCacheParams)();
|
|
244
285
|
console.log("_onFinish", _list);
|
|
245
286
|
form.resetFields();
|
|
246
|
-
if (!!((
|
|
287
|
+
if (!!((_j2 = state.service.cacheItem) == null ? void 0 : _j2.new)) {
|
|
247
288
|
window.dispatchEvent(
|
|
248
289
|
new CustomEvent("onAddNewService", {
|
|
249
290
|
detail: {
|
|
@@ -252,7 +293,15 @@ var Info = (_, ref) => {
|
|
|
252
293
|
})
|
|
253
294
|
);
|
|
254
295
|
}
|
|
255
|
-
(
|
|
296
|
+
(_k2 = window.closeBookingEditModal) == null ? void 0 : _k2.call(window);
|
|
297
|
+
_list.sort((a, b) => {
|
|
298
|
+
var _a3, _b3;
|
|
299
|
+
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
300
|
+
const bHasHolderId = ((_b3 = b._extend) == null ? void 0 : _b3.holder_id) && (Array.isArray(b._extend.holder_id) ? b._extend.holder_id.length > 0 : true);
|
|
301
|
+
if (!aHasHolderId && bHasHolderId) return -1;
|
|
302
|
+
if (aHasHolderId && !bHasHolderId) return 1;
|
|
303
|
+
return 0;
|
|
304
|
+
});
|
|
256
305
|
dispatch({
|
|
257
306
|
type: "setService",
|
|
258
307
|
payload: {
|
|
@@ -279,16 +328,34 @@ var Info = (_, ref) => {
|
|
|
279
328
|
(_cacheItem, open2, openProductDetail) => {
|
|
280
329
|
console.timeEnd("handleChange");
|
|
281
330
|
console.log("setEditDatasetEditData", _cacheItem, open2);
|
|
331
|
+
setCurrentTab("batch_edit");
|
|
282
332
|
isChangeTotal.current = false;
|
|
283
333
|
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
284
334
|
let values = cacheItem._extend;
|
|
285
335
|
const startTime2 = performance.now();
|
|
286
336
|
console.log(startTime2, "startTime");
|
|
287
337
|
form.resetFields();
|
|
288
|
-
form.setFieldsValue(
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
338
|
+
form.setFieldsValue({
|
|
339
|
+
capacity: values.capacity,
|
|
340
|
+
discount_reason: values.discount_reason,
|
|
341
|
+
duration: values.duration,
|
|
342
|
+
endDate: values.endDate,
|
|
343
|
+
end_date: values.end_date,
|
|
344
|
+
origin_total: values.origin_total,
|
|
345
|
+
price: values.price,
|
|
346
|
+
product_name: values.product_name,
|
|
347
|
+
quantity: values.quantity,
|
|
348
|
+
resource: values.resource,
|
|
349
|
+
startDate: values.startDate,
|
|
350
|
+
start_time: values.start_time,
|
|
351
|
+
start_date: values.start_date,
|
|
352
|
+
total: values.total,
|
|
353
|
+
holder_id: values.holder_id,
|
|
354
|
+
note: values.note
|
|
355
|
+
});
|
|
356
|
+
const endTime2 = performance.now();
|
|
357
|
+
console.log(endTime2 - window.pp1, "打开商品5");
|
|
358
|
+
console.log("执行时间", endTime2 - startTime2, values);
|
|
292
359
|
setTimeout(() => {
|
|
293
360
|
}, 20);
|
|
294
361
|
if (openProductDetail) {
|
|
@@ -305,9 +372,10 @@ var Info = (_, ref) => {
|
|
|
305
372
|
return cPrice !== oPrice;
|
|
306
373
|
}, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
|
|
307
374
|
const getResources = () => {
|
|
375
|
+
var _a2, _b2;
|
|
308
376
|
let res = (0, import_utils7.formatResources)({
|
|
309
377
|
cacheItem: getCurrentCacheItem(),
|
|
310
|
-
resourcesOrigin: state.service.cacheItem._data.resourcesOrigin
|
|
378
|
+
resourcesOrigin: (_b2 = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._data) == null ? void 0 : _b2.resourcesOrigin
|
|
311
379
|
});
|
|
312
380
|
dispatch({
|
|
313
381
|
type: "setService",
|
|
@@ -491,6 +559,18 @@ var Info = (_, ref) => {
|
|
|
491
559
|
}, [state.renderType, isNormalProduct]);
|
|
492
560
|
const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
|
|
493
561
|
const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
|
|
562
|
+
const items = (0, import_react.useMemo)(() => {
|
|
563
|
+
var _a2, _b2;
|
|
564
|
+
return ((_b2 = (_a2 = getCurrentCacheItem()) == null ? void 0 : _a2._extend) == null ? void 0 : _b2.items) || [];
|
|
565
|
+
}, [
|
|
566
|
+
getCurrentCacheItem(),
|
|
567
|
+
state.service.cacheItem,
|
|
568
|
+
currentResource,
|
|
569
|
+
useTotal
|
|
570
|
+
]);
|
|
571
|
+
const isEditGroup = (0, import_react.useMemo)(() => {
|
|
572
|
+
return items.length;
|
|
573
|
+
}, [items]);
|
|
494
574
|
const handleNoteConfirm = (noteValue) => {
|
|
495
575
|
form.setFieldsValue({ note: noteValue });
|
|
496
576
|
setNoteModalOpen(false);
|
|
@@ -573,16 +653,28 @@ var Info = (_, ref) => {
|
|
|
573
653
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
|
|
574
654
|
)) : null;
|
|
575
655
|
}, [isReason]);
|
|
656
|
+
const DateCom = (position) => {
|
|
657
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
658
|
+
import_antd.DatePicker,
|
|
659
|
+
{
|
|
660
|
+
className: "pisell-lowcode__booking-service-select-date",
|
|
661
|
+
disabledDate: (current) => (0, import_utils4.disabledDate)(current, position, state.date.value),
|
|
662
|
+
size: "large",
|
|
663
|
+
style: { width: "100%" },
|
|
664
|
+
format: state.locale === "en" ? "DD/MM/YYYY" : "YYYY-MM-DD"
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
};
|
|
576
668
|
const startTime = (0, import_react.useMemo)(() => {
|
|
577
669
|
var _a2, _b2, _c2, _d2;
|
|
578
670
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
579
671
|
import_antd.Form.Item,
|
|
580
672
|
{
|
|
581
|
-
label: import_utils.locales.getText("pisell2.text.start_time"),
|
|
582
|
-
name: "start_time",
|
|
673
|
+
label: import_utils.locales.getText(isEditGroup ? "pisell2.text.start_date" : "pisell2.text.start_time"),
|
|
674
|
+
name: isEditGroup ? "start_date" : "start_time",
|
|
583
675
|
rules: [{ required: true }]
|
|
584
676
|
},
|
|
585
|
-
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
677
|
+
isEditGroup ? DateCom("start") : SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
586
678
|
SelectTime,
|
|
587
679
|
{
|
|
588
680
|
slice: (_d2 = (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.service_time) == null ? void 0 : _d2.value,
|
|
@@ -595,10 +687,23 @@ var Info = (_, ref) => {
|
|
|
595
687
|
}
|
|
596
688
|
) : null
|
|
597
689
|
));
|
|
598
|
-
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value]);
|
|
690
|
+
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value, isEditGroup]);
|
|
691
|
+
const endTime = (0, import_react.useMemo)(() => {
|
|
692
|
+
if (!isEditGroup) {
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
696
|
+
import_antd.Form.Item,
|
|
697
|
+
{
|
|
698
|
+
label: import_utils.locales.getText("pisell2.text.end_date"),
|
|
699
|
+
name: "end_date"
|
|
700
|
+
},
|
|
701
|
+
DateCom("end")
|
|
702
|
+
));
|
|
703
|
+
}, [isEditGroup]);
|
|
599
704
|
const duration = (0, import_react.useMemo)(() => {
|
|
600
705
|
console.log("render form duration");
|
|
601
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
706
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: isEditGroup ? 24 : 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
602
707
|
import_antd.Form.Item,
|
|
603
708
|
{
|
|
604
709
|
label: import_utils.locales.getText("pisell2.text.duration"),
|
|
@@ -607,7 +712,7 @@ var Info = (_, ref) => {
|
|
|
607
712
|
},
|
|
608
713
|
/* @__PURE__ */ import_react.default.createElement(import_duration.default, { ...durationProps, timeObj })
|
|
609
714
|
));
|
|
610
|
-
}, [durationProps, timeObj]);
|
|
715
|
+
}, [durationProps, timeObj, isEditGroup]);
|
|
611
716
|
const resource = (0, import_react.useMemo)(() => {
|
|
612
717
|
console.log("render form resource");
|
|
613
718
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -624,6 +729,38 @@ var Info = (_, ref) => {
|
|
|
624
729
|
(_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
|
|
625
730
|
(_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
|
|
626
731
|
]);
|
|
732
|
+
const holder = (0, import_react.useMemo)(() => {
|
|
733
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
734
|
+
const showExtra = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.subject_require) === "require" && (!useHolderId || (useHolderId == null ? void 0 : useHolderId.length) < ((_e2 = (_d2 = state.service.cacheItem) == null ? void 0 : _d2._extend) == null ? void 0 : _e2.quantity));
|
|
735
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
736
|
+
import_antd.Form.Item,
|
|
737
|
+
{
|
|
738
|
+
name: "holder_id",
|
|
739
|
+
style: { width: "100%" },
|
|
740
|
+
rules: [
|
|
741
|
+
{
|
|
742
|
+
required: ((_h2 = (_g2 = (_f2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f2.config) == null ? void 0 : _g2.basic) == null ? void 0 : _h2.subject_require) === "require",
|
|
743
|
+
validator: (rule, value, callback) => {
|
|
744
|
+
debugger;
|
|
745
|
+
if (showExtra) {
|
|
746
|
+
callback(import_utils.locales.getText("page.booking.text.holder.length-error"));
|
|
747
|
+
} else {
|
|
748
|
+
callback();
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
755
|
+
import_Holder.default,
|
|
756
|
+
{
|
|
757
|
+
state,
|
|
758
|
+
cacheItem: state.service.cacheItem,
|
|
759
|
+
dispatch
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
));
|
|
763
|
+
}, [state.pet, state.client, state.service.cacheItem, useHolderId]);
|
|
627
764
|
const capacity = (0, import_react.useMemo)(() => {
|
|
628
765
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(import_Capacity.default, { state, cacheItem: state.service.cacheItem }));
|
|
629
766
|
}, [
|
|
@@ -726,6 +863,91 @@ var Info = (_, ref) => {
|
|
|
726
863
|
setVal(false);
|
|
727
864
|
}
|
|
728
865
|
}, [isShowTimeAndResource]);
|
|
866
|
+
const groupDom = (0, import_react.useMemo)(() => {
|
|
867
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!isEditGroup && /* @__PURE__ */ import_react.default.createElement(
|
|
868
|
+
import_EditTabs.default,
|
|
869
|
+
{
|
|
870
|
+
value: currentTab,
|
|
871
|
+
onChange: (e) => {
|
|
872
|
+
console.log(e);
|
|
873
|
+
setCurrentTab(e);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
877
|
+
"div",
|
|
878
|
+
{
|
|
879
|
+
className: "",
|
|
880
|
+
style: {
|
|
881
|
+
display: currentTab === "booking_list" ? "block" : "none"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
/* @__PURE__ */ import_react.default.createElement(import_BookingList.default, { items })
|
|
885
|
+
));
|
|
886
|
+
}, [isEditGroup, currentTab, items]);
|
|
887
|
+
const updateMultiDay = async ({ start_date, end_date, duration: duration2 }) => {
|
|
888
|
+
const cacheItem = await (0, import_utils7.getMultiDay)({
|
|
889
|
+
start_date,
|
|
890
|
+
end_date,
|
|
891
|
+
state,
|
|
892
|
+
cacheItem: getCurrentCacheItem()
|
|
893
|
+
});
|
|
894
|
+
if (duration2 !== void 0) {
|
|
895
|
+
cacheItem._extend.duration = duration2;
|
|
896
|
+
}
|
|
897
|
+
cacheItem._extend.items = (0, import_utils9.createBookingItemsByGroup)(cacheItem);
|
|
898
|
+
cacheItem._extend = {
|
|
899
|
+
...cacheItem._extend,
|
|
900
|
+
...(0, import_utils9.getGroupTotalPrice)(cacheItem._extend.items)
|
|
901
|
+
};
|
|
902
|
+
dispatch({
|
|
903
|
+
type: "setService",
|
|
904
|
+
payload: {
|
|
905
|
+
cacheItem
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
let fieldsValues = {
|
|
909
|
+
total: cacheItem._extend.total
|
|
910
|
+
};
|
|
911
|
+
form.setFieldsValue(fieldsValues);
|
|
912
|
+
};
|
|
913
|
+
const onValuesChange = (changedValues) => {
|
|
914
|
+
if (isEditGroup) {
|
|
915
|
+
if (changedValues == null ? void 0 : changedValues.duration) {
|
|
916
|
+
const end_date = (0, import_dayjs.default)(useStartDate).add(
|
|
917
|
+
changedValues == null ? void 0 : changedValues.duration,
|
|
918
|
+
"day"
|
|
919
|
+
);
|
|
920
|
+
form.setFieldsValue({
|
|
921
|
+
end_date
|
|
922
|
+
});
|
|
923
|
+
return updateMultiDay({
|
|
924
|
+
start_date: useStartDate,
|
|
925
|
+
end_date,
|
|
926
|
+
duration: changedValues == null ? void 0 : changedValues.duration
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
if (changedValues == null ? void 0 : changedValues.start_date) {
|
|
930
|
+
const startDate = (0, import_dayjs.default)(changedValues == null ? void 0 : changedValues.start_date);
|
|
931
|
+
const endDate = (0, import_dayjs.default)(useEndDate);
|
|
932
|
+
if (startDate.isAfter(endDate)) {
|
|
933
|
+
return form.setFieldsValue({
|
|
934
|
+
duration: void 0,
|
|
935
|
+
end_date: void 0
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
if ((changedValues == null ? void 0 : changedValues.start_date) || (changedValues == null ? void 0 : changedValues.end_date)) {
|
|
940
|
+
const cacheItem = getCurrentCacheItem();
|
|
941
|
+
const duration2 = (0, import_utils6.getDays)(cacheItem, "days");
|
|
942
|
+
const start_date = (changedValues == null ? void 0 : changedValues.start_date) || useStartDate;
|
|
943
|
+
const end_date = (changedValues == null ? void 0 : changedValues.end_date) || useEndDate;
|
|
944
|
+
updateMultiDay({ start_date, end_date, duration: duration2 });
|
|
945
|
+
return form.setFieldsValue({
|
|
946
|
+
duration: duration2
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
};
|
|
729
951
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
730
952
|
import_drawer.default,
|
|
731
953
|
{
|
|
@@ -748,16 +970,29 @@ var Info = (_, ref) => {
|
|
|
748
970
|
});
|
|
749
971
|
}
|
|
750
972
|
},
|
|
751
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" },
|
|
752
|
-
|
|
973
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, groupDom, /* @__PURE__ */ import_react.default.createElement(
|
|
974
|
+
import_antd.Form,
|
|
753
975
|
{
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
976
|
+
layout: "vertical",
|
|
977
|
+
form,
|
|
978
|
+
onFinish,
|
|
979
|
+
onValuesChange,
|
|
980
|
+
style: {
|
|
981
|
+
display: currentTab === "batch_edit" ? "block" : "none"
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_K = (_J = state.client) == null ? void 0 : _J.value) == null ? void 0 : _K.id) && holder),
|
|
985
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
|
|
986
|
+
import_noteModal.default,
|
|
987
|
+
{
|
|
988
|
+
open: noteModalOpen,
|
|
989
|
+
value: form.getFieldValue("note"),
|
|
990
|
+
onConfirm: handleNoteConfirm,
|
|
991
|
+
onDelete: handleNoteDelete,
|
|
992
|
+
onCancel: handleNoteCancel
|
|
993
|
+
}
|
|
994
|
+
))
|
|
995
|
+
), footer)
|
|
761
996
|
));
|
|
762
997
|
};
|
|
763
998
|
var editService_default = (0, import_react.forwardRef)(Info);
|
|
@@ -44,6 +44,7 @@ var import_utils = require("@pisell/utils");
|
|
|
44
44
|
var import_utils2 = require("../utils");
|
|
45
45
|
var import_utils3 = require("../info/service2/utils");
|
|
46
46
|
var import_utils4 = require("../../ticketBooking/components/addServiceVariant/utils");
|
|
47
|
+
var import_utils5 = require("./service/addService/utils");
|
|
47
48
|
var getUseableEventCount = (eventList, current) => {
|
|
48
49
|
return (eventList || []).reduce((pre, event) => {
|
|
49
50
|
return pre - event.pax;
|
|
@@ -220,13 +221,20 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
220
221
|
}
|
|
221
222
|
const appointmentTimingPreference = getAppointmentTimingPreference(state);
|
|
222
223
|
let lastServer = (0, import_utils2.getLastServer)((_a = state.service.value) == null ? void 0 : _a.filter((item) => !item.isCustomItem && !(0, import_utils3.isNormalProductByDurationSchedule)(item)));
|
|
224
|
+
const getDuration = (cacheItem2) => {
|
|
225
|
+
var _a2;
|
|
226
|
+
if ((0, import_utils5.isMultiDayProduct)(cacheItem2)) {
|
|
227
|
+
return (0, import_utils2.getDays)(cacheItem2, "days");
|
|
228
|
+
}
|
|
229
|
+
return (0, import_utils2.findNextDuration)(
|
|
230
|
+
cacheItem2.duration,
|
|
231
|
+
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
|
232
|
+
(_a2 = cacheItem2 == null ? void 0 : cacheItem2.duration) == null ? void 0 : _a2.value
|
|
233
|
+
);
|
|
234
|
+
};
|
|
223
235
|
let _extend = {
|
|
224
236
|
// 时长: 当前商品时长 > 第一个时长
|
|
225
|
-
duration: (
|
|
226
|
-
cacheItem.duration,
|
|
227
|
-
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
|
228
|
-
(_b = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _b.value
|
|
229
|
-
)
|
|
237
|
+
duration: getDuration(cacheItem)
|
|
230
238
|
};
|
|
231
239
|
if (lastServer) {
|
|
232
240
|
let lastServerStartDate = lastServer._extend.startDate;
|
|
@@ -235,9 +243,9 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
235
243
|
_extend.start_time = lastServerStartDate.format("HH:mm");
|
|
236
244
|
} else {
|
|
237
245
|
if ((0, import_dayjs.default)(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
|
238
|
-
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[((
|
|
246
|
+
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[((_b = timeObj == null ? void 0 : timeObj.timeSlices) == null ? void 0 : _b.length) - 1].value;
|
|
239
247
|
} else {
|
|
240
|
-
_extend.start_time = lastServerEndDate.format("HH:mm");
|
|
248
|
+
_extend.start_time = (_c = lastServerEndDate || (0, import_dayjs.default)()) == null ? void 0 : _c.format("HH:mm");
|
|
241
249
|
}
|
|
242
250
|
}
|
|
243
251
|
} else {
|
|
@@ -265,7 +273,10 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
|
265
273
|
..._extend,
|
|
266
274
|
...cacheItem._extend
|
|
267
275
|
};
|
|
268
|
-
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({
|
|
276
|
+
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({
|
|
277
|
+
...cacheItem,
|
|
278
|
+
_extend
|
|
279
|
+
});
|
|
269
280
|
_extend.startDate = startDate;
|
|
270
281
|
_extend.endDate = endDate;
|
|
271
282
|
const session = (_e = (_d = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.session;
|