@pisell/private-materials 6.8.6 → 6.8.8
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 +29 -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/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
- package/es/plus/productSelect/index.js +1 -4
- 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 +23 -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/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
- package/lib/plus/productSelect/index.js +1 -2
- 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 +3 -3
- 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/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
|
@@ -235,6 +235,7 @@ var CartItem = function CartItem(_ref) {
|
|
|
235
235
|
disabledEdit: isLastStep,
|
|
236
236
|
isShowChangeResource: currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 || (_currentStep$step = _currentStep$step.key) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.startsWith('select-resource'),
|
|
237
237
|
isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
|
|
238
|
+
isShowAmountFooter: true,
|
|
238
239
|
isShowPackageNote: false,
|
|
239
240
|
isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
|
|
240
241
|
isShowHolder: isFormSubject,
|
|
@@ -111,10 +111,26 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
111
111
|
appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$b = appointmentBooking.batchUpdateCart) === null || _appointmentBooking$b === void 0 || _appointmentBooking$b.call(appointmentBooking, items);
|
|
112
112
|
};
|
|
113
113
|
var onCartChange = function onCartChange() {
|
|
114
|
+
var _shopDiscount$setBook, _appointmentBooking$o;
|
|
114
115
|
var products = cart === null || cart === void 0 ? void 0 : cart.getItems();
|
|
116
|
+
shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.bookingSubject);
|
|
115
117
|
var val = shopDiscount.calcDiscount(products);
|
|
116
118
|
batchUpdateCart(val.productList);
|
|
117
119
|
};
|
|
120
|
+
var stringifiedHolders = useMemo(function () {
|
|
121
|
+
var _ret;
|
|
122
|
+
try {
|
|
123
|
+
_ret = JSON.stringify(products.map(function (item) {
|
|
124
|
+
return (item === null || item === void 0 ? void 0 : item.holder_id) || '';
|
|
125
|
+
}));
|
|
126
|
+
} catch (error) {
|
|
127
|
+
_ret = '';
|
|
128
|
+
}
|
|
129
|
+
return _ret;
|
|
130
|
+
}, [products]);
|
|
131
|
+
useEffect(function () {
|
|
132
|
+
onCartChange();
|
|
133
|
+
}, [stringifiedHolders]);
|
|
118
134
|
|
|
119
135
|
// // 监听customer变化
|
|
120
136
|
useEffect(function () {
|
|
@@ -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;
|
|
@@ -3,12 +3,12 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
3
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
10
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -41,7 +41,7 @@ var createToastContent = function createToastContent(text) {
|
|
|
41
41
|
}, text);
|
|
42
42
|
};
|
|
43
43
|
var ActionButtons = function ActionButtons(_ref) {
|
|
44
|
-
var _context$appHelper, _state$
|
|
44
|
+
var _context$appHelper, _state$service3, _state$addons2, _state$service5, _state$service7, _context$appHelper3, _state$service9, _state$addons4, _context$appHelper4, _context$appHelper4$g;
|
|
45
45
|
var state = _ref.state,
|
|
46
46
|
dispatch = _ref.dispatch,
|
|
47
47
|
_ref$disabled = _ref.disabled,
|
|
@@ -77,6 +77,8 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
77
77
|
|
|
78
78
|
// 将选中的客户数据传递给状态管理
|
|
79
79
|
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
|
80
|
+
var _state$client, _state$service;
|
|
81
|
+
var beforeValue = state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value;
|
|
80
82
|
dispatch({
|
|
81
83
|
type: 'setClient',
|
|
82
84
|
payload: {
|
|
@@ -84,6 +86,22 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
84
86
|
edit: true
|
|
85
87
|
}
|
|
86
88
|
});
|
|
89
|
+
if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
|
|
90
|
+
if (state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) {
|
|
91
|
+
// 还需要清空商品内的 holder 信息
|
|
92
|
+
dispatch({
|
|
93
|
+
type: 'setService',
|
|
94
|
+
payload: {
|
|
95
|
+
value: state.service.value.map(function (item) {
|
|
96
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
97
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
98
|
+
holder_id: []
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
87
105
|
});
|
|
88
106
|
var _useCustomer = useCustomer({
|
|
89
107
|
changeCustomerToGlobalState: changeCustomerToGlobalState
|
|
@@ -155,9 +173,9 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
155
173
|
|
|
156
174
|
// 检查是否有购物车内容
|
|
157
175
|
var hasCartItems = useMemo(function () {
|
|
158
|
-
var _state$
|
|
159
|
-
return ((state === null || state === void 0 || (_state$
|
|
160
|
-
}, [state === null || state === void 0 || (_state$
|
|
176
|
+
var _state$service2, _state$addons;
|
|
177
|
+
return ((state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 || (_state$service2 = _state$service2.value) === null || _state$service2 === void 0 ? void 0 : _state$service2.length) || 0) + ((state === null || state === void 0 || (_state$addons = state.addons) === null || _state$addons === void 0 || (_state$addons = _state$addons.value) === null || _state$addons === void 0 ? void 0 : _state$addons.length) || 0) > 0;
|
|
178
|
+
}, [state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value, state === null || state === void 0 || (_state$addons2 = state.addons) === null || _state$addons2 === void 0 ? void 0 : _state$addons2.value]);
|
|
161
179
|
|
|
162
180
|
// 检查是否禁用编辑
|
|
163
181
|
var isDisabledEdit = useMemo(function () {
|
|
@@ -194,8 +212,8 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
194
212
|
// 计算已使用的券数量
|
|
195
213
|
var usedVouchersCount = useMemo(function () {
|
|
196
214
|
try {
|
|
197
|
-
var _state$
|
|
198
|
-
if (!((_state$
|
|
215
|
+
var _state$service4;
|
|
216
|
+
if (!((_state$service4 = state.service) !== null && _state$service4 !== void 0 && (_state$service4 = _state$service4.value) !== null && _state$service4 !== void 0 && _state$service4.length)) {
|
|
199
217
|
return 0;
|
|
200
218
|
}
|
|
201
219
|
// 直接从全局折扣券列表中计算被选中的数量,避免重复计数
|
|
@@ -206,14 +224,14 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
206
224
|
console.error('计算已使用券数量失败:', error);
|
|
207
225
|
return 0;
|
|
208
226
|
}
|
|
209
|
-
}, [discountList, (_state$
|
|
227
|
+
}, [discountList, (_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : _state$service5.value]);
|
|
210
228
|
|
|
211
229
|
// 判断是否有券可用但手动取消使用(显示红色感叹号)
|
|
212
230
|
var shouldShowWarning = useMemo(function () {
|
|
213
231
|
try {
|
|
214
|
-
var _state$
|
|
232
|
+
var _state$service6;
|
|
215
233
|
// 条件:购物车不为空 && discountList 长度大于 0,且没有 isSelected 的优惠券,且有 isManualSelect 的优惠券
|
|
216
|
-
return ((_state$
|
|
234
|
+
return ((_state$service6 = state.service) === null || _state$service6 === void 0 || (_state$service6 = _state$service6.value) === null || _state$service6 === void 0 ? void 0 : _state$service6.length) > 0 && discountList.length > 0 && !discountList.some(function (discount) {
|
|
217
235
|
return discount.isSelected;
|
|
218
236
|
}) && discountList.some(function (discount) {
|
|
219
237
|
return discount.isManualSelect;
|
|
@@ -222,7 +240,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
222
240
|
console.error('判断警告状态失败:', error);
|
|
223
241
|
return false;
|
|
224
242
|
}
|
|
225
|
-
}, [discountList, (_state$
|
|
243
|
+
}, [discountList, (_state$service7 = state.service) === null || _state$service7 === void 0 ? void 0 : _state$service7.value]);
|
|
226
244
|
|
|
227
245
|
// 监听折扣券列表变化
|
|
228
246
|
useEffect(function () {
|
|
@@ -375,8 +393,8 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
375
393
|
|
|
376
394
|
// 商品清空后,重置折扣信息
|
|
377
395
|
useEffect(function () {
|
|
378
|
-
var _state$
|
|
379
|
-
if (((_state$
|
|
396
|
+
var _state$service8, _state$addons3;
|
|
397
|
+
if (((_state$service8 = state.service) === null || _state$service8 === void 0 || (_state$service8 = _state$service8.value) === null || _state$service8 === void 0 ? void 0 : _state$service8.length) === 0 && ((_state$addons3 = state.addons) === null || _state$addons3 === void 0 || (_state$addons3 = _state$addons3.value) === null || _state$addons3 === void 0 ? void 0 : _state$addons3.length) === 0) {
|
|
380
398
|
dispatch({
|
|
381
399
|
type: 'setState',
|
|
382
400
|
payload: {
|
|
@@ -384,7 +402,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
384
402
|
}
|
|
385
403
|
});
|
|
386
404
|
}
|
|
387
|
-
}, [(_state$
|
|
405
|
+
}, [(_state$service9 = state.service) === null || _state$service9 === void 0 ? void 0 : _state$service9.value, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.value]);
|
|
388
406
|
|
|
389
407
|
// 处理价格调整完成
|
|
390
408
|
var handlePriceAdjustConfirm = function handlePriceAdjustConfirm(discountAmount) {
|
|
@@ -413,7 +431,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
413
431
|
|
|
414
432
|
// 处理自定义商品保存
|
|
415
433
|
var handleCustomiseItemSave = function handleCustomiseItemSave(data) {
|
|
416
|
-
var _state$
|
|
434
|
+
var _state$service10;
|
|
417
435
|
console.log('保存自定义商品:', data);
|
|
418
436
|
|
|
419
437
|
// 创建自定义商品项,按照标准商品结构
|
|
@@ -457,7 +475,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
457
475
|
};
|
|
458
476
|
|
|
459
477
|
// 添加到购物车(使用 service 来存储自定义商品)
|
|
460
|
-
var currentServices = (state === null || state === void 0 || (_state$
|
|
478
|
+
var currentServices = (state === null || state === void 0 || (_state$service10 = state.service) === null || _state$service10 === void 0 ? void 0 : _state$service10.value) || [];
|
|
461
479
|
|
|
462
480
|
// 直接添加自定义商品,不检查重复
|
|
463
481
|
var updatedServices = [customItem].concat(_toConsumableArray(currentServices));
|
|
@@ -15,10 +15,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
16
16
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
-
import {
|
|
18
|
+
import { flexibleObj, getDiscountTimeByDayMinutes } from "../../utils";
|
|
19
19
|
import { formatAmount } from '@pisell/utils';
|
|
20
20
|
import Decimal from 'decimal.js';
|
|
21
|
-
import { isDayBooking,
|
|
21
|
+
import { isDayBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
22
|
+
import { isMultiDayProduct } from "../../info2/service/addService/utils";
|
|
22
23
|
export var getRelationDetailsTotal = function getRelationDetailsTotal(relation_details) {
|
|
23
24
|
var total = new Decimal(0);
|
|
24
25
|
var _iterator = _createForOfIteratorHelper(relation_details),
|
|
@@ -47,6 +48,8 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
47
48
|
var duration = new Decimal(0);
|
|
48
49
|
// 是否是跨日预约
|
|
49
50
|
var isDay = isDayBooking(state);
|
|
51
|
+
var dayDuration = new Decimal(0);
|
|
52
|
+
var minuteDuration = new Decimal(0);
|
|
50
53
|
if (isEdit) {
|
|
51
54
|
// 计算总价 服务 和 附加商品
|
|
52
55
|
if (state !== null && state !== void 0 && state.service || state !== null && state !== void 0 && state.addons) {
|
|
@@ -59,15 +62,19 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
59
62
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
60
63
|
var item = _step2.value;
|
|
61
64
|
// 跨日预约
|
|
62
|
-
if (isDay || isNormalProductByDurationSchedule(item)) {
|
|
65
|
+
if (isDay || isNormalProductByDurationSchedule(item) || isMultiDayProduct(item)) {
|
|
63
66
|
var quantity = new Decimal(item._extend.quantity || 1);
|
|
64
67
|
var itemTotal = new Decimal(item._extend.total || 0);
|
|
65
68
|
var itemOriginTotal = new Decimal(item._extend.origin_total || 0);
|
|
66
69
|
price = price.add((isOriginTotal ? itemOriginTotal : itemTotal).mul(quantity));
|
|
67
70
|
|
|
68
71
|
// 普通商品不能加到时长上
|
|
69
|
-
var _duration =
|
|
70
|
-
|
|
72
|
+
var _duration = !isNormalProductByDurationSchedule(item) ? new Decimal(item._extend.duration || 0) : new Decimal(0);
|
|
73
|
+
if (isDay || isMultiDayProduct(item)) {
|
|
74
|
+
dayDuration = dayDuration.add(_duration);
|
|
75
|
+
} else {
|
|
76
|
+
minuteDuration = minuteDuration.add(_duration);
|
|
77
|
+
}
|
|
71
78
|
} else {
|
|
72
79
|
var _quantity = new Decimal(item._extend.quantity || 1);
|
|
73
80
|
var _itemTotal = new Decimal(item._extend.total || 0);
|
|
@@ -79,6 +86,11 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
79
86
|
price = price.add(relationTotal);
|
|
80
87
|
var itemDuration = new Decimal(flexibleObj.getValue(item._extend.duration) || 0);
|
|
81
88
|
duration = duration.add(itemDuration);
|
|
89
|
+
if (isMultiDayProduct(item)) {
|
|
90
|
+
dayDuration = dayDuration.add(itemDuration);
|
|
91
|
+
} else {
|
|
92
|
+
minuteDuration = minuteDuration.add(itemDuration);
|
|
93
|
+
}
|
|
82
94
|
}
|
|
83
95
|
}
|
|
84
96
|
} catch (err) {
|
|
@@ -113,20 +125,25 @@ var getProductExpectAmount = function getProductExpectAmount(state, isEdit, isOr
|
|
|
113
125
|
var services = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || [];
|
|
114
126
|
duration = services.reduce(function (pre, cur) {
|
|
115
127
|
var current = new Decimal(0);
|
|
116
|
-
if (isDay) {
|
|
128
|
+
if (isDay || isMultiDayProduct(cur)) {
|
|
117
129
|
// 普通商品不能加到时长上
|
|
118
|
-
var _duration2 =
|
|
130
|
+
var _duration2 = !isNormalProductByDurationSchedule(cur) ? new Decimal(cur._extend.duration || 0) : new Decimal(0);
|
|
119
131
|
current = _duration2;
|
|
120
132
|
} else {
|
|
121
133
|
var _cur$_extend;
|
|
122
134
|
current = new Decimal(flexibleObj.getValue(((_cur$_extend = cur._extend) === null || _cur$_extend === void 0 ? void 0 : _cur$_extend.duration) || 0) || 0);
|
|
123
135
|
}
|
|
136
|
+
if (isDay || isMultiDayProduct(cur)) {
|
|
137
|
+
dayDuration = dayDuration.add(current);
|
|
138
|
+
} else {
|
|
139
|
+
minuteDuration = minuteDuration.add(current);
|
|
140
|
+
}
|
|
124
141
|
return pre.add(current);
|
|
125
142
|
}, new Decimal(0));
|
|
126
143
|
}
|
|
127
144
|
return {
|
|
128
145
|
productExpectAmount: price.toNumber(),
|
|
129
|
-
duration:
|
|
146
|
+
duration: getDiscountTimeByDayMinutes(dayDuration.toNumber(), minuteDuration.toNumber())
|
|
130
147
|
};
|
|
131
148
|
};
|
|
132
149
|
var getProductItemTax = function getProductItemTax(item, state, options) {
|
|
@@ -28,7 +28,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
28
28
|
import PaymentModal from "../../../checkout/PaymentModal";
|
|
29
29
|
import { closeAllPaymentResultToasts } from "../../../checkout/components/PaymentResultToast";
|
|
30
30
|
import { formatProducts } from "../../addons";
|
|
31
|
-
import { getIsSubjectRequire, isDayBooking, isEventBooking, isHasDayAppointmentProduct } from "../../info/service2/utils";
|
|
31
|
+
import { getIsSubjectRequire, isDayBooking, isEventBooking, isHasDayAppointmentProduct, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
32
32
|
import { createBookings, editBookings } from "../../info2/serve";
|
|
33
33
|
import AppointmentProductModal from "./AppointmentProductModal";
|
|
34
34
|
import FooterMenus from "./FooterMenus";
|
|
@@ -37,6 +37,7 @@ import "./index.less";
|
|
|
37
37
|
import { createEventBooking, editEventBooking } from "./serve";
|
|
38
38
|
import { checkHolderIsError, formatValues } from "./utils";
|
|
39
39
|
import NoteModal from "../../../../plus/noteModal";
|
|
40
|
+
import { showConfirmHolderModal, ConfirmHolderModal } from "../../utils/confirmHolderModal";
|
|
40
41
|
import { SubTotal } from "../../../../index";
|
|
41
42
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
42
43
|
import { sendWarningLog } from '@pisell/utils';
|
|
@@ -47,6 +48,7 @@ import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
|
|
|
47
48
|
import { useDebounceEffect, useDebounceFn, useMemoizedFn } from 'ahooks';
|
|
48
49
|
import { cloneDeep } from 'lodash';
|
|
49
50
|
import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/useShopDiscountModule";
|
|
51
|
+
import { isWalkIn } from "../../utils";
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* @title: 底部
|
|
@@ -57,7 +59,7 @@ import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/use
|
|
|
57
59
|
* @Date: 2024-01-30 16:51
|
|
58
60
|
*/
|
|
59
61
|
var Footer = function Footer(props) {
|
|
60
|
-
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4, _state$bookingConfig7, _state$
|
|
62
|
+
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4, _state$bookingConfig7, _state$client5;
|
|
61
63
|
var state = props.state,
|
|
62
64
|
buttons = props.buttons,
|
|
63
65
|
dispatch = props.dispatch,
|
|
@@ -852,8 +854,8 @@ var Footer = function Footer(props) {
|
|
|
852
854
|
*/
|
|
853
855
|
var handleSave = /*#__PURE__*/function () {
|
|
854
856
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref6) {
|
|
855
|
-
var _state$bookingConfig6;
|
|
856
|
-
var type, _ref6$messageShow, messageShow, _ref6$noSubmit, noSubmit, isToastMode, isHasDayProducts, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, _store$getState, _window7, callbackData, values, checkout, subtotal_info, res, isNeedDeposit, api;
|
|
857
|
+
var _state$bookingConfig6, _state$service$value2, _state$client3;
|
|
858
|
+
var type, _ref6$messageShow, messageShow, _ref6$noSubmit, noSubmit, isToastMode, isHasDayProducts, hasUnspecifiedHolderProduct, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, _store$getState, _window7, callbackData, values, checkout, subtotal_info, res, isNeedDeposit, api;
|
|
857
859
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
858
860
|
while (1) switch (_context6.prev = _context6.next) {
|
|
859
861
|
case 0:
|
|
@@ -876,12 +878,24 @@ var Footer = function Footer(props) {
|
|
|
876
878
|
}
|
|
877
879
|
return _context6.abrupt("return");
|
|
878
880
|
case 7:
|
|
881
|
+
debugger;
|
|
882
|
+
hasUnspecifiedHolderProduct = (_state$service$value2 = state.service.value) === null || _state$service$value2 === void 0 ? void 0 : _state$service$value2.some(function (item) {
|
|
883
|
+
var _item$_extend, _item$_extend2;
|
|
884
|
+
return (!((_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id) || ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) === 0) && !isNormalProductByDurationSchedule(item);
|
|
885
|
+
});
|
|
886
|
+
if (!(!isWalkIn((_state$client3 = state.client) === null || _state$client3 === void 0 || (_state$client3 = _state$client3.value) === null || _state$client3 === void 0 ? void 0 : _state$client3.id) && getIsSubjectRequire(state) && hasUnspecifiedHolderProduct)) {
|
|
887
|
+
_context6.next = 12;
|
|
888
|
+
break;
|
|
889
|
+
}
|
|
890
|
+
_context6.next = 12;
|
|
891
|
+
return showConfirmHolderModal(state, dispatch);
|
|
892
|
+
case 12:
|
|
879
893
|
if (!(isBooking4Shop && getIsSubjectRequire(state) && checkHolderIsError(state))) {
|
|
880
|
-
_context6.next =
|
|
894
|
+
_context6.next = 14;
|
|
881
895
|
break;
|
|
882
896
|
}
|
|
883
897
|
return _context6.abrupt("return");
|
|
884
|
-
case
|
|
898
|
+
case 14:
|
|
885
899
|
// 区分loading, 是点击的checkout 还是save
|
|
886
900
|
_setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
|
|
887
901
|
_setLoading(true);
|
|
@@ -890,34 +904,34 @@ var Footer = function Footer(props) {
|
|
|
890
904
|
createApi = state.renderType === 'eventBooking' ? createEventBooking : createBooking;
|
|
891
905
|
saveOtherValue = {};
|
|
892
906
|
if (!(type === 'save')) {
|
|
893
|
-
_context6.next =
|
|
907
|
+
_context6.next = 27;
|
|
894
908
|
break;
|
|
895
909
|
}
|
|
896
|
-
_context6.next =
|
|
910
|
+
_context6.next = 23;
|
|
897
911
|
return state === null || state === void 0 || (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
|
|
898
|
-
case
|
|
912
|
+
case 23:
|
|
899
913
|
_context6.t0 = _context6.sent;
|
|
900
914
|
if (_context6.t0) {
|
|
901
|
-
_context6.next =
|
|
915
|
+
_context6.next = 26;
|
|
902
916
|
break;
|
|
903
917
|
}
|
|
904
918
|
_context6.t0 = {};
|
|
905
|
-
case
|
|
919
|
+
case 26:
|
|
906
920
|
saveOtherValue = _context6.t0;
|
|
907
|
-
case
|
|
908
|
-
_context6.prev =
|
|
921
|
+
case 27:
|
|
922
|
+
_context6.prev = 27;
|
|
909
923
|
callbackData = null; // 格式化提交的参数
|
|
910
924
|
values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // checkout 2.0 补充商品总税费字段
|
|
911
925
|
values.product_tax_fee = total.tax || 0;
|
|
912
926
|
if (!noSubmit) {
|
|
913
|
-
_context6.next =
|
|
927
|
+
_context6.next = 33;
|
|
914
928
|
break;
|
|
915
929
|
}
|
|
916
930
|
return _context6.abrupt("return", values);
|
|
917
|
-
case
|
|
931
|
+
case 33:
|
|
918
932
|
checkout = pisellos.getModule('checkout'); // 如果有 orderid,则应该走更新逻辑
|
|
919
933
|
if (!editOrderId) {
|
|
920
|
-
_context6.next =
|
|
934
|
+
_context6.next = 43;
|
|
921
935
|
break;
|
|
922
936
|
}
|
|
923
937
|
subtotal_info = {
|
|
@@ -926,7 +940,7 @@ var Footer = function Footer(props) {
|
|
|
926
940
|
total: cloneDeep(total),
|
|
927
941
|
showDetail: showDetail
|
|
928
942
|
};
|
|
929
|
-
_context6.next =
|
|
943
|
+
_context6.next = 38;
|
|
930
944
|
return checkout.updateLocalOrderAsync({
|
|
931
945
|
orderId: editOrderId,
|
|
932
946
|
orderData: values,
|
|
@@ -934,10 +948,10 @@ var Footer = function Footer(props) {
|
|
|
934
948
|
autoPayment: true,
|
|
935
949
|
totalInfo: subtotal_info
|
|
936
950
|
});
|
|
937
|
-
case
|
|
938
|
-
_context6.next =
|
|
951
|
+
case 38:
|
|
952
|
+
_context6.next = 40;
|
|
939
953
|
return checkout.manualSyncOrderAsync();
|
|
940
|
-
case
|
|
954
|
+
case 40:
|
|
941
955
|
res = _context6.sent;
|
|
942
956
|
if (res.success) {
|
|
943
957
|
// 回调关闭弹窗
|
|
@@ -945,7 +959,7 @@ var Footer = function Footer(props) {
|
|
|
945
959
|
_setLoading(false);
|
|
946
960
|
}
|
|
947
961
|
return _context6.abrupt("return");
|
|
948
|
-
case
|
|
962
|
+
case 43:
|
|
949
963
|
// 如果是保存,检查是否需要支付定金
|
|
950
964
|
if (type === 'save') {
|
|
951
965
|
isNeedDeposit = checkout.checkIsNeedDepositAsync(values.bookings, values.relation_products);
|
|
@@ -1009,43 +1023,43 @@ var Footer = function Footer(props) {
|
|
|
1009
1023
|
|
|
1010
1024
|
// 如果有addons改动, 则先保存
|
|
1011
1025
|
if (!addonsEdit) {
|
|
1012
|
-
_context6.next =
|
|
1026
|
+
_context6.next = 49;
|
|
1013
1027
|
break;
|
|
1014
1028
|
}
|
|
1015
|
-
_context6.next =
|
|
1029
|
+
_context6.next = 49;
|
|
1016
1030
|
return handleSaveAddons();
|
|
1017
|
-
case
|
|
1031
|
+
case 49:
|
|
1018
1032
|
if (!infoEdit) {
|
|
1019
|
-
_context6.next =
|
|
1033
|
+
_context6.next = 54;
|
|
1020
1034
|
break;
|
|
1021
1035
|
}
|
|
1022
|
-
_context6.next =
|
|
1036
|
+
_context6.next = 52;
|
|
1023
1037
|
return api(values, state.bookingId || editOrderId);
|
|
1024
|
-
case
|
|
1038
|
+
case 52:
|
|
1025
1039
|
callbackData = _context6.sent;
|
|
1026
1040
|
if (messageShow) {
|
|
1027
1041
|
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
1028
1042
|
}
|
|
1029
|
-
case
|
|
1043
|
+
case 54:
|
|
1030
1044
|
// 回调关闭弹窗
|
|
1031
1045
|
state === null || state === void 0 || state.callback(callbackData, type);
|
|
1032
1046
|
_setLoading(false);
|
|
1033
1047
|
|
|
1034
1048
|
// return数据 checkout时需要
|
|
1035
1049
|
return _context6.abrupt("return", callbackData || values);
|
|
1036
|
-
case
|
|
1037
|
-
_context6.prev =
|
|
1038
|
-
_context6.t1 = _context6["catch"](
|
|
1050
|
+
case 59:
|
|
1051
|
+
_context6.prev = 59;
|
|
1052
|
+
_context6.t1 = _context6["catch"](27);
|
|
1039
1053
|
console.log(_context6.t1);
|
|
1040
1054
|
if ((_context6.t1 === null || _context6.t1 === void 0 ? void 0 : _context6.t1.code) === 70101) {
|
|
1041
1055
|
message.error(_context6.t1 === null || _context6.t1 === void 0 ? void 0 : _context6.t1.message);
|
|
1042
1056
|
}
|
|
1043
1057
|
_setLoading(false);
|
|
1044
|
-
case
|
|
1058
|
+
case 64:
|
|
1045
1059
|
case "end":
|
|
1046
1060
|
return _context6.stop();
|
|
1047
1061
|
}
|
|
1048
|
-
}, _callee6, null, [[
|
|
1062
|
+
}, _callee6, null, [[27, 59]]);
|
|
1049
1063
|
}));
|
|
1050
1064
|
return function handleSave(_x5) {
|
|
1051
1065
|
return _ref7.apply(this, arguments);
|
|
@@ -1734,6 +1748,8 @@ var Footer = function Footer(props) {
|
|
|
1734
1748
|
}
|
|
1735
1749
|
};
|
|
1736
1750
|
var changeCustomerToGlobalState = useMemoizedFn(function (value) {
|
|
1751
|
+
var _state$client4, _state$service4;
|
|
1752
|
+
var beforeValue = state === null || state === void 0 || (_state$client4 = state.client) === null || _state$client4 === void 0 ? void 0 : _state$client4.value;
|
|
1737
1753
|
dispatch({
|
|
1738
1754
|
type: 'setClient',
|
|
1739
1755
|
payload: {
|
|
@@ -1741,6 +1757,22 @@ var Footer = function Footer(props) {
|
|
|
1741
1757
|
edit: true
|
|
1742
1758
|
}
|
|
1743
1759
|
});
|
|
1760
|
+
if ((beforeValue === null || beforeValue === void 0 ? void 0 : beforeValue.id) === (value === null || value === void 0 ? void 0 : value.id)) return;
|
|
1761
|
+
if (state !== null && state !== void 0 && (_state$service4 = state.service) !== null && _state$service4 !== void 0 && (_state$service4 = _state$service4.value) !== null && _state$service4 !== void 0 && _state$service4.length) {
|
|
1762
|
+
// 还需要清空商品内的 holder 信息
|
|
1763
|
+
dispatch({
|
|
1764
|
+
type: 'setService',
|
|
1765
|
+
payload: {
|
|
1766
|
+
value: state.service.value.map(function (item) {
|
|
1767
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
1768
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
1769
|
+
holder_id: []
|
|
1770
|
+
})
|
|
1771
|
+
});
|
|
1772
|
+
})
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
}
|
|
1744
1776
|
});
|
|
1745
1777
|
var _useCustomer = useCustomer({
|
|
1746
1778
|
changeCustomerToGlobalState: changeCustomerToGlobalState
|
|
@@ -1943,7 +1975,7 @@ var Footer = function Footer(props) {
|
|
|
1943
1975
|
setEditCartMode: setEditCartMode,
|
|
1944
1976
|
paymentResultDisplayMode: state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.payment_setting) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.payment_result_display_mode,
|
|
1945
1977
|
shopDiscount: state.shop_discount,
|
|
1946
|
-
client: (_state$
|
|
1978
|
+
client: (_state$client5 = state.client) === null || _state$client5 === void 0 ? void 0 : _state$client5.value,
|
|
1947
1979
|
currentTotalPrice: total.productAmount,
|
|
1948
1980
|
onChangeShopDiscount: function onChangeShopDiscount(discount) {
|
|
1949
1981
|
dispatch({
|
|
@@ -1982,6 +2014,6 @@ var Footer = function Footer(props) {
|
|
|
1982
2014
|
// handleClearAllAndReset();
|
|
1983
2015
|
// }
|
|
1984
2016
|
}
|
|
1985
|
-
}));
|
|
2017
|
+
}), /*#__PURE__*/React.createElement(ConfirmHolderModal, null));
|
|
1986
2018
|
};
|
|
1987
2019
|
export 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;
|