@pisell/private-materials 6.7.7 → 6.7.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 +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/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/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -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/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/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/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/eftpos/hooks.d.ts +0 -1
- 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/hooks.d.ts +0 -1
- package/es/components/eftposPay/tyro/index.js +0 -12
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/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/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- 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/status.d.ts +0 -1
- package/es/components/pay/toC/status.js +0 -3
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -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/Voucher/index.js +10 -11
- package/es/components/wallet/components/WalletCard.js +1 -5
- package/es/components/wallet/index.js +2 -4
- 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/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/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -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/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/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/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/eftpos/hooks.d.ts +0 -1
- 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/hooks.d.ts +0 -1
- package/lib/components/eftposPay/tyro/index.js +0 -12
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/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/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- 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/status.d.ts +0 -1
- package/lib/components/pay/toC/status.js +0 -5
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -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/Voucher/index.js +8 -8
- package/lib/components/wallet/components/WalletCard.js +0 -4
- package/lib/components/wallet/index.js +2 -2
- 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
|
@@ -32,15 +32,10 @@ __export(utils_exports, {
|
|
|
32
32
|
checkHolderIsError: () => checkHolderIsError,
|
|
33
33
|
checkResourcesFormat: () => checkResourcesFormat,
|
|
34
34
|
checkSubResourcesCapacity: () => checkSubResourcesCapacity,
|
|
35
|
-
formatOriginalPrice: () => formatOriginalPrice,
|
|
36
35
|
formatProductBundle: () => formatProductBundle,
|
|
37
36
|
formatProductOption: () => formatProductOption,
|
|
38
37
|
formatProductPrice: () => formatProductPrice,
|
|
39
|
-
|
|
40
|
-
formatValues: () => formatValues,
|
|
41
|
-
getBundleDiscountList: () => getBundleDiscountList,
|
|
42
|
-
getMainProductSellingPrice: () => getMainProductSellingPrice,
|
|
43
|
-
getSourceProductPrice: () => getSourceProductPrice
|
|
38
|
+
formatValues: () => formatValues
|
|
44
39
|
});
|
|
45
40
|
module.exports = __toCommonJS(utils_exports);
|
|
46
41
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -79,10 +74,10 @@ var formatProductOption = (option) => {
|
|
|
79
74
|
}
|
|
80
75
|
return option.map((d) => {
|
|
81
76
|
return {
|
|
82
|
-
num: d.num,
|
|
83
|
-
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
84
|
-
option_group_id: d.option_group_id,
|
|
85
|
-
custom_add_price: Number(d == null ? void 0 : d.add_price)
|
|
77
|
+
"num": d.num,
|
|
78
|
+
"option_group_item_id": d.product_option_item_id || d.option_group_item_id,
|
|
79
|
+
"option_group_id": d.option_group_id,
|
|
80
|
+
"custom_add_price": Number(d == null ? void 0 : d.add_price)
|
|
86
81
|
};
|
|
87
82
|
});
|
|
88
83
|
};
|
|
@@ -114,8 +109,6 @@ var formatProductBundle = (bundle) => {
|
|
|
114
109
|
return temp + Number(item.num) * item.custom_add_price;
|
|
115
110
|
}, 0);
|
|
116
111
|
return {
|
|
117
|
-
"is_charge_tax": d.is_charge_tax,
|
|
118
|
-
"tax_fee": d.tax_fee,
|
|
119
112
|
"bundle_group_id": d.group_id,
|
|
120
113
|
"bundle_id": d.id,
|
|
121
114
|
"bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
@@ -123,42 +116,16 @@ var formatProductBundle = (bundle) => {
|
|
|
123
116
|
"num": d.num,
|
|
124
117
|
"extension_id": d.extension_id,
|
|
125
118
|
"extension_type": d.extension_type,
|
|
126
|
-
"price": Number(d == null ? void 0 : d.
|
|
119
|
+
"price": Number(d == null ? void 0 : d.price),
|
|
120
|
+
// checkout 2.0 新增
|
|
127
121
|
"price_type": d == null ? void 0 : d.price_type,
|
|
128
|
-
|
|
129
|
-
"custom_price":
|
|
122
|
+
// checkout 2.0 新增
|
|
123
|
+
"custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
|
|
130
124
|
"custom_price_type": d == null ? void 0 : d.price_type,
|
|
131
|
-
"option": option
|
|
132
|
-
"bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
|
|
133
|
-
// "bundle_sum_price": d?.original_price || d?.original_total,
|
|
134
|
-
"metadata": {
|
|
135
|
-
custom_product_bundle_map_id: d._id,
|
|
136
|
-
// 子商品单数量附加费
|
|
137
|
-
"surcharge_fee": d.surcharge_fee,
|
|
138
|
-
// 可选,附加费均摊舍入金额
|
|
139
|
-
"surcharge_rounding_remainder": d.surcharge_rounding_remainder,
|
|
140
|
-
relation_surcharge_ids: d.relation_surcharge_ids || []
|
|
141
|
-
}
|
|
125
|
+
"option": option
|
|
142
126
|
};
|
|
143
127
|
});
|
|
144
128
|
};
|
|
145
|
-
var getBundleDiscountList = (bundle) => {
|
|
146
|
-
if (!bundle) {
|
|
147
|
-
return [];
|
|
148
|
-
}
|
|
149
|
-
let discountList = [];
|
|
150
|
-
bundle.forEach((d) => {
|
|
151
|
-
if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
|
|
152
|
-
d.discount_list.forEach((item) => {
|
|
153
|
-
if (item == null ? void 0 : item.id) {
|
|
154
|
-
item.order_discount_id = item.id;
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
discountList.push(...d.discount_list.filter((item) => !item.id));
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
return discountList;
|
|
161
|
-
};
|
|
162
129
|
var getSubType = (item) => {
|
|
163
130
|
var _a;
|
|
164
131
|
const _type = (_a = item.duration) == null ? void 0 : _a.type;
|
|
@@ -246,7 +213,7 @@ var formatHolders = (state, item, values) => {
|
|
|
246
213
|
var formatProductPrice = (item) => {
|
|
247
214
|
var _a, _b, _c, _d;
|
|
248
215
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
249
|
-
let price = Number((
|
|
216
|
+
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
250
217
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
251
218
|
const variant = item.variant.find(
|
|
252
219
|
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
@@ -290,26 +257,6 @@ var formatMetaData = (item, isMultiDayPrices) => {
|
|
|
290
257
|
}
|
|
291
258
|
return metadata;
|
|
292
259
|
};
|
|
293
|
-
var formatProductMetadata = (item) => {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
295
|
-
let metadata = {};
|
|
296
|
-
if ((_a = item._extend) == null ? void 0 : _a.surcharge_fee) {
|
|
297
|
-
metadata.main_product_attached_bundle_surcharge_fee = (_b = item._extend) == null ? void 0 : _b.surcharge_fee;
|
|
298
|
-
}
|
|
299
|
-
if ((_c = item._extend) == null ? void 0 : _c.main_product_attached_bundle_tax_fee) {
|
|
300
|
-
metadata.main_product_attached_bundle_tax_fee = (_d = item._extend) == null ? void 0 : _d.main_product_attached_bundle_tax_fee;
|
|
301
|
-
}
|
|
302
|
-
if ((_e = item._extend) == null ? void 0 : _e.surcharge_rounding_remainder) {
|
|
303
|
-
metadata.surcharge_rounding_remainder = (_f = item._extend) == null ? void 0 : _f.surcharge_rounding_remainder;
|
|
304
|
-
}
|
|
305
|
-
if ((_g = item._extend) == null ? void 0 : _g.relation_surcharge_ids) {
|
|
306
|
-
metadata.relation_surcharge_ids = (_h = item._extend) == null ? void 0 : _h.relation_surcharge_ids;
|
|
307
|
-
}
|
|
308
|
-
if ((_i = item._extend) == null ? void 0 : _i.unique_identification_number) {
|
|
309
|
-
metadata.unique_identification_number = (_j = item._extend) == null ? void 0 : _j.unique_identification_number;
|
|
310
|
-
}
|
|
311
|
-
return metadata;
|
|
312
|
-
};
|
|
313
260
|
var getSourceProductPrice = (item) => {
|
|
314
261
|
var _a, _b, _c;
|
|
315
262
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
@@ -324,36 +271,12 @@ var getSourceProductPrice = (item) => {
|
|
|
324
271
|
}
|
|
325
272
|
return price;
|
|
326
273
|
};
|
|
327
|
-
var getMainProductSellingPrice = (item) => {
|
|
328
|
-
var _a, _b, _c, _d, _e, _f;
|
|
329
|
-
if (!(0, import_utils5.isNumber)((_a = item._extend) == null ? void 0 : _a.main_product_selling_price) && !(0, import_utils5.isString)((_b = item._extend) == null ? void 0 : _b.main_product_selling_price)) {
|
|
330
|
-
return void 0;
|
|
331
|
-
}
|
|
332
|
-
let optionPrice = new import_decimal.default(0);
|
|
333
|
-
if (((_c = item._extend.other) == null ? void 0 : _c.option) && Array.isArray((_d = item._extend.other) == null ? void 0 : _d.option)) {
|
|
334
|
-
optionPrice = (_e = item._extend.other) == null ? void 0 : _e.option.reduce((accumulator, currentValue) => {
|
|
335
|
-
const currentPrice = new import_decimal.default(currentValue.price || 0);
|
|
336
|
-
const currentNum = new import_decimal.default(currentValue.num || 0);
|
|
337
|
-
return accumulator.add(currentPrice.mul(currentNum));
|
|
338
|
-
}, optionPrice);
|
|
339
|
-
}
|
|
340
|
-
return new import_decimal.default((_f = item._extend) == null ? void 0 : _f.main_product_selling_price).add(optionPrice).toNumber();
|
|
341
|
-
};
|
|
342
274
|
var formatProducts = (item, quantity) => {
|
|
343
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
344
|
-
if (item == null ? void 0 : item.discount_list) {
|
|
345
|
-
item == null ? void 0 : item.discount_list.forEach((d) => {
|
|
346
|
-
if (d == null ? void 0 : d.id) {
|
|
347
|
-
d.order_discount_id = d.id;
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
}
|
|
275
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
351
276
|
const total = Number(item._extend.total);
|
|
352
277
|
const origin_total = Number(item._extend.origin_total);
|
|
353
278
|
const discount_amount = origin_total - total;
|
|
354
|
-
const
|
|
355
|
-
const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
|
|
356
|
-
discount_list.push(...bundleDiscountList);
|
|
279
|
+
const discount_list = (item == null ? void 0 : item.discount_list) || [];
|
|
357
280
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
358
281
|
discount_list.forEach((d) => {
|
|
359
282
|
d.metadata = {
|
|
@@ -371,23 +294,22 @@ var formatProducts = (item, quantity) => {
|
|
|
371
294
|
"name": item.name,
|
|
372
295
|
"num": quantity || item._extend.quantity,
|
|
373
296
|
"price": formatProductPrice(item),
|
|
374
|
-
"main_product_selling_price": getMainProductSellingPrice(item) ?? formatProductPrice(item),
|
|
375
297
|
"source_product_price": getSourceProductPrice(item),
|
|
376
298
|
"product_id": (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
|
|
377
299
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
378
300
|
"product_discount_reason": item._extend.discount_reason || "",
|
|
379
301
|
"is_charge_tax": item.is_charge_tax,
|
|
380
|
-
"note": ((
|
|
302
|
+
"note": ((_a = item._extend) == null ? void 0 : _a.note) || "",
|
|
381
303
|
"discountway": item._extend.discountway || "num",
|
|
382
304
|
"discount_per": item._extend.discount_per,
|
|
383
305
|
"discount_type": item._extend.discount_type || discount_type,
|
|
384
306
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
385
|
-
"product_bundle": formatProductBundle((
|
|
386
|
-
"bundle_edit": item._extend.bundle_edit
|
|
387
|
-
"product_option_item": formatProductOption((
|
|
388
|
-
"product_variant_id": ((
|
|
307
|
+
"product_bundle": formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
|
|
308
|
+
"bundle_edit": item._extend.bundle_edit,
|
|
309
|
+
"product_option_item": formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
|
|
310
|
+
"product_variant_id": ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
|
|
389
311
|
"discount_list": notManualDiscount,
|
|
390
|
-
metadata:
|
|
312
|
+
metadata: formatMetaData(item, false),
|
|
391
313
|
// checkout 需求新增字段
|
|
392
314
|
"calculated_original_price": formatOriginalPrice(item),
|
|
393
315
|
"calculated_selling_price": formatSellingPrice(item),
|
|
@@ -450,7 +372,7 @@ var formatBookings = (data, values) => {
|
|
|
450
372
|
let bookings = [];
|
|
451
373
|
let obj = {};
|
|
452
374
|
list.forEach((item) => {
|
|
453
|
-
var _a, _b, _c, _d, _e, _f
|
|
375
|
+
var _a, _b, _c, _d, _e, _f;
|
|
454
376
|
if (item.isCustomItem) {
|
|
455
377
|
bookings.push({
|
|
456
378
|
...item._extend,
|
|
@@ -490,32 +412,26 @@ var formatBookings = (data, values) => {
|
|
|
490
412
|
item._extend.unique_identification_number = unique_identification_number;
|
|
491
413
|
}
|
|
492
414
|
const isSetGroupId = obj[(_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.groupId];
|
|
493
|
-
if (!((_g = item._extend) == null ? void 0 : _g.unique_identification_number)) {
|
|
494
|
-
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
|
495
|
-
item._extend.unique_identification_number = unique_identification_number;
|
|
496
|
-
}
|
|
497
|
-
debugger;
|
|
498
415
|
const booking = {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
502
|
-
id: item.booking_id || 0,
|
|
503
|
-
relation_id: item._extend.relation_id || 0,
|
|
504
|
-
like_status: item._extend.like_status || "common",
|
|
505
|
-
relation_type: item._extend.relation_type || "",
|
|
506
|
-
is_all: false,
|
|
507
|
-
schedule_id: item._extend.schedule_id || 0,
|
|
508
|
-
end_time,
|
|
509
|
-
sub_type: isDay ? "days" : getSubType(item),
|
|
510
|
-
select_date: start_date,
|
|
511
|
-
start_time,
|
|
512
|
-
end_date,
|
|
513
|
-
start_date,
|
|
514
|
-
duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
515
|
-
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
516
|
-
resources: formatResource(item),
|
|
517
|
-
note: item._extend.note,
|
|
518
|
-
metadata: formatMetaData(item, !isSetGroupId),
|
|
416
|
+
"product": formatProducts(item),
|
|
417
|
+
"metadata": formatMetaData(item, !isSetGroupId),
|
|
418
|
+
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
419
|
+
"id": item.booking_id || 0,
|
|
420
|
+
"relation_id": item._extend.relation_id || 0,
|
|
421
|
+
"like_status": item._extend.like_status || "common",
|
|
422
|
+
"relation_type": item._extend.relation_type || "",
|
|
423
|
+
"is_all": false,
|
|
424
|
+
"schedule_id": item._extend.schedule_id || 0,
|
|
425
|
+
"end_time": end_time,
|
|
426
|
+
"sub_type": isDay ? "days" : getSubType(item),
|
|
427
|
+
"select_date": start_date,
|
|
428
|
+
"start_time": start_time,
|
|
429
|
+
"end_date": end_date,
|
|
430
|
+
"start_date": start_date,
|
|
431
|
+
"duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
432
|
+
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
433
|
+
"resources": formatResource(item),
|
|
434
|
+
"note": item._extend.note,
|
|
519
435
|
...eventOtherParams || {},
|
|
520
436
|
...dayParams
|
|
521
437
|
};
|
|
@@ -529,20 +445,12 @@ var formatBookings = (data, values) => {
|
|
|
529
445
|
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
|
530
446
|
const newItem = (0, import_lodash.cloneDeep)(item);
|
|
531
447
|
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
|
532
|
-
if (i > 0) {
|
|
533
|
-
newItem._extend.surcharge_rounding_remainder = void 0;
|
|
534
|
-
if (((_j = (_i = (_h = newItem._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.bundle) == null ? void 0 : _j.length) > 0) {
|
|
535
|
-
newItem._extend.other.bundle.forEach((bundleItem) => {
|
|
536
|
-
bundleItem.surcharge_rounding_remainder = void 0;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
448
|
bookings.push({
|
|
541
449
|
...booking,
|
|
542
450
|
"product": formatProducts(newItem, 1),
|
|
543
451
|
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
|
|
544
452
|
"holder": getHolderByIndex(booking.holder, i),
|
|
545
|
-
"metadata": formatMetaData(newItem
|
|
453
|
+
"metadata": formatMetaData(newItem)
|
|
546
454
|
});
|
|
547
455
|
}
|
|
548
456
|
});
|
|
@@ -701,13 +609,8 @@ var checkHolderIsError = (state) => {
|
|
|
701
609
|
checkHolderIsError,
|
|
702
610
|
checkResourcesFormat,
|
|
703
611
|
checkSubResourcesCapacity,
|
|
704
|
-
formatOriginalPrice,
|
|
705
612
|
formatProductBundle,
|
|
706
613
|
formatProductOption,
|
|
707
614
|
formatProductPrice,
|
|
708
|
-
|
|
709
|
-
formatValues,
|
|
710
|
-
getBundleDiscountList,
|
|
711
|
-
getMainProductSellingPrice,
|
|
712
|
-
getSourceProductPrice
|
|
615
|
+
formatValues
|
|
713
616
|
});
|
|
@@ -60,8 +60,6 @@ var VoucherCard = (props) => {
|
|
|
60
60
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
61
61
|
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
62
62
|
const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
|
|
63
|
-
const stateRef = (0, import_react.useRef)(state);
|
|
64
|
-
stateRef.current = state;
|
|
65
63
|
services = state.service;
|
|
66
64
|
const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)((value) => {
|
|
67
65
|
dispatch({
|
|
@@ -105,17 +103,11 @@ var VoucherCard = (props) => {
|
|
|
105
103
|
total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
|
|
106
104
|
discount_list: value.discount_list,
|
|
107
105
|
origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
|
|
108
|
-
quantity: value._extend.quantity
|
|
109
|
-
startDate: value._extend.startDate
|
|
106
|
+
quantity: value._extend.quantity
|
|
110
107
|
};
|
|
111
108
|
});
|
|
112
109
|
return val;
|
|
113
110
|
}, [state.service.value]);
|
|
114
|
-
const serviceTotal = (0, import_react.useMemo)(() => {
|
|
115
|
-
return serviceMemo.reduce((total, item) => {
|
|
116
|
-
return total + (item.total || 0);
|
|
117
|
-
}, 0);
|
|
118
|
-
}, [serviceMemo]);
|
|
119
111
|
const onScanWallPassCode = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
120
112
|
if (!e.detail.code) {
|
|
121
113
|
return;
|
|
@@ -163,8 +155,8 @@ var VoucherCard = (props) => {
|
|
|
163
155
|
}
|
|
164
156
|
if (isBooking4Shop) {
|
|
165
157
|
const val = shopDiscount.calcDiscount([
|
|
166
|
-
...
|
|
167
|
-
...
|
|
158
|
+
...state.service.value,
|
|
159
|
+
...state.addons.value
|
|
168
160
|
]);
|
|
169
161
|
console.log("input: ", state.service.value);
|
|
170
162
|
console.log("output: ", val);
|
|
@@ -235,12 +227,6 @@ var VoucherCard = (props) => {
|
|
|
235
227
|
const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
|
|
236
228
|
var _a2;
|
|
237
229
|
const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
|
|
238
|
-
const newTotal = serviceList.reduce((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
|
let other = {};
|
|
@@ -257,14 +243,12 @@ var VoucherCard = (props) => {
|
|
|
257
243
|
}
|
|
258
244
|
});
|
|
259
245
|
if (!((_a2 = props == null ? void 0 : props.state) == null ? void 0 : _a2.isBookingTicket2)) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
});
|
|
246
|
+
dispatch({
|
|
247
|
+
type: "setAddons",
|
|
248
|
+
payload: {
|
|
249
|
+
value: addonsList,
|
|
250
|
+
...other
|
|
251
|
+
}
|
|
268
252
|
});
|
|
269
253
|
}
|
|
270
254
|
});
|
|
@@ -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;
|
|
@@ -95,11 +95,10 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
95
95
|
}
|
|
96
96
|
const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
|
|
97
97
|
const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
|
|
98
|
-
const isEditDiscount = item.booking_id && (bundle.discount_list || []).length;
|
|
99
98
|
return {
|
|
100
99
|
...bundle,
|
|
101
100
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
102
|
-
price:
|
|
101
|
+
price: new import_decimal.default(bundleItemMap[bundle.id].price || 0).add(optionPrice).toNumber()
|
|
103
102
|
// product_price: bundleItemMap[item.id].product_price,
|
|
104
103
|
};
|
|
105
104
|
});
|
|
@@ -378,7 +378,6 @@ var formatBundle = (bundle) => {
|
|
|
378
378
|
num: item == null ? void 0 : item.num,
|
|
379
379
|
price: item == null ? void 0 : item.price,
|
|
380
380
|
total: item == null ? void 0 : item.price,
|
|
381
|
-
origin_total: item.original_total,
|
|
382
381
|
price_type: item == null ? void 0 : item.price_type,
|
|
383
382
|
bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
|
|
384
383
|
bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
|
|
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
-
var import_lodash = require("lodash");
|
|
40
39
|
var import_locales = __toESM(require("./locales"));
|
|
41
40
|
var import_clientCard = __toESM(require("../../../../plus/clientCard"));
|
|
42
41
|
var import_clinetSearch = __toESM(require("../../../../plus/clinetSearch"));
|
|
@@ -149,34 +148,10 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
149
148
|
selectCustomer(null);
|
|
150
149
|
};
|
|
151
150
|
const handleViewClient = (data) => {
|
|
152
|
-
const newSelectedCustomer = (0, import_lodash.cloneDeep)(selectedCustomer);
|
|
153
151
|
state.action({
|
|
154
152
|
type: "pisell1.handleOpenCustomerModal",
|
|
155
153
|
data: { id: state.client.value.id },
|
|
156
154
|
callback: (data2) => {
|
|
157
|
-
console.log("data>>>>>", data2);
|
|
158
|
-
const _selectedCustomer = {
|
|
159
|
-
...newSelectedCustomer || {},
|
|
160
|
-
display_name: (data2 == null ? void 0 : data2.display_name) || "",
|
|
161
|
-
email: (data2 == null ? void 0 : data2.email) || "",
|
|
162
|
-
phone: (data2 == null ? void 0 : data2.phone) || "",
|
|
163
|
-
nickname: (data2 == null ? void 0 : data2.nickname) || "",
|
|
164
|
-
country_calling_code: (data2 == null ? void 0 : data2.country_calling_code) || "",
|
|
165
|
-
first_name: (data2 == null ? void 0 : data2.first_name) || "",
|
|
166
|
-
last_name: (data2 == null ? void 0 : data2.last_name) || "",
|
|
167
|
-
contacts_info: (data2 == null ? void 0 : data2.contacts_info) || null
|
|
168
|
-
};
|
|
169
|
-
selectCustomer(_selectedCustomer);
|
|
170
|
-
if (JSON.stringify((newSelectedCustomer == null ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data2 == null ? void 0 : data2.contacts_info) || {})) {
|
|
171
|
-
dispatch({
|
|
172
|
-
type: "setContactsInfo",
|
|
173
|
-
payload: {
|
|
174
|
-
value: (data2 == null ? void 0 : data2.contacts_info) || {},
|
|
175
|
-
client_id: data2 == null ? void 0 : data2.id
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
handleSearchClient("");
|
|
180
155
|
}
|
|
181
156
|
});
|
|
182
157
|
};
|
|
@@ -262,6 +237,11 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
262
237
|
(0, import_utils3.setHandleSetClient)(handleSetClient);
|
|
263
238
|
}
|
|
264
239
|
}, [isActive]);
|
|
240
|
+
(0, import_react.useEffect)(() => {
|
|
241
|
+
return () => {
|
|
242
|
+
(0, import_utils3.setHandleSetClient)(null);
|
|
243
|
+
};
|
|
244
|
+
}, [isActive]);
|
|
265
245
|
const tags = (0, import_react.useMemo)(() => {
|
|
266
246
|
var _a2;
|
|
267
247
|
if (!selectedCustomer) return;
|
|
@@ -58,9 +58,9 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
58
58
|
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
59
59
|
var import_locales2 = require("../../../utils/locales");
|
|
60
60
|
var import_ahooks = require("ahooks");
|
|
61
|
+
var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
|
|
61
62
|
var import_cartClientCard = __toESM(require("./cartClientCard"));
|
|
62
63
|
var import_materials = require("@pisell/materials");
|
|
63
|
-
var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
|
|
64
64
|
var defaultModules = {
|
|
65
65
|
client: 1,
|
|
66
66
|
date: 1,
|
|
@@ -299,12 +299,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
299
299
|
dispatch: modal.dispatch,
|
|
300
300
|
source: "info"
|
|
301
301
|
},
|
|
302
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
303
|
-
import_cartClientCard.default,
|
|
304
|
-
{
|
|
305
|
-
clientCardProps: { dropdown: dropdownProps }
|
|
306
|
-
}
|
|
307
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
|
|
302
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(import_cartClientCard.default, { clientCardProps: { dropdown: dropdownProps } })) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
|
|
308
303
|
"div",
|
|
309
304
|
{
|
|
310
305
|
className: "booking-info-client-line-code",
|
|
@@ -243,12 +243,13 @@ var Info = (props) => {
|
|
|
243
243
|
_extend: {
|
|
244
244
|
start_date: state.date.value,
|
|
245
245
|
quantity: (e == null ? void 0 : e.quantity) || 1,
|
|
246
|
+
price: _detail.price,
|
|
246
247
|
product_name: item.title,
|
|
247
248
|
other
|
|
248
249
|
},
|
|
249
250
|
new: 1
|
|
250
251
|
};
|
|
251
|
-
|
|
252
|
+
console.log(cacheItem, "cacheItem", e);
|
|
252
253
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
253
254
|
cacheItem._extend.total = _total;
|
|
254
255
|
cacheItem._extend.origin_total = _total;
|
|
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
37
|
var import_skuDetailModal = __toESM(require("../../../../../pro/skuDetailModal"));
|
|
38
38
|
var import_model = require("../../../info/model");
|
|
39
|
-
var import_utils = require("../editService/utils");
|
|
40
39
|
var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
|
|
41
40
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
42
41
|
const modalRef = (0, import_react.useRef)(null);
|
|
@@ -63,12 +62,7 @@ var EditNormalService = (0, import_react.forwardRef)((props, ref) => {
|
|
|
63
62
|
const handleConfirm = (0, import_ahooks.useMemoizedFn)((data) => {
|
|
64
63
|
var _a, _b;
|
|
65
64
|
const newProducts = (_b = ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || []) == null ? void 0 : _b.map((item) => {
|
|
66
|
-
var _a2, _b2;
|
|
67
65
|
if (item._id == data._id) {
|
|
68
|
-
data = (0, import_utils.setProductPrice)(data, {
|
|
69
|
-
newTotal: (_a2 = data._extend) == null ? void 0 : _a2.total,
|
|
70
|
-
origin_total: (_b2 = data._extend) == null ? void 0 : _b2.origin_total
|
|
71
|
-
});
|
|
72
66
|
return data;
|
|
73
67
|
}
|
|
74
68
|
return item;
|
|
@@ -53,7 +53,6 @@ var import_utils5 = require("../../../info/utils");
|
|
|
53
53
|
var import_utils6 = require("../../../utils");
|
|
54
54
|
var import_utilsByBooking = require("../../utilsByBooking");
|
|
55
55
|
var import_utils7 = require("../addService/utils");
|
|
56
|
-
var import_utils8 = require("./utils");
|
|
57
56
|
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
|
58
57
|
var import_priceKeyboard = require("../../../../../pro/priceKeyboard");
|
|
59
58
|
var submitLock = false;
|
|
@@ -188,7 +187,7 @@ var Info = (_, ref) => {
|
|
|
188
187
|
form.setFieldsValue({ discount });
|
|
189
188
|
};
|
|
190
189
|
const onFinish = (values) => {
|
|
191
|
-
var _a2, _b2, _c2, _d2
|
|
190
|
+
var _a2, _b2, _c2, _d2;
|
|
192
191
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
193
192
|
if (isShowTimeAndResource && !isSuccess) {
|
|
194
193
|
return;
|
|
@@ -223,27 +222,19 @@ var Info = (_, ref) => {
|
|
|
223
222
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
224
223
|
_item._serviceKey = (0, import_utils3.genServiceKey)(_item);
|
|
225
224
|
let _id = _item == null ? void 0 : _item._id;
|
|
226
|
-
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
227
|
-
newTotal: values.total,
|
|
228
|
-
origin_total: (_c2 = _item._extend) == null ? void 0 : _c2.origin_total
|
|
229
|
-
});
|
|
230
225
|
if (!_list.some((d) => d._id === _id)) {
|
|
231
226
|
const detail = (0, import_utils3.addService)(_list, _item, state);
|
|
232
227
|
_list = detail.list;
|
|
233
228
|
} else {
|
|
234
229
|
if (isChangeTotal.current) {
|
|
235
230
|
delete _item.discount_list;
|
|
236
|
-
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
237
|
-
newTotal: values.total,
|
|
238
|
-
origin_total: (_d2 = _item._extend) == null ? void 0 : _d2.origin_total
|
|
239
|
-
});
|
|
240
231
|
}
|
|
241
232
|
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
242
233
|
}
|
|
243
234
|
(0, import_utils6.deleteCacheParams)();
|
|
244
235
|
console.log("_onFinish", _list);
|
|
245
236
|
form.resetFields();
|
|
246
|
-
if (!!((
|
|
237
|
+
if (!!((_c2 = state.service.cacheItem) == null ? void 0 : _c2.new)) {
|
|
247
238
|
window.dispatchEvent(
|
|
248
239
|
new CustomEvent("onAddNewService", {
|
|
249
240
|
detail: {
|
|
@@ -252,7 +243,7 @@ var Info = (_, ref) => {
|
|
|
252
243
|
})
|
|
253
244
|
);
|
|
254
245
|
}
|
|
255
|
-
(
|
|
246
|
+
(_d2 = window.closeBookingEditModal) == null ? void 0 : _d2.call(window);
|
|
256
247
|
dispatch({
|
|
257
248
|
type: "setService",
|
|
258
249
|
payload: {
|
|
@@ -11,18 +11,3 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
|
|
|
11
11
|
export declare const setAutoAllocationStorage: (data: {
|
|
12
12
|
[key: string]: boolean;
|
|
13
13
|
}) => void;
|
|
14
|
-
/**
|
|
15
|
-
* 手动折扣后给商品价格和子商品价格重新计算
|
|
16
|
-
*
|
|
17
|
-
* 计算逻辑:
|
|
18
|
-
* 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
|
|
19
|
-
* 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
|
|
20
|
-
*
|
|
21
|
-
* @param cacheItem - 缓存的商品项
|
|
22
|
-
* @param newTotal - 折扣后的新总价
|
|
23
|
-
* @param origin_total - 原始总价
|
|
24
|
-
*/
|
|
25
|
-
export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
|
|
26
|
-
newTotal: number;
|
|
27
|
-
origin_total: number;
|
|
28
|
-
}) => any;
|