@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
|
@@ -18,3 +18,17 @@ export declare const getProductPrice: (params: {
|
|
|
18
18
|
customer_id: number;
|
|
19
19
|
schedule_date: string;
|
|
20
20
|
}) => Promise<any>;
|
|
21
|
+
declare type MultiDayProductPriceParams = {
|
|
22
|
+
customer_id: number;
|
|
23
|
+
data: {
|
|
24
|
+
product_id: number;
|
|
25
|
+
schedule_date: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 获取普通商品和跨日预约的价格
|
|
30
|
+
* @param params
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare const getNormalAndMultiDayProductPrice: (params: MultiDayProductPriceParams) => Promise<any>;
|
|
34
|
+
export {};
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/booking/info/service/serve.ts
|
|
20
20
|
var serve_exports = {};
|
|
21
21
|
__export(serve_exports, {
|
|
22
|
+
getNormalAndMultiDayProductPrice: () => getNormalAndMultiDayProductPrice,
|
|
22
23
|
getProductDetail: () => getProductDetail,
|
|
23
24
|
getProductPrice: () => getProductPrice,
|
|
24
25
|
postMultiDay: () => postMultiDay
|
|
@@ -44,8 +45,12 @@ var getProductPrice = async (params) => import_utils.request.getRequest().post(`
|
|
|
44
45
|
type: "indexDB"
|
|
45
46
|
}
|
|
46
47
|
});
|
|
48
|
+
var getNormalAndMultiDayProductPrice = async (params) => {
|
|
49
|
+
return import_utils.request.getRequest().post(`/shop/product/query/shelf/price`, params);
|
|
50
|
+
};
|
|
47
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
52
|
0 && (module.exports = {
|
|
53
|
+
getNormalAndMultiDayProductPrice,
|
|
49
54
|
getProductDetail,
|
|
50
55
|
getProductPrice,
|
|
51
56
|
postMultiDay
|
|
@@ -31,6 +31,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
31
31
|
var import_utils = require("@pisell/utils");
|
|
32
32
|
var import_utils2 = require("../../../utils");
|
|
33
33
|
var import_distributeDiscount = require("../../service/serviceManager/distributeDiscount");
|
|
34
|
+
var import_utils3 = require("../../../../ticketBooking/utils");
|
|
34
35
|
var getGroupTotalPrice = (items) => {
|
|
35
36
|
return items.reduce((prev, next) => {
|
|
36
37
|
prev.duration += next._extend.duration;
|
|
@@ -98,6 +99,7 @@ var createBookingItemsByGroup = (item, isBatchEdit) => {
|
|
|
98
99
|
cacheItem._extend.total = totalPrice;
|
|
99
100
|
cacheItem._extend.origin_total = totalPrice;
|
|
100
101
|
cacheItem._extend.items = void 0;
|
|
102
|
+
cacheItem._serviceKey = (0, import_utils3.genServiceKey)(cacheItem);
|
|
101
103
|
bookings.push(cacheItem);
|
|
102
104
|
}
|
|
103
105
|
if (isBatchEdit) {
|
|
@@ -67,39 +67,7 @@ export declare const genRowKey: (key: string) => string;
|
|
|
67
67
|
* @Author: WangHan
|
|
68
68
|
* @Date: 2024-11-29 17:36
|
|
69
69
|
*/
|
|
70
|
-
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) =>
|
|
71
|
-
_origin: any;
|
|
72
|
-
id: any;
|
|
73
|
-
_id: any;
|
|
74
|
-
name: any;
|
|
75
|
-
title: any;
|
|
76
|
-
price: any;
|
|
77
|
-
total: number;
|
|
78
|
-
origin_total: number;
|
|
79
|
-
num: any;
|
|
80
|
-
image: any;
|
|
81
|
-
isShowNote: boolean;
|
|
82
|
-
note: any;
|
|
83
|
-
like_status: any;
|
|
84
|
-
bundle: any;
|
|
85
|
-
options: any;
|
|
86
|
-
errorMessage: string;
|
|
87
|
-
product_option_string: any;
|
|
88
|
-
discount_reason: any;
|
|
89
|
-
resource_id: any;
|
|
90
|
-
relation_form_name: any;
|
|
91
|
-
holder_title: any;
|
|
92
|
-
start_date: any;
|
|
93
|
-
end_date: any;
|
|
94
|
-
holder_id: any;
|
|
95
|
-
isNormalProduct: boolean;
|
|
96
|
-
isCustomItem: any;
|
|
97
|
-
vouchersApplicable: any;
|
|
98
|
-
locale: any;
|
|
99
|
-
symbol: any;
|
|
100
|
-
relation_products: any;
|
|
101
|
-
items: any[];
|
|
102
|
-
}[];
|
|
70
|
+
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) => any[];
|
|
103
71
|
/**
|
|
104
72
|
* @title: 禁用日期
|
|
105
73
|
* @description:
|
|
@@ -470,7 +470,7 @@ var genRowKey = (key) => {
|
|
|
470
470
|
return `rowKey-${key}`;
|
|
471
471
|
};
|
|
472
472
|
var getGeneralParams = (item, state, isParallelResource) => {
|
|
473
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
473
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
474
474
|
const { pet, service } = state;
|
|
475
475
|
const { holders = [], formData } = pet || {};
|
|
476
476
|
const parallelResourceOtherParams = {};
|
|
@@ -522,10 +522,11 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
522
522
|
];
|
|
523
523
|
}
|
|
524
524
|
const isNormalProduct = isNormalProductByDurationSchedule(item);
|
|
525
|
+
const isMultiDay = (0, import_utils6.isMultiDayProduct)(item);
|
|
525
526
|
return {
|
|
526
527
|
format: ["HH:mm", "HH:mm"],
|
|
527
528
|
show_time: true,
|
|
528
|
-
duration_type: "minutes",
|
|
529
|
+
duration_type: isMultiDay ? "days" : "minutes",
|
|
529
530
|
// 当前可选择holder列表
|
|
530
531
|
holders: formatHolders(holders),
|
|
531
532
|
isShowChangeHolder: !isNormalProduct,
|
|
@@ -533,15 +534,17 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
533
534
|
actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
|
534
535
|
actionIcon: "pisell2-clock-plus",
|
|
535
536
|
isMultipleResource: true,
|
|
537
|
+
isFormSubject: ((_e = (_d = (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject) == null ? void 0 : _e.type) === "form",
|
|
538
|
+
holderType: ((_h = (_g = (_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.holder) == null ? void 0 : _g.form) == null ? void 0 : _h.form_type) || "minors",
|
|
536
539
|
multiResources,
|
|
537
540
|
holderMaxCount: item == null ? void 0 : item._extend.quantity,
|
|
538
541
|
holderMode: (item == null ? void 0 : item._extend.quantity) > 1 ? "multiple" : void 0,
|
|
539
542
|
isErrorHolder: getIsSubjectRequire(state),
|
|
540
|
-
addHolderButtonText: ((
|
|
541
|
-
holder_id: (
|
|
542
|
-
start_date: !isNormalProduct ? (
|
|
543
|
-
end_date: !isNormalProduct ? ((
|
|
544
|
-
rowKey: genRowKey((
|
|
543
|
+
addHolderButtonText: ((_j = (_i = formData == null ? void 0 : formData[0]) == null ? void 0 : _i.form) == null ? void 0 : _j.title) || "",
|
|
544
|
+
holder_id: (_k = item == null ? void 0 : item._extend) == null ? void 0 : _k.holder_id,
|
|
545
|
+
start_date: !isNormalProduct ? (_l = item == null ? void 0 : item._extend) == null ? void 0 : _l.startDate : "",
|
|
546
|
+
end_date: !isNormalProduct ? ((_m = item == null ? void 0 : item._extend) == null ? void 0 : _m.endDate) || ((_n = item == null ? void 0 : item._extend) == null ? void 0 : _n.end_date) : "",
|
|
547
|
+
rowKey: genRowKey((_p = (_o = item == null ? void 0 : item._extend) == null ? void 0 : _o.other) == null ? void 0 : _p.rowKey),
|
|
545
548
|
...parallelResourceOtherParams
|
|
546
549
|
};
|
|
547
550
|
};
|
|
@@ -550,8 +553,6 @@ var calcAddTimeTotalPrice = (total, addTimeProducts) => {
|
|
|
550
553
|
};
|
|
551
554
|
var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelResource) => {
|
|
552
555
|
if (!(lists == null ? void 0 : lists.length)) return [];
|
|
553
|
-
const normalList = [];
|
|
554
|
-
const groupList = [];
|
|
555
556
|
const formItem = (item) => {
|
|
556
557
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
557
558
|
const _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
@@ -608,17 +609,23 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
608
609
|
_origin: item
|
|
609
610
|
};
|
|
610
611
|
};
|
|
611
|
-
console.log(normalList, "normalList");
|
|
612
612
|
if (isRenderGroup) {
|
|
613
|
-
|
|
614
|
-
|
|
613
|
+
const normalItemsWithIndex = [];
|
|
614
|
+
const groupItemsWithIndex = [];
|
|
615
|
+
const groupFirstIndexMap = {};
|
|
616
|
+
lists.forEach((item, index) => {
|
|
617
|
+
var _a, _b;
|
|
615
618
|
if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
|
|
616
|
-
|
|
619
|
+
normalItemsWithIndex.push({ item, index });
|
|
617
620
|
} else {
|
|
618
|
-
|
|
621
|
+
const groupId = (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.groupId;
|
|
622
|
+
groupItemsWithIndex.push({ item, index });
|
|
623
|
+
if (groupFirstIndexMap[groupId] === void 0) {
|
|
624
|
+
groupFirstIndexMap[groupId] = index;
|
|
625
|
+
}
|
|
619
626
|
}
|
|
620
627
|
});
|
|
621
|
-
|
|
628
|
+
const groups = groupItemsWithIndex.reduce((prev, { item }) => {
|
|
622
629
|
var _a;
|
|
623
630
|
const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
|
|
624
631
|
if (!prev[groupId]) {
|
|
@@ -627,7 +634,16 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
627
634
|
prev[groupId].push(item);
|
|
628
635
|
return prev;
|
|
629
636
|
}, {});
|
|
630
|
-
|
|
637
|
+
const mergedGroupItems = Object.entries(groups).map(([groupId, items]) => ({
|
|
638
|
+
item: formItem((0, import_utils3.concatBookings)(items)),
|
|
639
|
+
index: groupFirstIndexMap[groupId]
|
|
640
|
+
}));
|
|
641
|
+
const formattedNormalItems = normalItemsWithIndex.map(({ item, index }) => ({
|
|
642
|
+
item: formItem(item),
|
|
643
|
+
index
|
|
644
|
+
}));
|
|
645
|
+
const allItems = [...mergedGroupItems, ...formattedNormalItems].sort((a, b) => a.index - b.index);
|
|
646
|
+
return allItems.map(({ item }) => item);
|
|
631
647
|
} else {
|
|
632
648
|
return lists == null ? void 0 : lists.map((item) => formItem(item));
|
|
633
649
|
}
|
|
@@ -45,6 +45,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
45
45
|
var import_dayjs = __toESM(require("dayjs"));
|
|
46
46
|
var import_utils = require("../utils");
|
|
47
47
|
var import_utils2 = require("../info2/service/addTimeModal/utils");
|
|
48
|
+
var import_utils3 = require("../info2/service/addService/utils");
|
|
48
49
|
var getIsBundleOrCombination = (productDetail) => {
|
|
49
50
|
var _a;
|
|
50
51
|
if ((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) {
|
|
@@ -195,6 +196,9 @@ var isOpenAddTime = (state) => {
|
|
|
195
196
|
return true;
|
|
196
197
|
};
|
|
197
198
|
var isShowAddTime = (state, currentService) => {
|
|
199
|
+
if ((0, import_utils3.isMultiDayProduct)(currentService)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
198
202
|
if (!isOpenAddTime(state)) {
|
|
199
203
|
return false;
|
|
200
204
|
}
|
|
@@ -76,6 +76,8 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
76
76
|
((_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en"
|
|
77
77
|
);
|
|
78
78
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
79
|
+
var _a2, _b2, _c2;
|
|
80
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
79
81
|
dispatch({
|
|
80
82
|
type: "setClient",
|
|
81
83
|
payload: {
|
|
@@ -83,6 +85,15 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
83
85
|
edit: true
|
|
84
86
|
}
|
|
85
87
|
});
|
|
88
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
89
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
90
|
+
dispatch({
|
|
91
|
+
type: "setService",
|
|
92
|
+
payload: {
|
|
93
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
86
97
|
});
|
|
87
98
|
const {
|
|
88
99
|
customers,
|
|
@@ -49,6 +49,7 @@ var import_utils4 = require("@pisell/utils");
|
|
|
49
49
|
var import_ahooks = require("ahooks");
|
|
50
50
|
var import_utils5 = require("../../../info/service2/utils");
|
|
51
51
|
var import_utils6 = require("../../../../ticketBooking/utils");
|
|
52
|
+
var import_utils7 = require("../../../info/service2/Group/utils");
|
|
52
53
|
var shopList = [
|
|
53
54
|
2886,
|
|
54
55
|
4422,
|
|
@@ -223,7 +224,7 @@ var Info = (props) => {
|
|
|
223
224
|
isOS: isSession,
|
|
224
225
|
customer_id: (_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id
|
|
225
226
|
},
|
|
226
|
-
callback: (e, extension_type, detail) => {
|
|
227
|
+
callback: async (e, extension_type, detail) => {
|
|
227
228
|
var _a3, _b3;
|
|
228
229
|
if (lock) {
|
|
229
230
|
return;
|
|
@@ -248,6 +249,10 @@ var Info = (props) => {
|
|
|
248
249
|
},
|
|
249
250
|
new: 1
|
|
250
251
|
};
|
|
252
|
+
const isMultiDay = (0, import_utils2.isMultiDayProduct)(cacheItem);
|
|
253
|
+
if (isMultiDay) {
|
|
254
|
+
cacheItem._extend.end_date = state.date.value.add(1, "day");
|
|
255
|
+
}
|
|
251
256
|
cacheItem._extend.price = (0, import_utils3.getMainPrice)(cacheItem, _detail.price);
|
|
252
257
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
253
258
|
cacheItem._extend.total = _total;
|
|
@@ -261,7 +266,19 @@ var Info = (props) => {
|
|
|
261
266
|
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
|
262
267
|
}
|
|
263
268
|
cacheItem = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
264
|
-
|
|
269
|
+
const getMultiDayCacheItem = async (isConcatBookings) => {
|
|
270
|
+
cacheItem = await (0, import_utils2.getMultiDay)({
|
|
271
|
+
start_date: cacheItem._extend.start_date,
|
|
272
|
+
end_date: cacheItem._extend.end_date,
|
|
273
|
+
state,
|
|
274
|
+
cacheItem
|
|
275
|
+
});
|
|
276
|
+
cacheItem = (0, import_utils7.createBookingItemsByGroup)(cacheItem);
|
|
277
|
+
if (isConcatBookings) {
|
|
278
|
+
cacheItem = (0, import_utils7.concatBookings)(cacheItem);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
if (state.renderType === "eventBooking" || isMultiDay) {
|
|
265
282
|
cacheItem.autoClose = false;
|
|
266
283
|
}
|
|
267
284
|
if (cacheItem.autoClose) {
|
|
@@ -288,6 +305,9 @@ var Info = (props) => {
|
|
|
288
305
|
});
|
|
289
306
|
} else {
|
|
290
307
|
(_b3 = window.openBookingEditModal) == null ? void 0 : _b3.call(window);
|
|
308
|
+
if (isMultiDay) {
|
|
309
|
+
await getMultiDayCacheItem(true);
|
|
310
|
+
}
|
|
291
311
|
dispatch({
|
|
292
312
|
type: "setService",
|
|
293
313
|
payload: {
|
|
@@ -79,6 +79,14 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
|
|
|
79
79
|
* @Date: 2024-09-19 20:23
|
|
80
80
|
*/
|
|
81
81
|
export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
|
|
82
|
+
/**
|
|
83
|
+
* @title: 是否是跨日商品
|
|
84
|
+
* @description:
|
|
85
|
+
* @param {any} cacheItem
|
|
86
|
+
* @return {*}
|
|
87
|
+
*/
|
|
88
|
+
export declare const isMultiDayProduct: (product: any) => boolean;
|
|
89
|
+
export declare const getMultiDay: ({ start_date, end_date, state, cacheItem, }: any) => Promise<any>;
|
|
82
90
|
/**
|
|
83
91
|
* @title: 预生成服务的 extend
|
|
84
92
|
* @description:
|
|
@@ -32,11 +32,13 @@ __export(utils_exports, {
|
|
|
32
32
|
formatResources: () => formatResources,
|
|
33
33
|
getDurationProps: () => getDurationProps,
|
|
34
34
|
getFlexibleOption: () => getFlexibleOption,
|
|
35
|
+
getMultiDay: () => getMultiDay,
|
|
35
36
|
getProductExtend: () => getProductExtend,
|
|
36
37
|
getResourceByIds: () => getResourceByIds,
|
|
37
38
|
getTimeObj: () => getTimeObj,
|
|
38
39
|
getTimeSlices: () => getTimeSlices,
|
|
39
40
|
getUsableTime: () => getUsableTime,
|
|
41
|
+
isMultiDayProduct: () => isMultiDayProduct,
|
|
40
42
|
setDefaultCapacitys: () => setDefaultCapacitys,
|
|
41
43
|
setDefaultResource: () => setDefaultResource,
|
|
42
44
|
transServiceList: () => transServiceList
|
|
@@ -51,6 +53,8 @@ var import_AlertTriangle = __toESM(require("@pisell/icon/es/AlertTriangle"));
|
|
|
51
53
|
var import_utils3 = require("../editService/utils");
|
|
52
54
|
var import_mock = require("../../../mock");
|
|
53
55
|
var import_lodash = require("lodash");
|
|
56
|
+
var import_utils4 = require("../../../info/service2/utils");
|
|
57
|
+
var import_utils5 = require("../../../info/utils");
|
|
54
58
|
var getUsableTime = (cacheItem) => {
|
|
55
59
|
try {
|
|
56
60
|
let items = [];
|
|
@@ -138,6 +142,7 @@ var getTimeObj = ({
|
|
|
138
142
|
durationProps
|
|
139
143
|
}) => {
|
|
140
144
|
var _a, _b, _c;
|
|
145
|
+
const isMultiDay = isMultiDayProduct(cacheItem);
|
|
141
146
|
const flexibleOption = getFlexibleOption({
|
|
142
147
|
cacheItem,
|
|
143
148
|
useStartTime,
|
|
@@ -148,7 +153,8 @@ var getTimeObj = ({
|
|
|
148
153
|
});
|
|
149
154
|
let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
|
|
150
155
|
(_c = (_b = (_a = state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.service_time,
|
|
151
|
-
import_utils2.locales.locale
|
|
156
|
+
import_utils2.locales.locale,
|
|
157
|
+
isMultiDay
|
|
152
158
|
);
|
|
153
159
|
let timeSlices = [...obj.timeSlices];
|
|
154
160
|
let durationSlicesBasedOnTime = [...obj.durationSlicesBasedOnTime];
|
|
@@ -157,7 +163,7 @@ var getTimeObj = ({
|
|
|
157
163
|
}
|
|
158
164
|
if (useDuration && !durationSlicesBasedOnTime.some((d) => d.value === useDuration)) {
|
|
159
165
|
durationSlicesBasedOnTime.unshift({
|
|
160
|
-
label: (0, import_utils.getDiscountTime)(useDuration),
|
|
166
|
+
label: (0, import_utils.getDiscountTime)(useDuration, isMultiDay),
|
|
161
167
|
value: useDuration,
|
|
162
168
|
//@ts-ignore
|
|
163
169
|
disabled: true
|
|
@@ -395,13 +401,45 @@ var getIsAutoClose = (cacheItem) => {
|
|
|
395
401
|
}
|
|
396
402
|
);
|
|
397
403
|
};
|
|
404
|
+
var isMultiDayProduct = (product) => {
|
|
405
|
+
var _a;
|
|
406
|
+
return ((_a = product == null ? void 0 : product.duration) == null ? void 0 : _a.type) === "days";
|
|
407
|
+
};
|
|
408
|
+
var getMultiDay = async ({
|
|
409
|
+
start_date,
|
|
410
|
+
end_date,
|
|
411
|
+
state,
|
|
412
|
+
cacheItem
|
|
413
|
+
}) => {
|
|
414
|
+
let _cacheItem = cacheItem || state.service.cacheItem;
|
|
415
|
+
if (isMultiDayProduct(_cacheItem)) {
|
|
416
|
+
const { multiDayPrices, price } = await (0, import_utils4.updateAppointmentServicePrice)(
|
|
417
|
+
state,
|
|
418
|
+
{
|
|
419
|
+
start_date,
|
|
420
|
+
end_date,
|
|
421
|
+
product_id: _cacheItem.product_id
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
_cacheItem._extend.multiDayPrices = (0, import_utils5.getMultiDayPrices)(multiDayPrices || []);
|
|
425
|
+
if (!(multiDayPrices == null ? void 0 : multiDayPrices.length)) {
|
|
426
|
+
_cacheItem._extend.price = price;
|
|
427
|
+
}
|
|
428
|
+
return _cacheItem;
|
|
429
|
+
}
|
|
430
|
+
return _cacheItem;
|
|
431
|
+
};
|
|
398
432
|
var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
399
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
433
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
400
434
|
console.time("console.time getProductExtend");
|
|
401
435
|
const isNew = cacheItem.new || !cacheItem._extend.endDate;
|
|
402
436
|
let _cacheItem = { ...cacheItem };
|
|
403
437
|
const resourcesOriginMap = state.service.resourcesOriginMap || {};
|
|
404
438
|
_cacheItem._data = {};
|
|
439
|
+
if (isMultiDayProduct(cacheItem)) {
|
|
440
|
+
_cacheItem._extend.holder_id = ((_a = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a.holder_id) || [];
|
|
441
|
+
_cacheItem._extend.sub_type = "days";
|
|
442
|
+
}
|
|
405
443
|
if (isNew) {
|
|
406
444
|
_cacheItem._data.timeObj = getTimeObj({
|
|
407
445
|
cacheItem,
|
|
@@ -419,7 +457,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
419
457
|
cacheItem,
|
|
420
458
|
{
|
|
421
459
|
// 此数据用来控制 该商品所展示的资源是自身关联的, 还是全部的
|
|
422
|
-
resourceTab: (
|
|
460
|
+
resourceTab: (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.resource_tab,
|
|
423
461
|
resourcesOrigin: state.service.resourcesOrigin
|
|
424
462
|
}
|
|
425
463
|
);
|
|
@@ -445,10 +483,8 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
445
483
|
state
|
|
446
484
|
});
|
|
447
485
|
if ((0, import_utils.getDuration)(_cacheItem == null ? void 0 : _cacheItem.duration) === "flexible") {
|
|
448
|
-
_cacheItem._extend.duration = (
|
|
449
|
-
const { startDate, endDate } = (0, import_utils.getServiceTimes)(
|
|
450
|
-
_extend: _cacheItem._extend
|
|
451
|
-
});
|
|
486
|
+
_cacheItem._extend.duration = (_f = (_e = (_d = _cacheItem._data.timeObj) == null ? void 0 : _d.durationSlicesBasedOnTime) == null ? void 0 : _e[0]) == null ? void 0 : _f.value;
|
|
487
|
+
const { startDate, endDate } = (0, import_utils.getServiceTimes)(_cacheItem);
|
|
452
488
|
_cacheItem._extend.endDate = endDate;
|
|
453
489
|
}
|
|
454
490
|
}
|
|
@@ -479,7 +515,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
479
515
|
{
|
|
480
516
|
extraResources,
|
|
481
517
|
// 此数据用来控制 该商品所展示的资源是自身关联的, 还是全部的
|
|
482
|
-
resourceTab: (
|
|
518
|
+
resourceTab: (_h = (_g = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _g.config) == null ? void 0 : _h.resource_tab,
|
|
483
519
|
resourcesOrigin: state.service.resourcesOrigin
|
|
484
520
|
}
|
|
485
521
|
);
|
|
@@ -519,11 +555,13 @@ var transServiceList = (list) => {
|
|
|
519
555
|
formatResources,
|
|
520
556
|
getDurationProps,
|
|
521
557
|
getFlexibleOption,
|
|
558
|
+
getMultiDay,
|
|
522
559
|
getProductExtend,
|
|
523
560
|
getResourceByIds,
|
|
524
561
|
getTimeObj,
|
|
525
562
|
getTimeSlices,
|
|
526
563
|
getUsableTime,
|
|
564
|
+
isMultiDayProduct,
|
|
527
565
|
setDefaultCapacitys,
|
|
528
566
|
setDefaultResource,
|
|
529
567
|
transServiceList
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare type HolderValue = string | number;
|
|
4
|
+
interface HolderProps {
|
|
5
|
+
state: any;
|
|
6
|
+
cacheItem?: any;
|
|
7
|
+
value?: HolderValue | HolderValue[] | null;
|
|
8
|
+
onChange?: (val: HolderValue | HolderValue[] | null) => void;
|
|
9
|
+
dispatch?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const Holder: React.FC<HolderProps>;
|
|
12
|
+
export default Holder;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/info2/service/editService/Holder/index.tsx
|
|
30
|
+
var Holder_exports = {};
|
|
31
|
+
__export(Holder_exports, {
|
|
32
|
+
default: () => Holder_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Holder_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_HolderList = __toESM(require("../../../../../../plus/selectHolder/components/HolderList"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var import_HolderItem = __toESM(require("../../../../../../plus/selectHolder/components/HolderItem"));
|
|
41
|
+
var import_selectHolderModal = require("../../../../utils/selectHolderModal");
|
|
42
|
+
var import_materials = require("@pisell/materials");
|
|
43
|
+
var LinkButton = import_antd.Button;
|
|
44
|
+
var normalizeValue = (val) => {
|
|
45
|
+
if (Array.isArray(val)) {
|
|
46
|
+
return val.filter(
|
|
47
|
+
(item) => item !== void 0 && item !== null
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (val === void 0 || val === null || val === "") return [];
|
|
51
|
+
return [val];
|
|
52
|
+
};
|
|
53
|
+
var Holder = ({
|
|
54
|
+
state,
|
|
55
|
+
cacheItem,
|
|
56
|
+
value,
|
|
57
|
+
onChange,
|
|
58
|
+
dispatch
|
|
59
|
+
}) => {
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
61
|
+
const holderConfig = ((_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.holder) || {};
|
|
62
|
+
const title = ((_b = holderConfig == null ? void 0 : holderConfig.form) == null ? void 0 : _b.title) || (holderConfig == null ? void 0 : holderConfig.title) || import_utils.locales.getText("pisell2.text.holder");
|
|
63
|
+
const isRequired = ((_e = (_d = (_c = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.basic) == null ? void 0 : _e.subject_require) === "require";
|
|
64
|
+
const maxSelectedCount = ((_f = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _f.quantity) || 1;
|
|
65
|
+
const selectType = maxSelectedCount > 1 ? "multiple" : "single";
|
|
66
|
+
const [selectedValues, setSelectedValues] = (0, import_react.useState)(
|
|
67
|
+
() => normalizeValue(value)
|
|
68
|
+
);
|
|
69
|
+
(0, import_react.useEffect)(() => {
|
|
70
|
+
const next = normalizeValue(value);
|
|
71
|
+
setSelectedValues(next);
|
|
72
|
+
}, [value]);
|
|
73
|
+
const holderOptions = (0, import_react.useMemo)(() => {
|
|
74
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
75
|
+
const holdersFromState = Array.isArray((_a2 = state == null ? void 0 : state.pet) == null ? void 0 : _a2.holders) ? state.pet.holders : [];
|
|
76
|
+
const formId = ((_e2 = (_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) == null ? void 0 : _e2.form_id) || 0;
|
|
77
|
+
const holdersFromValue = Array.isArray((_g2 = (_f2 = state == null ? void 0 : state.pet) == null ? void 0 : _f2.value) == null ? void 0 : _g2[formId]) ? (_i2 = (_h2 = state == null ? void 0 : state.pet) == null ? void 0 : _h2.value) == null ? void 0 : _i2[formId] : [];
|
|
78
|
+
const rawList = holdersFromState.length > 0 ? holdersFromState : holdersFromValue;
|
|
79
|
+
return rawList.map((item) => {
|
|
80
|
+
const id = (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id) || (item == null ? void 0 : item.value);
|
|
81
|
+
if (id === void 0 || id === null) return null;
|
|
82
|
+
return {
|
|
83
|
+
label: (item == null ? void 0 : item.main_field) || (item == null ? void 0 : item.label) || (item == null ? void 0 : item.name) || import_utils.locales.getText("pisell-select-holder-please-select"),
|
|
84
|
+
value: id,
|
|
85
|
+
avatar: item == null ? void 0 : item.avatar,
|
|
86
|
+
subtitle: (item == null ? void 0 : item.subtitle) || (item == null ? void 0 : item.second_field) || (item == null ? void 0 : item.sub_field)
|
|
87
|
+
};
|
|
88
|
+
}).filter(Boolean);
|
|
89
|
+
}, [(_g = state == null ? void 0 : state.pet) == null ? void 0 : _g.holders, (_h = state == null ? void 0 : state.pet) == null ? void 0 : _h.value, (_i = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _i.config]);
|
|
90
|
+
const displayConfig = (0, import_react.useMemo)(
|
|
91
|
+
() => ({
|
|
92
|
+
direction: "vertical",
|
|
93
|
+
selectType,
|
|
94
|
+
showAvatar: true,
|
|
95
|
+
showTitle: true,
|
|
96
|
+
showSubtitle: Boolean(holderOptions.some((option) => option.subtitle))
|
|
97
|
+
}),
|
|
98
|
+
[holderOptions, selectType]
|
|
99
|
+
);
|
|
100
|
+
const selectedSummary = (0, import_react.useMemo)(() => {
|
|
101
|
+
if (!maxSelectedCount) return "";
|
|
102
|
+
const label = import_utils.locales.getText("pisell-select-holder-selected").replace(/[::]\s*$/, "");
|
|
103
|
+
return `${selectedValues.length}/${maxSelectedCount} ${label}`;
|
|
104
|
+
}, [selectedValues.length, maxSelectedCount]);
|
|
105
|
+
const handleApply = (0, import_react.useCallback)(
|
|
106
|
+
(nextValues) => {
|
|
107
|
+
onChange == null ? void 0 : onChange(nextValues);
|
|
108
|
+
},
|
|
109
|
+
[onChange, selectType]
|
|
110
|
+
);
|
|
111
|
+
const handleEdit = (0, import_react.useCallback)(
|
|
112
|
+
async (event) => {
|
|
113
|
+
var _a2, _b2;
|
|
114
|
+
event == null ? void 0 : event.preventDefault();
|
|
115
|
+
const holderConfig2 = ((_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) || {};
|
|
116
|
+
const currentMaxSelectedCount = (holderConfig2 == null ? void 0 : holderConfig2.maxSelectedCount) || ((_b2 = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _b2.quantity) || 1;
|
|
117
|
+
const result = await (0, import_selectHolderModal.selectHolderModal)({
|
|
118
|
+
state,
|
|
119
|
+
dispatch,
|
|
120
|
+
initialValue: selectedValues.length > 0 ? selectedValues : void 0,
|
|
121
|
+
maxSelectedCount: currentMaxSelectedCount
|
|
122
|
+
});
|
|
123
|
+
if (result && result.length > 0) {
|
|
124
|
+
setSelectedValues(result);
|
|
125
|
+
handleApply(result);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
[selectedValues, state, dispatch, handleApply]
|
|
129
|
+
);
|
|
130
|
+
const handleClear = (0, import_react.useCallback)(
|
|
131
|
+
(event) => {
|
|
132
|
+
event == null ? void 0 : event.preventDefault();
|
|
133
|
+
setSelectedValues([]);
|
|
134
|
+
handleApply([]);
|
|
135
|
+
},
|
|
136
|
+
[handleApply]
|
|
137
|
+
);
|
|
138
|
+
const clearDisabled = (0, import_react.useMemo)(() => {
|
|
139
|
+
return (selectedValues == null ? void 0 : selectedValues.length) === 0;
|
|
140
|
+
}, [selectedValues]);
|
|
141
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-holder-field" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-holder-field__header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-holder-field__title" }, isRequired && /* @__PURE__ */ import_react.default.createElement("span", { className: "booking-holder-field__required" }, "*"), /* @__PURE__ */ import_react.default.createElement("span", null, title), maxSelectedCount ? /* @__PURE__ */ import_react.default.createElement("span", { className: "booking-holder-field__count" }, selectedSummary) : null), /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-holder-field__actions" }, /* @__PURE__ */ import_react.default.createElement(
|
|
142
|
+
LinkButton,
|
|
143
|
+
{
|
|
144
|
+
type: "link",
|
|
145
|
+
size: "small",
|
|
146
|
+
className: "booking-holder-field__action-button",
|
|
147
|
+
onClick: handleEdit
|
|
148
|
+
},
|
|
149
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-edit-05" }),
|
|
150
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.edit"))
|
|
151
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
152
|
+
LinkButton,
|
|
153
|
+
{
|
|
154
|
+
type: "link",
|
|
155
|
+
size: "small",
|
|
156
|
+
disabled: clearDisabled,
|
|
157
|
+
className: "booking-holder-field__action-button",
|
|
158
|
+
onClick: handleClear
|
|
159
|
+
},
|
|
160
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-delete_wght300_24px" }),
|
|
161
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear"))
|
|
162
|
+
))), selectedValues.length === 0 ? /* @__PURE__ */ import_react.default.createElement(import_antd.Row, null, /* @__PURE__ */ import_react.default.createElement(
|
|
163
|
+
import_antd.Col,
|
|
164
|
+
{
|
|
165
|
+
span: 8,
|
|
166
|
+
xs: 24,
|
|
167
|
+
sm: 12,
|
|
168
|
+
md: 8,
|
|
169
|
+
lg: 8,
|
|
170
|
+
onClick: handleEdit
|
|
171
|
+
},
|
|
172
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
import_HolderItem.default,
|
|
174
|
+
{
|
|
175
|
+
item: {
|
|
176
|
+
label: import_utils.locales.getText("pisell2.booking.info.text.add-holder"),
|
|
177
|
+
value: null
|
|
178
|
+
},
|
|
179
|
+
isAddItem: true
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
)) : /* @__PURE__ */ import_react.default.createElement(
|
|
183
|
+
import_HolderList.default,
|
|
184
|
+
{
|
|
185
|
+
dataSource: selectedValues.map((item) => {
|
|
186
|
+
const option = holderOptions.find((opt) => opt.value === item);
|
|
187
|
+
return {
|
|
188
|
+
label: (option == null ? void 0 : option.label) || "",
|
|
189
|
+
value: item
|
|
190
|
+
};
|
|
191
|
+
}),
|
|
192
|
+
selectedValues,
|
|
193
|
+
displayConfig,
|
|
194
|
+
allowAdd: false,
|
|
195
|
+
onClick: () => handleEdit()
|
|
196
|
+
}
|
|
197
|
+
))), /* @__PURE__ */ import_react.default.createElement(import_selectHolderModal.SelectHolderModal, null));
|
|
198
|
+
};
|
|
199
|
+
var Holder_default = Holder;
|