@pisell/private-materials 3.3.33 → 3.3.35
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/Sales/Cart/index.js +26 -13
- package/es/components/Sales/Cart/types.d.ts +12 -0
- package/es/components/Sales/Cart/utils.d.ts +23 -0
- package/es/components/Sales/Cart/utils.js +161 -0
- package/es/components/Sales/Checkout/utils.d.ts +9 -1
- package/es/components/Sales/Checkout/utils.js +25 -3
- package/es/components/Sales/Event/Detail.d.ts +2 -0
- package/es/components/Sales/Event/Detail.js +56 -13
- package/es/components/Sales/Event/serve.d.ts +10 -0
- package/es/components/Sales/Event/serve.js +26 -1
- package/es/components/Sales/Summary/utils.js +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +42 -20
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +10 -29
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +156 -53
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/utils.js +17 -0
- package/es/components/appointmentBooking/components/Content/index.js +28 -44
- package/es/components/appointmentBooking/components/Content/index.less +23 -1
- 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/Footer/index.js +5 -5
- 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.js +47 -61
- package/es/components/appointmentBooking/components/Resource/index.js +102 -119
- package/es/components/appointmentBooking/components/Services/index.js +50 -25
- 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 -1
- package/es/components/appointmentBooking/hooks.js +215 -294
- 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/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- 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/voucher/index.d.ts +0 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- 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/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/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/booking/utils.d.ts +2 -2
- package/es/components/booking/utils.js +19 -11
- 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/ContinueButton/index.js +218 -73
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/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/Header/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/Provider/SelectHolderModal.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 +3 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.js +70 -13
- 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/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -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/index.d.ts +0 -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/index.d.ts +0 -1
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.js +4 -2
- 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/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/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/Sales/Cart/index.js +30 -18
- package/lib/components/Sales/Cart/types.d.ts +12 -0
- package/lib/components/Sales/Cart/utils.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.js +149 -0
- package/lib/components/Sales/Checkout/utils.d.ts +9 -1
- package/lib/components/Sales/Checkout/utils.js +18 -4
- package/lib/components/Sales/Event/Detail.d.ts +2 -0
- package/lib/components/Sales/Event/Detail.js +34 -10
- package/lib/components/Sales/Event/serve.d.ts +10 -0
- package/lib/components/Sales/Event/serve.js +5 -2
- package/lib/components/Sales/Summary/utils.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +7 -2
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +10 -34
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +43 -6
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.d.ts +12 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/utils.js +37 -0
- package/lib/components/appointmentBooking/components/Content/index.js +28 -42
- package/lib/components/appointmentBooking/components/Content/index.less +23 -1
- 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.js +19 -36
- package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
- package/lib/components/appointmentBooking/components/Services/index.js +18 -10
- 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 -1
- package/lib/components/appointmentBooking/hooks.js +62 -142
- package/lib/components/appointmentBooking/utils.d.ts +2 -88
- package/lib/components/appointmentBooking/utils.js +51 -191
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- 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/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/booking/utils.js +5 -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/ContinueButton/index.js +128 -42
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/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/Header/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/Provider/SelectHolderModal.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 +3 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +7 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +79 -24
- 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/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.js +6 -2
- 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/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/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 +1 -1
- 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
|
@@ -20,11 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
Toast: () => Toast,
|
|
23
|
-
checkAndGoNext: () => checkAndGoNext,
|
|
24
|
-
checkAndMarkCartRenderError: () => checkAndMarkCartRenderError,
|
|
25
23
|
checkHasFormStep: () => checkHasFormStep,
|
|
26
|
-
currentAppointmentBoard: () => currentAppointmentBoard,
|
|
27
|
-
currentRenderLists: () => currentRenderLists,
|
|
28
24
|
formatCarts: () => formatCarts,
|
|
29
25
|
formatCartsResources: () => formatCartsResources,
|
|
30
26
|
formatCurrentUser: () => formatCurrentUser,
|
|
@@ -32,19 +28,13 @@ __export(utils_exports, {
|
|
|
32
28
|
formatForms: () => formatForms,
|
|
33
29
|
formatGuest: () => formatGuest,
|
|
34
30
|
formatHolder: () => formatHolder,
|
|
35
|
-
getCartCurrentResourceData: () => getCartCurrentResourceData,
|
|
36
|
-
getCurrentBoard: () => getCurrentBoard,
|
|
37
31
|
getCustomer: () => getCustomer,
|
|
38
|
-
getFormInsertBeforeKey: () => getFormInsertBeforeKey,
|
|
39
32
|
getMeAccount: () => getMeAccount,
|
|
40
|
-
getMultiResources: () => getMultiResources,
|
|
41
33
|
getPunctuationMark: () => getPunctuationMark,
|
|
42
|
-
getResourceTitle: () => getResourceTitle,
|
|
43
34
|
hasResourceFormId: () => hasResourceFormId,
|
|
44
35
|
openForm: () => openForm,
|
|
45
36
|
sortResources: () => sortResources,
|
|
46
37
|
updateBookingFormStorage: () => updateBookingFormStorage,
|
|
47
|
-
updateCartResources: () => updateCartResources,
|
|
48
38
|
updateLists: () => updateLists
|
|
49
39
|
});
|
|
50
40
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -286,192 +276,68 @@ var Toast = (text) => {
|
|
|
286
276
|
var checkHasFormStep = ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
|
|
287
277
|
var _a, _b, _c;
|
|
288
278
|
let isNext = false;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const currentFormId = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
|
|
295
|
-
const form_id = Number((currentFormId == null ? void 0 : currentFormId[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
|
|
296
|
-
if (!form_id || !resources.length) return;
|
|
297
|
-
const cartId = cart._id;
|
|
298
|
-
const cartOriginResources = ((_f = cart._origin) == null ? void 0 : _f.resources) || [];
|
|
299
|
-
const resourceData = resources.find((r) => String(r._id) === String(cartId));
|
|
300
|
-
if (!resourceData) return;
|
|
301
|
-
let resourceItem = (resourceData.resources || []).find((r) => Number(r.id) === form_id);
|
|
302
|
-
if (!resourceItem) return;
|
|
303
|
-
resourceItem = {
|
|
304
|
-
...resourceItem,
|
|
305
|
-
renderList: ((_g = resourceItem == null ? void 0 : resourceItem.renderList) == null ? void 0 : _g.map((r) => {
|
|
306
|
-
return {
|
|
307
|
-
...r,
|
|
308
|
-
label: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id)
|
|
309
|
-
};
|
|
310
|
-
})) || []
|
|
311
|
-
};
|
|
312
|
-
const cartResource = cartOriginResources.find((r) => Number(r.form_id) === form_id);
|
|
313
|
-
const renderId = (cartResource == null ? void 0 : cartResource.id) || 0;
|
|
314
|
-
const renderItem = ((resourceItem == null ? void 0 : resourceItem.renderList) || []).find((r) => Number(r == null ? void 0 : r.id) === Number(renderId));
|
|
315
|
-
return {
|
|
316
|
-
cartItem: cart,
|
|
317
|
-
resourceItem: {
|
|
318
|
-
...resourceItem,
|
|
319
|
-
originRenderLists: resourceData.resources
|
|
320
|
-
},
|
|
321
|
-
renderItem
|
|
322
|
-
};
|
|
323
|
-
} catch (error) {
|
|
324
|
-
return cart;
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
var getMultiResources = (cart, resourceItem, currentKey) => {
|
|
328
|
-
var _a;
|
|
329
|
-
if (!resourceItem || !cart) return [];
|
|
330
|
-
const isCurrentResourceStep = currentKey.startsWith("select-resource");
|
|
331
|
-
let resources = ((_a = cart == null ? void 0 : cart._origin) == null ? void 0 : _a.resources) || [];
|
|
332
|
-
let selectedResources = isCurrentResourceStep ? resources.filter((r) => (r == null ? void 0 : r.form_id) !== (resourceItem == null ? void 0 : resourceItem.form_id)) : resources;
|
|
333
|
-
selectedResources = selectedResources.map((r) => {
|
|
334
|
-
return {
|
|
335
|
-
...r,
|
|
336
|
-
name: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id),
|
|
337
|
-
isShowChangeResource: false,
|
|
338
|
-
is_hide_like: true
|
|
339
|
-
};
|
|
340
|
-
});
|
|
341
|
-
let currentResources = resources.find((r) => (r == null ? void 0 : r.form_id) === (resourceItem == null ? void 0 : resourceItem.form_id));
|
|
342
|
-
let currentResource = isCurrentResourceStep ? {
|
|
343
|
-
allowClearResource: true,
|
|
344
|
-
lists: (resourceItem == null ? void 0 : resourceItem.renderList) || [],
|
|
345
|
-
is_hide_like: true,
|
|
346
|
-
id: currentResources == null ? void 0 : currentResources.id
|
|
347
|
-
} : {};
|
|
348
|
-
return [...selectedResources, currentResource];
|
|
349
|
-
};
|
|
350
|
-
var getCurrentBoard = (appointmentBooking, code) => {
|
|
351
|
-
var _a;
|
|
352
|
-
const { appointmentBoard } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
353
|
-
const resourceConfig = (_a = appointmentBoard == null ? void 0 : appointmentBoard.resource_tab) == null ? void 0 : _a[code];
|
|
354
|
-
return resourceConfig;
|
|
355
|
-
};
|
|
356
|
-
var getResourceTitle = (appointmentBooking, code, utils, originResource) => {
|
|
357
|
-
const resourceConfig = getCurrentBoard(appointmentBooking, code);
|
|
358
|
-
let name = "";
|
|
359
|
-
if (resourceConfig == null ? void 0 : resourceConfig.resource_type_title) {
|
|
360
|
-
name = utils.translation(resourceConfig == null ? void 0 : resourceConfig.resource_type_title);
|
|
279
|
+
if (hasResourceFormId2) {
|
|
280
|
+
const index = (currentStep == null ? void 0 : currentStep.index) + 1;
|
|
281
|
+
const description = locales2.getText("pisell2.appointment.fill-form");
|
|
282
|
+
const isExist = stepList == null ? void 0 : stepList.some((item) => (item == null ? void 0 : item.key) === "select-time");
|
|
283
|
+
appointmentBooking.addStep({ index, key: "fill-form", description }, isExist ? "select-time" : void 0);
|
|
361
284
|
} else {
|
|
362
|
-
|
|
285
|
+
appointmentBooking.removeStep("fill-form");
|
|
363
286
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
return {
|
|
375
|
-
...cart,
|
|
376
|
-
isErrorResource: true,
|
|
377
|
-
resourceErrorText: name
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
return cart;
|
|
381
|
-
});
|
|
382
|
-
return {
|
|
383
|
-
hasError,
|
|
384
|
-
updatedCartList
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
var getFormInsertBeforeKey = (currentKey, stepList) => {
|
|
388
|
-
const isFirstResource = currentKey === "select-resource";
|
|
389
|
-
const timeStep = stepList.find((item) => item.key.startsWith("select-time"));
|
|
390
|
-
if (isFirstResource && timeStep) {
|
|
391
|
-
return timeStep.key;
|
|
392
|
-
} else {
|
|
393
|
-
return currentKey;
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
|
|
397
|
-
let hasError = false;
|
|
398
|
-
let updatedCartList = [...carts];
|
|
399
|
-
if (isFormSubject && !checkAccount("holder")) {
|
|
400
|
-
updatedCartList = carts == null ? void 0 : carts.map((item) => {
|
|
401
|
-
if (!(item == null ? void 0 : item.holder_id)) {
|
|
402
|
-
hasError = true;
|
|
403
|
-
return {
|
|
404
|
-
...item,
|
|
405
|
-
isErrorHolder: true
|
|
406
|
-
};
|
|
287
|
+
const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
|
|
288
|
+
if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepLists == null ? void 0 : stepLists.length)) {
|
|
289
|
+
const _checkHolder = () => {
|
|
290
|
+
const result = checkHolder({
|
|
291
|
+
isFormSubject,
|
|
292
|
+
checkAccount,
|
|
293
|
+
carts
|
|
294
|
+
});
|
|
295
|
+
if (result) {
|
|
296
|
+
setCarts(result);
|
|
407
297
|
}
|
|
408
|
-
return
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
hasError,
|
|
413
|
-
updatedCartList
|
|
414
|
-
};
|
|
415
|
-
};
|
|
416
|
-
var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
|
|
417
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
418
|
-
try {
|
|
419
|
-
const currentStepKey = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
|
|
420
|
-
const form_id = Number((currentStepKey == null ? void 0 : currentStepKey[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
|
|
421
|
-
const form_code = (currentStepKey == null ? void 0 : currentStepKey[1]) || ((_h = (_g = (_f = resources == null ? void 0 : resources[0]) == null ? void 0 : _f.resources) == null ? void 0 : _g[0]) == null ? void 0 : _h.code);
|
|
422
|
-
const cart_id = currentStepKey == null ? void 0 : currentStepKey[2];
|
|
423
|
-
const resource_form_id = currentStepKey == null ? void 0 : currentStepKey[3];
|
|
424
|
-
const policy_id = currentStepKey == null ? void 0 : currentStepKey[4];
|
|
425
|
-
const resource_tab = (_j = (_i = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _i.appointmentBoard) == null ? void 0 : _j.resource_tab;
|
|
426
|
-
const config = resource_tab == null ? void 0 : resource_tab[form_code];
|
|
427
|
-
const isRequired = (config == null ? void 0 : config.customer_resource) === "customer_resource_required";
|
|
428
|
-
const isSystem = (config == null ? void 0 : config.customer_resource) === "customer_resource_system";
|
|
429
|
-
const isSkip = (config == null ? void 0 : config.hasOwnProperty("resource_skip_select")) ? !!(config == null ? void 0 : config.resource_skip_select) : true;
|
|
430
|
-
return {
|
|
431
|
-
isRequired,
|
|
432
|
-
isSystem,
|
|
433
|
-
isSkip,
|
|
434
|
-
form_id,
|
|
435
|
-
form_code,
|
|
436
|
-
cart_id,
|
|
437
|
-
resource_form_id,
|
|
438
|
-
policy_id
|
|
298
|
+
if (!!result) return true;
|
|
439
299
|
};
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
300
|
+
if (!isLogin) {
|
|
301
|
+
utils.action({
|
|
302
|
+
type: "pisell1.login",
|
|
303
|
+
data: {
|
|
304
|
+
type: "plugin"
|
|
305
|
+
},
|
|
306
|
+
callback: (status) => {
|
|
307
|
+
var _a2;
|
|
308
|
+
if (status === "success") {
|
|
309
|
+
if (!isFormSubject) {
|
|
310
|
+
const user = JSON.parse(((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("customer")) || "{}");
|
|
311
|
+
const currentUser = formatCustomer(user);
|
|
312
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
313
|
+
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
314
|
+
} else {
|
|
315
|
+
getHolders();
|
|
316
|
+
}
|
|
317
|
+
if (isSkip) {
|
|
318
|
+
isNext = true;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
} else {
|
|
324
|
+
isNext = true;
|
|
325
|
+
}
|
|
326
|
+
if (isNext && !_checkHolder()) {
|
|
327
|
+
nextStep();
|
|
328
|
+
} else {
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
462
331
|
} else {
|
|
463
|
-
|
|
332
|
+
if (isSkip) {
|
|
333
|
+
nextStep();
|
|
334
|
+
}
|
|
464
335
|
}
|
|
465
|
-
return newResource || [];
|
|
466
336
|
};
|
|
467
337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
468
338
|
0 && (module.exports = {
|
|
469
339
|
Toast,
|
|
470
|
-
checkAndGoNext,
|
|
471
|
-
checkAndMarkCartRenderError,
|
|
472
340
|
checkHasFormStep,
|
|
473
|
-
currentAppointmentBoard,
|
|
474
|
-
currentRenderLists,
|
|
475
341
|
formatCarts,
|
|
476
342
|
formatCartsResources,
|
|
477
343
|
formatCurrentUser,
|
|
@@ -479,18 +345,12 @@ var updateCartResources = (item, value) => {
|
|
|
479
345
|
formatForms,
|
|
480
346
|
formatGuest,
|
|
481
347
|
formatHolder,
|
|
482
|
-
getCartCurrentResourceData,
|
|
483
|
-
getCurrentBoard,
|
|
484
348
|
getCustomer,
|
|
485
|
-
getFormInsertBeforeKey,
|
|
486
349
|
getMeAccount,
|
|
487
|
-
getMultiResources,
|
|
488
350
|
getPunctuationMark,
|
|
489
|
-
getResourceTitle,
|
|
490
351
|
hasResourceFormId,
|
|
491
352
|
openForm,
|
|
492
353
|
sortResources,
|
|
493
354
|
updateBookingFormStorage,
|
|
494
|
-
updateCartResources,
|
|
495
355
|
updateLists
|
|
496
356
|
});
|
|
@@ -104,7 +104,7 @@ var isBooking4Shop = (shopId, renderType) => {
|
|
|
104
104
|
if (renderType === "eventBooking") {
|
|
105
105
|
return false;
|
|
106
106
|
}
|
|
107
|
-
const booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285];
|
|
107
|
+
const booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285, 6124];
|
|
108
108
|
return booking4Shops.includes(shopId);
|
|
109
109
|
};
|
|
110
110
|
function generateDateRange(start, end) {
|
|
@@ -163,10 +163,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
163
163
|
export declare const getDuration: (duration: number | {
|
|
164
164
|
type: string;
|
|
165
165
|
value: number;
|
|
166
|
-
}) => number | {
|
|
166
|
+
}) => number | "flexible" | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}
|
|
169
|
+
};
|
|
170
170
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
171
171
|
export declare const getIsEdit: (state: any) => boolean;
|
|
172
172
|
export {};
|
|
@@ -230,6 +230,9 @@ var formatProductListByCategory = (list, filterItem) => {
|
|
|
230
230
|
return Object.values(categoryObject).sort((a, b) => b.sort - a.sort);
|
|
231
231
|
};
|
|
232
232
|
var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
233
|
+
var _a;
|
|
234
|
+
const isEdit = !!cacheItem.booking_id;
|
|
235
|
+
const isCurrentRelation = item.item_id === ((_a = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a.relation_id);
|
|
233
236
|
const startDate = (0, import_dayjs.default)(
|
|
234
237
|
cacheItem._extend.start_date.format("YYYY-MM-DD") + " " + getServeStartTime(cacheItem._extend.start_time)
|
|
235
238
|
);
|
|
@@ -240,7 +243,8 @@ var getResourceTimeIsUsable = (item, cacheItem) => {
|
|
|
240
243
|
if (time.max_participants_limit == 0) {
|
|
241
244
|
isMaxLimitRange = true;
|
|
242
245
|
} else {
|
|
243
|
-
|
|
246
|
+
const orderEventCount = isEdit && isCurrentRelation ? time.order_event_count - 1 : time.order_event_count;
|
|
247
|
+
isMaxLimitRange = orderEventCount < time.max_participants_limit;
|
|
244
248
|
}
|
|
245
249
|
const timeStartDate = (0, import_dayjs.default)(time.start_date + " " + time.start_time).subtract(
|
|
246
250
|
1,
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -295,15 +295,15 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
|
|
301
301
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "step" | "unset" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|