@pisell/private-materials 6.3.29 → 6.3.31
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 +9 -1
- package/build/lowcode/preview.js +144 -144
- 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/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +62 -46
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/contactInfoMode/index.js +93 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/model.js +3 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.js +154 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/pro/Login2.0/AuthModal.d.ts +143 -0
- package/es/pro/Login2.0/AuthModal.js +624 -0
- package/es/pro/Login2.0/Login2.d.ts +61 -0
- package/es/pro/Login2.0/Login2.js +2157 -0
- package/es/pro/Login2.0/Register2.d.ts +65 -0
- package/es/pro/Login2.0/Register2.js +1501 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
- package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/es/pro/Login2.0/components/LegalTerms.js +51 -0
- package/es/pro/Login2.0/components/LegalTerms.less +74 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
- package/es/pro/Login2.0/components/PhoneInput.js +414 -0
- package/es/pro/Login2.0/components/PhoneInput.less +148 -0
- package/es/pro/Login2.0/components/phoneValidation.js +228 -0
- package/es/pro/Login2.0/hooks/index.d.ts +2 -0
- package/es/pro/Login2.0/hooks/index.js +1 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
- package/es/pro/Login2.0/index.js +8 -0
- package/es/pro/Login2.0/index.less +993 -0
- package/es/pro/Login2.0/locales.js +622 -0
- package/es/pro/Login2.0/shared/Header.d.ts +11 -0
- package/es/pro/Login2.0/shared/Header.js +42 -0
- package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
- package/es/pro/Login2.0/shared/registerFlow.js +171 -0
- package/es/pro/Login2.0/shared/types.d.ts +232 -0
- package/es/pro/Login2.0/shared/types.js +1 -0
- package/es/pro/Login2.0/steps/CodeInput.js +209 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
- package/es/pro/Login2.0/steps/SetPassword.js +148 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
- package/es/pro/Login2.0/steps/index.js +11 -0
- package/es/pro/Login2.0/steps/steps.less +423 -0
- package/es/pro/Login2.0/types.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +70 -38
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info2/index.js +5 -4
- package/lib/components/booking/info2/service/contactInfoMode/index.js +104 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/model.js +3 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +13 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.js +138 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
- package/lib/pro/Login2.0/AuthModal.js +498 -0
- package/lib/pro/Login2.0/Login2.d.ts +61 -0
- package/lib/pro/Login2.0/Login2.js +1468 -0
- package/lib/pro/Login2.0/Register2.d.ts +65 -0
- package/lib/pro/Login2.0/Register2.js +1062 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
- package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
- package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
- package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
- package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
- package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
- package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
- package/lib/pro/Login2.0/hooks/index.js +29 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
- package/lib/pro/Login2.0/index.js +45 -0
- package/lib/pro/Login2.0/index.less +993 -0
- package/lib/pro/Login2.0/locales.js +646 -0
- package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
- package/lib/pro/Login2.0/shared/Header.js +81 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
- package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
- package/lib/pro/Login2.0/shared/types.d.ts +232 -0
- package/lib/pro/Login2.0/shared/types.js +17 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
- package/lib/pro/Login2.0/steps/index.js +60 -0
- package/lib/pro/Login2.0/steps/steps.less +423 -0
- package/lib/pro/Login2.0/types.js +17 -0
- package/lowcode/authmodal/meta.ts +395 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/lowcode/login2/CONFIG.md +447 -0
- package/lowcode/login2/TEST_CONFIG.md +324 -0
- package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
- package/lowcode/login2/meta.ts +560 -0
- package/lowcode/login2/snippets.ts +124 -0
- package/lowcode/register2/meta.ts +562 -0
- package/lowcode/register2/snippets.ts +257 -0
- package/package.json +7 -5
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/hooks.d.ts +0 -106
- package/es/components/appointmentBooking/locales.d.ts +0 -360
- package/es/components/booking/components/footer/utils.d.ts +0 -41
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
- package/es/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
- package/es/components/booking/info/main.d.ts +0 -12
- package/es/components/booking/info/model.d.ts +0 -14
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/editService/index.d.ts +0 -7
- package/es/components/booking/info2/index.d.ts +0 -12
- package/es/components/booking/info2/service/addService/index.d.ts +0 -11
- package/es/components/booking/locales.d.ts +0 -837
- package/es/components/booking/model.d.ts +0 -116
- package/es/components/eftposPay/component/fail/index.d.ts +0 -3
- package/es/components/index.d.ts +0 -22
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +0 -10
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +0 -9
- package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/es/components/ruleSetting/locales.d.ts +0 -48
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
- package/es/components/ticketBooking/index.d.ts +0 -7
- package/es/plus/productSelect/ProductCard/index.d.ts +0 -47
- package/es/plus/productSelect/index.d.ts +0 -32
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/hooks.d.ts +0 -106
- package/lib/components/appointmentBooking/locales.d.ts +0 -360
- package/lib/components/booking/components/footer/utils.d.ts +0 -41
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
- package/lib/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
- package/lib/components/booking/info/main.d.ts +0 -12
- package/lib/components/booking/info/model.d.ts +0 -14
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/editService/index.d.ts +0 -7
- package/lib/components/booking/info2/index.d.ts +0 -12
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
- package/lib/components/booking/locales.d.ts +0 -837
- package/lib/components/booking/model.d.ts +0 -116
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
- package/lib/components/index.d.ts +0 -22
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +0 -10
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +0 -9
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/lib/components/ruleSetting/locales.d.ts +0 -48
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
- package/lib/components/ticketBooking/index.d.ts +0 -7
- package/lib/plus/productSelect/ProductCard/index.d.ts +0 -47
- package/lib/plus/productSelect/index.d.ts +0 -32
|
@@ -66,7 +66,16 @@ var contextUtils = () => {
|
|
|
66
66
|
var useAppointmentBookingStep = () => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
69
|
-
const {
|
|
69
|
+
const {
|
|
70
|
+
appointmentBooking,
|
|
71
|
+
setCurrentStep,
|
|
72
|
+
carts,
|
|
73
|
+
openPolicy,
|
|
74
|
+
setLoading,
|
|
75
|
+
setCurrentSelectedResources,
|
|
76
|
+
currentStepParams,
|
|
77
|
+
setIsErrorHolder
|
|
78
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
70
79
|
const { isRetailTemplate } = useAppointmentBookingSetting();
|
|
71
80
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
72
81
|
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
@@ -79,14 +88,11 @@ var useAppointmentBookingStep = () => {
|
|
|
79
88
|
};
|
|
80
89
|
(0, import_react.useEffect)(() => {
|
|
81
90
|
getCurrentAndLastStep();
|
|
82
|
-
pisellOS.effects.on(
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
if (res.path === "currentStep") {
|
|
86
|
-
getCurrentAndLastStep();
|
|
87
|
-
}
|
|
91
|
+
pisellOS.effects.on("appointmentBooking_step:changed", async (res) => {
|
|
92
|
+
if (res.path === "currentStep") {
|
|
93
|
+
getCurrentAndLastStep();
|
|
88
94
|
}
|
|
89
|
-
);
|
|
95
|
+
});
|
|
90
96
|
}, []);
|
|
91
97
|
const getStepIndex = (type, skipNumber = 0) => {
|
|
92
98
|
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
@@ -105,11 +111,14 @@ var useAppointmentBookingStep = () => {
|
|
|
105
111
|
};
|
|
106
112
|
const addStep = (props, stepKey) => {
|
|
107
113
|
const { index, key, description } = props;
|
|
108
|
-
return appointmentBooking.addStep(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
return appointmentBooking.addStep(
|
|
115
|
+
{
|
|
116
|
+
index,
|
|
117
|
+
key,
|
|
118
|
+
description
|
|
119
|
+
},
|
|
120
|
+
stepKey
|
|
121
|
+
);
|
|
113
122
|
};
|
|
114
123
|
const updateStep = (key, step) => {
|
|
115
124
|
appointmentBooking.updateStep(key, {
|
|
@@ -159,7 +168,9 @@ var useAppointmentBookingStep = () => {
|
|
|
159
168
|
appointmentBooking.addStep(
|
|
160
169
|
{
|
|
161
170
|
key: "select-resource",
|
|
162
|
-
description: import_utils.locales.getText(
|
|
171
|
+
description: import_utils.locales.getText(
|
|
172
|
+
"pisell2.appointment.select.resource"
|
|
173
|
+
)
|
|
163
174
|
},
|
|
164
175
|
targetKey
|
|
165
176
|
);
|
|
@@ -175,7 +186,9 @@ var useAppointmentBookingStep = () => {
|
|
|
175
186
|
appointmentBooking.addStep(
|
|
176
187
|
{
|
|
177
188
|
key: "select-resource",
|
|
178
|
-
description: import_utils.locales.getText(
|
|
189
|
+
description: import_utils.locales.getText(
|
|
190
|
+
"pisell2.appointment.select.resource"
|
|
191
|
+
)
|
|
179
192
|
},
|
|
180
193
|
targetKey
|
|
181
194
|
);
|
|
@@ -191,13 +204,19 @@ var useAppointmentBookingStep = () => {
|
|
|
191
204
|
}
|
|
192
205
|
const capacityResult = appointmentBooking.checkMaxDurationCapacity();
|
|
193
206
|
if (!capacityResult.success) {
|
|
194
|
-
const getMessage = import_utils.locales.getText(
|
|
207
|
+
const getMessage = import_utils.locales.getText(
|
|
208
|
+
"pisell2.appointment.unuse.capacity"
|
|
209
|
+
);
|
|
195
210
|
const message = typeof getMessage === "function" ? getMessage(capacityResult.minAvailableCount) : getMessage;
|
|
196
211
|
return (0, import_utils2.Toast)(message);
|
|
197
212
|
}
|
|
198
213
|
}
|
|
199
214
|
if (!isRetailTemplate && (currentKey == null ? void 0 : currentKey.startsWith("select-resource"))) {
|
|
200
|
-
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(
|
|
215
|
+
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(
|
|
216
|
+
currentSelectedResources,
|
|
217
|
+
appointmentBooking,
|
|
218
|
+
utils
|
|
219
|
+
);
|
|
201
220
|
if (hasError) {
|
|
202
221
|
setCurrentSelectedResources(updatedCartList);
|
|
203
222
|
(0, import_utils3.scrollToFirstErrorCard)();
|
|
@@ -214,7 +233,10 @@ var useAppointmentBookingStep = () => {
|
|
|
214
233
|
if (formId) {
|
|
215
234
|
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
216
235
|
const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
|
|
217
|
-
appointmentBooking.addStep(
|
|
236
|
+
appointmentBooking.addStep(
|
|
237
|
+
{ key: formKey, description },
|
|
238
|
+
preKey || beforeKey
|
|
239
|
+
);
|
|
218
240
|
preKey = formKey;
|
|
219
241
|
} else {
|
|
220
242
|
appointmentBooking.removeStep(formKey);
|
|
@@ -224,15 +246,20 @@ var useAppointmentBookingStep = () => {
|
|
|
224
246
|
const selectedResource = (_c2 = currentSelectedResources == null ? void 0 : currentSelectedResources[0]) == null ? void 0 : _c2.currentSelectedResource;
|
|
225
247
|
if (selectedResource) {
|
|
226
248
|
const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
|
|
227
|
-
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
249
|
+
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex(
|
|
250
|
+
(item) => {
|
|
251
|
+
var _a3;
|
|
252
|
+
return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
|
|
253
|
+
}
|
|
254
|
+
);
|
|
231
255
|
const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
|
|
232
256
|
const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
|
|
233
257
|
if (nextResource) {
|
|
234
258
|
const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
|
|
235
|
-
appointmentBooking.addStep(
|
|
259
|
+
appointmentBooking.addStep(
|
|
260
|
+
{ key: resourceKey, description: "" },
|
|
261
|
+
beforeKey
|
|
262
|
+
);
|
|
236
263
|
} else {
|
|
237
264
|
appointmentBooking.removeStep(resourceKey);
|
|
238
265
|
}
|
|
@@ -255,8 +282,14 @@ var useAppointmentBookingStep = () => {
|
|
|
255
282
|
} else {
|
|
256
283
|
cartLists = carts || [];
|
|
257
284
|
}
|
|
258
|
-
const appoimentCarts = cartLists.filter(
|
|
259
|
-
|
|
285
|
+
const appoimentCarts = cartLists.filter(
|
|
286
|
+
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
287
|
+
);
|
|
288
|
+
const { hasError } = (0, import_utils2.checkAndGoNext)(
|
|
289
|
+
isFormSubject,
|
|
290
|
+
checkAccount,
|
|
291
|
+
appoimentCarts
|
|
292
|
+
);
|
|
260
293
|
setIsErrorHolder(hasError);
|
|
261
294
|
if (hasError) {
|
|
262
295
|
return;
|
|
@@ -370,12 +403,9 @@ var useAppointmentBookingCart = () => {
|
|
|
370
403
|
};
|
|
371
404
|
(0, import_react.useEffect)(() => {
|
|
372
405
|
getCartAndSummary();
|
|
373
|
-
pisellOS.effects.on(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
getCartAndSummary();
|
|
377
|
-
}
|
|
378
|
-
);
|
|
406
|
+
pisellOS.effects.on("appointmentBooking_cart:changed", async () => {
|
|
407
|
+
getCartAndSummary();
|
|
408
|
+
});
|
|
379
409
|
}, []);
|
|
380
410
|
};
|
|
381
411
|
var useAppointmentBookingLogin = () => {
|
|
@@ -441,7 +471,10 @@ var useAppointmentBookingAccount = () => {
|
|
|
441
471
|
};
|
|
442
472
|
const addAccount = async (val, type) => {
|
|
443
473
|
const customer = (0, import_utils2.getCustomer)(utils);
|
|
444
|
-
const result = await appointmentBooking.addAccount(val, {
|
|
474
|
+
const result = await appointmentBooking.addAccount(val, {
|
|
475
|
+
type,
|
|
476
|
+
customerId: customer == null ? void 0 : customer.id
|
|
477
|
+
});
|
|
445
478
|
return result;
|
|
446
479
|
};
|
|
447
480
|
const checkAccount = (type) => {
|
|
@@ -484,7 +517,11 @@ var useIsSkipResourceStep = () => {
|
|
|
484
517
|
try {
|
|
485
518
|
const { resources } = getResourceList();
|
|
486
519
|
const accountLists = await appointmentBooking.getAccounts();
|
|
487
|
-
const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(
|
|
520
|
+
const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(
|
|
521
|
+
currentStepParams.key,
|
|
522
|
+
resources,
|
|
523
|
+
appointmentBooking
|
|
524
|
+
);
|
|
488
525
|
if (isSystem) {
|
|
489
526
|
nextStep();
|
|
490
527
|
return true;
|
|
@@ -512,7 +549,7 @@ var useIsSkipResourceStep = () => {
|
|
|
512
549
|
return { checkSkipResourceStep };
|
|
513
550
|
};
|
|
514
551
|
var useAppointmentBookingSetting = () => {
|
|
515
|
-
var _a, _b;
|
|
552
|
+
var _a, _b, _c;
|
|
516
553
|
const utils = contextUtils();
|
|
517
554
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
518
555
|
const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
@@ -537,7 +574,8 @@ var useAppointmentBookingSetting = () => {
|
|
|
537
574
|
bookingSubject,
|
|
538
575
|
setOtherData,
|
|
539
576
|
getOtherData,
|
|
540
|
-
formName
|
|
577
|
+
formName,
|
|
578
|
+
bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
|
|
541
579
|
};
|
|
542
580
|
};
|
|
543
581
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -140,7 +140,8 @@ var locales_default = {
|
|
|
140
140
|
"pisell2.text.goodpass.code-invalid": "Current code is invalid",
|
|
141
141
|
"pisell2.text.goodpass.code-invalid-cart": "No eligible items in the cart",
|
|
142
142
|
"pisell2.text.goodpass.login": "Login",
|
|
143
|
-
"pisell2.text.goodpass.login-tip": " for member benefit Or use account credit"
|
|
143
|
+
"pisell2.text.goodpass.login-tip": " for member benefit Or use account credit",
|
|
144
|
+
"pisell2.text.contact-info.title": "Contact info"
|
|
144
145
|
},
|
|
145
146
|
"zh-CN": {
|
|
146
147
|
"pisell2.event.calendar.limit.unavailable": "不可预约",
|
|
@@ -259,7 +260,8 @@ var locales_default = {
|
|
|
259
260
|
"pisell2.text.goodpass.code-invalid": "当前券码不可用",
|
|
260
261
|
"pisell2.text.goodpass.code-invalid-cart": "当前购物车中无可用商品",
|
|
261
262
|
"pisell2.text.goodpass.login": "登录",
|
|
262
|
-
"pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分"
|
|
263
|
+
"pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分",
|
|
264
|
+
"pisell2.text.contact-info.title": "联系信息"
|
|
263
265
|
},
|
|
264
266
|
"zh-HK": {
|
|
265
267
|
"pisell2.event.calendar.limit.unavailable": "不可預約",
|
|
@@ -378,6 +380,7 @@ var locales_default = {
|
|
|
378
380
|
"pisell2.text.goodpass.code-invalid": "當前券碼不可用",
|
|
379
381
|
"pisell2.text.goodpass.code-invalid-cart": "當前購物車中無可用商品",
|
|
380
382
|
"pisell2.text.goodpass.login": "登錄",
|
|
381
|
-
"pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分"
|
|
383
|
+
"pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分",
|
|
384
|
+
"pisell2.text.contact-info.title": "聯繫信息"
|
|
382
385
|
}
|
|
383
386
|
};
|
|
@@ -147,7 +147,7 @@ var Footer = (props) => {
|
|
|
147
147
|
return false;
|
|
148
148
|
}, [(_g = state.addons) == null ? void 0 : _g.edit]);
|
|
149
149
|
const infoEdit = (0, import_react.useMemo)(() => {
|
|
150
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
150
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
151
151
|
if (!state.bookingId) {
|
|
152
152
|
return true;
|
|
153
153
|
}
|
|
@@ -169,6 +169,9 @@ var Footer = (props) => {
|
|
|
169
169
|
if ((_f2 = state.contacts) == null ? void 0 : _f2.edit) {
|
|
170
170
|
return true;
|
|
171
171
|
}
|
|
172
|
+
if ((_g2 = state.contacts_info) == null ? void 0 : _g2.edit) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
172
175
|
return false;
|
|
173
176
|
}, [state]);
|
|
174
177
|
const isEdit = (0, import_react.useMemo)(() => {
|
|
@@ -71,9 +71,9 @@ var formatProductOption = (option) => {
|
|
|
71
71
|
}
|
|
72
72
|
return option.map((d) => {
|
|
73
73
|
return {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
num: d.num,
|
|
75
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
76
|
+
option_group_id: d.option_group_id
|
|
77
77
|
// "add_price": Number(d?.add_price),
|
|
78
78
|
};
|
|
79
79
|
});
|
|
@@ -92,7 +92,9 @@ var formatProductBundle = (bundle) => {
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
try {
|
|
95
|
-
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
95
|
+
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
96
|
+
(d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id)
|
|
97
|
+
);
|
|
96
98
|
if ((errorBundles == null ? void 0 : errorBundles.length) > 0) {
|
|
97
99
|
log(errorBundles);
|
|
98
100
|
}
|
|
@@ -100,16 +102,16 @@ var formatProductBundle = (bundle) => {
|
|
|
100
102
|
}
|
|
101
103
|
return bundle.map((d) => {
|
|
102
104
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
bundle_group_id: d.group_id,
|
|
106
|
+
bundle_id: d.id,
|
|
107
|
+
bundle_product_id: (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
108
|
+
bundle_variant_id: d.bundle_variant_id,
|
|
109
|
+
num: d.num,
|
|
110
|
+
extension_id: d.extension_id,
|
|
111
|
+
extension_type: d.extension_type,
|
|
110
112
|
// "price": Number(d?.price),
|
|
111
113
|
// "price_type": d?.price_type,
|
|
112
|
-
|
|
114
|
+
option: formatProductOption(d.option)
|
|
113
115
|
};
|
|
114
116
|
});
|
|
115
117
|
};
|
|
@@ -168,11 +170,14 @@ var formatResource = (service) => {
|
|
|
168
170
|
return void 0;
|
|
169
171
|
}
|
|
170
172
|
try {
|
|
171
|
-
return Object.values(service._extend.resource).reduce(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
return Object.values(service._extend.resource).reduce(
|
|
174
|
+
(pre, cur) => {
|
|
175
|
+
const newList = checkResourcesFormat(cur, service);
|
|
176
|
+
pre = pre.concat(newList);
|
|
177
|
+
return pre;
|
|
178
|
+
},
|
|
179
|
+
[]
|
|
180
|
+
);
|
|
176
181
|
} catch (err) {
|
|
177
182
|
return void 0;
|
|
178
183
|
}
|
|
@@ -199,7 +204,9 @@ var formatProductPrice = (item) => {
|
|
|
199
204
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
200
205
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
201
206
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
202
|
-
const variant = item.variant.find(
|
|
207
|
+
const variant = item.variant.find(
|
|
208
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
209
|
+
);
|
|
203
210
|
if (variant) {
|
|
204
211
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
205
212
|
}
|
|
@@ -211,7 +218,7 @@ var formatProductPrice = (item) => {
|
|
|
211
218
|
}
|
|
212
219
|
return price;
|
|
213
220
|
};
|
|
214
|
-
var formatMetaData = (item) => {
|
|
221
|
+
var formatMetaData = (item, isMultiDayPrices) => {
|
|
215
222
|
var _a, _b, _c, _d, _e;
|
|
216
223
|
let metadata = {};
|
|
217
224
|
if ((_a = item._extend) == null ? void 0 : _a.capacity) {
|
|
@@ -223,7 +230,7 @@ var formatMetaData = (item) => {
|
|
|
223
230
|
if ((_b = item._extend) == null ? void 0 : _b.holder_id) {
|
|
224
231
|
metadata.holder_id = (_c = item._extend) == null ? void 0 : _c.holder_id;
|
|
225
232
|
}
|
|
226
|
-
if ((_d = item._extend) == null ? void 0 : _d.multiDayPrices) {
|
|
233
|
+
if (isMultiDayPrices && ((_d = item._extend) == null ? void 0 : _d.multiDayPrices)) {
|
|
227
234
|
metadata.multiDayPrices = (_e = item._extend) == null ? void 0 : _e.multiDayPrices;
|
|
228
235
|
}
|
|
229
236
|
return metadata;
|
|
@@ -233,7 +240,9 @@ var getSourceProductPrice = (item) => {
|
|
|
233
240
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
234
241
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
235
242
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
236
|
-
const variant = item.variant.find(
|
|
243
|
+
const variant = item.variant.find(
|
|
244
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
245
|
+
);
|
|
237
246
|
if (variant) {
|
|
238
247
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
239
248
|
}
|
|
@@ -247,7 +256,9 @@ var formatProducts = (item, quantity) => {
|
|
|
247
256
|
const discount_amount = origin_total - total;
|
|
248
257
|
const discount_list = (item == null ? void 0 : item.discount_list) || [];
|
|
249
258
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
250
|
-
const notManualDiscount = discount_list.filter(
|
|
259
|
+
const notManualDiscount = discount_list.filter(
|
|
260
|
+
(item2) => item2.type !== "product"
|
|
261
|
+
);
|
|
251
262
|
return {
|
|
252
263
|
"num": quantity || item._extend.quantity,
|
|
253
264
|
"price": formatProductPrice(item),
|
|
@@ -266,17 +277,19 @@ var formatProducts = (item, quantity) => {
|
|
|
266
277
|
"product_option_item": formatProductOption((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option),
|
|
267
278
|
"product_variant_id": ((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.product_variant_id) || 0,
|
|
268
279
|
"discount_list": notManualDiscount,
|
|
269
|
-
metadata: formatMetaData(item)
|
|
280
|
+
metadata: formatMetaData(item, false)
|
|
270
281
|
};
|
|
271
282
|
};
|
|
272
283
|
var formatAppointmentProductLists = (data) => {
|
|
273
284
|
var _a;
|
|
274
285
|
try {
|
|
275
286
|
let list = data.service.value;
|
|
276
|
-
list = list.filter(
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
list = list.filter(
|
|
288
|
+
(item) => {
|
|
289
|
+
var _a2;
|
|
290
|
+
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
|
|
291
|
+
}
|
|
292
|
+
);
|
|
280
293
|
const groupMap = /* @__PURE__ */ new Map();
|
|
281
294
|
list.forEach((item) => {
|
|
282
295
|
var _a2;
|
|
@@ -286,7 +299,10 @@ var formatAppointmentProductLists = (data) => {
|
|
|
286
299
|
}
|
|
287
300
|
groupMap.get(key).push(item);
|
|
288
301
|
});
|
|
289
|
-
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
302
|
+
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
303
|
+
(acc, group) => acc.concat(group),
|
|
304
|
+
[]
|
|
305
|
+
);
|
|
290
306
|
return list || [];
|
|
291
307
|
} catch (error) {
|
|
292
308
|
}
|
|
@@ -317,8 +333,9 @@ var formatBookings = (data, values) => {
|
|
|
317
333
|
let dayParams = {};
|
|
318
334
|
const eventOtherParams = data.eventOtherParams;
|
|
319
335
|
let bookings = [];
|
|
320
|
-
|
|
321
|
-
|
|
336
|
+
let obj = {};
|
|
337
|
+
list.forEach((item, index) => {
|
|
338
|
+
var _a, _b, _c, _d, _e;
|
|
322
339
|
let start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
323
340
|
let end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
324
341
|
let end_time = item._extend.endDate.format("HH:mm");
|
|
@@ -330,15 +347,22 @@ var formatBookings = (data, values) => {
|
|
|
330
347
|
if (isDay) {
|
|
331
348
|
const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
|
|
332
349
|
const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
|
|
333
|
-
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
350
|
+
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
351
|
+
startDate,
|
|
352
|
+
endDate
|
|
353
|
+
});
|
|
334
354
|
start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
|
|
335
355
|
start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
|
|
336
356
|
end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
|
|
337
357
|
end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
|
|
338
358
|
dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
|
|
339
359
|
dayParams.holder = formatHolders(data, item, values);
|
|
340
|
-
dayParams.duration = (0, import_utils3.getDays)(
|
|
360
|
+
dayParams.duration = (0, import_utils3.getDays)(
|
|
361
|
+
{ _extend: { start_date: startDateTime, end_date: endDateTime } },
|
|
362
|
+
"minutes"
|
|
363
|
+
);
|
|
341
364
|
}
|
|
365
|
+
const isSetGroupId = obj[(_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.groupId];
|
|
342
366
|
const booking = {
|
|
343
367
|
"product": formatProducts(item),
|
|
344
368
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
@@ -357,10 +381,14 @@ var formatBookings = (data, values) => {
|
|
|
357
381
|
"duration": isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
358
382
|
"number": item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
359
383
|
"resources": formatResource(item),
|
|
360
|
-
|
|
384
|
+
// 当groupId第一次出现时,需要设置metadata.multiDayPrices, 否则不用
|
|
385
|
+
"metadata": formatMetaData(item, !isSetGroupId),
|
|
361
386
|
...eventOtherParams || {},
|
|
362
387
|
...dayParams
|
|
363
388
|
};
|
|
389
|
+
if (!isSetGroupId) {
|
|
390
|
+
obj[item._extend.groupId] = true;
|
|
391
|
+
}
|
|
364
392
|
if (isDay) {
|
|
365
393
|
bookings.push(booking);
|
|
366
394
|
return;
|
|
@@ -368,9 +396,9 @@ var formatBookings = (data, values) => {
|
|
|
368
396
|
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
|
369
397
|
bookings.push({
|
|
370
398
|
...booking,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
399
|
+
product: formatProducts(item, 1),
|
|
400
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }, false) : item._extend.number || 1,
|
|
401
|
+
holder: getHolderByIndex(booking.holder, i)
|
|
374
402
|
});
|
|
375
403
|
}
|
|
376
404
|
});
|
|
@@ -422,7 +450,7 @@ var formatHolder = (state, values) => {
|
|
|
422
450
|
return obj;
|
|
423
451
|
};
|
|
424
452
|
var formatValues = (state) => {
|
|
425
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
453
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
426
454
|
let values = {
|
|
427
455
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
428
456
|
platform: state.isBookingTicket2 ? "pos" : "shop",
|
|
@@ -454,7 +482,10 @@ var formatValues = (state) => {
|
|
|
454
482
|
};
|
|
455
483
|
values.holder = formatHolder(state, values);
|
|
456
484
|
if (isDay || isEvent) {
|
|
457
|
-
values.relation_products = formatRelationProducts(
|
|
485
|
+
values.relation_products = formatRelationProducts(
|
|
486
|
+
state,
|
|
487
|
+
isDay ? "day" : "event"
|
|
488
|
+
);
|
|
458
489
|
} else {
|
|
459
490
|
values.relation_products = formatNormalProducts(state);
|
|
460
491
|
if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
|
|
@@ -473,6 +504,7 @@ var formatValues = (state) => {
|
|
|
473
504
|
if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
|
|
474
505
|
values.type = "virtual";
|
|
475
506
|
}
|
|
507
|
+
values.contacts_info = ((_h = state.contacts_info) == null ? void 0 : _h.value) || null;
|
|
476
508
|
return values;
|
|
477
509
|
};
|
|
478
510
|
var checkHolderIsError = (state) => {
|
|
@@ -52,7 +52,7 @@ var useClientFn = (_params) => {
|
|
|
52
52
|
num: 5,
|
|
53
53
|
total: 0,
|
|
54
54
|
search: "",
|
|
55
|
-
with: ["formRecord"],
|
|
55
|
+
with: ["formRecord", "contactsInfo"],
|
|
56
56
|
relation_form_id: (_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id
|
|
57
57
|
});
|
|
58
58
|
const paramsRef = (0, import_react.useRef)(params);
|
|
@@ -173,7 +173,11 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
173
173
|
const handleAddPet = (_client, cb) => {
|
|
174
174
|
var _a2, _b2, _c2;
|
|
175
175
|
let _data = {
|
|
176
|
-
formDataConfig: isMinorAndWaiver ? {
|
|
176
|
+
formDataConfig: isMinorAndWaiver ? {
|
|
177
|
+
...waiverForm,
|
|
178
|
+
customer_id: _client.id,
|
|
179
|
+
is_franchisor: (_b2 = (_a2 = state.pet.formData) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.is_franchisor
|
|
180
|
+
} : { ...((_c2 = state.pet.formData) == null ? void 0 : _c2[0]) || {} }
|
|
177
181
|
};
|
|
178
182
|
_data.customerId = _client.id;
|
|
179
183
|
state.action({
|
|
@@ -278,7 +282,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
278
282
|
} else {
|
|
279
283
|
const val = await getClients(
|
|
280
284
|
{
|
|
281
|
-
with: ["formRecord"],
|
|
285
|
+
with: ["formRecord", "contactsInfo"],
|
|
282
286
|
relation_form_id: boardConfig == null ? void 0 : boardConfig.form_id,
|
|
283
287
|
skip: 1,
|
|
284
288
|
num: 20,
|
|
@@ -448,21 +452,34 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
448
452
|
size: 64,
|
|
449
453
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
450
454
|
}
|
|
451
|
-
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_A = state.client.value) == null ? void 0 : _A.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_B = state.client.value) == null ? void 0 : _B.email) : null, ((_C = state.client.value) == null ? void 0 : _C.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_D = state.client.value) == null ? void 0 : _D.phone) : null, !!((_F = (_E = state.client.value) == null ? void 0 : _E.waiver_form) == null ? void 0 : _F.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
455
|
+
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_A = state.client.value) == null ? void 0 : _A.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_B = state.client.value) == null ? void 0 : _B.email) : null, ((_C = state.client.value) == null ? void 0 : _C.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_D = state.client.value) == null ? void 0 : _D.phone) : null, !!((_F = (_E = state.client.value) == null ? void 0 : _E.waiver_form) == null ? void 0 : _F.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
456
|
+
"div",
|
|
457
|
+
{
|
|
458
|
+
className: "pisell-lowcode__booking-client-waiver",
|
|
459
|
+
title: (0, import_utils5.getWaiverTitle)((_G = state.client.value) == null ? void 0 : _G.waiver_form)
|
|
460
|
+
},
|
|
461
|
+
(_J = (_I = (_H = state.client.value) == null ? void 0 : _H.waiver_form) == null ? void 0 : _I.map) == null ? void 0 : _J.call(_I, (item) => {
|
|
462
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement(
|
|
463
|
+
"span",
|
|
464
|
+
{
|
|
465
|
+
className: "pisell-lowcode__booking-client-waiver-colon"
|
|
466
|
+
},
|
|
467
|
+
":"
|
|
468
|
+
), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
|
|
469
|
+
"span",
|
|
470
|
+
{
|
|
471
|
+
className: "pisell-lowcode__booking-client-waiver-filled"
|
|
472
|
+
},
|
|
473
|
+
import_utils.locales.getText("pisell2.text.filled")
|
|
474
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
475
|
+
"span",
|
|
476
|
+
{
|
|
477
|
+
className: "pisell-lowcode__booking-client-waiver-not-filled"
|
|
478
|
+
},
|
|
479
|
+
import_utils.locales.getText("pisell2.text.not-filled")
|
|
480
|
+
), ` ; `);
|
|
481
|
+
})
|
|
482
|
+
)), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
466
483
|
import_antd.Dropdown.Button,
|
|
467
484
|
{
|
|
468
485
|
menu: {
|