@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
|
@@ -14,7 +14,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
16
|
import { useState, useEffect, useMemo } from 'react';
|
|
17
|
-
import { locales } from
|
|
17
|
+
import { locales } from '@pisell/utils';
|
|
18
18
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
19
19
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
20
20
|
import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
|
|
@@ -37,7 +37,7 @@ export var contextUtils = function contextUtils() {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @title: 监听步骤发生变化
|
|
40
|
-
* @description:
|
|
40
|
+
* @description:
|
|
41
41
|
* @return {*}
|
|
42
42
|
* @Author: WangHan
|
|
43
43
|
* @Date: 2025-04-15 11:11
|
|
@@ -143,56 +143,56 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
143
143
|
var currentSelectedResources = appointmentBooking.getOtherData('current_selected_resources');
|
|
144
144
|
|
|
145
145
|
// 先确定点击时的步骤,如果当前步骤是选择服务
|
|
146
|
-
if (!isRetailTemplate && currentKey ===
|
|
146
|
+
if (!isRetailTemplate && currentKey === 'select-service') {
|
|
147
147
|
var _appointmentBooking$o, _stepList, _stepList2;
|
|
148
148
|
var _ref3 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
|
|
149
149
|
bookingProcess = _ref3.bookingProcess;
|
|
150
|
-
var isDateSelectedFirst = bookingProcess ===
|
|
150
|
+
var isDateSelectedFirst = bookingProcess === 'date_first';
|
|
151
151
|
var hasResourceStep = (_stepList = stepList) === null || _stepList === void 0 ? void 0 : _stepList.find(function (item) {
|
|
152
|
-
return (item === null || item === void 0 ? void 0 : item.key) ===
|
|
152
|
+
return (item === null || item === void 0 ? void 0 : item.key) === 'select-resource';
|
|
153
153
|
});
|
|
154
154
|
var hasSelectGuestStep = (_stepList2 = stepList) === null || _stepList2 === void 0 || (_stepList2 = _stepList2.find(function (item) {
|
|
155
|
-
return (item === null || item === void 0 ? void 0 : item.key) ===
|
|
155
|
+
return (item === null || item === void 0 ? void 0 : item.key) === 'select-guest';
|
|
156
156
|
})) === null || _stepList2 === void 0 ? void 0 : _stepList2.key;
|
|
157
157
|
// 判断购物车里是否全是是普通商品
|
|
158
158
|
var isAllNormalProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartAllNormalProducts();
|
|
159
159
|
if (isAllNormalProduct) {
|
|
160
|
-
removeStep(
|
|
161
|
-
removeStep(
|
|
160
|
+
removeStep('select-resource');
|
|
161
|
+
removeStep('select-time');
|
|
162
162
|
removeStep('fill-form');
|
|
163
163
|
if (!isDateSelectedFirst) {
|
|
164
|
-
removeStep(
|
|
164
|
+
removeStep('select-date');
|
|
165
165
|
}
|
|
166
166
|
} else if (!hasResourceStep) {
|
|
167
167
|
// 如果不全是普通商品,并且还没有选择资源步骤,证明之前被删除过,要给她加回来
|
|
168
168
|
// 判断当前步骤里有没有添加预约人,如果有的话则应该是在添加预约人之后添加步骤
|
|
169
|
-
var targetKey = hasSelectGuestStep ? hasSelectGuestStep :
|
|
169
|
+
var targetKey = hasSelectGuestStep ? hasSelectGuestStep : 'select-service';
|
|
170
170
|
var isHasDurationProduct = appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.isCartHasDurationProduct();
|
|
171
171
|
// 如果购物车里有 duration 商品(目前来说,只能是纯 duration 商品)
|
|
172
172
|
if (isHasDurationProduct) {
|
|
173
173
|
// 如果是先选商品,则添加日期、资源、时间步骤
|
|
174
174
|
if (!isDateSelectedFirst) {
|
|
175
175
|
appointmentBooking.addStep({
|
|
176
|
-
key:
|
|
177
|
-
description: locales.getText(
|
|
176
|
+
key: 'select-date',
|
|
177
|
+
description: locales.getText('pisell2.appointment.select.date')
|
|
178
178
|
}, targetKey);
|
|
179
|
-
targetKey =
|
|
179
|
+
targetKey = 'select-date';
|
|
180
180
|
}
|
|
181
181
|
// 如果是先选日期,则添加资源、时间
|
|
182
182
|
appointmentBooking.addStep({
|
|
183
|
-
key:
|
|
184
|
-
description: locales.getText(
|
|
183
|
+
key: 'select-resource',
|
|
184
|
+
description: locales.getText('pisell2.appointment.select.resource')
|
|
185
185
|
}, targetKey);
|
|
186
|
-
targetKey =
|
|
186
|
+
targetKey = 'select-resource';
|
|
187
187
|
appointmentBooking.addStep({
|
|
188
|
-
key:
|
|
189
|
-
description: locales.getText(
|
|
188
|
+
key: 'select-time',
|
|
189
|
+
description: locales.getText('pisell2.appointment.select.time')
|
|
190
190
|
}, targetKey);
|
|
191
191
|
} else {
|
|
192
192
|
// 如果购物车里是session 商品,则只添加选择资源步骤
|
|
193
193
|
appointmentBooking.addStep({
|
|
194
|
-
key:
|
|
195
|
-
description: locales.getText(
|
|
194
|
+
key: 'select-resource',
|
|
195
|
+
description: locales.getText('pisell2.appointment.select.resource')
|
|
196
196
|
}, targetKey);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -381,7 +381,6 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
381
381
|
// // getHolders();
|
|
382
382
|
// // }
|
|
383
383
|
// // }
|
|
384
|
-
|
|
385
384
|
// // 继续后续流程
|
|
386
385
|
// checkHolder()
|
|
387
386
|
// }
|
|
@@ -434,7 +433,7 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
|
|
|
434
433
|
|
|
435
434
|
/**
|
|
436
435
|
* @title: 获取商品数据
|
|
437
|
-
* @description:
|
|
436
|
+
* @description:
|
|
438
437
|
* @return {*}
|
|
439
438
|
* @Author: WangHan
|
|
440
439
|
* @Date: 2025-04-15 11:12
|
|
@@ -525,7 +524,7 @@ export var useAppointmentBookingProduct = function useAppointmentBookingProduct(
|
|
|
525
524
|
|
|
526
525
|
/**
|
|
527
526
|
* @title: 更新购物车数据
|
|
528
|
-
* @description:
|
|
527
|
+
* @description:
|
|
529
528
|
* @return {*}
|
|
530
529
|
* @Author: WangHan
|
|
531
530
|
* @Date: 2025-04-15 11:12
|
|
@@ -612,7 +611,7 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
|
|
|
612
611
|
|
|
613
612
|
/**
|
|
614
613
|
* @title: 获取登录状态
|
|
615
|
-
* @description:
|
|
614
|
+
* @description:
|
|
616
615
|
* @return {*}
|
|
617
616
|
* @Author: WangHan
|
|
618
617
|
* @Date: 2025-04-15 11:14
|
|
@@ -640,7 +639,7 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
|
|
|
640
639
|
|
|
641
640
|
/**
|
|
642
641
|
* @title: 获取账户
|
|
643
|
-
* @description:
|
|
642
|
+
* @description:
|
|
644
643
|
* @return {*}
|
|
645
644
|
* @Author: WangHan
|
|
646
645
|
* @Date: 2025-04-15 11:15
|
|
@@ -790,7 +789,7 @@ export var useAppointmentBookingAccount = function useAppointmentBookingAccount(
|
|
|
790
789
|
|
|
791
790
|
/**
|
|
792
791
|
* @title: 获取资源数据
|
|
793
|
-
* @description:
|
|
792
|
+
* @description:
|
|
794
793
|
* @return {*}
|
|
795
794
|
* @Author: WangHan
|
|
796
795
|
* @Date: 2025-04-15 11:29
|
|
@@ -855,7 +854,7 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
|
|
|
855
854
|
|
|
856
855
|
/**
|
|
857
856
|
* @title: 是否跳过资源选择步骤
|
|
858
|
-
* @description:
|
|
857
|
+
* @description:
|
|
859
858
|
* @return {*}
|
|
860
859
|
* @Author: WangHan
|
|
861
860
|
* @Date: 2025-04-21 11:47
|
|
@@ -937,13 +936,13 @@ export var useIsSkipResourceStep = function useIsSkipResourceStep() {
|
|
|
937
936
|
|
|
938
937
|
/**
|
|
939
938
|
* @title: 获取预约配置
|
|
940
|
-
* @description:
|
|
939
|
+
* @description:
|
|
941
940
|
* @return {*}
|
|
942
941
|
* @Author: WangHan
|
|
943
942
|
* @Date: 2025-04-24 18:15
|
|
944
943
|
*/
|
|
945
944
|
export var useAppointmentBookingSetting = function useAppointmentBookingSetting() {
|
|
946
|
-
var _appointmentBooking$o4, _appointmentBooking$o5;
|
|
945
|
+
var _appointmentBooking$o4, _appointmentBooking$o5, _appointmentBooking$o6;
|
|
947
946
|
var utils = contextUtils();
|
|
948
947
|
var _ref28 = useAppointmentBookingContext(),
|
|
949
948
|
appointmentBooking = _ref28.appointmentBooking;
|
|
@@ -977,6 +976,7 @@ export var useAppointmentBookingSetting = function useAppointmentBookingSetting(
|
|
|
977
976
|
bookingSubject: bookingSubject,
|
|
978
977
|
setOtherData: setOtherData,
|
|
979
978
|
getOtherData: getOtherData,
|
|
980
|
-
formName: formName
|
|
979
|
+
formName: formName,
|
|
980
|
+
bookingSetting: (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o6 = appointmentBooking.otherParams) === null || _appointmentBooking$o6 === void 0 ? void 0 : _appointmentBooking$o6.bookingSetting) || {}
|
|
981
981
|
};
|
|
982
982
|
};
|
|
@@ -117,6 +117,7 @@ declare const _default: {
|
|
|
117
117
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
118
118
|
'pisell2.text.goodpass.login': string;
|
|
119
119
|
'pisell2.text.goodpass.login-tip': string;
|
|
120
|
+
'pisell2.text.contact-info.title': string;
|
|
120
121
|
};
|
|
121
122
|
'zh-CN': {
|
|
122
123
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -236,6 +237,7 @@ declare const _default: {
|
|
|
236
237
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
237
238
|
'pisell2.text.goodpass.login': string;
|
|
238
239
|
'pisell2.text.goodpass.login-tip': string;
|
|
240
|
+
'pisell2.text.contact-info.title': string;
|
|
239
241
|
};
|
|
240
242
|
'zh-HK': {
|
|
241
243
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -355,6 +357,7 @@ declare const _default: {
|
|
|
355
357
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
356
358
|
'pisell2.text.goodpass.login': string;
|
|
357
359
|
'pisell2.text.goodpass.login-tip': string;
|
|
360
|
+
'pisell2.text.contact-info.title': string;
|
|
358
361
|
};
|
|
359
362
|
};
|
|
360
363
|
export default _default;
|
|
@@ -132,9 +132,10 @@ export default {
|
|
|
132
132
|
'pisell2.text.goodpass.code': 'Code',
|
|
133
133
|
'pisell2.text.goodpass.enter-code': 'Enter Code',
|
|
134
134
|
'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
|
|
135
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
135
|
+
'pisell2.text.goodpass.code-invalid-cart': 'No eligible items in the cart',
|
|
136
136
|
'pisell2.text.goodpass.login': 'Login',
|
|
137
|
-
'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit'
|
|
137
|
+
'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit',
|
|
138
|
+
'pisell2.text.contact-info.title': 'Contact info'
|
|
138
139
|
},
|
|
139
140
|
'zh-CN': {
|
|
140
141
|
'pisell2.event.calendar.limit.unavailable': '不可预约',
|
|
@@ -269,9 +270,10 @@ export default {
|
|
|
269
270
|
'pisell2.text.goodpass.code': '券码',
|
|
270
271
|
'pisell2.text.goodpass.enter-code': '请输入券码',
|
|
271
272
|
'pisell2.text.goodpass.code-invalid': '当前券码不可用',
|
|
272
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
273
|
+
'pisell2.text.goodpass.code-invalid-cart': '当前购物车中无可用商品',
|
|
273
274
|
'pisell2.text.goodpass.login': '登录',
|
|
274
|
-
'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分'
|
|
275
|
+
'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分',
|
|
276
|
+
'pisell2.text.contact-info.title': '联系信息'
|
|
275
277
|
},
|
|
276
278
|
'zh-HK': {
|
|
277
279
|
'pisell2.event.calendar.limit.unavailable': '不可預約',
|
|
@@ -406,8 +408,9 @@ export default {
|
|
|
406
408
|
'pisell2.text.goodpass.code': '券碼',
|
|
407
409
|
'pisell2.text.goodpass.enter-code': '請輸入券碼',
|
|
408
410
|
'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
|
|
409
|
-
'pisell2.text.goodpass.code-invalid-cart':
|
|
411
|
+
'pisell2.text.goodpass.code-invalid-cart': '當前購物車中無可用商品',
|
|
410
412
|
'pisell2.text.goodpass.login': '登錄',
|
|
411
|
-
'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分'
|
|
413
|
+
'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分',
|
|
414
|
+
'pisell2.text.contact-info.title': '聯繫信息'
|
|
412
415
|
}
|
|
413
416
|
};
|
|
@@ -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
|
+
}>;
|
|
@@ -176,7 +176,7 @@ var Footer = function Footer(props) {
|
|
|
176
176
|
|
|
177
177
|
// info 是否有编辑
|
|
178
178
|
var infoEdit = useMemo(function () {
|
|
179
|
-
var _state$client, _state$date, _state$pet, _state$service, _state$notes, _state$contacts;
|
|
179
|
+
var _state$client, _state$date, _state$pet, _state$service, _state$notes, _state$contacts, _state$contacts_info;
|
|
180
180
|
if (!state.bookingId) {
|
|
181
181
|
return true;
|
|
182
182
|
}
|
|
@@ -198,6 +198,9 @@ var Footer = function Footer(props) {
|
|
|
198
198
|
if ((_state$contacts = state.contacts) !== null && _state$contacts !== void 0 && _state$contacts.edit) {
|
|
199
199
|
return true;
|
|
200
200
|
}
|
|
201
|
+
if ((_state$contacts_info = state.contacts_info) !== null && _state$contacts_info !== void 0 && _state$contacts_info.edit) {
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
201
204
|
return false;
|
|
202
205
|
}, [state]);
|
|
203
206
|
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import dayjs from
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
8
|
import { flexibleObj, isNowTime, getNowTime } from "../../utils";
|
|
9
9
|
import { isWalkIn } from "../../utils";
|
|
10
10
|
import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
@@ -12,10 +12,10 @@ import { getDays } from "../../utils";
|
|
|
12
12
|
import { appointmentTypes } from "../../info/service2/status";
|
|
13
13
|
import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule } from "../../info/service2/utils";
|
|
14
14
|
import { isArr, locales, sendWarningLog } from '@pisell/utils';
|
|
15
|
-
import { PisellToast } from
|
|
15
|
+
import { PisellToast } from '@pisell/materials';
|
|
16
16
|
var formatNote = function formatNote(data) {
|
|
17
17
|
var _data$notes;
|
|
18
|
-
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) ||
|
|
18
|
+
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || '';
|
|
19
19
|
};
|
|
20
20
|
var formatCustomer = function formatCustomer(data) {
|
|
21
21
|
var _data$client, _data$client2, _data$client3, _data$client4, _data$client5, _data$client6;
|
|
@@ -34,7 +34,7 @@ var formatCustomer = function formatCustomer(data) {
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @title: 套餐单规格信息
|
|
37
|
-
* @description:
|
|
37
|
+
* @description:
|
|
38
38
|
* @param {any} option
|
|
39
39
|
* @return {*}
|
|
40
40
|
* @Author: zhiwei.Wang
|
|
@@ -46,9 +46,9 @@ export var formatProductOption = function formatProductOption(option) {
|
|
|
46
46
|
}
|
|
47
47
|
return option.map(function (d) {
|
|
48
48
|
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
num: d.num,
|
|
50
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
51
|
+
option_group_id: d.option_group_id
|
|
52
52
|
// "add_price": Number(d?.add_price),
|
|
53
53
|
};
|
|
54
54
|
});
|
|
@@ -56,7 +56,7 @@ export var formatProductOption = function formatProductOption(option) {
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* @title: 添加套餐警告
|
|
59
|
-
* @description:
|
|
59
|
+
* @description:
|
|
60
60
|
* @param {any} data
|
|
61
61
|
* @return {*}
|
|
62
62
|
* @Author: WangHan
|
|
@@ -77,7 +77,7 @@ var log = function log(data) {
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* @title: 套餐信息
|
|
80
|
-
* @description:
|
|
80
|
+
* @description:
|
|
81
81
|
* @param {any} bundle
|
|
82
82
|
* @return {*}
|
|
83
83
|
* @Author: zhiwei.Wang
|
|
@@ -99,16 +99,16 @@ export var formatProductBundle = function formatProductBundle(bundle) {
|
|
|
99
99
|
} catch (error) {}
|
|
100
100
|
return bundle.map(function (d) {
|
|
101
101
|
return {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
bundle_group_id: d.group_id,
|
|
103
|
+
bundle_id: d.id,
|
|
104
|
+
bundle_product_id: (d === null || d === void 0 ? void 0 : d._bundle_product_id) || (d === null || d === void 0 ? void 0 : d.product_id),
|
|
105
|
+
bundle_variant_id: d.bundle_variant_id,
|
|
106
|
+
num: d.num,
|
|
107
|
+
extension_id: d.extension_id,
|
|
108
|
+
extension_type: d.extension_type,
|
|
109
109
|
// "price": Number(d?.price),
|
|
110
110
|
// "price_type": d?.price_type,
|
|
111
|
-
|
|
111
|
+
option: formatProductOption(d.option)
|
|
112
112
|
};
|
|
113
113
|
});
|
|
114
114
|
};
|
|
@@ -189,7 +189,7 @@ var formatResource = function formatResource(service) {
|
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* @title: 格式化子预约的holder数据
|
|
192
|
-
* @description:
|
|
192
|
+
* @description:
|
|
193
193
|
* @param {any} state
|
|
194
194
|
* @param {any} item
|
|
195
195
|
* @param {any} values
|
|
@@ -220,7 +220,7 @@ var formatHolders = function formatHolders(state, item, values) {
|
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
222
|
* @title: 格式化商品单价
|
|
223
|
-
* @description:
|
|
223
|
+
* @description:
|
|
224
224
|
* @param {any} item
|
|
225
225
|
* @return {*}
|
|
226
226
|
* @Author: WangHan
|
|
@@ -250,7 +250,7 @@ export var formatProductPrice = function formatProductPrice(item) {
|
|
|
250
250
|
}
|
|
251
251
|
return price;
|
|
252
252
|
};
|
|
253
|
-
var formatMetaData = function formatMetaData(item) {
|
|
253
|
+
var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
254
254
|
var _item$_extend8, _item$_extend9, _item$_extend11;
|
|
255
255
|
var metadata = {};
|
|
256
256
|
if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.capacity) {
|
|
@@ -263,7 +263,7 @@ var formatMetaData = function formatMetaData(item) {
|
|
|
263
263
|
var _item$_extend10;
|
|
264
264
|
metadata.holder_id = (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id;
|
|
265
265
|
}
|
|
266
|
-
if ((_item$_extend11 = item._extend) !== null && _item$_extend11 !== void 0 && _item$_extend11.multiDayPrices) {
|
|
266
|
+
if (isMultiDayPrices && (_item$_extend11 = item._extend) !== null && _item$_extend11 !== void 0 && _item$_extend11.multiDayPrices) {
|
|
267
267
|
var _item$_extend12;
|
|
268
268
|
metadata.multiDayPrices = (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.multiDayPrices;
|
|
269
269
|
}
|
|
@@ -304,7 +304,7 @@ var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* @title: 格式化商品数据
|
|
307
|
-
* @description:
|
|
307
|
+
* @description:
|
|
308
308
|
* @param {any} item
|
|
309
309
|
* @return {*}
|
|
310
310
|
* @Author: WangHan
|
|
@@ -342,13 +342,13 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
342
342
|
"product_option_item": formatProductOption((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 || (_item$_extend16 = _item$_extend16.other) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.option),
|
|
343
343
|
"product_variant_id": ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 || (_item$_extend17 = _item$_extend17.other) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.product_variant_id) || 0,
|
|
344
344
|
"discount_list": notManualDiscount,
|
|
345
|
-
metadata: formatMetaData(item)
|
|
345
|
+
metadata: formatMetaData(item, false)
|
|
346
346
|
};
|
|
347
347
|
};
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
350
|
* @title: 格式化跨日预约下的普通商品
|
|
351
|
-
* @description:
|
|
351
|
+
* @description:
|
|
352
352
|
* @param {any} data
|
|
353
353
|
* @param {any} booking_item
|
|
354
354
|
* @return {*}
|
|
@@ -374,7 +374,7 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
376
|
* @title: 格式化跨日预约商品列表
|
|
377
|
-
* @description:
|
|
377
|
+
* @description:
|
|
378
378
|
* @param {any} data
|
|
379
379
|
* @return {*}
|
|
380
380
|
* @Author: WangHan
|
|
@@ -424,7 +424,7 @@ var getHolderByIndex = function getHolderByIndex(holder, index) {
|
|
|
424
424
|
|
|
425
425
|
/**
|
|
426
426
|
* @title: 预约商品信息
|
|
427
|
-
* @description:
|
|
427
|
+
* @description:
|
|
428
428
|
* @param {any} data
|
|
429
429
|
* @return {*}
|
|
430
430
|
* @Author: zhiwei.Wang
|
|
@@ -454,11 +454,13 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
454
454
|
var dayParams = {};
|
|
455
455
|
var eventOtherParams = data.eventOtherParams;
|
|
456
456
|
var bookings = [];
|
|
457
|
-
|
|
457
|
+
var obj = {};
|
|
458
|
+
list.forEach(function (item, index) {
|
|
459
|
+
var _item$_extend25;
|
|
458
460
|
var start_date = item._extend.startDate.format('YYYY-MM-DD');
|
|
459
461
|
var end_date = item._extend.endDate.format('YYYY-MM-DD');
|
|
460
|
-
var end_time = item._extend.endDate.format(
|
|
461
|
-
var start_time = item._extend.startDate.format(
|
|
462
|
+
var end_time = item._extend.endDate.format('HH:mm');
|
|
463
|
+
var start_time = item._extend.startDate.format('HH:mm');
|
|
462
464
|
|
|
463
465
|
// 更新当前时间
|
|
464
466
|
if (isNowTime(item._extend.start_time)) {
|
|
@@ -492,6 +494,11 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
492
494
|
}
|
|
493
495
|
}, 'minutes');
|
|
494
496
|
}
|
|
497
|
+
|
|
498
|
+
// 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
|
|
499
|
+
// 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
|
|
500
|
+
// 后续出现不需要设置 metadata.multiDayPrices. 节省体积
|
|
501
|
+
var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.groupId];
|
|
495
502
|
var booking = _objectSpread(_objectSpread({
|
|
496
503
|
"product": formatProducts(item),
|
|
497
504
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
@@ -512,19 +519,25 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
512
519
|
cacheItem: item
|
|
513
520
|
}) : item._extend.number || 1,
|
|
514
521
|
"resources": formatResource(item),
|
|
515
|
-
|
|
522
|
+
// 当groupId第一次出现时,需要设置metadata.multiDayPrices, 否则不用
|
|
523
|
+
"metadata": formatMetaData(item, !isSetGroupId)
|
|
516
524
|
}, eventOtherParams || {}), dayParams);
|
|
525
|
+
|
|
526
|
+
// 记录下每个GroupId第一次出现的时机
|
|
527
|
+
if (!isSetGroupId) {
|
|
528
|
+
obj[item._extend.groupId] = true;
|
|
529
|
+
}
|
|
517
530
|
if (isDay) {
|
|
518
531
|
bookings.push(booking);
|
|
519
532
|
return;
|
|
520
533
|
}
|
|
521
534
|
for (var i = 0; i < (item._extend.quantity || 1); i++) {
|
|
522
535
|
bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
|
|
523
|
-
|
|
524
|
-
|
|
536
|
+
product: formatProducts(item, 1),
|
|
537
|
+
number: item._extend.capacity ? getSumCapacity({
|
|
525
538
|
cacheItem: item
|
|
526
539
|
}, false) : item._extend.number || 1,
|
|
527
|
-
|
|
540
|
+
holder: getHolderByIndex(booking.holder, i)
|
|
528
541
|
}));
|
|
529
542
|
}
|
|
530
543
|
});
|
|
@@ -533,7 +546,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
533
546
|
|
|
534
547
|
/**
|
|
535
548
|
* @title: 普通商品
|
|
536
|
-
* @description:
|
|
549
|
+
* @description:
|
|
537
550
|
* @param {any} data
|
|
538
551
|
* @return {*}
|
|
539
552
|
* @Author: WangHan
|
|
@@ -544,10 +557,10 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
|
|
|
544
557
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
545
558
|
// open items 下的商品
|
|
546
559
|
list = list.filter(function (item) {
|
|
547
|
-
var _item$
|
|
560
|
+
var _item$_extend26;
|
|
548
561
|
return (
|
|
549
562
|
// 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
|
|
550
|
-
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$
|
|
563
|
+
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.holder_id) && appointmentTypes.includes(item.extension_type)
|
|
551
564
|
);
|
|
552
565
|
});
|
|
553
566
|
var relationProducts = [];
|
|
@@ -574,7 +587,7 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
574
587
|
|
|
575
588
|
/**
|
|
576
589
|
* @title: 预约主体信息
|
|
577
|
-
* @description:
|
|
590
|
+
* @description:
|
|
578
591
|
* @param {any} state
|
|
579
592
|
* @param {any} values
|
|
580
593
|
* @return {*}
|
|
@@ -607,15 +620,15 @@ var formatHolder = function formatHolder(state, values) {
|
|
|
607
620
|
|
|
608
621
|
// https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
|
|
609
622
|
export var formatValues = function formatValues(state) {
|
|
610
|
-
var _values, _values3;
|
|
623
|
+
var _values, _values3, _state$contacts_info;
|
|
611
624
|
var values = {
|
|
612
|
-
type: state.renderType === 'eventBooking' ?
|
|
613
|
-
platform: state.isBookingTicket2 ?
|
|
614
|
-
sales_channel:
|
|
615
|
-
order_sales_channel: state.isBookingTicket2 ?
|
|
625
|
+
type: state.renderType === 'eventBooking' ? 'event_booking_v2' : 'appointment_booking',
|
|
626
|
+
platform: state.isBookingTicket2 ? 'pos' : 'shop',
|
|
627
|
+
sales_channel: 'my_pisel',
|
|
628
|
+
order_sales_channel: state.isBookingTicket2 ? 'pos' : 'online_store',
|
|
616
629
|
bookings: [],
|
|
617
630
|
customer_id: 1,
|
|
618
|
-
customer_name:
|
|
631
|
+
customer_name: '',
|
|
619
632
|
holder: {},
|
|
620
633
|
relation_products: [],
|
|
621
634
|
metadata: {}
|
|
@@ -642,7 +655,7 @@ export var formatValues = function formatValues(state) {
|
|
|
642
655
|
// 主体
|
|
643
656
|
values.holder = formatHolder(state, values);
|
|
644
657
|
if (isDay || isEvent) {
|
|
645
|
-
values.relation_products = formatRelationProducts(state, isDay ?
|
|
658
|
+
values.relation_products = formatRelationProducts(state, isDay ? 'day' : 'event');
|
|
646
659
|
} else {
|
|
647
660
|
var _values$relation_prod;
|
|
648
661
|
values.relation_products = formatNormalProducts(state);
|
|
@@ -671,6 +684,9 @@ export var formatValues = function formatValues(state) {
|
|
|
671
684
|
if (!((_values3 = values) !== null && _values3 !== void 0 && (_values3 = _values3.bookings) !== null && _values3 !== void 0 && _values3.length)) {
|
|
672
685
|
values.type = 'virtual';
|
|
673
686
|
}
|
|
687
|
+
|
|
688
|
+
// 联系信息
|
|
689
|
+
values.contacts_info = ((_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.value) || null;
|
|
674
690
|
return values;
|
|
675
691
|
};
|
|
676
692
|
|
|
@@ -678,7 +694,7 @@ export var formatValues = function formatValues(state) {
|
|
|
678
694
|
export var checkHolderIsError = function checkHolderIsError(state) {
|
|
679
695
|
var _state$client;
|
|
680
696
|
var holderError = state.service.value.some(function (item) {
|
|
681
|
-
var _item$
|
|
697
|
+
var _item$_extend27;
|
|
682
698
|
// 普通商品不需要检测holder
|
|
683
699
|
if (isNormalProductByDurationSchedule(item)) {
|
|
684
700
|
return false;
|
|
@@ -686,7 +702,7 @@ export var checkHolderIsError = function checkHolderIsError(state) {
|
|
|
686
702
|
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
687
703
|
return true;
|
|
688
704
|
}
|
|
689
|
-
if (item._extend.quantity > 1 && ((_item$
|
|
705
|
+
if (item._extend.quantity > 1 && ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 || (_item$_extend27 = _item$_extend27.holder_id) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.length) !== item._extend.quantity) {
|
|
690
706
|
return true;
|
|
691
707
|
}
|
|
692
708
|
return false;
|
|
@@ -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 = function 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: state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id
|
|
57
57
|
}),
|
|
58
58
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
@@ -294,7 +294,7 @@ var useClientFn = function useClientFn(_params) {
|
|
|
294
294
|
if (getIsWalkIn(item === null || item === void 0 ? void 0 : item.id)) {
|
|
295
295
|
return locales.getText('pisell2.text.select-a-customer');
|
|
296
296
|
}
|
|
297
|
-
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) :
|
|
297
|
+
var firstLastName = item.first_name || item.last_name ? "".concat(item.first_name, " ").concat(item.last_name) : '';
|
|
298
298
|
return item.name || (item.display_name || '').trim() || (item.nickname || '').trim() || firstLastName.trim() || '';
|
|
299
299
|
}, [locales.localeMap]);
|
|
300
300
|
useEffect(function () {
|
|
@@ -262,7 +262,7 @@ var VerticalClient = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
262
262
|
case 7:
|
|
263
263
|
_context.next = 9;
|
|
264
264
|
return getClients({
|
|
265
|
-
with: ['formRecord'],
|
|
265
|
+
with: ['formRecord', 'contactsInfo'],
|
|
266
266
|
relation_form_id: boardConfig === null || boardConfig === void 0 ? void 0 : boardConfig.form_id,
|
|
267
267
|
skip: 1,
|
|
268
268
|
num: 20,
|
|
@@ -27,6 +27,7 @@ import "./index.less";
|
|
|
27
27
|
import Notes from "./notes";
|
|
28
28
|
import { Service2Cart } from "./service2";
|
|
29
29
|
import { isDayBooking, isEventBooking, isTerminalDayBooking } from "./service2/utils";
|
|
30
|
+
import ContactInfoMode from "../info2/service/contactInfoMode";
|
|
30
31
|
var defaultModules = {
|
|
31
32
|
client: 1,
|
|
32
33
|
date: 1,
|
|
@@ -37,7 +38,7 @@ var defaultModules = {
|
|
|
37
38
|
};
|
|
38
39
|
locales.init(localeTexts, getLocale());
|
|
39
40
|
var Info = Provider(function (props) {
|
|
40
|
-
var _modal$state2, _modal$state5, _context$appHelper4, _modal$state6;
|
|
41
|
+
var _modal$state2, _modal$state5, _context$appHelper4, _modal$state6, _modal$state7;
|
|
41
42
|
var style = props.style,
|
|
42
43
|
globalState = props.globalState,
|
|
43
44
|
_props$modules = props.modules,
|
|
@@ -143,7 +144,7 @@ var Info = Provider(function (props) {
|
|
|
143
144
|
bodyClassName: classNames('booking-info-warp', _defineProperty(_defineProperty({}, 'create-booking-page-info-wrap', isBookingCreatePage), 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode && !isTerminalDayBooking(modal.state)))
|
|
144
145
|
}, /*#__PURE__*/React.createElement("div", {
|
|
145
146
|
className: "booking-info"
|
|
146
|
-
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$
|
|
147
|
+
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, (modal === null || modal === void 0 || (_modal$state6 = modal.state) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.bookingConfig) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.config) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.cart_settings_tab) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.display_contact_info) === null || _modal$state6 === void 0 ? void 0 : _modal$state6.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, null) : null, modules.holder && !((_modal$state7 = modal.state) !== null && _modal$state7 !== void 0 && _modal$state7.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
147
148
|
loading: globalState.loading,
|
|
148
149
|
round: true,
|
|
149
150
|
active: true,
|