@pisell/private-materials 3.3.16 → 3.3.17
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -16
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +40 -13
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +67 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -3
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +50 -7
- package/es/components/appointmentBooking/components/Date/index.js +10 -2
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Form/index.js +61 -49
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +5 -4
- package/es/components/appointmentBooking/components/Services/index.js +2 -4
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/context.d.ts +5 -1
- package/es/components/appointmentBooking/context.js +37 -14
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +7 -19
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +196 -193
- package/es/components/appointmentBooking/utils.js +21 -13
- package/es/components/booking/components/customSelect/index.js +2 -0
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +27 -22
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +17 -2
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/forms.d.ts +4 -0
- package/es/components/booking/forms/forms.js +14 -3
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -2
- package/es/components/booking/forms/single/index.js +33 -26
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/client/index.js +24 -3
- package/es/components/booking/info/client/index.less +39 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +10 -1
- package/es/components/booking/info/clientVariant/utils.d.ts +1 -0
- package/es/components/booking/info/clientVariant/utils.js +6 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +17 -2
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +29 -4
- package/es/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +8 -1
- package/es/components/booking/info/hooks/useAddHolder.js +131 -31
- package/es/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
- package/es/components/booking/info/hooks/useGetHolderList.js +48 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +2 -2
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.js +4 -41
- package/es/components/booking/info/pet/index.js +83 -8
- package/es/components/booking/info/pet/serve.d.ts +1 -0
- package/es/components/booking/info/pet/serve.js +27 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/Lists.js +2 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +2 -0
- package/es/components/booking/info/service2/utils.js +20 -10
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +9 -1
- package/es/components/booking/locales.d.ts +21 -0
- package/es/components/booking/locales.js +42 -3
- package/es/components/booking/utils.js +3 -1
- 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 +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/shoppingCart/Provider.js +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.js +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +5 -6
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/index.d.ts +5 -2
- package/es/components/ticketBooking/index.js +20 -5
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -8
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +27 -11
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +20 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +32 -2
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +3 -3
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +26 -1
- package/lib/components/appointmentBooking/components/Date/index.js +4 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Form/index.js +48 -36
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +5 -4
- package/lib/components/appointmentBooking/components/Services/index.js +4 -6
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -4
- package/lib/components/appointmentBooking/context.d.ts +5 -1
- package/lib/components/appointmentBooking/context.js +17 -5
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +1 -12
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +4 -1
- package/lib/components/appointmentBooking/utils.js +19 -13
- package/lib/components/booking/components/customSelect/index.js +2 -0
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +3 -1
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +16 -1
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/forms.d.ts +4 -0
- package/lib/components/booking/forms/forms.js +13 -3
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -2
- package/lib/components/booking/forms/single/index.js +13 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/client/index.js +20 -3
- package/lib/components/booking/info/client/index.less +39 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +8 -1
- package/lib/components/booking/info/clientVariant/utils.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/utils.js +34 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -3
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +17 -0
- package/lib/components/booking/info/clientVariant/vertical/index.js +31 -6
- package/lib/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +8 -1
- package/lib/components/booking/info/hooks/useAddHolder.js +88 -16
- package/lib/components/booking/info/hooks/useGetHolderList.d.ts +2 -0
- package/lib/components/booking/info/hooks/useGetHolderList.js +61 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +2 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.js +2 -21
- package/lib/components/booking/info/pet/index.js +57 -10
- package/lib/components/booking/info/pet/serve.d.ts +1 -0
- package/lib/components/booking/info/pet/serve.js +33 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +2 -0
- package/lib/components/booking/info/service2/utils.js +17 -7
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +8 -1
- package/lib/components/booking/locales.d.ts +21 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/utils.js +3 -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 +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/shoppingCart/Provider.js +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.js +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +1 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -3
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +4 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.d.ts +5 -2
- package/lib/components/ticketBooking/index.js +13 -4
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lowcode/ticket-booking/meta.ts +26 -0
- package/package.json +2 -2
|
@@ -25,7 +25,7 @@ import classNames from 'classnames';
|
|
|
25
25
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
26
26
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
27
27
|
import { formatProducts } from "../../addons";
|
|
28
|
-
import { isDayBooking, isHasDayAppointmentProduct } from "../../info/service2/utils";
|
|
28
|
+
import { getIsSubjectRequire, isDayBooking, isHasDayAppointmentProduct } from "../../info/service2/utils";
|
|
29
29
|
import { isBooking4Shop } from "../../info/utils";
|
|
30
30
|
import { createBookings, editBookings } from "../../info2/serve";
|
|
31
31
|
import AppointmentProductModal from "./AppointmentProductModal";
|
|
@@ -33,7 +33,7 @@ import FooterMenus from "./FooterMenus";
|
|
|
33
33
|
import { getSumTotal, is_price_include_tax } from "./amount";
|
|
34
34
|
import "./index.less";
|
|
35
35
|
import { createEventBooking, editEventBooking } from "./serve";
|
|
36
|
-
import { formatValues } from "./utils";
|
|
36
|
+
import { checkHolderIsError, formatValues } from "./utils";
|
|
37
37
|
import VoucherCard from "../voucher";
|
|
38
38
|
import { SubTotal } from "../../../../index";
|
|
39
39
|
/**
|
|
@@ -430,6 +430,12 @@ var Footer = function Footer(props) {
|
|
|
430
430
|
}
|
|
431
431
|
return _context4.abrupt("return");
|
|
432
432
|
case 5:
|
|
433
|
+
if (!(getIsSubjectRequire(state) && checkHolderIsError(state))) {
|
|
434
|
+
_context4.next = 7;
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
return _context4.abrupt("return");
|
|
438
|
+
case 7:
|
|
433
439
|
// 区分loading, 是点击的checkout 还是save
|
|
434
440
|
_setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
|
|
435
441
|
_setLoading(true);
|
|
@@ -438,22 +444,22 @@ var Footer = function Footer(props) {
|
|
|
438
444
|
createApi = state.renderType === 'eventBooking' ? createEventBooking : createBooking;
|
|
439
445
|
saveOtherValue = {};
|
|
440
446
|
if (!(type === 'save')) {
|
|
441
|
-
_context4.next =
|
|
447
|
+
_context4.next = 20;
|
|
442
448
|
break;
|
|
443
449
|
}
|
|
444
|
-
_context4.next =
|
|
450
|
+
_context4.next = 16;
|
|
445
451
|
return state === null || state === void 0 || (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
|
|
446
|
-
case
|
|
452
|
+
case 16:
|
|
447
453
|
_context4.t0 = _context4.sent;
|
|
448
454
|
if (_context4.t0) {
|
|
449
|
-
_context4.next =
|
|
455
|
+
_context4.next = 19;
|
|
450
456
|
break;
|
|
451
457
|
}
|
|
452
458
|
_context4.t0 = {};
|
|
453
|
-
case
|
|
459
|
+
case 19:
|
|
454
460
|
saveOtherValue = _context4.t0;
|
|
455
|
-
case
|
|
456
|
-
_context4.prev =
|
|
461
|
+
case 20:
|
|
462
|
+
_context4.prev = 20;
|
|
457
463
|
callbackData = null; // 格式化提交的参数
|
|
458
464
|
values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // 区分是新增还是编辑
|
|
459
465
|
api = state.bookingId ? editApi : createApi; // 活动预约新建时校验重复 -- 暂不处理
|
|
@@ -485,44 +491,43 @@ var Footer = function Footer(props) {
|
|
|
485
491
|
// }
|
|
486
492
|
// 如果有addons改动, 则先保存
|
|
487
493
|
if (!addonsEdit) {
|
|
488
|
-
_context4.next =
|
|
494
|
+
_context4.next = 27;
|
|
489
495
|
break;
|
|
490
496
|
}
|
|
491
|
-
_context4.next =
|
|
497
|
+
_context4.next = 27;
|
|
492
498
|
return handleSaveAddons();
|
|
493
|
-
case
|
|
499
|
+
case 27:
|
|
494
500
|
if (!infoEdit) {
|
|
495
|
-
_context4.next =
|
|
501
|
+
_context4.next = 32;
|
|
496
502
|
break;
|
|
497
503
|
}
|
|
498
|
-
_context4.next =
|
|
504
|
+
_context4.next = 30;
|
|
499
505
|
return api(values, state.bookingId);
|
|
500
|
-
case
|
|
506
|
+
case 30:
|
|
501
507
|
callbackData = _context4.sent;
|
|
502
508
|
if (messageShow) {
|
|
503
509
|
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
504
510
|
}
|
|
505
|
-
case
|
|
506
|
-
debugger;
|
|
511
|
+
case 32:
|
|
507
512
|
// 回调关闭弹窗
|
|
508
513
|
state === null || state === void 0 || state.callback(callbackData);
|
|
509
514
|
_setLoading(false);
|
|
510
515
|
|
|
511
516
|
// return数据 checkout时需要
|
|
512
517
|
return _context4.abrupt("return", callbackData || values);
|
|
513
|
-
case
|
|
514
|
-
_context4.prev =
|
|
515
|
-
_context4.t1 = _context4["catch"](
|
|
518
|
+
case 37:
|
|
519
|
+
_context4.prev = 37;
|
|
520
|
+
_context4.t1 = _context4["catch"](20);
|
|
516
521
|
console.log(_context4.t1);
|
|
517
522
|
if ((_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.code) === 70101) {
|
|
518
523
|
message.error(_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.message);
|
|
519
524
|
}
|
|
520
525
|
_setLoading(false);
|
|
521
|
-
case
|
|
526
|
+
case 42:
|
|
522
527
|
case "end":
|
|
523
528
|
return _context4.stop();
|
|
524
529
|
}
|
|
525
|
-
}, _callee4, null, [[
|
|
530
|
+
}, _callee4, null, [[20, 37]]);
|
|
526
531
|
}));
|
|
527
532
|
return function handleSave(_x2) {
|
|
528
533
|
return _ref5.apply(this, arguments);
|
|
@@ -11,7 +11,8 @@ import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
|
11
11
|
import { getDays } from "../../utils";
|
|
12
12
|
import { appointmentTypes } from "../../info/service2/status";
|
|
13
13
|
import { isDaysBooking, formatDayTime, isEventBooking } from "../../info/service2/utils";
|
|
14
|
-
import { sendWarningLog } from '@pisell/utils';
|
|
14
|
+
import { locales, sendWarningLog } from '@pisell/utils';
|
|
15
|
+
import { PisellToast } from "@pisell/materials";
|
|
15
16
|
var formatNote = function formatNote(data) {
|
|
16
17
|
var _data$notes;
|
|
17
18
|
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
|
|
@@ -468,7 +469,6 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
468
469
|
"metadata": formatMetaData(item)
|
|
469
470
|
}, eventOtherParams || {}), dayParams);
|
|
470
471
|
});
|
|
471
|
-
debugger;
|
|
472
472
|
return bookings;
|
|
473
473
|
};
|
|
474
474
|
|
|
@@ -589,4 +589,19 @@ export var formatValues = function formatValues(state) {
|
|
|
589
589
|
// values.is_bundle_price_calculated = 1
|
|
590
590
|
}
|
|
591
591
|
return values;
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// 检测预约主体是否为空
|
|
595
|
+
export var checkHolderIsError = function checkHolderIsError(state) {
|
|
596
|
+
var _state$client;
|
|
597
|
+
var holderError = state.service.value.some(function (item) {
|
|
598
|
+
return !item._extend.holder_id;
|
|
599
|
+
});
|
|
600
|
+
var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
|
|
601
|
+
if (holderError && (!clientId || clientId === 0 || clientId === 1)) {
|
|
602
|
+
PisellToast({
|
|
603
|
+
content: locales.getText('pisell2.text.please-select-the-customer-first')
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
return holderError;
|
|
592
607
|
};
|
|
@@ -44,7 +44,11 @@ var Forms = Provider(function (props) {
|
|
|
44
44
|
client = props.client,
|
|
45
45
|
loading = props.loading,
|
|
46
46
|
addButtonProps = props.addButtonProps,
|
|
47
|
-
drawerProps = props.drawerProps
|
|
47
|
+
drawerProps = props.drawerProps,
|
|
48
|
+
isMinorAndWaiver = props.isMinorAndWaiver,
|
|
49
|
+
waiverForm = props.waiverForm,
|
|
50
|
+
addCallbackService = props.addCallbackService,
|
|
51
|
+
getHolders = props.getHolders;
|
|
48
52
|
|
|
49
53
|
// 新增数据
|
|
50
54
|
var onAction = useMemoizedFn( /*#__PURE__*/function () {
|
|
@@ -54,7 +58,9 @@ var Forms = Provider(function (props) {
|
|
|
54
58
|
while (1) switch (_context.prev = _context.next) {
|
|
55
59
|
case 0:
|
|
56
60
|
_data = {
|
|
57
|
-
formDataConfig: _objectSpread({},
|
|
61
|
+
formDataConfig: isMinorAndWaiver ? _objectSpread(_objectSpread({}, waiverForm), {}, {
|
|
62
|
+
customer_id: client === null || client === void 0 ? void 0 : client.id
|
|
63
|
+
}) : _objectSpread({}, formDataConfig)
|
|
58
64
|
};
|
|
59
65
|
if (formDataConfig.data_range === 'customer' && !isWalkIn(client === null || client === void 0 ? void 0 : client.id)) {
|
|
60
66
|
_data.customerId = client.id;
|
|
@@ -63,6 +69,11 @@ var Forms = Provider(function (props) {
|
|
|
63
69
|
type: 'pisell1.goCustomFormAddData',
|
|
64
70
|
data: _data,
|
|
65
71
|
callback: function callback(res) {
|
|
72
|
+
if (isMinorAndWaiver) {
|
|
73
|
+
addCallbackService === null || addCallbackService === void 0 || addCallbackService();
|
|
74
|
+
getHolders === null || getHolders === void 0 || getHolders();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
66
77
|
var obj = {};
|
|
67
78
|
var _iterator = _createForOfIteratorHelper(res),
|
|
68
79
|
_step;
|
|
@@ -198,6 +209,6 @@ var Forms = Provider(function (props) {
|
|
|
198
209
|
optionRender: optionRender
|
|
199
210
|
})));
|
|
200
211
|
}));
|
|
201
|
-
}, [forms, hideTitle, modalOpen, value, loading, client === null || client === void 0 ? void 0 : client.id, addButtonProps, customSelectProps, optionRender, drawerProps]);
|
|
212
|
+
}, [forms, hideTitle, modalOpen, value, loading, client === null || client === void 0 ? void 0 : client.id, addButtonProps, customSelectProps, optionRender, drawerProps, addCallbackService]);
|
|
202
213
|
});
|
|
203
214
|
export default Forms;
|
|
@@ -11,10 +11,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
11
11
|
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; }
|
|
12
12
|
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; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
import React, { useCallback, useMemo } from
|
|
15
|
-
import FileDownload02 from
|
|
16
|
-
import { image, locales } from
|
|
17
|
-
import { Avatar } from
|
|
14
|
+
import React, { useCallback, useMemo } from 'react';
|
|
15
|
+
import FileDownload02 from '@pisell/icon/es/FileDownload02';
|
|
16
|
+
import { image, locales } from '@pisell/utils';
|
|
17
|
+
import { Avatar, Tag } from 'antd';
|
|
18
18
|
import CustomSelect from "../../components/customSelect";
|
|
19
19
|
import CollapsibleList from "../../components/collapsibleList";
|
|
20
20
|
import "./index.less";
|
|
@@ -48,7 +48,7 @@ var Single = function Single(_ref) {
|
|
|
48
48
|
// }, [field]);
|
|
49
49
|
|
|
50
50
|
var _useComponents = useComponents({
|
|
51
|
-
components: [
|
|
51
|
+
components: ['HumanBodySelector']
|
|
52
52
|
}),
|
|
53
53
|
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
54
54
|
HumanBodySelector = _useComponents2[0];
|
|
@@ -66,11 +66,11 @@ var Single = function Single(_ref) {
|
|
|
66
66
|
var val = fieldData[field.key];
|
|
67
67
|
|
|
68
68
|
// 附件类型
|
|
69
|
-
if (field.filed_type ===
|
|
69
|
+
if (field.filed_type === 'attachment') {
|
|
70
70
|
if (Array.isArray(val)) {
|
|
71
71
|
return val.map(function (item) {
|
|
72
72
|
// 图片
|
|
73
|
-
if (item.type.indexOf(
|
|
73
|
+
if (item.type.indexOf('image') !== -1) {
|
|
74
74
|
return /*#__PURE__*/React.createElement("img", {
|
|
75
75
|
className: "attachment-item",
|
|
76
76
|
src: image.ali(item.url, 200),
|
|
@@ -82,7 +82,7 @@ var Single = function Single(_ref) {
|
|
|
82
82
|
href: item.url,
|
|
83
83
|
key: item.url,
|
|
84
84
|
style: {
|
|
85
|
-
display:
|
|
85
|
+
display: 'block',
|
|
86
86
|
marginTop: 8
|
|
87
87
|
},
|
|
88
88
|
onClick: function onClick(e) {
|
|
@@ -98,14 +98,14 @@ var Single = function Single(_ref) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// 头像
|
|
101
|
-
if (field.filed_type ===
|
|
101
|
+
if (field.filed_type === 'customer_cover') {
|
|
102
102
|
return /*#__PURE__*/React.createElement(Avatar, {
|
|
103
103
|
src: val
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// 签名
|
|
108
|
-
if (field.filed_type ===
|
|
108
|
+
if (field.filed_type === 'signature') {
|
|
109
109
|
return /*#__PURE__*/React.createElement("img", {
|
|
110
110
|
className: "attachment-item",
|
|
111
111
|
src: image.ali(val, 200),
|
|
@@ -114,12 +114,12 @@ var Single = function Single(_ref) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// 手机号
|
|
117
|
-
if (field.filed_type ===
|
|
117
|
+
if (field.filed_type === 'customer_phone') {
|
|
118
118
|
if (val) {
|
|
119
|
-
return "".concat(val.country_calling_code && "(+".concat(val.country_calling_code, ")"), " ").concat(val.phone ||
|
|
119
|
+
return "".concat(val.country_calling_code && "(+".concat(val.country_calling_code, ")"), " ").concat(val.phone || '');
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
if (field.filed_type ===
|
|
122
|
+
if (field.filed_type === 'body_hotspot_image') {
|
|
123
123
|
return HumanBodySelector ? /*#__PURE__*/React.createElement(HumanBodySelector, {
|
|
124
124
|
value: val,
|
|
125
125
|
disable: true
|
|
@@ -134,10 +134,10 @@ var Single = function Single(_ref) {
|
|
|
134
134
|
value: val
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
if ((field === null || field === void 0 ? void 0 : field.filed_type) ===
|
|
137
|
+
if ((field === null || field === void 0 ? void 0 : field.filed_type) === 'media') {
|
|
138
138
|
return null;
|
|
139
139
|
}
|
|
140
|
-
return val ||
|
|
140
|
+
return val || '-';
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
/**
|
|
@@ -181,9 +181,16 @@ var Single = function Single(_ref) {
|
|
|
181
181
|
}
|
|
182
182
|
return /*#__PURE__*/React.createElement("div", {
|
|
183
183
|
style: {
|
|
184
|
-
flex: 1
|
|
184
|
+
flex: 1,
|
|
185
|
+
display: 'flex',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
justifyContent: 'space-between'
|
|
185
188
|
}
|
|
186
|
-
}, item[
|
|
189
|
+
}, item['main_field'] || item[form.option_key] || '-', item !== null && item !== void 0 && item.status ? item.status === 'valid' ? /*#__PURE__*/React.createElement(Tag, {
|
|
190
|
+
color: "#56c064"
|
|
191
|
+
}, locales.getText('pisell2.text.status.valid')) : /*#__PURE__*/React.createElement(Tag, {
|
|
192
|
+
color: "#d83963"
|
|
193
|
+
}, locales.getText('pisell2.text.status.expired')) : null);
|
|
187
194
|
};
|
|
188
195
|
|
|
189
196
|
/**
|
|
@@ -197,11 +204,11 @@ var Single = function Single(_ref) {
|
|
|
197
204
|
var _addButtonProps = useMemo(function () {
|
|
198
205
|
var _form$form, _form$form2;
|
|
199
206
|
var obj = _objectSpread({
|
|
200
|
-
title: "".concat(locales.getText(
|
|
201
|
-
subTitle: "".concat(locales.getText(
|
|
207
|
+
title: "".concat(locales.getText('pisell2.text.add-a'), " ").concat(((_form$form = form.form) === null || _form$form === void 0 ? void 0 : _form$form.title) || '-'),
|
|
208
|
+
subTitle: "".concat(locales.getText('pisell2.text.add-another'), " ").concat(((_form$form2 = form.form) === null || _form$form2 === void 0 ? void 0 : _form$form2.title) || '-')
|
|
202
209
|
}, addButtonProps);
|
|
203
210
|
// 表单和表格点击事件触发新增弹窗
|
|
204
|
-
if ([
|
|
211
|
+
if (['form', 'table'].includes(form.type)) {
|
|
205
212
|
obj.onClick = onAdd;
|
|
206
213
|
}
|
|
207
214
|
return obj;
|
|
@@ -216,11 +223,11 @@ var Single = function Single(_ref) {
|
|
|
216
223
|
* @Date: 2024-01-30 17:09
|
|
217
224
|
*/
|
|
218
225
|
var _mode = useMemo(function () {
|
|
219
|
-
if ([
|
|
220
|
-
return
|
|
226
|
+
if (['form'].includes(mode)) {
|
|
227
|
+
return 'single';
|
|
221
228
|
}
|
|
222
|
-
if ([
|
|
223
|
-
return
|
|
229
|
+
if (['table'].includes(mode)) {
|
|
230
|
+
return 'multiple';
|
|
224
231
|
}
|
|
225
232
|
return mode;
|
|
226
233
|
}, [mode, form]);
|
|
@@ -239,10 +246,10 @@ var Single = function Single(_ref) {
|
|
|
239
246
|
previewItemRender: function previewItemRender(d) {
|
|
240
247
|
return renderItem(d);
|
|
241
248
|
},
|
|
242
|
-
name: ((_form$form3 = form.form) === null || _form$form3 === void 0 ? void 0 : _form$form3.title) ||
|
|
249
|
+
name: ((_form$form3 = form.form) === null || _form$form3 === void 0 ? void 0 : _form$form3.title) || '-',
|
|
243
250
|
addButtonProps: _addButtonProps,
|
|
244
251
|
drawerProps: _objectSpread({
|
|
245
|
-
title: "".concat(locales.getText(
|
|
252
|
+
title: "".concat(locales.getText('pisell2.text.select'), " ").concat(((_form$form4 = form.form) === null || _form$form4 === void 0 ? void 0 : _form$form4.title) || '-'),
|
|
246
253
|
destroyOnClose: true
|
|
247
254
|
}, drawerProps || {}),
|
|
248
255
|
optionRender: _optionRender,
|
|
@@ -32,9 +32,10 @@ import { image, locales } from '@pisell/utils';
|
|
|
32
32
|
import { isWalkIn as getIsWalkIn } from "../../utils";
|
|
33
33
|
import { getFranchiseeCustomerInfo, getFranchiseeCustomerList } from "./serve";
|
|
34
34
|
import { useMemoizedFn } from 'ahooks';
|
|
35
|
+
import { getWaiverTitle } from "../clientVariant/utils";
|
|
35
36
|
var isLoadClient = false;
|
|
36
37
|
var Client = function Client() {
|
|
37
|
-
var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7;
|
|
38
|
+
var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
|
|
38
39
|
var modalRef = useRef();
|
|
39
40
|
var _useState = useState(false),
|
|
40
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -423,7 +424,16 @@ var Client = function Client() {
|
|
|
423
424
|
className: ""
|
|
424
425
|
}, item.email) : null, item.phone ? /*#__PURE__*/React.createElement("div", {
|
|
425
426
|
className: ""
|
|
426
|
-
}, item.phone) : null)
|
|
427
|
+
}, item.phone) : null), /*#__PURE__*/React.createElement("div", {
|
|
428
|
+
className: 'pisell-lowcode__booking-client-list-item-info-waiver',
|
|
429
|
+
title: getWaiverTitle(item.waiver_form)
|
|
430
|
+
}, (item.waiver_form || []).map(function (item) {
|
|
431
|
+
return /*#__PURE__*/React.createElement("span", null, item.form_title, ":", item.is_filled ? /*#__PURE__*/React.createElement("span", {
|
|
432
|
+
className: 'pisell-lowcode__booking-client-list-item-waiver-filled'
|
|
433
|
+
}, locales.getText('pisell2.text.filled')) : /*#__PURE__*/React.createElement("span", {
|
|
434
|
+
className: 'pisell-lowcode__booking-client-list-item-waiver-not-filled'
|
|
435
|
+
}, locales.getText('pisell2.text.not-filled')), "; ");
|
|
436
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
427
437
|
className: "pisell-lowcode__booking-client-list-item-loading"
|
|
428
438
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
429
439
|
spinning: franchiseeLoading === item.id
|
|
@@ -468,7 +478,18 @@ var Client = function Client() {
|
|
|
468
478
|
className: "pisell-lowcode__booking-client-info-email"
|
|
469
479
|
}, (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.email) : null, (_state$client$value6 = state.client.value) !== null && _state$client$value6 !== void 0 && _state$client$value6.phone ? /*#__PURE__*/React.createElement("div", {
|
|
470
480
|
className: "pisell-lowcode__booking-client-info-phone"
|
|
471
|
-
}, (_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.phone) : null
|
|
481
|
+
}, (_state$client$value7 = state.client.value) === null || _state$client$value7 === void 0 ? void 0 : _state$client$value7.phone) : null, !!((_state$client$value8 = state.client.value) !== null && _state$client$value8 !== void 0 && (_state$client$value8 = _state$client$value8.waiver_form) !== null && _state$client$value8 !== void 0 && _state$client$value8.length) && /*#__PURE__*/React.createElement("div", {
|
|
482
|
+
className: 'pisell-lowcode__booking-client-waiver',
|
|
483
|
+
title: getWaiverTitle((_state$client$value9 = state.client.value) === null || _state$client$value9 === void 0 ? void 0 : _state$client$value9.waiver_form)
|
|
484
|
+
}, (_state$client$value10 = state.client.value) === null || _state$client$value10 === void 0 || (_state$client$value10 = _state$client$value10.waiver_form) === null || _state$client$value10 === void 0 || (_state$client$value11 = _state$client$value10.map) === null || _state$client$value11 === void 0 ? void 0 : _state$client$value11.call(_state$client$value10, function (item) {
|
|
485
|
+
return /*#__PURE__*/React.createElement("span", null, item.form_title, /*#__PURE__*/React.createElement("span", {
|
|
486
|
+
className: 'pisell-lowcode__booking-client-waiver-colon'
|
|
487
|
+
}, ":"), item.is_filled ? /*#__PURE__*/React.createElement("span", {
|
|
488
|
+
className: 'pisell-lowcode__booking-client-waiver-filled'
|
|
489
|
+
}, locales.getText('pisell2.text.filled')) : /*#__PURE__*/React.createElement("span", {
|
|
490
|
+
className: 'pisell-lowcode__booking-client-waiver-not-filled'
|
|
491
|
+
}, locales.getText('pisell2.text.not-filled')), "; ");
|
|
492
|
+
})))), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
|
|
472
493
|
className: "pisell-lowcode__booking-client-info-right"
|
|
473
494
|
}, isWalkIn ? /*#__PURE__*/React.createElement(PlusCircle, {
|
|
474
495
|
className: "pisell-lowcode__booking-client-add-icon"
|
|
@@ -60,6 +60,26 @@
|
|
|
60
60
|
line-height: 20px;
|
|
61
61
|
margin-top: 4px;
|
|
62
62
|
}
|
|
63
|
+
.pisell-lowcode__booking-client-waiver {
|
|
64
|
+
color: var(--Gray-400, #98A2B3);
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
font-style: normal;
|
|
67
|
+
font-weight: 400;
|
|
68
|
+
line-height: 20px; /* 142.857% */
|
|
69
|
+
text-align: left;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
.pisell-lowcode__booking-client-waiver-colon {
|
|
74
|
+
margin: 0 2px;
|
|
75
|
+
}
|
|
76
|
+
.pisell-lowcode__booking-client-waiver-filled {
|
|
77
|
+
color: var(--Success-600, #079455);
|
|
78
|
+
}
|
|
79
|
+
.pisell-lowcode__booking-client-waiver-not-filled {
|
|
80
|
+
color: var(--Error-600, #D92D20);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
63
83
|
}
|
|
64
84
|
|
|
65
85
|
.pisell-lowcode__booking-client-info-right {
|
|
@@ -106,6 +126,7 @@
|
|
|
106
126
|
align-items: center;
|
|
107
127
|
justify-content: center;
|
|
108
128
|
background: var(--gray-100, #F2F4F7);
|
|
129
|
+
flex-shrink: 0;
|
|
109
130
|
|
|
110
131
|
.pisell-lowcode__booking-client-list-item-avatar-icon {
|
|
111
132
|
font-size: 24px;
|
|
@@ -118,6 +139,7 @@
|
|
|
118
139
|
flex: 1;
|
|
119
140
|
flex-direction: column;
|
|
120
141
|
justify-content: center;
|
|
142
|
+
overflow: hidden;
|
|
121
143
|
|
|
122
144
|
.pisell-lowcode__booking-client-list-item-info-name {
|
|
123
145
|
color: var(--text-text-1, #1B1B1B);
|
|
@@ -142,4 +164,21 @@
|
|
|
142
164
|
line-height: 20px;
|
|
143
165
|
/* 142.857% */
|
|
144
166
|
}
|
|
167
|
+
.pisell-lowcode__booking-client-list-item-info-waiver {
|
|
168
|
+
color: var(--Gray-400, #98A2B3);
|
|
169
|
+
font-size: 14px;
|
|
170
|
+
font-style: normal;
|
|
171
|
+
font-weight: 400;
|
|
172
|
+
line-height: 20px; /* 142.857% */
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
height: 20px;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
.pisell-lowcode__booking-client-list-item-waiver-filled {
|
|
178
|
+
color: var(--Success-600, #079455);
|
|
179
|
+
}
|
|
180
|
+
.pisell-lowcode__booking-client-list-item-waiver-not-filled {
|
|
181
|
+
color: var(--Error-600, #D92D20);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
145
184
|
}
|
|
@@ -141,7 +141,16 @@ var useClientFn = function useClientFn(_params) {
|
|
|
141
141
|
if (resetParams.skip === 1) {
|
|
142
142
|
totalList = list;
|
|
143
143
|
} else {
|
|
144
|
-
|
|
144
|
+
list.forEach(function (item) {
|
|
145
|
+
var index = totalList.findIndex(function (old) {
|
|
146
|
+
return old.id === item.id;
|
|
147
|
+
});
|
|
148
|
+
if (index > -1) {
|
|
149
|
+
totalList[index] = item;
|
|
150
|
+
} else {
|
|
151
|
+
totalList.push(item);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
145
154
|
}
|
|
146
155
|
_payload.clients = totalList;
|
|
147
156
|
setParams(_objectSpread(_objectSpread(_objectSpread({}, params), resetParams), {}, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getWaiverTitle: (waiverForm: any[]) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { locales } from '@pisell/utils';
|
|
2
|
+
export var getWaiverTitle = function getWaiverTitle(waiverForm) {
|
|
3
|
+
return (waiverForm || []).map(function (item) {
|
|
4
|
+
return "".concat(item.form_title || '', ":").concat(item.is_filled ? locales.getText('pisell2.text.filled') : locales.getText('pisell2.text.not-filled'));
|
|
5
|
+
}).join(';');
|
|
6
|
+
};
|
|
@@ -30,6 +30,7 @@ import "./SelectDrawer.less";
|
|
|
30
30
|
import { formatAddFormValues, sortFormValues } from "../../../forms/format";
|
|
31
31
|
import { uniqueByField } from "../../utils";
|
|
32
32
|
import PlusCircle from '@pisell/icon/es/PlusCircle';
|
|
33
|
+
import { getWaiverTitle } from "../utils";
|
|
33
34
|
var ActionItem = function ActionItem(props) {
|
|
34
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
36
|
className: "vertical-client-select-drawer-item-wrap",
|
|
@@ -53,7 +54,11 @@ var Item = function Item(_ref) {
|
|
|
53
54
|
coverSize = _ref.coverSize,
|
|
54
55
|
checked = _ref.checked,
|
|
55
56
|
style = _ref.style,
|
|
56
|
-
loading = _ref.loading
|
|
57
|
+
loading = _ref.loading,
|
|
58
|
+
waiverForm = _ref.waiverForm;
|
|
59
|
+
var waiverTitle = useMemo(function () {
|
|
60
|
+
return getWaiverTitle(waiverForm);
|
|
61
|
+
}, [waiverForm]);
|
|
57
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
58
63
|
className: classNames('vertical-client-select-drawer-item-wrap', _defineProperty({}, 'checked', checked)),
|
|
59
64
|
onClick: onClick,
|
|
@@ -76,6 +81,15 @@ var Item = function Item(_ref) {
|
|
|
76
81
|
className: "",
|
|
77
82
|
title: d
|
|
78
83
|
}, d);
|
|
84
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: 'pisell-lowcode__booking-client-list-item-info-desc-waiver',
|
|
86
|
+
title: waiverTitle
|
|
87
|
+
}, (waiverForm || []).map(function (item) {
|
|
88
|
+
return /*#__PURE__*/React.createElement("span", null, item.form_title, ":", item.is_filled ? /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
className: 'pisell-lowcode__booking-client-list-item-info-desc-filled'
|
|
90
|
+
}, locales.getText('pisell2.text.filled')) : /*#__PURE__*/React.createElement("span", {
|
|
91
|
+
className: 'pisell-lowcode__booking-client-list-item-info-desc-not-filled'
|
|
92
|
+
}, locales.getText('pisell2.text.not-filled')), "; ");
|
|
79
93
|
}))), /*#__PURE__*/React.createElement(Spin, {
|
|
80
94
|
spinning: !!loading
|
|
81
95
|
}));
|
|
@@ -376,7 +390,8 @@ var SelectDrawer = function SelectDrawer(props, ref) {
|
|
|
376
390
|
style: showPet ? {
|
|
377
391
|
marginBottom: 6
|
|
378
392
|
} : {},
|
|
379
|
-
loading: franchiseeLoading === item.id
|
|
393
|
+
loading: franchiseeLoading === item.id,
|
|
394
|
+
waiverForm: item.waiver_form
|
|
380
395
|
}), showPet && /*#__PURE__*/React.createElement("div", {
|
|
381
396
|
className: "vertical-client-select-drawer-content-item-children"
|
|
382
397
|
}, ((item === null || item === void 0 ? void 0 : item.form_record) || []).map(function (f) {
|
|
@@ -30,6 +30,23 @@
|
|
|
30
30
|
.pisell-lowcode__booking-client-list-item-info {
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
}
|
|
33
|
+
.pisell-lowcode__booking-client-list-item-info-desc-waiver {
|
|
34
|
+
color: var(--Gray-400, #98A2B3);
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
line-height: 20px; /* 142.857% */
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
height: 20px;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
.pisell-lowcode__booking-client-list-item-info-desc-filled {
|
|
45
|
+
color: var(--Success-600, #079455);
|
|
46
|
+
}
|
|
47
|
+
.pisell-lowcode__booking-client-list-item-info-desc-not-filled {
|
|
48
|
+
color: var(--Error-600, #D92D20);
|
|
49
|
+
}
|
|
33
50
|
.vertical-client-item-icon-wrap {
|
|
34
51
|
display: flex;
|
|
35
52
|
width: 56px;
|