@pisell/private-materials 3.3.33 → 3.3.34
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 +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +25 -4
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +25 -45
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.js +36 -53
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Form/index.js +161 -61
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.js +50 -64
- package/es/components/appointmentBooking/components/Resource/index.js +102 -119
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/context.js +3 -43
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.d.ts +3 -2
- package/es/components/appointmentBooking/hooks.js +209 -293
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/utils.d.ts +2 -88
- package/es/components/appointmentBooking/utils.js +63 -325
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +5 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +9 -33
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.js +21 -35
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Form/index.js +98 -54
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.js +20 -39
- package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/context.js +4 -48
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.d.ts +3 -2
- package/lib/components/appointmentBooking/hooks.js +57 -143
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.d.ts +2 -88
- package/lib/components/appointmentBooking/utils.js +51 -191
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
|
@@ -102,20 +102,41 @@ var ContinueButton = function ContinueButton(_ref) {
|
|
|
102
102
|
*/
|
|
103
103
|
var handleContinue = /*#__PURE__*/function () {
|
|
104
104
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
105
|
+
var loginOk;
|
|
105
106
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
106
107
|
while (1) switch (_context2.prev = _context2.next) {
|
|
107
108
|
case 0:
|
|
108
109
|
_context2.prev = 0;
|
|
109
|
-
|
|
110
|
+
if (!((currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2 === (stepList === null || stepList === void 0 ? void 0 : stepList.length))) {
|
|
111
|
+
_context2.next = 9;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
_context2.next = 4;
|
|
115
|
+
return handleLoginCheck();
|
|
110
116
|
case 4:
|
|
111
|
-
|
|
117
|
+
loginOk = _context2.sent;
|
|
118
|
+
if (loginOk) {
|
|
119
|
+
_context2.next = 7;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
return _context2.abrupt("return");
|
|
123
|
+
case 7:
|
|
124
|
+
if (!handleCheckAccount()) {
|
|
125
|
+
_context2.next = 9;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
return _context2.abrupt("return");
|
|
129
|
+
case 9:
|
|
130
|
+
return _context2.abrupt("return", onNext && onNext());
|
|
131
|
+
case 12:
|
|
132
|
+
_context2.prev = 12;
|
|
112
133
|
_context2.t0 = _context2["catch"](0);
|
|
113
134
|
console.log(_context2.t0, 'handleContinue_error');
|
|
114
|
-
case
|
|
135
|
+
case 15:
|
|
115
136
|
case "end":
|
|
116
137
|
return _context2.stop();
|
|
117
138
|
}
|
|
118
|
-
}, _callee2, null, [[0,
|
|
139
|
+
}, _callee2, null, [[0, 12]]);
|
|
119
140
|
}));
|
|
120
141
|
return function handleContinue() {
|
|
121
142
|
return _ref3.apply(this, arguments);
|
|
@@ -14,7 +14,7 @@ import ContinueButton from "../ContinueButton";
|
|
|
14
14
|
import { useAppointmentBooking } from "../../../hooks";
|
|
15
15
|
import { useAppointmentBookingContext } from "../../../context";
|
|
16
16
|
import { useAppointmentBookingAccount, useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingLogin, contextUtils } from "../../../hooks";
|
|
17
|
-
import { formatHolder, formatCurrentUser, openForm
|
|
17
|
+
import { formatHolder, formatCarts, formatCurrentUser, openForm } from "../../../utils";
|
|
18
18
|
import VoucherCard from "../../Voucher";
|
|
19
19
|
import Total from "./Total";
|
|
20
20
|
import Deposit from "../../Deposit";
|
|
@@ -24,26 +24,26 @@ var CartItem = function CartItem(_ref) {
|
|
|
24
24
|
var _businessUtils$getApp, _currentStep$step, _currentStep$step2;
|
|
25
25
|
var onNext = _ref.onNext;
|
|
26
26
|
var appointmentBooking = useAppointmentBooking();
|
|
27
|
-
var
|
|
28
|
-
carts =
|
|
29
|
-
currentStep =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
addAccount =
|
|
40
|
-
var
|
|
41
|
-
getResourceList =
|
|
42
|
-
var
|
|
43
|
-
isFormSubject =
|
|
44
|
-
bookingSubject =
|
|
45
|
-
var
|
|
46
|
-
isLogin =
|
|
27
|
+
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
28
|
+
carts = _useAppointmentBookin.carts,
|
|
29
|
+
currentStep = _useAppointmentBookin.currentStep,
|
|
30
|
+
resources = _useAppointmentBookin.resources,
|
|
31
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
32
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams,
|
|
33
|
+
summary = _useAppointmentBookin.summary,
|
|
34
|
+
isLastStep = _useAppointmentBookin.isLastStep;
|
|
35
|
+
var _useAppointmentBookin2 = useAppointmentBookingAccount(),
|
|
36
|
+
accountLists = _useAppointmentBookin2.accountLists,
|
|
37
|
+
getHolders = _useAppointmentBookin2.getHolders,
|
|
38
|
+
form_id = _useAppointmentBookin2.form_id,
|
|
39
|
+
addAccount = _useAppointmentBookin2.addAccount;
|
|
40
|
+
var _useAppointmentBookin3 = useAppointmentBookingResource(),
|
|
41
|
+
getResourceList = _useAppointmentBookin3.getResourceList;
|
|
42
|
+
var _useAppointmentBookin4 = useAppointmentBookingSetting(),
|
|
43
|
+
isFormSubject = _useAppointmentBookin4.isFormSubject,
|
|
44
|
+
bookingSubject = _useAppointmentBookin4.bookingSubject;
|
|
45
|
+
var _useAppointmentBookin5 = useAppointmentBookingLogin(),
|
|
46
|
+
isLogin = _useAppointmentBookin5.isLogin;
|
|
47
47
|
var utils = contextUtils();
|
|
48
48
|
var businessUtils = utils.businessUtils;
|
|
49
49
|
var deposit = summary.deposit;
|
|
@@ -113,7 +113,7 @@ var CartItem = function CartItem(_ref) {
|
|
|
113
113
|
} else {
|
|
114
114
|
appointmentBooking.updateCart({
|
|
115
115
|
_id: e === null || e === void 0 ? void 0 : e._id,
|
|
116
|
-
resources: val ?
|
|
116
|
+
resources: val ? [val] : []
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
getResourceList();
|
|
@@ -198,28 +198,8 @@ var CartItem = function CartItem(_ref) {
|
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
var products = useMemo(function () {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (!(carts !== null && carts !== void 0 && carts.length)) return [];
|
|
204
|
-
if ((currentSelectedResourcesRef === null || currentSelectedResourcesRef === void 0 || (_currentSelectedResou = currentSelectedResourcesRef.current) === null || _currentSelectedResou === void 0 ? void 0 : _currentSelectedResou.length) > 0) {
|
|
205
|
-
var newCarts = carts.map(function (item) {
|
|
206
|
-
var _currentResourceData$;
|
|
207
|
-
var currentResourceData = currentSelectedResourcesRef.current.find(function (resource) {
|
|
208
|
-
return (resource === null || resource === void 0 ? void 0 : resource._id) === (item === null || item === void 0 ? void 0 : item._id);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
// 可选资源列表
|
|
212
|
-
var multiResources = getMultiResources(item, currentResourceData === null || currentResourceData === void 0 || (_currentResourceData$ = currentResourceData.currentSelectedResource) === null || _currentResourceData$ === void 0 ? void 0 : _currentResourceData$.resourceItem, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key);
|
|
213
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
214
|
-
isMultipleResource: true,
|
|
215
|
-
multiResources: multiResources
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
return newCarts;
|
|
219
|
-
} else {
|
|
220
|
-
return carts;
|
|
221
|
-
}
|
|
222
|
-
}, [carts, currentSelectedResourcesRef.current, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key]);
|
|
201
|
+
return formatCarts(carts, resources, utils, accountLists);
|
|
202
|
+
}, [carts, resources, accountLists]);
|
|
223
203
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
224
204
|
className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
|
|
225
205
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -230,7 +210,7 @@ var CartItem = function CartItem(_ref) {
|
|
|
230
210
|
hideAddBtn: false,
|
|
231
211
|
holders: holders,
|
|
232
212
|
disabledEdit: isLastStep,
|
|
233
|
-
isShowChangeResource: currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0
|
|
213
|
+
isShowChangeResource: (currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'select-resource',
|
|
234
214
|
isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
|
|
235
215
|
isShowPackageNote: false,
|
|
236
216
|
isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
|
|
@@ -29,25 +29,26 @@ import "./index.less";
|
|
|
29
29
|
var Layout = function Layout() {
|
|
30
30
|
var _currentStep$step, _currentStep$step3, _currentStep$step4, _currentStep$step6, _currentStep$step8;
|
|
31
31
|
var stepRef = useRef();
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
isDateSelectedFirst =
|
|
44
|
-
isFormSubject =
|
|
45
|
-
var
|
|
46
|
-
isLogin =
|
|
47
|
-
var
|
|
48
|
-
getHolders =
|
|
49
|
-
var
|
|
50
|
-
removeStep =
|
|
32
|
+
var formRef = useRef();
|
|
33
|
+
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
34
|
+
currentStep = _useAppointmentBookin.currentStep,
|
|
35
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
36
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams,
|
|
37
|
+
setIsAgreeDepositPolicy = _useAppointmentBookin.setIsAgreeDepositPolicy,
|
|
38
|
+
appointmentBooking = _useAppointmentBookin.appointmentBooking,
|
|
39
|
+
setLoading = _useAppointmentBookin.setLoading,
|
|
40
|
+
policyParams = _useAppointmentBookin.policyParams,
|
|
41
|
+
closePolicy = _useAppointmentBookin.closePolicy;
|
|
42
|
+
var _useAppointmentBookin2 = useAppointmentBookingSetting(),
|
|
43
|
+
isDateSelectedFirst = _useAppointmentBookin2.isDateSelectedFirst,
|
|
44
|
+
isFormSubject = _useAppointmentBookin2.isFormSubject;
|
|
45
|
+
var _useAppointmentBookin3 = useAppointmentBookingLogin(),
|
|
46
|
+
isLogin = _useAppointmentBookin3.isLogin;
|
|
47
|
+
var _useAppointmentBookin4 = useAppointmentBookingAccount(),
|
|
48
|
+
getHolders = _useAppointmentBookin4.getHolders;
|
|
49
|
+
var _useAppointmentBookin5 = useAppointmentBookingStep(),
|
|
50
|
+
removeStep = _useAppointmentBookin5.removeStep,
|
|
51
|
+
stepList = _useAppointmentBookin5.stepList;
|
|
51
52
|
var _useShopDiscount = useShopDiscount(),
|
|
52
53
|
shopDiscount = _useShopDiscount.shopDiscount;
|
|
53
54
|
|
|
@@ -59,7 +60,6 @@ var Layout = function Layout() {
|
|
|
59
60
|
params = _useState2[0],
|
|
60
61
|
setParams = _useState2[1];
|
|
61
62
|
useEffect(function () {
|
|
62
|
-
appointmentBooking.removeStep('fill-form');
|
|
63
63
|
return function () {
|
|
64
64
|
var _shopDiscount$destroy;
|
|
65
65
|
setIsAgreeDepositPolicy(false);
|
|
@@ -67,18 +67,6 @@ var Layout = function Layout() {
|
|
|
67
67
|
shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$destroy = shopDiscount.destroy) === null || _shopDiscount$destroy === void 0 || _shopDiscount$destroy.call(shopDiscount);
|
|
68
68
|
};
|
|
69
69
|
}, []);
|
|
70
|
-
useEffect(function () {
|
|
71
|
-
var _currentStepParams$st;
|
|
72
|
-
if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < 0) return;
|
|
73
|
-
var resourceStepIndex = currentStepParams === null || currentStepParams === void 0 || (_currentStepParams$st = currentStepParams.stepLists) === null || _currentStepParams$st === void 0 ? void 0 : _currentStepParams$st.findIndex(function (item) {
|
|
74
|
-
return item.key === 'select-resource';
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// 清空当前所选择的资源
|
|
78
|
-
if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < resourceStepIndex) {
|
|
79
|
-
appointmentBooking.setOtherData('current_selected_resources', null);
|
|
80
|
-
}
|
|
81
|
-
}, [currentStepParams]);
|
|
82
70
|
useEffect(function () {
|
|
83
71
|
try {
|
|
84
72
|
if (isFormSubject) {
|
|
@@ -112,38 +100,33 @@ var Layout = function Layout() {
|
|
|
112
100
|
behavior: 'smooth'
|
|
113
101
|
});
|
|
114
102
|
}, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
|
|
115
|
-
var components = {
|
|
116
|
-
// 选择服务
|
|
117
|
-
'select-service': Services,
|
|
118
|
-
// 添加客户
|
|
119
|
-
'select-guest': Guest,
|
|
120
|
-
// 选择时间
|
|
121
|
-
'select-date': Date,
|
|
122
|
-
// 时间切片
|
|
123
|
-
'select-time': TimeSlicing,
|
|
124
|
-
// 确认信息
|
|
125
|
-
'confirm-information': ConfirmInformation
|
|
126
|
-
};
|
|
127
103
|
var Com = useMemo(function () {
|
|
128
104
|
var _currentStep$step2;
|
|
129
105
|
var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
|
|
130
106
|
if (!key) return null;
|
|
131
|
-
var
|
|
132
|
-
|
|
107
|
+
var components = {
|
|
108
|
+
// 选择服务
|
|
109
|
+
'select-service': Services,
|
|
110
|
+
// 添加客户
|
|
111
|
+
'select-guest': Guest,
|
|
112
|
+
// 选择时间
|
|
113
|
+
'select-date': Date,
|
|
133
114
|
// 选择资源
|
|
134
|
-
|
|
135
|
-
|
|
115
|
+
'select-resource': Resource,
|
|
116
|
+
// 时间切片
|
|
117
|
+
'select-time': TimeSlicing,
|
|
136
118
|
// 填写表单
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
119
|
+
'fill-form': Form,
|
|
120
|
+
// 确认信息
|
|
121
|
+
'confirm-information': ConfirmInformation
|
|
122
|
+
};
|
|
123
|
+
var Com = components[key];
|
|
141
124
|
return /*#__PURE__*/React.createElement(Com, {
|
|
142
125
|
onChange: setParams,
|
|
143
126
|
params: params,
|
|
144
127
|
ref: stepRef
|
|
145
128
|
});
|
|
146
|
-
}, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
|
|
129
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key, stepRef]);
|
|
147
130
|
|
|
148
131
|
/**
|
|
149
132
|
* @title: 动态计算中间内容区域的高度
|
|
@@ -10,57 +10,122 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef } from 'react';
|
|
13
|
+
import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef, useEffect } from 'react';
|
|
14
14
|
import useComponents from "../../../../hooks/useComponents";
|
|
15
|
-
import {
|
|
15
|
+
import { formatForms, formatCarts, updateLists, updateBookingFormStorage } from "../../utils";
|
|
16
16
|
import { useAppointmentBookingContext } from "../../context";
|
|
17
|
-
import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep } from "../../hooks";
|
|
17
|
+
import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep, contextUtils } from "../../hooks";
|
|
18
|
+
import PolicyModal from "../../deposit/components/PolicyModal";
|
|
18
19
|
import "./index.less";
|
|
19
20
|
var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
21
|
var manualRef = useRef();
|
|
21
|
-
var _useState = useState(
|
|
22
|
+
var _useState = useState(0),
|
|
22
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
currentFormIndex = _useState2[0],
|
|
25
|
+
setCurrentFormIndex = _useState2[1];
|
|
26
|
+
var _useState3 = useState(false),
|
|
27
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
|
+
showAgreement = _useState4[0],
|
|
29
|
+
setShowAgreement = _useState4[1];
|
|
30
|
+
var _useState5 = useState({}),
|
|
31
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
32
|
+
agreementContent = _useState6[0],
|
|
33
|
+
setAgreementContent = _useState6[1];
|
|
34
|
+
var _useState7 = useState([]),
|
|
35
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
36
|
+
formStatus = _useState8[0],
|
|
37
|
+
setFormStatus = _useState8[1];
|
|
38
|
+
var _useState9 = useState(false),
|
|
39
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
40
|
+
isClearData = _useState10[0],
|
|
41
|
+
setIsClearData = _useState10[1];
|
|
42
|
+
var _useState11 = useState(0),
|
|
43
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
44
|
+
formId = _useState12[0],
|
|
45
|
+
setFormId = _useState12[1];
|
|
46
|
+
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
47
|
+
carts = _useAppointmentBookin.carts,
|
|
48
|
+
appointmentBooking = _useAppointmentBookin.appointmentBooking,
|
|
49
|
+
setLoading = _useAppointmentBookin.setLoading;
|
|
50
|
+
var _useAppointmentBookin2 = useAppointmentBookingResource(),
|
|
51
|
+
getResourceList = _useAppointmentBookin2.getResourceList;
|
|
52
|
+
var _useAppointmentBookin3 = useAppointmentBookingSetting(),
|
|
53
|
+
setOtherData = _useAppointmentBookin3.setOtherData,
|
|
54
|
+
getOtherData = _useAppointmentBookin3.getOtherData;
|
|
55
|
+
var _useAppointmentBookin4 = useAppointmentBookingStep(),
|
|
56
|
+
nextStep = _useAppointmentBookin4.nextStep;
|
|
57
|
+
var utils = contextUtils();
|
|
37
58
|
useImperativeHandle(ref, function () {
|
|
38
59
|
return {
|
|
39
60
|
next: function next() {
|
|
40
61
|
var _manualRef$current, _manualRef$current$su;
|
|
41
|
-
debugger;
|
|
42
62
|
setLoading(true);
|
|
43
63
|
(_manualRef$current = manualRef.current) === null || _manualRef$current === void 0 || (_manualRef$current$su = _manualRef$current.submit) === null || _manualRef$current$su === void 0 || _manualRef$current$su.call(_manualRef$current);
|
|
44
64
|
}
|
|
45
65
|
};
|
|
46
66
|
});
|
|
67
|
+
var key = 'booking_form';
|
|
68
|
+
|
|
69
|
+
// 获取本地存储
|
|
70
|
+
var formStorage = getOtherData('booking_form') || {};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @title: 获取资源列表
|
|
74
|
+
* @description:
|
|
75
|
+
* @param {*} useMemo
|
|
76
|
+
* @return {*}
|
|
77
|
+
* @Author: WangHan
|
|
78
|
+
* @Date: 2025-05-06 10:00
|
|
79
|
+
*/
|
|
80
|
+
var resources = useMemo(function () {
|
|
81
|
+
var _resource = getResourceList();
|
|
82
|
+
return (_resource === null || _resource === void 0 ? void 0 : _resource.resources) || [];
|
|
83
|
+
}, []);
|
|
84
|
+
var forms = useMemo(function () {
|
|
85
|
+
var newCarts = formatCarts(carts, resources, utils);
|
|
86
|
+
if (!(newCarts !== null && newCarts !== void 0 && newCarts.length) || !(resources !== null && resources !== void 0 && resources.length)) return [];
|
|
87
|
+
return formatForms(newCarts) || [];
|
|
88
|
+
}, [carts, resources]);
|
|
89
|
+
useEffect(function () {
|
|
90
|
+
var _forms$currentFormInd;
|
|
91
|
+
if (!(forms !== null && forms !== void 0 && forms.length)) return;
|
|
92
|
+
setFormId((forms === null || forms === void 0 || (_forms$currentFormInd = forms[currentFormIndex]) === null || _forms$currentFormInd === void 0 ? void 0 : _forms$currentFormInd.form_id) || 0);
|
|
93
|
+
}, [forms, currentFormIndex]);
|
|
47
94
|
var _useComponents = useComponents({
|
|
48
95
|
components: ['FormCard']
|
|
49
96
|
}),
|
|
50
97
|
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
51
98
|
FormCard = _useComponents2[0];
|
|
52
|
-
var key = 'booking_form';
|
|
53
99
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
100
|
+
/**
|
|
101
|
+
* @title: 获取下一个表单
|
|
102
|
+
* @description:
|
|
103
|
+
* @return {*}
|
|
104
|
+
* @Author: WangHan
|
|
105
|
+
* @Date: 2025-04-26 11:04
|
|
106
|
+
*/
|
|
107
|
+
var goToNextForm = function goToNextForm() {
|
|
108
|
+
var nextIndex = currentFormIndex + 1;
|
|
109
|
+
if (nextIndex < forms.length) {
|
|
110
|
+
var _forms$nextIndex, _forms$nextIndex2;
|
|
111
|
+
setIsClearData(true);
|
|
112
|
+
setCurrentFormIndex(nextIndex);
|
|
113
|
+
|
|
114
|
+
// 如果下一个表单没有id但有协议,直接弹协议
|
|
115
|
+
if (!(forms !== null && forms !== void 0 && (_forms$nextIndex = forms[nextIndex]) !== null && _forms$nextIndex !== void 0 && _forms$nextIndex.form_id) && forms !== null && forms !== void 0 && (_forms$nextIndex2 = forms[nextIndex]) !== null && _forms$nextIndex2 !== void 0 && _forms$nextIndex2.policy_id) {
|
|
116
|
+
var _forms$nextIndex3;
|
|
117
|
+
setLoading(true);
|
|
118
|
+
setAgreementContent({
|
|
119
|
+
id: forms === null || forms === void 0 || (_forms$nextIndex3 = forms[nextIndex]) === null || _forms$nextIndex3 === void 0 ? void 0 : _forms$nextIndex3.policy_id
|
|
120
|
+
});
|
|
121
|
+
setShowAgreement(true);
|
|
122
|
+
} else {
|
|
123
|
+
setLoading(false);
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
nextStep();
|
|
127
|
+
}
|
|
128
|
+
};
|
|
64
129
|
|
|
65
130
|
/**
|
|
66
131
|
* @title: 更新表单状态
|
|
@@ -74,6 +139,10 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
74
139
|
if (status === 'error') {
|
|
75
140
|
setLoading(false);
|
|
76
141
|
}
|
|
142
|
+
var newFormStatus = updateLists(formStatus, 'id', formId, {
|
|
143
|
+
status: status
|
|
144
|
+
});
|
|
145
|
+
setFormStatus(newFormStatus);
|
|
77
146
|
};
|
|
78
147
|
|
|
79
148
|
/**
|
|
@@ -85,13 +154,15 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
154
|
* @Date: 2025-04-28 11:32
|
|
86
155
|
*/
|
|
87
156
|
var setFormStorage = function setFormStorage(values) {
|
|
157
|
+
var _forms$currentFormInd2;
|
|
158
|
+
var cart_id = forms === null || forms === void 0 || (_forms$currentFormInd2 = forms[currentFormIndex]) === null || _forms$currentFormInd2 === void 0 ? void 0 : _forms$currentFormInd2.cart_id;
|
|
88
159
|
var oldData = getOtherData(key);
|
|
89
|
-
var newData = updateBookingFormStorage(oldData,
|
|
160
|
+
var newData = updateBookingFormStorage(oldData, cart_id, values);
|
|
90
161
|
setOtherData(key, _objectSpread({}, newData));
|
|
91
162
|
|
|
92
163
|
// 更新表单购物车
|
|
93
164
|
appointmentBooking.updateCart({
|
|
94
|
-
_id:
|
|
165
|
+
_id: cart_id,
|
|
95
166
|
relationForms: [{
|
|
96
167
|
form_id: formId,
|
|
97
168
|
form_record_ids: [values === null || values === void 0 ? void 0 : values.form_record_id]
|
|
@@ -109,40 +180,69 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
109
180
|
* @Date: 2025-04-28 11:34
|
|
110
181
|
*/
|
|
111
182
|
var handleFormFinish = function handleFormFinish(status, values) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
183
|
+
setIsClearData(false);
|
|
184
|
+
updateFormStatus(status);
|
|
185
|
+
if (status === 'success') {
|
|
186
|
+
var _forms$currentFormInd3;
|
|
187
|
+
setFormStorage(values);
|
|
188
|
+
|
|
189
|
+
// 判断当前表单是否有协议
|
|
190
|
+
if (forms !== null && forms !== void 0 && (_forms$currentFormInd3 = forms[currentFormIndex]) !== null && _forms$currentFormInd3 !== void 0 && _forms$currentFormInd3.policy_id) {
|
|
191
|
+
var _forms$currentFormInd4;
|
|
192
|
+
setAgreementContent({
|
|
193
|
+
id: forms === null || forms === void 0 || (_forms$currentFormInd4 = forms[currentFormIndex]) === null || _forms$currentFormInd4 === void 0 ? void 0 : _forms$currentFormInd4.policy_id
|
|
194
|
+
});
|
|
195
|
+
setShowAgreement(true);
|
|
196
|
+
} else {
|
|
197
|
+
goToNextForm();
|
|
118
198
|
}
|
|
119
|
-
} catch (error) {
|
|
120
|
-
setLoading(false);
|
|
121
199
|
}
|
|
122
200
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
201
|
+
var handleAgreementOk = function handleAgreementOk() {
|
|
202
|
+
setShowAgreement(false);
|
|
203
|
+
goToNextForm();
|
|
204
|
+
};
|
|
205
|
+
var formCom = useMemo(function () {
|
|
206
|
+
var _forms$currentFormInd5;
|
|
207
|
+
if (!formId) return;
|
|
208
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
className: "appointment-form-wrap"
|
|
210
|
+
}, /*#__PURE__*/React.createElement(FormCard, {
|
|
211
|
+
id: formId,
|
|
212
|
+
ref: manualRef,
|
|
213
|
+
isGetLastData: false,
|
|
214
|
+
setting: {
|
|
215
|
+
isHidden: 1
|
|
216
|
+
},
|
|
217
|
+
formWrapStyle: {
|
|
218
|
+
padding: '16px'
|
|
219
|
+
},
|
|
220
|
+
isV2API: true,
|
|
221
|
+
isShowSkeleton: true,
|
|
222
|
+
onSubmit: function onSubmit(status, values) {
|
|
223
|
+
handleFormFinish(status, values);
|
|
224
|
+
},
|
|
225
|
+
onFinishFailed: function onFinishFailed(e) {
|
|
226
|
+
updateFormStatus('error');
|
|
227
|
+
},
|
|
228
|
+
onFormValueChange: function onFormValueChange(values) {},
|
|
229
|
+
defaultValues: (formStorage === null || formStorage === void 0 ? void 0 : formStorage[forms === null || forms === void 0 || (_forms$currentFormInd5 = forms[currentFormIndex]) === null || _forms$currentFormInd5 === void 0 ? void 0 : _forms$currentFormInd5.cart_id]) || {},
|
|
230
|
+
isClearData: false
|
|
231
|
+
}));
|
|
232
|
+
}, [currentFormIndex, formId]);
|
|
233
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, formCom, showAgreement ? /*#__PURE__*/React.createElement(PolicyModal, {
|
|
234
|
+
open: showAgreement,
|
|
235
|
+
onCancel: function onCancel() {
|
|
236
|
+
return setShowAgreement(false);
|
|
134
237
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
onSubmit: function onSubmit(status, values) {
|
|
138
|
-
handleFormFinish(status, values);
|
|
238
|
+
onConfirm: function onConfirm() {
|
|
239
|
+
return handleAgreementOk();
|
|
139
240
|
},
|
|
140
|
-
|
|
141
|
-
|
|
241
|
+
item: agreementContent,
|
|
242
|
+
onChange: function onChange() {
|
|
243
|
+
return setLoading(false);
|
|
142
244
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
isClearData: false
|
|
146
|
-
})));
|
|
245
|
+
isHideCheckout: false
|
|
246
|
+
}) : null);
|
|
147
247
|
});
|
|
148
248
|
export default Form;
|