@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
|
@@ -51,6 +51,7 @@ var import_index = require("./index.less");
|
|
|
51
51
|
var import_serve2 = require("./serve");
|
|
52
52
|
var import_utils3 = require("./utils");
|
|
53
53
|
var import_noteModal = __toESM(require("../../../../plus/noteModal"));
|
|
54
|
+
var import_confirmHolderModal = require("../../utils/confirmHolderModal");
|
|
54
55
|
var import__ = require("../../../../index");
|
|
55
56
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
56
57
|
var import_utils4 = require("@pisell/utils");
|
|
@@ -61,6 +62,7 @@ var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCusto
|
|
|
61
62
|
var import_ahooks = require("ahooks");
|
|
62
63
|
var import_lodash = require("lodash");
|
|
63
64
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
65
|
+
var import_utils5 = require("../../utils");
|
|
64
66
|
var Footer = (props) => {
|
|
65
67
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
66
68
|
const { state, buttons, dispatch, source } = props;
|
|
@@ -600,7 +602,7 @@ var Footer = (props) => {
|
|
|
600
602
|
messageShow = true,
|
|
601
603
|
noSubmit = false
|
|
602
604
|
}) => {
|
|
603
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
605
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
604
606
|
const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
|
|
605
607
|
if (isToastMode) {
|
|
606
608
|
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
|
@@ -609,6 +611,14 @@ var Footer = (props) => {
|
|
|
609
611
|
const isHasDayProducts = handleDaySubmit();
|
|
610
612
|
if (isHasDayProducts) return;
|
|
611
613
|
}
|
|
614
|
+
debugger;
|
|
615
|
+
const hasUnspecifiedHolderProduct = (_d2 = state.service.value) == null ? void 0 : _d2.some((item) => {
|
|
616
|
+
var _a3, _b3, _c3;
|
|
617
|
+
return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
|
|
618
|
+
});
|
|
619
|
+
if (!(0, import_utils5.isWalkIn)((_f2 = (_e2 = state.client) == null ? void 0 : _e2.value) == null ? void 0 : _f2.id) && (0, import_utils2.getIsSubjectRequire)(state) && hasUnspecifiedHolderProduct) {
|
|
620
|
+
await (0, import_confirmHolderModal.showConfirmHolderModal)(state, dispatch);
|
|
621
|
+
}
|
|
612
622
|
if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
|
|
613
623
|
return;
|
|
614
624
|
}
|
|
@@ -619,7 +629,7 @@ var Footer = (props) => {
|
|
|
619
629
|
const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
|
|
620
630
|
let saveOtherValue = {};
|
|
621
631
|
if (type === "save") {
|
|
622
|
-
saveOtherValue = await ((
|
|
632
|
+
saveOtherValue = await ((_g2 = state == null ? void 0 : state.onSave) == null ? void 0 : _g2.call(state, state.client)) || {};
|
|
623
633
|
}
|
|
624
634
|
try {
|
|
625
635
|
let callbackData = null;
|
|
@@ -665,7 +675,7 @@ var Footer = (props) => {
|
|
|
665
675
|
{ key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
|
|
666
676
|
{
|
|
667
677
|
key: "店铺id",
|
|
668
|
-
value: (
|
|
678
|
+
value: (_k2 = (_j2 = (_i2 = (_h2 = store == null ? void 0 : store.getState) == null ? void 0 : _h2.call(store)) == null ? void 0 : _i2.global) == null ? void 0 : _j2.globalConfig) == null ? void 0 : _k2.id
|
|
669
679
|
},
|
|
670
680
|
{
|
|
671
681
|
key: "shopApi",
|
|
@@ -1251,6 +1261,8 @@ var Footer = (props) => {
|
|
|
1251
1261
|
}
|
|
1252
1262
|
};
|
|
1253
1263
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
1264
|
+
var _a2, _b2, _c2;
|
|
1265
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
1254
1266
|
dispatch({
|
|
1255
1267
|
type: "setClient",
|
|
1256
1268
|
payload: {
|
|
@@ -1258,6 +1270,15 @@ var Footer = (props) => {
|
|
|
1258
1270
|
edit: true
|
|
1259
1271
|
}
|
|
1260
1272
|
});
|
|
1273
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
1274
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
1275
|
+
dispatch({
|
|
1276
|
+
type: "setService",
|
|
1277
|
+
payload: {
|
|
1278
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1261
1282
|
});
|
|
1262
1283
|
const { selectCustomer } = (0, import_useCustomer.useCustomer)({
|
|
1263
1284
|
changeCustomerToGlobalState
|
|
@@ -1452,6 +1473,6 @@ var Footer = (props) => {
|
|
|
1452
1473
|
}
|
|
1453
1474
|
}
|
|
1454
1475
|
}
|
|
1455
|
-
));
|
|
1476
|
+
), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
|
|
1456
1477
|
};
|
|
1457
1478
|
var footer_default = Footer;
|
|
@@ -56,5 +56,12 @@ export declare const formatOriginalPrice: (item: any) => number;
|
|
|
56
56
|
export declare const formatSellingPrice: (item: any) => number;
|
|
57
57
|
export declare const getSourceProductPrice: (item: any) => number;
|
|
58
58
|
export declare const getMainProductSellingPrice: (item: any) => number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* @title: 是否包含跨日预约商品
|
|
61
|
+
* @description:
|
|
62
|
+
* @param {any} data
|
|
63
|
+
* @return {*}
|
|
64
|
+
*/
|
|
65
|
+
export declare const getHasMultiDayProduct: (data: any) => any;
|
|
59
66
|
export declare const formatValues: (state: any) => any;
|
|
60
67
|
export declare const checkHolderIsError: (state: any) => any;
|
|
@@ -39,6 +39,7 @@ __export(utils_exports, {
|
|
|
39
39
|
formatSellingPrice: () => formatSellingPrice,
|
|
40
40
|
formatValues: () => formatValues,
|
|
41
41
|
getBundleDiscountList: () => getBundleDiscountList,
|
|
42
|
+
getHasMultiDayProduct: () => getHasMultiDayProduct,
|
|
42
43
|
getMainProductSellingPrice: () => getMainProductSellingPrice,
|
|
43
44
|
getSourceProductPrice: () => getSourceProductPrice
|
|
44
45
|
});
|
|
@@ -291,22 +292,22 @@ var formatMetaData = (item, isMultiDayPrices) => {
|
|
|
291
292
|
return metadata;
|
|
292
293
|
};
|
|
293
294
|
var formatProductMetadata = (item) => {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
295
296
|
let metadata = {};
|
|
296
|
-
if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
|
|
297
|
-
metadata.main_product_attached_bundle_surcharge_fee = (
|
|
297
|
+
if (((_a = item._extend) == null ? void 0 : _a.surcharge_fee) || ((_b = item.metadata) == null ? void 0 : _b.main_product_attached_bundle_surcharge_fee)) {
|
|
298
|
+
metadata.main_product_attached_bundle_surcharge_fee = ((_c = item._extend) == null ? void 0 : _c.surcharge_fee) || ((_d = item.metadata) == null ? void 0 : _d.main_product_attached_bundle_surcharge_fee);
|
|
298
299
|
}
|
|
299
|
-
if ((
|
|
300
|
-
metadata.main_product_attached_bundle_tax_fee = (
|
|
300
|
+
if (((_e = item._extend) == null ? void 0 : _e.main_product_attached_bundle_tax_fee) || ((_f = item.metadata) == null ? void 0 : _f.main_product_attached_bundle_tax_fee)) {
|
|
301
|
+
metadata.main_product_attached_bundle_tax_fee = ((_g = item._extend) == null ? void 0 : _g.main_product_attached_bundle_tax_fee) || ((_h = item.metadata) == null ? void 0 : _h.main_product_attached_bundle_tax_fee);
|
|
301
302
|
}
|
|
302
|
-
if ((
|
|
303
|
-
metadata.surcharge_rounding_remainder = (
|
|
303
|
+
if (((_i = item._extend) == null ? void 0 : _i.surcharge_rounding_remainder) || ((_j = item.metadata) == null ? void 0 : _j.surcharge_rounding_remainder)) {
|
|
304
|
+
metadata.surcharge_rounding_remainder = ((_k = item._extend) == null ? void 0 : _k.surcharge_rounding_remainder) || ((_l = item.metadata) == null ? void 0 : _l.surcharge_rounding_remainder);
|
|
304
305
|
}
|
|
305
|
-
if ((
|
|
306
|
-
metadata.relation_surcharge_ids = (
|
|
306
|
+
if (((_m = item._extend) == null ? void 0 : _m.relation_surcharge_ids) || ((_n = item.metadata) == null ? void 0 : _n.relation_surcharge_ids)) {
|
|
307
|
+
metadata.relation_surcharge_ids = ((_o = item._extend) == null ? void 0 : _o.relation_surcharge_ids) || ((_p = item.metadata) == null ? void 0 : _p.relation_surcharge_ids);
|
|
307
308
|
}
|
|
308
|
-
if ((
|
|
309
|
-
metadata.unique_identification_number = (
|
|
309
|
+
if (((_q = item._extend) == null ? void 0 : _q.unique_identification_number) || ((_r = item.metadata) == null ? void 0 : _r.unique_identification_number)) {
|
|
310
|
+
metadata.unique_identification_number = ((_s = item._extend) == null ? void 0 : _s.unique_identification_number) || ((_t = item.metadata) == null ? void 0 : _t.unique_identification_number);
|
|
310
311
|
}
|
|
311
312
|
return metadata;
|
|
312
313
|
};
|
|
@@ -367,6 +368,7 @@ var formatProducts = (item, quantity) => {
|
|
|
367
368
|
if (item.isCustomItem) {
|
|
368
369
|
item.product_id = 0;
|
|
369
370
|
}
|
|
371
|
+
debugger;
|
|
370
372
|
return {
|
|
371
373
|
"name": item.name,
|
|
372
374
|
"num": quantity || item._extend.quantity,
|
|
@@ -429,6 +431,14 @@ var getHolderByIndex = (holder, index) => {
|
|
|
429
431
|
form_record: [(_a = holder == null ? void 0 : holder.form_record) == null ? void 0 : _a[index]].filter(Boolean)
|
|
430
432
|
};
|
|
431
433
|
};
|
|
434
|
+
var getHasMultiDayProduct = (data) => {
|
|
435
|
+
const list = data.service.value;
|
|
436
|
+
const isHas = list.some((item) => {
|
|
437
|
+
var _a;
|
|
438
|
+
return (_a = item._extend) == null ? void 0 : _a.groupId;
|
|
439
|
+
});
|
|
440
|
+
return isHas;
|
|
441
|
+
};
|
|
432
442
|
var formatBookings = (data, values) => {
|
|
433
443
|
const isDay = (0, import_utils4.isDaysBooking)(data);
|
|
434
444
|
const isEvent = (0, import_utils4.isEventBooking)(data);
|
|
@@ -450,7 +460,7 @@ var formatBookings = (data, values) => {
|
|
|
450
460
|
let bookings = [];
|
|
451
461
|
let obj = {};
|
|
452
462
|
list.forEach((item) => {
|
|
453
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
463
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
454
464
|
if (item.isCustomItem) {
|
|
455
465
|
bookings.push({
|
|
456
466
|
...item._extend,
|
|
@@ -459,6 +469,7 @@ var formatBookings = (data, values) => {
|
|
|
459
469
|
});
|
|
460
470
|
return;
|
|
461
471
|
}
|
|
472
|
+
const isMultiDay = (_a = item._extend) == null ? void 0 : _a.groupId;
|
|
462
473
|
let start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
463
474
|
let end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
464
475
|
let end_time = item._extend.endDate.format("HH:mm");
|
|
@@ -468,8 +479,8 @@ var formatBookings = (data, values) => {
|
|
|
468
479
|
}
|
|
469
480
|
dayParams.holder = formatHolders(data, item, values);
|
|
470
481
|
if (isDay) {
|
|
471
|
-
const startDate = ((
|
|
472
|
-
const endDate = ((
|
|
482
|
+
const startDate = ((_b = item._extend) == null ? void 0 : _b.startDate) || ((_c = item._extend) == null ? void 0 : _c.start_date);
|
|
483
|
+
const endDate = ((_d = item._extend) == null ? void 0 : _d.endDate) || ((_e = item._extend) == null ? void 0 : _e.end_date);
|
|
473
484
|
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
474
485
|
startDate,
|
|
475
486
|
endDate
|
|
@@ -485,16 +496,15 @@ var formatBookings = (data, values) => {
|
|
|
485
496
|
"minutes"
|
|
486
497
|
);
|
|
487
498
|
}
|
|
488
|
-
if (!((
|
|
499
|
+
if (!((_f = item._extend) == null ? void 0 : _f.unique_identification_number)) {
|
|
489
500
|
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
|
490
501
|
item._extend.unique_identification_number = unique_identification_number;
|
|
491
502
|
}
|
|
492
|
-
const isSetGroupId = obj[(
|
|
493
|
-
if (!((
|
|
503
|
+
const isSetGroupId = obj[(_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.groupId];
|
|
504
|
+
if (!((_h = item._extend) == null ? void 0 : _h.unique_identification_number)) {
|
|
494
505
|
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
|
495
506
|
item._extend.unique_identification_number = unique_identification_number;
|
|
496
507
|
}
|
|
497
|
-
debugger;
|
|
498
508
|
const booking = {
|
|
499
509
|
schedule_event_id: item == null ? void 0 : item.booking_id,
|
|
500
510
|
product: formatProducts(item),
|
|
@@ -511,7 +521,7 @@ var formatBookings = (data, values) => {
|
|
|
511
521
|
start_time,
|
|
512
522
|
end_date,
|
|
513
523
|
start_date,
|
|
514
|
-
duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
524
|
+
duration: isDay || isMultiDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
515
525
|
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
516
526
|
resources: formatResource(item),
|
|
517
527
|
note: item._extend.note,
|
|
@@ -522,7 +532,7 @@ var formatBookings = (data, values) => {
|
|
|
522
532
|
if (!isSetGroupId) {
|
|
523
533
|
obj[item._extend.groupId] = true;
|
|
524
534
|
}
|
|
525
|
-
if (isDay) {
|
|
535
|
+
if (isDay || isMultiDay) {
|
|
526
536
|
bookings.push(booking);
|
|
527
537
|
return;
|
|
528
538
|
}
|
|
@@ -531,7 +541,7 @@ var formatBookings = (data, values) => {
|
|
|
531
541
|
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
|
532
542
|
if (i > 0) {
|
|
533
543
|
newItem._extend.surcharge_rounding_remainder = void 0;
|
|
534
|
-
if (((
|
|
544
|
+
if (((_k = (_j = (_i = newItem._extend) == null ? void 0 : _i.other) == null ? void 0 : _j.bundle) == null ? void 0 : _k.length) > 0) {
|
|
535
545
|
newItem._extend.other.bundle.forEach((bundleItem) => {
|
|
536
546
|
bundleItem.surcharge_rounding_remainder = void 0;
|
|
537
547
|
});
|
|
@@ -618,6 +628,7 @@ var formatValues = (state) => {
|
|
|
618
628
|
metadata: {}
|
|
619
629
|
};
|
|
620
630
|
const isDay = (0, import_utils4.isDaysBooking)(state);
|
|
631
|
+
const isHasMultiDay = getHasMultiDayProduct(state);
|
|
621
632
|
const isEvent = (0, import_utils4.isEventBooking)(state);
|
|
622
633
|
if (!state.bookingId || isDay) {
|
|
623
634
|
values.shop_note = formatNote(state);
|
|
@@ -635,10 +646,10 @@ var formatValues = (state) => {
|
|
|
635
646
|
...customer
|
|
636
647
|
};
|
|
637
648
|
values.holder = formatHolder(state, values);
|
|
638
|
-
if (
|
|
649
|
+
if (isEvent) {
|
|
639
650
|
values.relation_products = formatRelationProducts(
|
|
640
651
|
state,
|
|
641
|
-
|
|
652
|
+
"event"
|
|
642
653
|
);
|
|
643
654
|
} else {
|
|
644
655
|
values.relation_products = formatNormalProducts(state);
|
|
@@ -652,7 +663,7 @@ var formatValues = (state) => {
|
|
|
652
663
|
startTime = `${startTime || "00:00"}:00`;
|
|
653
664
|
values.schedule_date = `${values.bookings[0].select_date} ${startTime}`;
|
|
654
665
|
}
|
|
655
|
-
if (isDay) {
|
|
666
|
+
if (isDay || isHasMultiDay) {
|
|
656
667
|
values.metadata.is_multiday_appointment = 1;
|
|
657
668
|
}
|
|
658
669
|
if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
|
|
@@ -665,16 +676,16 @@ var checkHolderIsError = (state) => {
|
|
|
665
676
|
var _a, _b;
|
|
666
677
|
let errorRowKey = "";
|
|
667
678
|
const holderError = state.service.value.some((item) => {
|
|
668
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
679
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
669
680
|
if ((0, import_utils4.isNormalProductByDurationSchedule)(item)) {
|
|
670
681
|
return false;
|
|
671
682
|
}
|
|
672
|
-
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
673
|
-
errorRowKey = (0, import_utils4.genRowKey)((
|
|
683
|
+
if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_a2 = item._extend.holder_id) == null ? void 0 : _a2.length) === 0)) {
|
|
684
|
+
errorRowKey = (0, import_utils4.genRowKey)((_c = (_b2 = item == null ? void 0 : item._extend) == null ? void 0 : _b2.other) == null ? void 0 : _c.rowKey);
|
|
674
685
|
return true;
|
|
675
686
|
}
|
|
676
|
-
if (item._extend.quantity > 1 && ((
|
|
677
|
-
errorRowKey = (0, import_utils4.genRowKey)((
|
|
687
|
+
if (item._extend.quantity > 1 && ((_e = (_d = item._extend) == null ? void 0 : _d.holder_id) == null ? void 0 : _e.length) !== item._extend.quantity) {
|
|
688
|
+
errorRowKey = (0, import_utils4.genRowKey)((_g = (_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.rowKey);
|
|
678
689
|
return true;
|
|
679
690
|
}
|
|
680
691
|
return false;
|
|
@@ -708,6 +719,7 @@ var checkHolderIsError = (state) => {
|
|
|
708
719
|
formatSellingPrice,
|
|
709
720
|
formatValues,
|
|
710
721
|
getBundleDiscountList,
|
|
722
|
+
getHasMultiDayProduct,
|
|
711
723
|
getMainProductSellingPrice,
|
|
712
724
|
getSourceProductPrice
|
|
713
725
|
});
|
|
@@ -48,7 +48,7 @@ var import_utils3 = require("../../info/clientVariant/utils");
|
|
|
48
48
|
var import_useShopDiscountModule = require("../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
49
49
|
var services = {};
|
|
50
50
|
var VoucherCard = (props) => {
|
|
51
|
-
var _a, _b, _c, _d;
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
52
|
const context = (0, import_useEngineContext.default)();
|
|
53
53
|
const { state, dispatch, source, isInModal = false } = props;
|
|
54
54
|
const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
|
|
@@ -60,10 +60,13 @@ var VoucherCard = (props) => {
|
|
|
60
60
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
61
61
|
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
62
62
|
const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
|
|
63
|
+
const holderChangedRef = (0, import_react.useRef)(false);
|
|
63
64
|
const stateRef = (0, import_react.useRef)(state);
|
|
64
65
|
stateRef.current = state;
|
|
65
66
|
services = state.service;
|
|
66
67
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
68
|
+
var _a2, _b2, _c2;
|
|
69
|
+
const beforeValue = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value;
|
|
67
70
|
dispatch({
|
|
68
71
|
type: "setClient",
|
|
69
72
|
payload: {
|
|
@@ -71,6 +74,15 @@ var VoucherCard = (props) => {
|
|
|
71
74
|
edit: true
|
|
72
75
|
}
|
|
73
76
|
});
|
|
77
|
+
if ((beforeValue == null ? void 0 : beforeValue.id) === (value == null ? void 0 : value.id)) return;
|
|
78
|
+
if ((_c2 = (_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.value) == null ? void 0 : _c2.length) {
|
|
79
|
+
dispatch({
|
|
80
|
+
type: "setService",
|
|
81
|
+
payload: {
|
|
82
|
+
value: state.service.value.map((item) => ({ ...item, _extend: { ...item._extend, holder_id: [] } }))
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
74
86
|
});
|
|
75
87
|
const { selectCustomer } = (0, import_pisellos.useCustomer)({
|
|
76
88
|
changeCustomerToGlobalState
|
|
@@ -97,7 +109,7 @@ var VoucherCard = (props) => {
|
|
|
97
109
|
const serviceMemo = (0, import_react.useMemo)(() => {
|
|
98
110
|
var _a2;
|
|
99
111
|
const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
|
|
100
|
-
var _a3, _b2;
|
|
112
|
+
var _a3, _b2, _c2;
|
|
101
113
|
return {
|
|
102
114
|
booking_id: value.booking_id,
|
|
103
115
|
id: value.id,
|
|
@@ -106,7 +118,8 @@ var VoucherCard = (props) => {
|
|
|
106
118
|
discount_list: value.discount_list,
|
|
107
119
|
origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
|
|
108
120
|
quantity: value._extend.quantity,
|
|
109
|
-
startDate: value._extend.startDate
|
|
121
|
+
startDate: value._extend.startDate,
|
|
122
|
+
holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id
|
|
110
123
|
};
|
|
111
124
|
});
|
|
112
125
|
return val;
|
|
@@ -146,6 +159,29 @@ var VoucherCard = (props) => {
|
|
|
146
159
|
});
|
|
147
160
|
return val;
|
|
148
161
|
}, [state.addons.value]);
|
|
162
|
+
const holdersMemo = (0, import_react.useMemo)(() => {
|
|
163
|
+
var _a2;
|
|
164
|
+
if (isBooking4Shop) {
|
|
165
|
+
let list = [];
|
|
166
|
+
if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
|
|
167
|
+
let entries = Object.entries(state.pet.value);
|
|
168
|
+
if (entries.length === 1) {
|
|
169
|
+
list = entries[0][1];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
shopDiscount.setHolders(list);
|
|
173
|
+
holderChangedRef.current = true;
|
|
174
|
+
return list || [];
|
|
175
|
+
}
|
|
176
|
+
}, [(_c = state.pet) == null ? void 0 : _c.value, isBooking4Shop]);
|
|
177
|
+
(0, import_react.useEffect)(() => {
|
|
178
|
+
var _a2, _b2, _c2, _d2;
|
|
179
|
+
console.log("update booking subject", state.bookingConfig);
|
|
180
|
+
(_d2 = shopDiscount == null ? void 0 : shopDiscount.setBookingSubject) == null ? void 0 : _d2.call(
|
|
181
|
+
shopDiscount,
|
|
182
|
+
(_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject
|
|
183
|
+
);
|
|
184
|
+
}, [state.bookingConfig]);
|
|
149
185
|
const disabled = (0, import_react.useMemo)(() => {
|
|
150
186
|
var _a2;
|
|
151
187
|
if (["paid", "partially_paid"].includes(
|
|
@@ -158,7 +194,7 @@ var VoucherCard = (props) => {
|
|
|
158
194
|
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
159
195
|
() => {
|
|
160
196
|
var _a2, _b2;
|
|
161
|
-
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
197
|
+
if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
162
198
|
return;
|
|
163
199
|
}
|
|
164
200
|
if (isBooking4Shop) {
|
|
@@ -169,13 +205,19 @@ var VoucherCard = (props) => {
|
|
|
169
205
|
console.log("input: ", state.service.value);
|
|
170
206
|
console.log("output: ", val);
|
|
171
207
|
productListToValue(val.productList);
|
|
208
|
+
holderChangedRef.current = false;
|
|
172
209
|
}
|
|
173
210
|
},
|
|
174
211
|
{ wait: 1e3 }
|
|
175
212
|
);
|
|
176
213
|
(0, import_react.useEffect)(() => {
|
|
177
214
|
run();
|
|
178
|
-
}, [
|
|
215
|
+
}, [
|
|
216
|
+
JSON.stringify(serviceMemo),
|
|
217
|
+
JSON.stringify(addonsMemo),
|
|
218
|
+
JSON.stringify(holdersMemo),
|
|
219
|
+
isBooking4Shop
|
|
220
|
+
]);
|
|
179
221
|
(0, import_react.useEffect)(() => {
|
|
180
222
|
if (shopDiscount) {
|
|
181
223
|
const wrappedHandler = executeIfActive(fn);
|
|
@@ -328,7 +370,7 @@ var VoucherCard = (props) => {
|
|
|
328
370
|
{
|
|
329
371
|
style: { width: "100%" },
|
|
330
372
|
isInModal: isInModal || false,
|
|
331
|
-
dataSource: ((
|
|
373
|
+
dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
|
|
332
374
|
mixedSort,
|
|
333
375
|
onChange: (val) => {
|
|
334
376
|
const detail = shopDiscount.setDiscountSelected({
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -40,6 +40,7 @@ var import_utils2 = require("@pisell/utils");
|
|
|
40
40
|
var import_materials = require("@pisell/materials");
|
|
41
41
|
var import_serve = require("../info/service/serve");
|
|
42
42
|
var import_decimal = __toESM(require("decimal.js"));
|
|
43
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
43
44
|
var formatBundleItemMap = (product) => {
|
|
44
45
|
return product.bundle_group.reduce((pre, cur) => {
|
|
45
46
|
const curObj = {};
|
|
@@ -70,15 +71,19 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
70
71
|
let isBundleChange = false;
|
|
71
72
|
let isNotFoundBundle = false;
|
|
72
73
|
const notFoundProducts = [];
|
|
74
|
+
const multiDayPricesCache = /* @__PURE__ */ new Map();
|
|
73
75
|
const value = cartValue.map((item) => {
|
|
74
|
-
var _a, _b, _c, _d;
|
|
75
|
-
const
|
|
76
|
+
var _a, _b, _c, _d, _e, _f;
|
|
77
|
+
const itemScheduleDate = ((_a = item._extend) == null ? void 0 : _a.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : "";
|
|
78
|
+
const newProduct = newProducts.find(
|
|
79
|
+
(newItem2) => newItem2.id === item.product_id && newItem2.schedule_date === itemScheduleDate
|
|
80
|
+
);
|
|
76
81
|
if (!newProduct) {
|
|
77
82
|
return item;
|
|
78
83
|
}
|
|
79
84
|
let isChangePrice = newProduct.price != item.price;
|
|
80
85
|
const bundleItemMap = formatBundleItemMap(newProduct);
|
|
81
|
-
const newBundle = (((
|
|
86
|
+
const newBundle = (((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle) || []).map((bundle) => {
|
|
82
87
|
if (!bundleItemMap[bundle.id]) {
|
|
83
88
|
isNotFoundBundle = true;
|
|
84
89
|
if (!notFoundProducts.some((p) => p._id === bundle._id)) {
|
|
@@ -103,6 +108,24 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
103
108
|
// product_price: bundleItemMap[item.id].product_price,
|
|
104
109
|
};
|
|
105
110
|
});
|
|
111
|
+
if ((_d = item._extend) == null ? void 0 : _d.groupId) {
|
|
112
|
+
if (!multiDayPricesCache.has(item._extend.groupId)) {
|
|
113
|
+
const productPrices = newProducts.filter((p) => p.id === item.product_id);
|
|
114
|
+
const multiDayPrices = {};
|
|
115
|
+
productPrices.forEach((priceItem) => {
|
|
116
|
+
multiDayPrices[priceItem.schedule_date] = {
|
|
117
|
+
total: Number(priceItem.price),
|
|
118
|
+
origin_total: Number(priceItem.price),
|
|
119
|
+
num: 1,
|
|
120
|
+
quotation_id: priceItem.quotation_id || 0,
|
|
121
|
+
start_date: priceItem.schedule_date,
|
|
122
|
+
end_date: (0, import_dayjs.default)(priceItem.schedule_date).add(1, "day").format("YYYY-MM-DD")
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
multiDayPricesCache.set(item._extend.groupId, multiDayPrices);
|
|
126
|
+
}
|
|
127
|
+
item._extend.multiDayPrices = multiDayPricesCache.get(item._extend.groupId);
|
|
128
|
+
}
|
|
106
129
|
if (!isChangePrice) {
|
|
107
130
|
return item;
|
|
108
131
|
} else {
|
|
@@ -120,7 +143,7 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
120
143
|
bundle_edit: isBundleChange ? 1 : item._extend.bundle_edit,
|
|
121
144
|
other: {
|
|
122
145
|
...item._extend.other,
|
|
123
|
-
option: (
|
|
146
|
+
option: (_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option,
|
|
124
147
|
bundle: newBundle
|
|
125
148
|
}
|
|
126
149
|
}
|
|
@@ -146,22 +169,31 @@ var useQuotation = (state, dispatch) => {
|
|
|
146
169
|
cartValueRef.current = state.service.value;
|
|
147
170
|
const getCartQuotation = async (params) => {
|
|
148
171
|
if (!cartValueRef.current.length) return;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
172
|
+
if (!(params == null ? void 0 : params.customer_id)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const queryData = cartValueRef.current.filter((item) => !item.isCustomItem).map((item) => {
|
|
176
|
+
var _a2;
|
|
177
|
+
return {
|
|
178
|
+
product_id: item.product_id,
|
|
179
|
+
schedule_date: ((_a2 = item._extend) == null ? void 0 : _a2.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : params == null ? void 0 : params.schedule_date
|
|
180
|
+
// 如果没有商品日期,使用传入的默认日期
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
if (!queryData.length) return;
|
|
184
|
+
const data = await (0, import_serve.getNormalAndMultiDayProductPrice)({
|
|
185
|
+
customer_id: params == null ? void 0 : params.customer_id,
|
|
186
|
+
data: queryData
|
|
155
187
|
});
|
|
156
|
-
return data;
|
|
188
|
+
return data.data;
|
|
157
189
|
};
|
|
158
190
|
const currentDate = (0, import_react.useMemo)(() => {
|
|
159
191
|
return state.date.value.format("YYYY-MM-DD");
|
|
160
192
|
}, [state.date.value]);
|
|
161
193
|
const updateCartQuotation = async (params) => {
|
|
162
194
|
const data = await getCartQuotation(params);
|
|
163
|
-
if (!
|
|
164
|
-
const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data
|
|
195
|
+
if (!data || !data.length) return;
|
|
196
|
+
const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data);
|
|
165
197
|
if (isNotFoundBundle) {
|
|
166
198
|
setProducts(notFoundProducts);
|
|
167
199
|
setOpen(true);
|
|
@@ -25,7 +25,7 @@ module.exports = __toCommonJS(useHolderConfig_exports);
|
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_utils = require("../../utils");
|
|
27
27
|
var useHolderConfig = (state) => {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
29
29
|
const appointment_subject = (0, import_react.useMemo)(() => {
|
|
30
30
|
var _a2, _b2, _c2;
|
|
31
31
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
|
|
@@ -37,10 +37,14 @@ var useHolderConfig = (state) => {
|
|
|
37
37
|
const isFormSubject = (0, import_react.useMemo)(() => {
|
|
38
38
|
return appointment_subject.type === "form";
|
|
39
39
|
}, [appointment_subject.type]);
|
|
40
|
+
const holderType = (0, import_react.useMemo)(() => {
|
|
41
|
+
var _a2, _b2, _c2;
|
|
42
|
+
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) == null ? void 0 : _b2.form) == null ? void 0 : _c2.formType) || "minors";
|
|
43
|
+
}, [(_e = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _e.holder]);
|
|
40
44
|
const isWalkInBol = (0, import_react.useMemo)(() => {
|
|
41
45
|
var _a2, _b2;
|
|
42
46
|
return (0, import_utils.isWalkIn)((_b2 = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id);
|
|
43
|
-
}, [(
|
|
47
|
+
}, [(_g = (_f = state == null ? void 0 : state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id]);
|
|
44
48
|
const isCustomerSubject = (0, import_react.useMemo)(() => {
|
|
45
49
|
return appointment_subject.type === "customer";
|
|
46
50
|
}, [appointment_subject.type]);
|
|
@@ -53,7 +57,8 @@ var useHolderConfig = (state) => {
|
|
|
53
57
|
isFormSubject,
|
|
54
58
|
isCustomerSubject,
|
|
55
59
|
isWalkInBol,
|
|
56
|
-
isShowChangeHolder
|
|
60
|
+
isShowChangeHolder,
|
|
61
|
+
holderType
|
|
57
62
|
};
|
|
58
63
|
};
|
|
59
64
|
var useHolderConfig_default = useHolderConfig;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => React.JSX.Element;
|
|
2
|
+
declare const Lists: ({ onEdit, onChange, onAction, isParallelResource, isShowDelete, isShowAmountFooter }: any) => React.JSX.Element;
|
|
3
3
|
export default Lists;
|
|
@@ -41,7 +41,7 @@ var import_useHolderConfig = __toESM(require("../hooks/useHolderConfig"));
|
|
|
41
41
|
var import_ahooks = require("ahooks");
|
|
42
42
|
var import_utils2 = require("../../info2/service/addService/utils");
|
|
43
43
|
var import_useAddHolder = __toESM(require("../hooks/useAddHolder"));
|
|
44
|
-
var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
44
|
+
var Lists = ({ onEdit, onChange, onAction, isParallelResource, isShowDelete = true, isShowAmountFooter = true }) => {
|
|
45
45
|
var _a;
|
|
46
46
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
47
47
|
const { isShowChangeHolder } = (0, import_useHolderConfig.default)(state);
|
|
@@ -85,6 +85,8 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
85
85
|
return {
|
|
86
86
|
hideAddBtn: state.isTerminalDayBookingPage || state.isBookingCreatePage,
|
|
87
87
|
isShowNote: state.isBookingTicket2 ? true : (0, import_utils.isEventBooking)(state),
|
|
88
|
+
isShowDelete,
|
|
89
|
+
isShowAmountFooter,
|
|
88
90
|
isShowPackageNote: false,
|
|
89
91
|
accounts: [],
|
|
90
92
|
isEdit: !!(state == null ? void 0 : state.bookingId),
|
|
@@ -109,7 +111,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
109
111
|
const p = (0, import_utils.formatProducts)(
|
|
110
112
|
((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) || [],
|
|
111
113
|
state,
|
|
112
|
-
|
|
114
|
+
true,
|
|
113
115
|
true,
|
|
114
116
|
isParallelResource
|
|
115
117
|
);
|