@pisell/private-materials 6.3.30 → 6.3.32
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 +146 -146
- 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.d.ts +1 -1
- 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.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +62 -46
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
- 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.d.ts +10 -1
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/model.d.ts +13 -1
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -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.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +40 -0
- package/es/plus/contactInfoModal/index.js +154 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -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.d.ts +31 -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.d.ts +27 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -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.d.ts +17 -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.d.ts +24 -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.d.ts +543 -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.d.ts +116 -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.d.ts +24 -0
- package/es/pro/Login2.0/steps/CodeInput.js +209 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
- package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/es/pro/Login2.0/steps/SetPassword.js +148 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
- package/es/pro/Login2.0/steps/index.d.ts +19 -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.d.ts +167 -0
- package/es/pro/Login2.0/types.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- 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.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +70 -38
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
- 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.d.ts +10 -1
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +5 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/model.d.ts +13 -1
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +13 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -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.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +40 -0
- package/lib/plus/contactInfoModal/index.js +138 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -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.d.ts +31 -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.d.ts +27 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -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.d.ts +17 -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.d.ts +24 -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.d.ts +543 -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.d.ts +116 -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.d.ts +24 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
- package/lib/pro/Login2.0/steps/index.d.ts +19 -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.d.ts +167 -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
|
@@ -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) => {
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -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: {
|
|
@@ -55,6 +55,7 @@ var import_index = require("./index.less");
|
|
|
55
55
|
var import_notes = __toESM(require("./notes"));
|
|
56
56
|
var import_service2 = require("./service2");
|
|
57
57
|
var import_utils3 = require("./service2/utils");
|
|
58
|
+
var import_contactInfoMode = __toESM(require("../info2/service/contactInfoMode"));
|
|
58
59
|
var defaultModules = {
|
|
59
60
|
client: 1,
|
|
60
61
|
date: 1,
|
|
@@ -65,7 +66,7 @@ var defaultModules = {
|
|
|
65
66
|
};
|
|
66
67
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
67
68
|
var Info = (0, import_model.Provider)((props) => {
|
|
68
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
69
70
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
70
71
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
71
72
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -91,7 +92,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
91
92
|
}
|
|
92
93
|
}, []);
|
|
93
94
|
(0, import_react.useEffect)(() => {
|
|
94
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2,
|
|
95
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
95
96
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
96
97
|
modal.dispatch({
|
|
97
98
|
type: "setState",
|
|
@@ -100,7 +101,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
100
101
|
...globalState,
|
|
101
102
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
102
103
|
isFranchisee,
|
|
103
|
-
timezone: (
|
|
104
|
+
timezone: (_m2 = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m2.timezone,
|
|
104
105
|
isDayBooking: (globalState == null ? void 0 : globalState.renderType) === "dayBooking"
|
|
105
106
|
}
|
|
106
107
|
});
|
|
@@ -164,7 +165,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
164
165
|
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode && !(0, import_utils3.isTerminalDayBooking)(modal.state)
|
|
165
166
|
})
|
|
166
167
|
},
|
|
167
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
|
168
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, ((_m = (_l = (_k = (_j = (_i = modal == null ? void 0 : modal.state) == null ? void 0 : _i.bookingConfig) == null ? void 0 : _j.config) == null ? void 0 : _k.cart_settings_tab) == null ? void 0 : _l.display_contact_info) == null ? void 0 : _m.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_n = modal.state) == null ? void 0 : _n.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
168
169
|
import_antd.Skeleton,
|
|
169
170
|
{
|
|
170
171
|
loading: globalState.loading,
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -38,6 +38,11 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
|
38
38
|
setClient(state, payload) {
|
|
39
39
|
state.setGlobalState({ client: { ...state.client, ...payload } });
|
|
40
40
|
},
|
|
41
|
+
setContactsInfo(state, payload) {
|
|
42
|
+
state.setGlobalState({
|
|
43
|
+
contacts_info: { ...state.contacts_info, ...payload }
|
|
44
|
+
});
|
|
45
|
+
},
|
|
41
46
|
setService(state, payload) {
|
|
42
47
|
let obj = {};
|
|
43
48
|
if (payload.value) {
|
|
@@ -59,6 +59,7 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
59
59
|
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
60
60
|
var import_locales2 = require("../../../utils/locales");
|
|
61
61
|
var import_ahooks = require("ahooks");
|
|
62
|
+
var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
|
|
62
63
|
var defaultModules = {
|
|
63
64
|
client: 1,
|
|
64
65
|
date: 1,
|
|
@@ -68,7 +69,7 @@ var defaultModules = {
|
|
|
68
69
|
};
|
|
69
70
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
70
71
|
var Info = (0, import_model.Provider)((props) => {
|
|
71
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
72
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
72
73
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
73
74
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
74
75
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -96,7 +97,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
96
97
|
}
|
|
97
98
|
}, []);
|
|
98
99
|
(0, import_react.useMemo)(() => {
|
|
99
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2,
|
|
100
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
100
101
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
101
102
|
modal.dispatch({
|
|
102
103
|
type: "setState",
|
|
@@ -105,7 +106,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
105
106
|
...globalState,
|
|
106
107
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
107
108
|
isFranchisee,
|
|
108
|
-
timezone: (
|
|
109
|
+
timezone: (_m2 = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m2.timezone
|
|
109
110
|
}
|
|
110
111
|
});
|
|
111
112
|
}, [globalState]);
|
|
@@ -276,7 +277,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
276
277
|
["create-booking-page-info-wrap-create"]: isBookingCreatePageCreateMode
|
|
277
278
|
})
|
|
278
279
|
},
|
|
279
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
|
280
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, ((_p = (_o = (_n = (_m = (_l = modal == null ? void 0 : modal.state) == null ? void 0 : _l.bookingConfig) == null ? void 0 : _m.config) == null ? void 0 : _n.cart_settings_tab) == null ? void 0 : _o.display_contact_info) == null ? void 0 : _p.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_q = modal.state) == null ? void 0 : _q.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
280
281
|
import_antd.Skeleton,
|
|
281
282
|
{
|
|
282
283
|
loading: globalState.loading,
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/info2/service/contactInfoMode/index.tsx
|
|
30
|
+
var contactInfoMode_exports = {};
|
|
31
|
+
__export(contactInfoMode_exports, {
|
|
32
|
+
default: () => contactInfoMode_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(contactInfoMode_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_contactInfo = __toESM(require("../../../../../plus/contactInfo"));
|
|
38
|
+
var import_model = require("../../../info/model");
|
|
39
|
+
var ContactInfoMode = () => {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
42
|
+
console.log("state>>>>>>>>>", state);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i;
|
|
45
|
+
console.log("state>>>>>>>>>111", (_a2 = state == null ? void 0 : state.contacts_info) == null ? void 0 : _a2.client_id);
|
|
46
|
+
console.log("state>>>>>>>>>222", (_b2 = state.client.value) == null ? void 0 : _b2.id);
|
|
47
|
+
if (((_c2 = state.client.value) == null ? void 0 : _c2.id) != ((_d = state == null ? void 0 : state.contacts_info) == null ? void 0 : _d.client_id)) {
|
|
48
|
+
const contactInfo = (_f = (_e = state.client.value) == null ? void 0 : _e.contacts_info) == null ? void 0 : _f.value;
|
|
49
|
+
if (!contactInfo) {
|
|
50
|
+
const {
|
|
51
|
+
first_name,
|
|
52
|
+
last_name,
|
|
53
|
+
phone,
|
|
54
|
+
country_calling_code,
|
|
55
|
+
country_code,
|
|
56
|
+
email
|
|
57
|
+
} = ((_g = state.client) == null ? void 0 : _g.value) || {};
|
|
58
|
+
dispatch({
|
|
59
|
+
type: "setContactsInfo",
|
|
60
|
+
payload: {
|
|
61
|
+
value: {
|
|
62
|
+
first_name: first_name || "",
|
|
63
|
+
last_name: last_name || "",
|
|
64
|
+
phone: {
|
|
65
|
+
phone: phone || "",
|
|
66
|
+
country_calling_code: country_calling_code || "",
|
|
67
|
+
country_code: country_code || ""
|
|
68
|
+
},
|
|
69
|
+
email: email || ""
|
|
70
|
+
},
|
|
71
|
+
client_id: (_h = state.client.value) == null ? void 0 : _h.id
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
dispatch({
|
|
76
|
+
type: "setContactsInfo",
|
|
77
|
+
payload: {
|
|
78
|
+
value: { ...contactInfo || {} },
|
|
79
|
+
client_id: (_i = state.client.value) == null ? void 0 : _i.id
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, [(_a = state.client.value) == null ? void 0 : _a.id, (_b = state == null ? void 0 : state.contacts_info) == null ? void 0 : _b.client_id]);
|
|
85
|
+
const handleSave = (value) => {
|
|
86
|
+
dispatch({
|
|
87
|
+
type: "setContactsInfo",
|
|
88
|
+
payload: { value, edit: true }
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: "24px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: "pisell-lowcode__booking-contact-info-title",
|
|
95
|
+
style: { fontSize: "16px", fontWeight: 500, marginBottom: "8px" }
|
|
96
|
+
},
|
|
97
|
+
import_utils.locales.getText("pisell2.booking.text.contact-info.title")
|
|
98
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
import_contactInfo.default,
|
|
100
|
+
{
|
|
101
|
+
dataSource: ((_c = state.contacts_info) == null ? void 0 : _c.value) || null,
|
|
102
|
+
isShowDelete: false,
|
|
103
|
+
isShowAvatar: false,
|
|
104
|
+
isShowPhone: true,
|
|
105
|
+
isShowEmail: true,
|
|
106
|
+
style: { padding: "14px 0 14px 14px" },
|
|
107
|
+
onSave: handleSave
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
};
|
|
111
|
+
var contactInfoMode_default = ContactInfoMode;
|
|
@@ -276,6 +276,7 @@ declare const _default: {
|
|
|
276
276
|
'pisell2.text.quotation.product.change.title': string;
|
|
277
277
|
'pisell2.text.quotation.product.change.describe': string;
|
|
278
278
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
279
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
279
280
|
};
|
|
280
281
|
'zh-CN': {
|
|
281
282
|
'pisell2.text.refunded-amount': string;
|
|
@@ -554,6 +555,7 @@ declare const _default: {
|
|
|
554
555
|
'pisell2.text.quotation.product.change.title': string;
|
|
555
556
|
'pisell2.text.quotation.product.change.describe': string;
|
|
556
557
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
558
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
557
559
|
};
|
|
558
560
|
'zh-HK': {
|
|
559
561
|
'pisell2.text.refunded-amount': string;
|
|
@@ -832,6 +834,7 @@ declare const _default: {
|
|
|
832
834
|
'pisell2.text.quotation.product.change.title': string;
|
|
833
835
|
'pisell2.text.quotation.product.change.describe': string;
|
|
834
836
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
837
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
835
838
|
};
|
|
836
839
|
};
|
|
837
840
|
export default _default;
|