@pisell/private-materials 6.7.7 → 6.7.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 +17 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/es/components/booking/addons/index.js +17 -25
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +84 -548
- package/es/components/booking/components/footer/index.js +56 -77
- package/es/components/booking/components/footer/utils.d.ts +0 -19
- package/es/components/booking/components/footer/utils.js +73 -194
- package/es/components/booking/components/voucher/index.js +7 -23
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +6 -30
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +0 -6
- package/es/components/booking/info2/service/editService/index.js +6 -16
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/es/components/booking/info2/service/editService/utils.js +0 -66
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +0 -1
- package/es/components/booking/utils.js +3 -16
- package/es/components/checkout/PaymentModal.d.ts +5 -13
- package/es/components/checkout/PaymentModal.js +252 -304
- package/es/components/checkout/PaymentPlugin.d.ts +3 -0
- package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/es/components/checkout/components/AdditionalModule/index.js +12 -52
- package/es/components/checkout/components/AmountSummary/index.js +76 -9
- package/es/components/checkout/components/AmountSummary/index.less +6 -5
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +0 -6
- package/es/components/checkout/locales.js +0 -6
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
- package/es/components/eftposPay/payo/config.js +32 -70
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/index.js +0 -12
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/list/List.js +40 -56
- package/es/components/list/hooks/useListState.d.ts +3 -5
- package/es/components/list/hooks/useListState.js +2 -17
- package/es/components/list/styles/header.less +3 -3
- package/es/components/list/utils/index.d.ts +1 -13
- package/es/components/list/utils/index.js +1 -43
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/es/components/pay/toC/index.js +4 -7
- package/es/components/pay/toC/locales.d.ts +0 -3
- package/es/components/pay/toC/locales.js +3 -6
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +0 -1
- package/es/components/pay/toC/status.js +0 -3
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
- package/es/components/ticketBooking/components/menuBar/index.js +12 -109
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +7 -112
- package/es/components/ticketBooking/components/timeBar/index.less +0 -59
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
- package/es/components/ticketBooking/locales.d.ts +0 -6
- package/es/components/ticketBooking/locales.js +3 -9
- package/es/components/ticketBooking/utils/index.d.ts +0 -3
- package/es/components/ticketBooking/utils/index.js +13 -36
- package/es/components/wallet/Detail/index.js +2 -34
- package/es/components/wallet/Detail/index.less +0 -11
- package/es/components/wallet/Detail/locales.d.ts +0 -6
- package/es/components/wallet/Detail/locales.js +2 -14
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/index.js +10 -11
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +1 -5
- package/es/components/wallet/index.js +2 -4
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/wallet/serve.d.ts +0 -7
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +1 -5
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +30 -28
- package/es/plus/clinetSearch/locales.d.ts +0 -3
- package/es/plus/clinetSearch/locales.js +4 -7
- package/es/plus/clinetSearch/types.d.ts +0 -12
- package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
- package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
- package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
- package/es/plus/walletPassGallery/index.js +3 -7
- package/es/plus/walletPassGallery/serve.d.ts +0 -3
- package/es/plus/walletPassGallery/serve.js +2 -4
- package/es/pro/Login2.0/index.less +8 -15
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +36 -45
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
- package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/lib/components/booking/addons/index.js +7 -15
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +41 -293
- package/lib/components/booking/components/footer/index.js +11 -30
- package/lib/components/booking/components/footer/utils.d.ts +0 -19
- package/lib/components/booking/components/footer/utils.js +41 -138
- package/lib/components/booking/components/voucher/index.js +9 -25
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +5 -25
- package/lib/components/booking/info2/index.js +2 -7
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
- package/lib/components/booking/info2/service/editService/index.js +3 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/lib/components/booking/info2/service/editService/utils.js +3 -40
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +0 -1
- package/lib/components/booking/utils.js +0 -11
- package/lib/components/checkout/PaymentModal.d.ts +5 -13
- package/lib/components/checkout/PaymentModal.js +147 -190
- package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
- package/lib/components/checkout/PaymentPlugin.js +181 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
- package/lib/components/checkout/components/AmountSummary/index.js +46 -5
- package/lib/components/checkout/components/AmountSummary/index.less +6 -5
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/hooks/useWalletPass.js +1 -1
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +0 -6
- package/lib/components/checkout/locales.js +0 -6
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
- package/lib/components/eftposPay/payo/config.js +73 -98
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/index.js +0 -12
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/list/List.js +16 -34
- package/lib/components/list/hooks/useListState.d.ts +3 -5
- package/lib/components/list/hooks/useListState.js +1 -14
- package/lib/components/list/styles/header.less +3 -3
- package/lib/components/list/utils/index.d.ts +1 -13
- package/lib/components/list/utils/index.js +0 -27
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/lib/components/pay/toC/index.js +1 -4
- package/lib/components/pay/toC/locales.d.ts +0 -3
- package/lib/components/pay/toC/locales.js +3 -6
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +0 -1
- package/lib/components/pay/toC/status.js +0 -5
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
- package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
- package/lib/components/ticketBooking/locales.d.ts +0 -6
- package/lib/components/ticketBooking/locales.js +3 -9
- package/lib/components/ticketBooking/utils/index.d.ts +0 -3
- package/lib/components/ticketBooking/utils/index.js +6 -20
- package/lib/components/wallet/Detail/index.js +3 -31
- package/lib/components/wallet/Detail/index.less +0 -11
- package/lib/components/wallet/Detail/locales.d.ts +0 -6
- package/lib/components/wallet/Detail/locales.js +2 -14
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +0 -4
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/wallet/serve.d.ts +0 -7
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -12
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +8 -17
- package/lib/plus/clinetSearch/locales.d.ts +0 -3
- package/lib/plus/clinetSearch/locales.js +4 -7
- package/lib/plus/clinetSearch/types.d.ts +0 -12
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
- package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
- package/lib/plus/walletPassGallery/index.js +3 -7
- package/lib/plus/walletPassGallery/serve.d.ts +0 -3
- package/lib/plus/walletPassGallery/serve.js +2 -3
- package/lib/pro/Login2.0/index.less +8 -15
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +43 -42
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/checkout/plugin.js +0 -303
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/eftposPay/payo/payment.js +0 -579
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
- package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SectionList.js +0 -174
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
- package/es/components/systemSettings/registry/components/index.d.ts +0 -4
- package/es/components/systemSettings/registry/components/index.js +0 -4
- package/es/components/systemSettings/registry/index.d.ts +0 -5
- package/es/components/systemSettings/registry/index.js +0 -1059
- package/es/components/systemSettings/registry/index.less +0 -410
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/locales.js +0 -300
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/services.js +0 -472
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/types.js +0 -1
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/systemSettings/registry/utils/validators.js +0 -44
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/wallet/utils.js +0 -342
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/checkout/plugin.js +0 -263
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/eftposPay/payo/payment.js +0 -357
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
- package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/index.js +0 -48
- package/lib/components/systemSettings/registry/index.d.ts +0 -5
- package/lib/components/systemSettings/registry/index.js +0 -529
- package/lib/components/systemSettings/registry/index.less +0 -410
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/locales.js +0 -324
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/services.js +0 -290
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/types.js +0 -17
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/systemSettings/registry/utils/validators.js +0 -54
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/wallet/utils.js +0 -287
- package/lowcode/payment-modal/meta.ts +0 -135
- package/lowcode/settings-registry/meta.ts +0 -29
- package/lowcode/wallet-pass-detail/meta.ts +0 -89
|
@@ -4,12 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
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."); }
|
|
9
|
-
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); }
|
|
10
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
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; }
|
|
13
7
|
import dayjs from 'dayjs';
|
|
14
8
|
import { flexibleObj, isNowTime, getNowTime } from "../../utils";
|
|
15
9
|
import { isWalkIn } from "../../utils";
|
|
@@ -17,8 +11,8 @@ import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
|
17
11
|
import { getDays } from "../../utils";
|
|
18
12
|
import { appointmentTypes } from "../../info/service2/status";
|
|
19
13
|
import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule, genRowKey } from "../../info/service2/utils";
|
|
20
|
-
import { isArr, locales, sendWarningLog, getUniqueId
|
|
21
|
-
import { PisellToast } from
|
|
14
|
+
import { isArr, locales, sendWarningLog, getUniqueId } from '@pisell/utils';
|
|
15
|
+
import { PisellToast } from "@pisell/materials";
|
|
22
16
|
import { getClientName } from "../../../../plus/clientName/utils";
|
|
23
17
|
import { cloneDeep } from 'lodash';
|
|
24
18
|
import Decimal from 'decimal.js';
|
|
@@ -55,10 +49,10 @@ export var formatProductOption = function formatProductOption(option) {
|
|
|
55
49
|
}
|
|
56
50
|
return option.map(function (d) {
|
|
57
51
|
return {
|
|
58
|
-
num: d.num,
|
|
59
|
-
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
60
|
-
option_group_id: d.option_group_id,
|
|
61
|
-
custom_add_price: Number(d === null || d === void 0 ? void 0 : d.add_price)
|
|
52
|
+
"num": d.num,
|
|
53
|
+
"option_group_item_id": d.product_option_item_id || d.option_group_item_id,
|
|
54
|
+
"option_group_id": d.option_group_id,
|
|
55
|
+
"custom_add_price": Number(d === null || d === void 0 ? void 0 : d.add_price)
|
|
62
56
|
};
|
|
63
57
|
});
|
|
64
58
|
};
|
|
@@ -112,8 +106,6 @@ export var formatProductBundle = function formatProductBundle(bundle) {
|
|
|
112
106
|
return temp + Number(item.num) * item.custom_add_price;
|
|
113
107
|
}, 0);
|
|
114
108
|
return {
|
|
115
|
-
"is_charge_tax": d.is_charge_tax,
|
|
116
|
-
"tax_fee": d.tax_fee,
|
|
117
109
|
"bundle_group_id": d.group_id,
|
|
118
110
|
"bundle_id": d.id,
|
|
119
111
|
"bundle_product_id": (d === null || d === void 0 ? void 0 : d._bundle_product_id) || (d === null || d === void 0 ? void 0 : d.product_id),
|
|
@@ -121,49 +113,16 @@ export var formatProductBundle = function formatProductBundle(bundle) {
|
|
|
121
113
|
"num": d.num,
|
|
122
114
|
"extension_id": d.extension_id,
|
|
123
115
|
"extension_type": d.extension_type,
|
|
124
|
-
"price": Number(d === null || d === void 0 ? void 0 : d.
|
|
116
|
+
"price": Number(d === null || d === void 0 ? void 0 : d.price),
|
|
117
|
+
// checkout 2.0 新增
|
|
125
118
|
"price_type": d === null || d === void 0 ? void 0 : d.price_type,
|
|
126
|
-
|
|
127
|
-
"custom_price":
|
|
119
|
+
// checkout 2.0 新增
|
|
120
|
+
"custom_price": new Decimal(d === null || d === void 0 ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
|
|
128
121
|
"custom_price_type": d === null || d === void 0 ? void 0 : d.price_type,
|
|
129
|
-
"option": option
|
|
130
|
-
"bundle_selling_price": Math.abs(d === null || d === void 0 ? void 0 : d.price),
|
|
131
|
-
// "bundle_sum_price": d?.original_price || d?.original_total,
|
|
132
|
-
"metadata": {
|
|
133
|
-
custom_product_bundle_map_id: d._id,
|
|
134
|
-
// 子商品单数量附加费
|
|
135
|
-
"surcharge_fee": d.surcharge_fee,
|
|
136
|
-
// 可选,附加费均摊舍入金额
|
|
137
|
-
"surcharge_rounding_remainder": d.surcharge_rounding_remainder,
|
|
138
|
-
relation_surcharge_ids: d.relation_surcharge_ids || []
|
|
139
|
-
}
|
|
122
|
+
"option": option
|
|
140
123
|
};
|
|
141
124
|
});
|
|
142
125
|
};
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* 获取子商品折扣信息
|
|
146
|
-
* @param item
|
|
147
|
-
*/
|
|
148
|
-
export var getBundleDiscountList = function getBundleDiscountList(bundle) {
|
|
149
|
-
if (!bundle) {
|
|
150
|
-
return [];
|
|
151
|
-
}
|
|
152
|
-
var discountList = [];
|
|
153
|
-
bundle.forEach(function (d) {
|
|
154
|
-
if (d.discount_list && isArr(d.discount_list)) {
|
|
155
|
-
d.discount_list.forEach(function (item) {
|
|
156
|
-
if (item !== null && item !== void 0 && item.id) {
|
|
157
|
-
item.order_discount_id = item.id;
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
discountList.push.apply(discountList, _toConsumableArray(d.discount_list.filter(function (item) {
|
|
161
|
-
return !item.id;
|
|
162
|
-
})));
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
return discountList;
|
|
166
|
-
};
|
|
167
126
|
var getSubType = function getSubType(item) {
|
|
168
127
|
var _item$duration;
|
|
169
128
|
var _type = (_item$duration = item.duration) === null || _item$duration === void 0 ? void 0 : _item$duration.type;
|
|
@@ -279,9 +238,9 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
279
238
|
* @Date: 2024-12-23 12:05
|
|
280
239
|
*/
|
|
281
240
|
export var formatProductPrice = function formatProductPrice(item) {
|
|
282
|
-
var _item$_extend6, _item$
|
|
241
|
+
var _item$_extend6, _item$_extend7, _item$variant;
|
|
283
242
|
var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
|
|
284
|
-
var price = Number((_item$
|
|
243
|
+
var price = Number((_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
|
|
285
244
|
|
|
286
245
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
287
246
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant = item.variant) === null || _item$variant === void 0 ? void 0 : _item$variant.length) > 0) {
|
|
@@ -302,13 +261,12 @@ export var formatProductPrice = function formatProductPrice(item) {
|
|
|
302
261
|
}
|
|
303
262
|
return price;
|
|
304
263
|
};
|
|
305
|
-
|
|
306
264
|
/**
|
|
307
265
|
* checkout2.0: 单个数量商品总价(原价),包含所有套餐子商品金额、报价单等等
|
|
308
266
|
* @param item
|
|
309
267
|
* @returns
|
|
310
268
|
*/
|
|
311
|
-
|
|
269
|
+
var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
312
270
|
var _item$_extend8;
|
|
313
271
|
return Number((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.origin_total);
|
|
314
272
|
};
|
|
@@ -318,7 +276,7 @@ export var formatOriginalPrice = function formatOriginalPrice(item) {
|
|
|
318
276
|
* @param item
|
|
319
277
|
* @returns
|
|
320
278
|
*/
|
|
321
|
-
|
|
279
|
+
var formatSellingPrice = function formatSellingPrice(item) {
|
|
322
280
|
var _item$_extend9;
|
|
323
281
|
return Number((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.total);
|
|
324
282
|
};
|
|
@@ -345,39 +303,6 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
|
345
303
|
}
|
|
346
304
|
return metadata;
|
|
347
305
|
};
|
|
348
|
-
var formatProductMetadata = function formatProductMetadata(item) {
|
|
349
|
-
var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23, _item$_extend25;
|
|
350
|
-
var metadata = {};
|
|
351
|
-
|
|
352
|
-
// 主商品+非原价(加减价)子商品附加费
|
|
353
|
-
if ((_item$_extend17 = item._extend) !== null && _item$_extend17 !== void 0 && _item$_extend17.surcharge_fee) {
|
|
354
|
-
var _item$_extend18;
|
|
355
|
-
metadata.main_product_attached_bundle_surcharge_fee = (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.surcharge_fee;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// 主商品+非原价(加减价)子商品税费
|
|
359
|
-
if ((_item$_extend19 = item._extend) !== null && _item$_extend19 !== void 0 && _item$_extend19.main_product_attached_bundle_tax_fee) {
|
|
360
|
-
var _item$_extend20;
|
|
361
|
-
metadata.main_product_attached_bundle_tax_fee = (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.main_product_attached_bundle_tax_fee;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
// 可选,附加费均摊舍入金额
|
|
365
|
-
if ((_item$_extend21 = item._extend) !== null && _item$_extend21 !== void 0 && _item$_extend21.surcharge_rounding_remainder) {
|
|
366
|
-
var _item$_extend22;
|
|
367
|
-
metadata.surcharge_rounding_remainder = (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.surcharge_rounding_remainder;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
// 使用的附加费id列表
|
|
371
|
-
if ((_item$_extend23 = item._extend) !== null && _item$_extend23 !== void 0 && _item$_extend23.relation_surcharge_ids) {
|
|
372
|
-
var _item$_extend24;
|
|
373
|
-
metadata.relation_surcharge_ids = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.relation_surcharge_ids;
|
|
374
|
-
}
|
|
375
|
-
if ((_item$_extend25 = item._extend) !== null && _item$_extend25 !== void 0 && _item$_extend25.unique_identification_number) {
|
|
376
|
-
var _item$_extend26;
|
|
377
|
-
metadata.unique_identification_number = (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.unique_identification_number;
|
|
378
|
-
}
|
|
379
|
-
return metadata;
|
|
380
|
-
};
|
|
381
306
|
|
|
382
307
|
// const formatDiscountList = (list: any[]) => {
|
|
383
308
|
// return list.map(item => {
|
|
@@ -394,10 +319,10 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
394
319
|
// }
|
|
395
320
|
|
|
396
321
|
// 获取商品价格 包含组合规格
|
|
397
|
-
|
|
398
|
-
var _item$
|
|
399
|
-
var other = (_item$
|
|
400
|
-
var price = Number((_item$
|
|
322
|
+
var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
323
|
+
var _item$_extend17, _item$_extend18, _item$variant2;
|
|
324
|
+
var other = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.other;
|
|
325
|
+
var price = Number((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.price);
|
|
401
326
|
|
|
402
327
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
403
328
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
|
|
@@ -411,25 +336,6 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
411
336
|
return price;
|
|
412
337
|
};
|
|
413
338
|
|
|
414
|
-
// 获取主商品价格 要增加option
|
|
415
|
-
export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
|
|
416
|
-
var _item$_extend29, _item$_extend30, _item$_extend$other, _item$_extend$other2, _item$_extend31;
|
|
417
|
-
if (!isNumber((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.main_product_selling_price) && !isString((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.main_product_selling_price)) {
|
|
418
|
-
return undefined;
|
|
419
|
-
}
|
|
420
|
-
var optionPrice = new Decimal(0);
|
|
421
|
-
// 单规格
|
|
422
|
-
if ((_item$_extend$other = item._extend.other) !== null && _item$_extend$other !== void 0 && _item$_extend$other.option && Array.isArray((_item$_extend$other2 = item._extend.other) === null || _item$_extend$other2 === void 0 ? void 0 : _item$_extend$other2.option)) {
|
|
423
|
-
var _item$_extend$other3;
|
|
424
|
-
optionPrice = (_item$_extend$other3 = item._extend.other) === null || _item$_extend$other3 === void 0 ? void 0 : _item$_extend$other3.option.reduce(function (accumulator, currentValue) {
|
|
425
|
-
var currentPrice = new Decimal(currentValue.price || 0);
|
|
426
|
-
var currentNum = new Decimal(currentValue.num || 0);
|
|
427
|
-
return accumulator.add(currentPrice.mul(currentNum));
|
|
428
|
-
}, optionPrice);
|
|
429
|
-
}
|
|
430
|
-
return new Decimal((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.main_product_selling_price).add(optionPrice).toNumber();
|
|
431
|
-
};
|
|
432
|
-
|
|
433
339
|
/**
|
|
434
340
|
* @title: 格式化商品数据
|
|
435
341
|
* @description:
|
|
@@ -439,20 +345,11 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
439
345
|
* @Date: 2024-12-07 14:21
|
|
440
346
|
*/
|
|
441
347
|
var formatProducts = function formatProducts(item, quantity) {
|
|
442
|
-
var _item$
|
|
443
|
-
if (item !== null && item !== void 0 && item.discount_list) {
|
|
444
|
-
item === null || item === void 0 || item.discount_list.forEach(function (d) {
|
|
445
|
-
if (d !== null && d !== void 0 && d.id) {
|
|
446
|
-
d.order_discount_id = d.id;
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
}
|
|
348
|
+
var _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22;
|
|
450
349
|
var total = Number(item._extend.total);
|
|
451
350
|
var origin_total = Number(item._extend.origin_total);
|
|
452
351
|
var discount_amount = origin_total - total;
|
|
453
|
-
var
|
|
454
|
-
var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
|
|
455
|
-
discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
|
|
352
|
+
var discount_list = (item === null || item === void 0 ? void 0 : item.discount_list) || [];
|
|
456
353
|
|
|
457
354
|
// 加价时type使用change_price
|
|
458
355
|
var discount_type = discount_amount < 0 ? 'change_price' : 'discount';
|
|
@@ -473,23 +370,22 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
473
370
|
"name": item.name,
|
|
474
371
|
"num": quantity || item._extend.quantity,
|
|
475
372
|
"price": formatProductPrice(item),
|
|
476
|
-
"main_product_selling_price": (_getMainProductSellin = getMainProductSellingPrice(item)) !== null && _getMainProductSellin !== void 0 ? _getMainProductSellin : formatProductPrice(item),
|
|
477
373
|
"source_product_price": getSourceProductPrice(item),
|
|
478
374
|
"product_id": item !== null && item !== void 0 && item.product_id || item.product_id === 0 ? item.product_id : item.id,
|
|
479
375
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
480
376
|
"product_discount_reason": item._extend.discount_reason || '',
|
|
481
377
|
"is_charge_tax": item.is_charge_tax,
|
|
482
|
-
"note": ((_item$
|
|
378
|
+
"note": ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.note) || '',
|
|
483
379
|
"discountway": item._extend.discountway || "num",
|
|
484
380
|
"discount_per": item._extend.discount_per,
|
|
485
381
|
"discount_type": item._extend.discount_type || discount_type,
|
|
486
382
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
487
|
-
"product_bundle": formatProductBundle((_item$
|
|
488
|
-
"bundle_edit": item._extend.bundle_edit
|
|
489
|
-
"product_option_item": formatProductOption((_item$
|
|
490
|
-
"product_variant_id": ((_item$
|
|
383
|
+
"product_bundle": formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
|
|
384
|
+
"bundle_edit": item._extend.bundle_edit,
|
|
385
|
+
"product_option_item": formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
|
|
386
|
+
"product_variant_id": ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
|
|
491
387
|
"discount_list": notManualDiscount,
|
|
492
|
-
metadata:
|
|
388
|
+
metadata: formatMetaData(item, false),
|
|
493
389
|
// checkout 需求新增字段
|
|
494
390
|
"calculated_original_price": formatOriginalPrice(item),
|
|
495
391
|
"calculated_selling_price": formatSellingPrice(item),
|
|
@@ -512,8 +408,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
512
408
|
|
|
513
409
|
// 过滤出卡片中的普通商品
|
|
514
410
|
var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
|
|
515
|
-
var _item$
|
|
516
|
-
var holderId = (_item$
|
|
411
|
+
var _item$_extend23;
|
|
412
|
+
var holderId = (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.holder_id;
|
|
517
413
|
var bookingHolderId = booking_item._extend.holder_id;
|
|
518
414
|
var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
|
|
519
415
|
return holderId && holderId === bookingHolderId && !isDayBookingProduct;
|
|
@@ -539,15 +435,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
|
|
|
539
435
|
|
|
540
436
|
// 找出预约商品
|
|
541
437
|
list = list.filter(function (item) {
|
|
542
|
-
var _item$
|
|
543
|
-
return ((_item$
|
|
438
|
+
var _item$_extend24;
|
|
439
|
+
return ((_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.holder_id) && !isNormalProductByDurationSchedule(item);
|
|
544
440
|
});
|
|
545
441
|
|
|
546
442
|
// 对预约商品列表根据holder_id进行分组
|
|
547
443
|
var groupMap = new Map();
|
|
548
444
|
list.forEach(function (item) {
|
|
549
|
-
var _item$
|
|
550
|
-
var key = (_item$
|
|
445
|
+
var _item$_extend25;
|
|
446
|
+
var key = (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id; // 分组键
|
|
551
447
|
if (!groupMap.has(key)) {
|
|
552
448
|
groupMap.set(key, []);
|
|
553
449
|
}
|
|
@@ -609,7 +505,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
609
505
|
var bookings = [];
|
|
610
506
|
var obj = {};
|
|
611
507
|
list.forEach(function (item) {
|
|
612
|
-
var _item$
|
|
508
|
+
var _item$_extend30, _item$_extend31;
|
|
613
509
|
// 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
|
|
614
510
|
if (item.isCustomItem) {
|
|
615
511
|
bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
|
|
@@ -630,9 +526,9 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
630
526
|
|
|
631
527
|
// 跨日预约下的普通商品
|
|
632
528
|
if (isDay) {
|
|
633
|
-
var _item$
|
|
634
|
-
var startDate = ((_item$
|
|
635
|
-
var endDate = ((_item$
|
|
529
|
+
var _item$_extend26, _item$_extend27, _item$_extend28, _item$_extend29;
|
|
530
|
+
var startDate = ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.startDate) || ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.start_date);
|
|
531
|
+
var endDate = ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.endDate) || ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.end_date);
|
|
636
532
|
var _formatDayTime = formatDayTime({
|
|
637
533
|
startDate: startDate,
|
|
638
534
|
endDate: endDate
|
|
@@ -654,7 +550,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
654
550
|
}
|
|
655
551
|
}, 'minutes');
|
|
656
552
|
}
|
|
657
|
-
if (!((_item$
|
|
553
|
+
if (!((_item$_extend30 = item._extend) !== null && _item$_extend30 !== void 0 && _item$_extend30.unique_identification_number)) {
|
|
658
554
|
var unique_identification_number = getUniqueId();
|
|
659
555
|
item._extend.unique_identification_number = unique_identification_number;
|
|
660
556
|
}
|
|
@@ -662,35 +558,29 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
662
558
|
// 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
|
|
663
559
|
// 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
|
|
664
560
|
// 后续出现不需要设置 metadata.multiDayPrices. 节省体积
|
|
665
|
-
var isSetGroupId = obj[item === null || item === void 0 || (_item$
|
|
666
|
-
if (!((_item$_extend46 = item._extend) !== null && _item$_extend46 !== void 0 && _item$_extend46.unique_identification_number)) {
|
|
667
|
-
var _unique_identification_number = getUniqueId();
|
|
668
|
-
item._extend.unique_identification_number = _unique_identification_number;
|
|
669
|
-
}
|
|
670
|
-
debugger;
|
|
561
|
+
var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.groupId];
|
|
671
562
|
var booking = _objectSpread(_objectSpread({
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
675
|
-
id: item.booking_id || 0,
|
|
676
|
-
relation_id: item._extend.relation_id || 0,
|
|
677
|
-
like_status: item._extend.like_status || 'common',
|
|
678
|
-
relation_type: item._extend.relation_type || '',
|
|
679
|
-
is_all: false,
|
|
680
|
-
schedule_id: item._extend.schedule_id || 0,
|
|
681
|
-
end_time: end_time,
|
|
682
|
-
sub_type: isDay ? 'days' : getSubType(item),
|
|
683
|
-
select_date: start_date,
|
|
684
|
-
start_time: start_time,
|
|
685
|
-
end_date: end_date,
|
|
686
|
-
start_date: start_date,
|
|
687
|
-
duration: isDay ? 0 : flexibleObj.getValue(item._extend.duration),
|
|
688
|
-
number: item._extend.capacity ? getSumCapacity({
|
|
563
|
+
"product": formatProducts(item),
|
|
564
|
+
"metadata": formatMetaData(item, !isSetGroupId),
|
|
565
|
+
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
566
|
+
'id': item.booking_id || 0,
|
|
567
|
+
"relation_id": item._extend.relation_id || 0,
|
|
568
|
+
"like_status": item._extend.like_status || 'common',
|
|
569
|
+
"relation_type": item._extend.relation_type || '',
|
|
570
|
+
"is_all": false,
|
|
571
|
+
"schedule_id": item._extend.schedule_id || 0,
|
|
572
|
+
"end_time": end_time,
|
|
573
|
+
"sub_type": isDay ? 'days' : getSubType(item),
|
|
574
|
+
"select_date": start_date,
|
|
575
|
+
"start_time": start_time,
|
|
576
|
+
"end_date": end_date,
|
|
577
|
+
"start_date": start_date,
|
|
578
|
+
"duration": isDay ? 0 : flexibleObj.getValue(item._extend.duration),
|
|
579
|
+
"number": item._extend.capacity ? getSumCapacity({
|
|
689
580
|
cacheItem: item
|
|
690
581
|
}) : item._extend.number || 1,
|
|
691
|
-
resources: formatResource(item),
|
|
692
|
-
note: item._extend.note
|
|
693
|
-
metadata: formatMetaData(item, !isSetGroupId)
|
|
582
|
+
"resources": formatResource(item),
|
|
583
|
+
"note": item._extend.note
|
|
694
584
|
}, eventOtherParams || {}), dayParams);
|
|
695
585
|
|
|
696
586
|
// 记录下每个GroupId第一次出现的时机
|
|
@@ -704,25 +594,13 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
704
594
|
for (var i = 0; i < (item._extend.quantity || 1); i++) {
|
|
705
595
|
var newItem = cloneDeep(item);
|
|
706
596
|
newItem._extend.unique_identification_number = "".concat(item._extend.unique_identification_number, "_").concat(i);
|
|
707
|
-
// 舍入金额已基于数量计算,拆分时只保留第一个的 surcharge_rounding_remainder
|
|
708
|
-
if (i > 0) {
|
|
709
|
-
var _newItem$_extend;
|
|
710
|
-
// 清除主商品的舍入金额
|
|
711
|
-
newItem._extend.surcharge_rounding_remainder = undefined;
|
|
712
|
-
// 清除 bundle 子商品的舍入金额
|
|
713
|
-
if (((_newItem$_extend = newItem._extend) === null || _newItem$_extend === void 0 || (_newItem$_extend = _newItem$_extend.other) === null || _newItem$_extend === void 0 || (_newItem$_extend = _newItem$_extend.bundle) === null || _newItem$_extend === void 0 ? void 0 : _newItem$_extend.length) > 0) {
|
|
714
|
-
newItem._extend.other.bundle.forEach(function (bundleItem) {
|
|
715
|
-
bundleItem.surcharge_rounding_remainder = undefined;
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
597
|
bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
|
|
720
598
|
"product": formatProducts(newItem, 1),
|
|
721
599
|
"number": item._extend.capacity ? getSumCapacity({
|
|
722
600
|
cacheItem: newItem
|
|
723
601
|
}, false) : newItem._extend.number || 1,
|
|
724
602
|
"holder": getHolderByIndex(booking.holder, i),
|
|
725
|
-
"metadata": formatMetaData(newItem
|
|
603
|
+
"metadata": formatMetaData(newItem)
|
|
726
604
|
}));
|
|
727
605
|
}
|
|
728
606
|
});
|
|
@@ -742,16 +620,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
|
|
|
742
620
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
743
621
|
// open items 下的商品
|
|
744
622
|
list = list.filter(function (item) {
|
|
745
|
-
var _item$
|
|
623
|
+
var _item$_extend32;
|
|
746
624
|
return (
|
|
747
625
|
// 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
|
|
748
|
-
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$
|
|
626
|
+
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.holder_id) && appointmentTypes.includes(item.extension_type)
|
|
749
627
|
);
|
|
750
628
|
});
|
|
751
629
|
var relationProducts = [];
|
|
752
630
|
relationProducts = list.map(function (item) {
|
|
753
|
-
var _item$
|
|
754
|
-
if (!((_item$
|
|
631
|
+
var _item$_extend33;
|
|
632
|
+
if (!((_item$_extend33 = item._extend) !== null && _item$_extend33 !== void 0 && _item$_extend33.unique_identification_number)) {
|
|
755
633
|
var unique_identification_number = getUniqueId();
|
|
756
634
|
item._extend.unique_identification_number = unique_identification_number;
|
|
757
635
|
}
|
|
@@ -770,8 +648,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
770
648
|
});
|
|
771
649
|
var relationProducts = [];
|
|
772
650
|
relationProducts = list.map(function (item) {
|
|
773
|
-
var _item$
|
|
774
|
-
if (!((_item$
|
|
651
|
+
var _item$_extend34;
|
|
652
|
+
if (!((_item$_extend34 = item._extend) !== null && _item$_extend34 !== void 0 && _item$_extend34.unique_identification_number)) {
|
|
775
653
|
var unique_identification_number = getUniqueId();
|
|
776
654
|
item._extend.unique_identification_number = unique_identification_number;
|
|
777
655
|
}
|
|
@@ -779,6 +657,7 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
779
657
|
});
|
|
780
658
|
return relationProducts || [];
|
|
781
659
|
};
|
|
660
|
+
|
|
782
661
|
/**
|
|
783
662
|
* @title: 预约主体信息
|
|
784
663
|
* @description:
|
|
@@ -889,21 +768,21 @@ export var formatValues = function formatValues(state) {
|
|
|
889
768
|
// 检测预约主体是否为空
|
|
890
769
|
export var checkHolderIsError = function checkHolderIsError(state) {
|
|
891
770
|
var _state$client;
|
|
892
|
-
var errorRowKey =
|
|
771
|
+
var errorRowKey = "";
|
|
893
772
|
var holderError = state.service.value.some(function (item) {
|
|
894
|
-
var _item$
|
|
773
|
+
var _item$_extend36;
|
|
895
774
|
// 普通商品不需要检测holder
|
|
896
775
|
if (isNormalProductByDurationSchedule(item)) {
|
|
897
776
|
return false;
|
|
898
777
|
}
|
|
899
778
|
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
900
|
-
var _item$
|
|
901
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
779
|
+
var _item$_extend35;
|
|
780
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.other) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.rowKey);
|
|
902
781
|
return true;
|
|
903
782
|
}
|
|
904
|
-
if (item._extend.quantity > 1 && ((_item$
|
|
905
|
-
var _item$
|
|
906
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$
|
|
783
|
+
if (item._extend.quantity > 1 && ((_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 || (_item$_extend36 = _item$_extend36.holder_id) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.length) !== item._extend.quantity) {
|
|
784
|
+
var _item$_extend37;
|
|
785
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 || (_item$_extend37 = _item$_extend37.other) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.rowKey);
|
|
907
786
|
return true;
|
|
908
787
|
}
|
|
909
788
|
return false;
|
|
@@ -70,8 +70,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
70
70
|
var shopDiscount = useShopDiscountModule();
|
|
71
71
|
var _useActiveExecute = useActiveExecute(),
|
|
72
72
|
executeIfActive = _useActiveExecute.executeIfActive;
|
|
73
|
-
var stateRef = useRef(state);
|
|
74
|
-
stateRef.current = state;
|
|
75
73
|
services = state.service;
|
|
76
74
|
|
|
77
75
|
// 将选中的客户数据传递给状态管理
|
|
@@ -115,17 +113,11 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
115
113
|
total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
|
|
116
114
|
discount_list: value.discount_list,
|
|
117
115
|
origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
|
|
118
|
-
quantity: value._extend.quantity
|
|
119
|
-
startDate: value._extend.startDate
|
|
116
|
+
quantity: value._extend.quantity
|
|
120
117
|
};
|
|
121
118
|
});
|
|
122
119
|
return val;
|
|
123
120
|
}, [state.service.value]);
|
|
124
|
-
var serviceTotal = useMemo(function () {
|
|
125
|
-
return serviceMemo.reduce(function (total, item) {
|
|
126
|
-
return total + (item.total || 0);
|
|
127
|
-
}, 0);
|
|
128
|
-
}, [serviceMemo]);
|
|
129
121
|
var onScanWallPassCode = useMemoizedFn(function (e) {
|
|
130
122
|
if (!e.detail.code) {
|
|
131
123
|
return;
|
|
@@ -171,7 +163,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
171
163
|
return;
|
|
172
164
|
}
|
|
173
165
|
if (isBooking4Shop) {
|
|
174
|
-
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(
|
|
166
|
+
var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
|
|
175
167
|
console.log('input: ', state.service.value);
|
|
176
168
|
console.log('output: ', val);
|
|
177
169
|
productListToValue(val.productList);
|
|
@@ -235,12 +227,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
235
227
|
var _getServiceAddons = getServiceAddons(list),
|
|
236
228
|
serviceList = _getServiceAddons.serviceList,
|
|
237
229
|
addonsList = _getServiceAddons.addonsList;
|
|
238
|
-
var newTotal = serviceList.reduce(function (total, item) {
|
|
239
|
-
return total + (item._extend.total || 0);
|
|
240
|
-
}, 0);
|
|
241
|
-
if (newTotal !== serviceTotal) {
|
|
242
|
-
edit = true;
|
|
243
|
-
}
|
|
244
230
|
serviceValueRef.current = serviceList;
|
|
245
231
|
addonsValueRef.current = addonsList;
|
|
246
232
|
var other = {};
|
|
@@ -258,13 +244,11 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
258
244
|
|
|
259
245
|
// 售票页面暂时不需要
|
|
260
246
|
if (!(props !== null && props !== void 0 && (_props$state = props.state) !== null && _props$state !== void 0 && _props$state.isBookingTicket2)) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}, other)
|
|
267
|
-
});
|
|
247
|
+
dispatch({
|
|
248
|
+
type: 'setAddons',
|
|
249
|
+
payload: _objectSpread({
|
|
250
|
+
value: addonsList
|
|
251
|
+
}, other)
|
|
268
252
|
});
|
|
269
253
|
}
|
|
270
254
|
});
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -85,12 +85,9 @@ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
|
|
|
85
85
|
return item.id === bundle.id;
|
|
86
86
|
});
|
|
87
87
|
var optionPrice = calculateTotalPrice((selectBundleInfo === null || selectBundleInfo === void 0 ? void 0 : selectBundleInfo.option) || []);
|
|
88
|
-
|
|
89
|
-
// 编辑预约时使用折扣卡
|
|
90
|
-
var isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
|
|
91
88
|
return _objectSpread(_objectSpread({}, bundle), {}, {
|
|
92
89
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
93
|
-
price:
|
|
90
|
+
price: new Decimal(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
94
91
|
// product_price: bundleItemMap[item.id].product_price,
|
|
95
92
|
});
|
|
96
93
|
});
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -442,7 +442,6 @@ var formatBundle = function formatBundle(bundle) {
|
|
|
442
442
|
num: item === null || item === void 0 ? void 0 : item.num,
|
|
443
443
|
price: item === null || item === void 0 ? void 0 : item.price,
|
|
444
444
|
total: item === null || item === void 0 ? void 0 : item.price,
|
|
445
|
-
origin_total: item.original_total,
|
|
446
445
|
price_type: item === null || item === void 0 ? void 0 : item.price_type,
|
|
447
446
|
bundle_sum_price: item === null || item === void 0 ? void 0 : item.bundle_sum_price,
|
|
448
447
|
bundle_sum_type: item === null || item === void 0 ? void 0 : item.bundle_sum_type,
|