@pisell/private-materials 3.2.39 → 3.3.0
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/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -127
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/es/components/appointmentBooking/components/Content/index.js +76 -9
- package/es/components/appointmentBooking/components/Content/index.less +21 -0
- package/es/components/appointmentBooking/components/Date/index.js +128 -37
- package/es/components/appointmentBooking/components/Date/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.js +8 -2
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/index.js +200 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Guest/index.js +1 -1
- package/es/components/appointmentBooking/components/Header/index.js +53 -19
- package/es/components/appointmentBooking/components/Resource/index.js +67 -12
- package/es/components/appointmentBooking/components/Services/index.js +213 -75
- package/es/components/appointmentBooking/components/Services/index.less +0 -14
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
- package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/es/components/appointmentBooking/context.d.ts +4 -4
- package/es/components/appointmentBooking/context.js +42 -33
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +57 -0
- package/es/components/appointmentBooking/hooks.d.ts +29 -1
- package/es/components/appointmentBooking/hooks.js +382 -114
- package/es/components/appointmentBooking/index.js +9 -4
- package/es/components/appointmentBooking/locales.d.ts +51 -3
- package/es/components/appointmentBooking/locales.js +58 -4
- package/es/components/appointmentBooking/utils.d.ts +66 -1
- package/es/components/appointmentBooking/utils.js +226 -33
- package/es/components/booking/addons/index.js +10 -6
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +90 -72
- package/es/components/booking/components/footer/utils.d.ts +11 -0
- package/es/components/booking/components/footer/utils.js +72 -44
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +22 -6
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/es/components/booking/info/hooks/useAddHolder.js +70 -0
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
- package/es/components/booking/info/index.js +9 -2
- package/es/components/booking/info/main.js +1 -1
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/pet/index.js +18 -17
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +119 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +7 -5
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +7 -5
- package/es/components/booking/info/service/index.js +2 -2
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.js +1 -0
- package/es/components/booking/info/service/serviceManager/index.js +12 -7
- package/es/components/booking/info/service2/Group/utils.js +2 -1
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
- package/es/components/booking/info/service2/utils.d.ts +6 -5
- package/es/components/booking/info/service2/utils.js +356 -88
- package/es/components/booking/info/utils.d.ts +2 -0
- package/es/components/booking/info/utils.js +45 -1
- package/es/components/booking/info2/index.js +9 -6
- package/es/components/booking/info2/serve.d.ts +2 -2
- package/es/components/booking/info2/serve.js +8 -15
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +13 -8
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +49 -14
- package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
- package/es/components/booking/info2/service/editService/index.js +4 -3
- package/es/components/booking/info2/service/index.js +18 -37
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utils.js +43 -0
- package/es/components/booking/info2/utilsByBooking.js +17 -4
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.js +2 -2
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/addNote/index.less +3 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +20 -8
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/components/TabProduct/index.js +176 -0
- package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/es/components/productSelect/components/gridLayout/index.js +28 -0
- package/es/components/productSelect/components/gridLayout/index.less +6 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/es/components/productSelect/components/productGroup/index.js +145 -0
- package/es/components/productSelect/components/productGroup/index.less +208 -0
- package/es/components/productSelect/hooks/useToken.d.ts +18 -0
- package/es/components/productSelect/hooks/useToken.js +35 -0
- package/es/components/productSelect/index.d.ts +23 -0
- package/es/components/productSelect/index.js +93 -0
- package/es/components/productSelect/index.less +69 -0
- package/es/components/productSelect/locales.d.ts +18 -0
- package/es/components/productSelect/locales.js +17 -0
- package/es/components/productSelect/mock.d.ts +134 -0
- package/es/components/productSelect/mock.js +202 -0
- package/es/components/productSelect/theme/token.d.ts +17 -0
- package/es/components/productSelect/theme/token.js +19 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/Provider.d.ts +1 -1
- package/es/components/shoppingCart/Provider.js +3 -1
- package/es/components/shoppingCart/components/Cart/Product.js +15 -3
- package/es/components/shoppingCart/components/Cart/index.less +15 -15
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.less +15 -0
- package/es/components/shoppingCart/hooks/useAddService.js +7 -1
- package/es/components/shoppingCart/index.d.ts +1 -1
- package/es/components/shoppingCart/index.js +3 -1
- package/es/components/shoppingCart/status.js +4 -1
- package/es/components/shoppingCart/type.d.ts +5 -0
- package/es/components/subTotal/index.d.ts +22 -0
- package/es/components/subTotal/index.js +234 -0
- package/es/components/subTotal/index.less +70 -0
- package/es/components/subTotal/locales.d.ts +42 -0
- package/es/components/subTotal/locales.js +41 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/menuBar/index.js +54 -0
- package/es/components/ticketBooking/components/menuBar/index.less +84 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/es/components/ticketBooking/components/timeBar/index.js +113 -0
- package/es/components/ticketBooking/components/timeBar/index.less +22 -0
- package/es/components/ticketBooking/data.d.ts +58 -0
- package/es/components/ticketBooking/data.js +58 -58
- package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
- package/es/components/ticketBooking/index.d.ts +3 -2
- package/es/components/ticketBooking/index.js +139 -5
- package/es/components/ticketBooking/index.less +4 -0
- package/es/components/ticketBooking/locales.d.ts +144 -0
- package/es/components/ticketBooking/locales.js +143 -0
- package/es/components/ticketBooking/miniRedux.d.ts +22 -0
- package/es/components/ticketBooking/miniRedux.js +105 -0
- package/es/components/ticketBooking/serve.d.ts +282 -0
- package/es/components/ticketBooking/serve.js +957 -0
- package/es/components/ticketBooking/utils/index.d.ts +14 -0
- package/es/components/ticketBooking/utils/index.js +102 -0
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -80
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/lib/components/appointmentBooking/components/Content/index.js +59 -5
- package/lib/components/appointmentBooking/components/Content/index.less +21 -0
- package/lib/components/appointmentBooking/components/Date/index.js +44 -18
- package/lib/components/appointmentBooking/components/Date/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/index.js +157 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -13
- package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
- package/lib/components/appointmentBooking/components/Services/index.js +86 -63
- package/lib/components/appointmentBooking/components/Services/index.less +0 -14
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
- package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/lib/components/appointmentBooking/context.d.ts +4 -4
- package/lib/components/appointmentBooking/context.js +15 -10
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +57 -0
- package/lib/components/appointmentBooking/hooks.d.ts +29 -1
- package/lib/components/appointmentBooking/hooks.js +148 -22
- package/lib/components/appointmentBooking/index.js +6 -4
- package/lib/components/appointmentBooking/locales.d.ts +51 -3
- package/lib/components/appointmentBooking/locales.js +52 -4
- package/lib/components/appointmentBooking/utils.d.ts +66 -1
- package/lib/components/appointmentBooking/utils.js +158 -33
- package/lib/components/booking/addons/index.js +9 -5
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +94 -32
- package/lib/components/booking/components/footer/utils.d.ts +11 -0
- package/lib/components/booking/components/footer/utils.js +38 -14
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +18 -2
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
- package/lib/components/booking/info/index.js +5 -1
- package/lib/components/booking/info/main.js +1 -1
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/pet/index.js +3 -2
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +106 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +6 -4
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +5 -3
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.js +1 -0
- package/lib/components/booking/info/service/serviceManager/index.js +6 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -1
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
- package/lib/components/booking/info/service2/utils.d.ts +6 -5
- package/lib/components/booking/info/service2/utils.js +304 -30
- package/lib/components/booking/info/utils.d.ts +2 -0
- package/lib/components/booking/info/utils.js +40 -1
- package/lib/components/booking/info2/index.js +6 -1
- package/lib/components/booking/info2/serve.d.ts +2 -2
- package/lib/components/booking/info2/serve.js +3 -10
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +11 -6
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +50 -17
- package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
- package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
- package/lib/components/booking/info2/service/editService/index.js +3 -1
- package/lib/components/booking/info2/service/index.js +18 -28
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utils.js +65 -0
- package/lib/components/booking/info2/utilsByBooking.js +12 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.js +2 -2
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.js +1 -1
- package/lib/components/booking/notes/addNote/index.less +3 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +25 -10
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/components/TabProduct/index.js +172 -0
- package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/lib/components/productSelect/components/gridLayout/index.js +58 -0
- package/lib/components/productSelect/components/gridLayout/index.less +6 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/lib/components/productSelect/components/productGroup/index.js +122 -0
- package/lib/components/productSelect/components/productGroup/index.less +208 -0
- package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/components/productSelect/hooks/useToken.js +51 -0
- package/lib/components/productSelect/index.d.ts +23 -0
- package/lib/components/productSelect/index.js +119 -0
- package/lib/components/productSelect/index.less +69 -0
- package/lib/components/productSelect/locales.d.ts +18 -0
- package/lib/components/productSelect/locales.js +41 -0
- package/lib/components/productSelect/mock.d.ts +134 -0
- package/lib/components/productSelect/mock.js +276 -0
- package/lib/components/productSelect/theme/token.d.ts +17 -0
- package/lib/components/productSelect/theme/token.js +47 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/Provider.d.ts +1 -1
- package/lib/components/shoppingCart/Provider.js +3 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
- package/lib/components/shoppingCart/components/Cart/index.less +15 -15
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.less +15 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
- package/lib/components/shoppingCart/index.d.ts +1 -1
- package/lib/components/shoppingCart/index.js +2 -0
- package/lib/components/shoppingCart/status.js +4 -1
- package/lib/components/shoppingCart/type.d.ts +5 -0
- package/lib/components/subTotal/index.d.ts +22 -0
- package/lib/components/subTotal/index.js +175 -0
- package/lib/components/subTotal/index.less +70 -0
- package/lib/components/subTotal/locales.d.ts +42 -0
- package/lib/components/subTotal/locales.js +65 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
- package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
- package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
- package/lib/components/ticketBooking/data.d.ts +58 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
- package/lib/components/ticketBooking/index.d.ts +3 -2
- package/lib/components/ticketBooking/index.js +159 -3
- package/lib/components/ticketBooking/index.less +4 -0
- package/lib/components/ticketBooking/locales.d.ts +144 -0
- package/lib/components/ticketBooking/locales.js +167 -0
- package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
- package/lib/components/ticketBooking/miniRedux.js +96 -0
- package/lib/components/ticketBooking/serve.d.ts +282 -0
- package/lib/components/ticketBooking/serve.js +214 -0
- package/lib/components/ticketBooking/utils/index.d.ts +14 -0
- package/lib/components/ticketBooking/utils/index.js +131 -0
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/lowcode/product-select/meta.ts +217 -0
- package/lowcode/sub-total/meta.ts +134 -0
- package/lowcode/ticket-booking/meta.ts +29 -0
- package/package.json +2 -2
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
7
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
8
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
9
5
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
12
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -20,12 +20,16 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
21
|
import { getNoResource } from "../../mock";
|
|
22
22
|
import { getErrorList, getProductTotalPrice } from "../../utils";
|
|
23
|
-
import { locales } from
|
|
23
|
+
import { locales } from '@pisell/utils';
|
|
24
24
|
import dayjs from 'dayjs';
|
|
25
25
|
import { appointmentTypes, openingTime } from "./status";
|
|
26
26
|
import { postMultiDay } from "../service/serve";
|
|
27
27
|
import localeTexts from "../../locales";
|
|
28
28
|
import { concatBookings, isGroupBooking, getProductByGroupId } from "./Group/utils";
|
|
29
|
+
import { isShowAddTime } from "../utils";
|
|
30
|
+
import { formatResources } from "../service/addService/utils";
|
|
31
|
+
import { getProductExtend } from "../../info2/service/addService/utils";
|
|
32
|
+
import { getErrorList as getErrorListInfo2 } from "../../info2/utilsByBooking";
|
|
29
33
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
30
34
|
export var formatActiveKey = function formatActiveKey(lists, platform, isEdit) {
|
|
31
35
|
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
@@ -48,7 +52,7 @@ export var formatActiveKey = function formatActiveKey(lists, platform, isEdit) {
|
|
|
48
52
|
|
|
49
53
|
/**
|
|
50
54
|
* @title: 获取资源名称
|
|
51
|
-
* @description:
|
|
55
|
+
* @description:
|
|
52
56
|
* @param {any} id
|
|
53
57
|
* @param {any} state
|
|
54
58
|
* @return {*}
|
|
@@ -73,7 +77,7 @@ var errorTypes = {
|
|
|
73
77
|
|
|
74
78
|
/**
|
|
75
79
|
* @title: 错误提示
|
|
76
|
-
* @description:
|
|
80
|
+
* @description:
|
|
77
81
|
* @param {any} service
|
|
78
82
|
* @param {any} resourceItem
|
|
79
83
|
* @return {*}
|
|
@@ -98,7 +102,7 @@ export var getErrorMessage = function getErrorMessage(service, resourceItem, isD
|
|
|
98
102
|
|
|
99
103
|
/**
|
|
100
104
|
* @title: 格式化主体列表
|
|
101
|
-
* @description:
|
|
105
|
+
* @description:
|
|
102
106
|
* @param {any} lists
|
|
103
107
|
* @param {boolean} isOpenGroup
|
|
104
108
|
* @return {*}
|
|
@@ -167,7 +171,7 @@ export var isBookingProduct = function isBookingProduct(extension_type, bol) {
|
|
|
167
171
|
|
|
168
172
|
/**
|
|
169
173
|
* @title: 是否是预约商品
|
|
170
|
-
* @description:
|
|
174
|
+
* @description:
|
|
171
175
|
* @return {*}
|
|
172
176
|
* @Author: WangHan
|
|
173
177
|
* @Date: 2024-12-06 11:24
|
|
@@ -175,21 +179,145 @@ export var isBookingProduct = function isBookingProduct(extension_type, bol) {
|
|
|
175
179
|
export var isDayBookingProduct = function isDayBookingProduct(item, state) {
|
|
176
180
|
return isBookingProduct(item === null || item === void 0 ? void 0 : item.extension_type) && state.renderType === 'dayBooking';
|
|
177
181
|
};
|
|
182
|
+
var currentResource = function currentResource(state, useResource, cacheItem) {
|
|
183
|
+
var resourcesOrigin = state.service.resourcesOrigin;
|
|
184
|
+
var resources = formatResources({
|
|
185
|
+
cacheItem: cacheItem,
|
|
186
|
+
resourcesOrigin: resourcesOrigin,
|
|
187
|
+
isDay: false
|
|
188
|
+
});
|
|
189
|
+
var item = resources.find(function (d) {
|
|
190
|
+
return d.form_record_id == useResource;
|
|
191
|
+
}) || {};
|
|
192
|
+
return item;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// 更新holder
|
|
196
|
+
var handleChangeHolder = function handleChangeHolder(products, currentItem, other) {
|
|
197
|
+
return products.map(function (item) {
|
|
198
|
+
if (item._id === currentItem._id) {
|
|
199
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
200
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
201
|
+
holder_id: other.id
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return item;
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// 添加holder
|
|
210
|
+
var handleAddHolder = function handleAddHolder() {};
|
|
211
|
+
var handleLike = function handleLike(products, currentItem, other) {
|
|
212
|
+
return products.map(function (item) {
|
|
213
|
+
if (currentItem.isParallelResource) {
|
|
214
|
+
if (item._id === currentItem.serviceId) {
|
|
215
|
+
var _item$_extend, _item$_extend2;
|
|
216
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
217
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
218
|
+
resource: _objectSpread(_objectSpread({}, (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.resource), {}, _defineProperty({}, currentItem.resourceId, (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.resource[currentItem.resourceId].map(function (item) {
|
|
219
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
220
|
+
like_status: other.like_status
|
|
221
|
+
});
|
|
222
|
+
})))
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
return item;
|
|
227
|
+
} else {
|
|
228
|
+
if (item._id === currentItem._id) {
|
|
229
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
230
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
231
|
+
like_status: other.like_status
|
|
232
|
+
})
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
return item;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// 更新资源
|
|
241
|
+
var handleChangeResource = function handleChangeResource(products, currentItem, other, state) {
|
|
242
|
+
return products.map(function (item) {
|
|
243
|
+
var _ref = other || {},
|
|
244
|
+
props = _ref.props,
|
|
245
|
+
value = _ref.value;
|
|
246
|
+
var _ref2 = props || {},
|
|
247
|
+
isParallelResource = _ref2.isParallelResource,
|
|
248
|
+
resourceId = _ref2.resourceId;
|
|
249
|
+
if (isParallelResource) {
|
|
250
|
+
if (item._id === currentItem._id) {
|
|
251
|
+
var hasDataItem = getProductExtend({
|
|
252
|
+
cacheItem: _objectSpread(_objectSpread({}, item), {}, {
|
|
253
|
+
new: 0
|
|
254
|
+
}),
|
|
255
|
+
state: state
|
|
256
|
+
});
|
|
257
|
+
var maps = hasDataItem._extend.resource[resourceId] ? hasDataItem._extend.resource[resourceId].reduce(function (pre, cur) {
|
|
258
|
+
pre[cur.relation_id] = cur;
|
|
259
|
+
return pre;
|
|
260
|
+
}, {}) : {};
|
|
261
|
+
item._extend.resource[resourceId] = value.map(function (d) {
|
|
262
|
+
var _hasDataItem$_data$re, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _currentForm$renderLi5;
|
|
263
|
+
var currentForm = ((_hasDataItem$_data$re = hasDataItem._data.resourceMaps) === null || _hasDataItem$_data$re === void 0 ? void 0 : _hasDataItem$_data$re[resourceId]) || {};
|
|
264
|
+
return (
|
|
265
|
+
// maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
|
|
266
|
+
maps[d] || {
|
|
267
|
+
relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[d]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
|
|
268
|
+
form_id: resourceId,
|
|
269
|
+
relation_id: d,
|
|
270
|
+
like_status: 'common',
|
|
271
|
+
// 新添加的数据补充错误信息
|
|
272
|
+
errors: getErrorListInfo2((_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2[d], hasDataItem),
|
|
273
|
+
children: (_currentForm$renderLi3 = currentForm.renderListMaps) === null || _currentForm$renderLi3 === void 0 || (_currentForm$renderLi3 = _currentForm$renderLi3[d]) === null || _currentForm$renderLi3 === void 0 ? void 0 : _currentForm$renderLi3.children,
|
|
274
|
+
metadata: _objectSpread(_objectSpread({}, (_currentForm$renderLi4 = currentForm.renderListMaps) === null || _currentForm$renderLi4 === void 0 || (_currentForm$renderLi4 = _currentForm$renderLi4[d]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.metadata), {}, {
|
|
275
|
+
form_name: currentForm.title,
|
|
276
|
+
resource_name: (_currentForm$renderLi5 = currentForm.renderListMaps[d]) === null || _currentForm$renderLi5 === void 0 ? void 0 : _currentForm$renderLi5.main_field
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
return item;
|
|
283
|
+
} else {
|
|
284
|
+
if (item._id === currentItem._id) {
|
|
285
|
+
var _resourceItem$_extend;
|
|
286
|
+
var resourceItem = currentResource(state, other.id, item);
|
|
287
|
+
var _ref3 = (resourceItem === null || resourceItem === void 0 || (_resourceItem$_extend = resourceItem._extend) === null || _resourceItem$_extend === void 0 ? void 0 : _resourceItem$_extend.usableTime) || {},
|
|
288
|
+
relation_type = _ref3.relation_type,
|
|
289
|
+
item_id = _ref3.item_id,
|
|
290
|
+
schedule_id = _ref3.schedule_id;
|
|
291
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
292
|
+
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
293
|
+
resource: item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0,
|
|
294
|
+
relation_type: relation_type || 'form',
|
|
295
|
+
relation_id: item_id || (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) || 0,
|
|
296
|
+
schedule_id: schedule_id || 0
|
|
297
|
+
})
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
return item;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
};
|
|
178
304
|
|
|
179
305
|
/**
|
|
180
306
|
* @title: 更新商品数据
|
|
181
|
-
* @description:
|
|
307
|
+
* @description:
|
|
182
308
|
* @param {any} state
|
|
309
|
+
* @param currentItem
|
|
183
310
|
* @param {string} type
|
|
184
|
-
* @param {any} _id // 商品id
|
|
185
311
|
* @param {any} other
|
|
312
|
+
* @param actions
|
|
186
313
|
* @return {*}
|
|
187
314
|
* @Author: WangHan
|
|
188
315
|
* @Date: 2025-01-03 15:00
|
|
189
316
|
*/
|
|
190
|
-
export var updateServices = function updateServices(state, currentItem, type, other) {
|
|
191
|
-
var _state$service;
|
|
192
|
-
|
|
317
|
+
export var updateServices = function updateServices(state, currentItem, type, other, actions) {
|
|
318
|
+
var _state$service, _state$service2;
|
|
319
|
+
if (!(state !== null && state !== void 0 && (_state$service = state.service) !== null && _state$service !== void 0 && _state$service.value)) return [];
|
|
320
|
+
var products = (state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || [];
|
|
193
321
|
// currentItem 可能是单个 也可能是数组
|
|
194
322
|
var isGroup = isGroupBooking(currentItem._id);
|
|
195
323
|
// 删除
|
|
@@ -212,11 +340,27 @@ export var updateServices = function updateServices(state, currentItem, type, ot
|
|
|
212
340
|
if (type === 'delete_holders') {
|
|
213
341
|
var _products2;
|
|
214
342
|
products = (_products2 = products) === null || _products2 === void 0 ? void 0 : _products2.filter(function (item) {
|
|
215
|
-
var _item$
|
|
216
|
-
return (item === null || item === void 0 || (_item$
|
|
343
|
+
var _item$_extend3;
|
|
344
|
+
return (item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.holder_id) !== other;
|
|
217
345
|
});
|
|
218
346
|
}
|
|
219
347
|
|
|
348
|
+
// 更新holder
|
|
349
|
+
if (type === 'change_holder') {
|
|
350
|
+
products = handleChangeHolder(products, currentItem, other);
|
|
351
|
+
}
|
|
352
|
+
if (type === 'add_holder') {
|
|
353
|
+
actions === null || actions === void 0 || actions.handleAddHolder();
|
|
354
|
+
return products;
|
|
355
|
+
}
|
|
356
|
+
if (type === 'like') {
|
|
357
|
+
products = handleLike(products, currentItem, other);
|
|
358
|
+
}
|
|
359
|
+
if (type === 'change_resource') {
|
|
360
|
+
products = handleChangeResource(products, currentItem, other, state);
|
|
361
|
+
return products;
|
|
362
|
+
}
|
|
363
|
+
|
|
220
364
|
// 更新商品的holder_id
|
|
221
365
|
if (type === 'update_holders') {
|
|
222
366
|
var _products3;
|
|
@@ -268,7 +412,7 @@ export var updateServices = function updateServices(state, currentItem, type, ot
|
|
|
268
412
|
|
|
269
413
|
/**
|
|
270
414
|
* @title: 格式化套餐
|
|
271
|
-
* @description:
|
|
415
|
+
* @description:
|
|
272
416
|
* @param {any} bundle
|
|
273
417
|
* @return {*}
|
|
274
418
|
* @Author: WangHan
|
|
@@ -293,7 +437,7 @@ var formatBundle = function formatBundle(bundle) {
|
|
|
293
437
|
|
|
294
438
|
/**
|
|
295
439
|
* @title: 格式化单规格
|
|
296
|
-
* @description:
|
|
440
|
+
* @description:
|
|
297
441
|
* @param {any} options
|
|
298
442
|
* @return {*}
|
|
299
443
|
* @Author: WangHan
|
|
@@ -323,10 +467,129 @@ export var formItems = function formItems(items) {
|
|
|
323
467
|
});
|
|
324
468
|
});
|
|
325
469
|
};
|
|
470
|
+
var formatHolders = function formatHolders(items) {
|
|
471
|
+
return items.map(function (d) {
|
|
472
|
+
return {
|
|
473
|
+
id: d === null || d === void 0 ? void 0 : d.form_record_id,
|
|
474
|
+
label: d === null || d === void 0 ? void 0 : d.main_field
|
|
475
|
+
};
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
var getErrorMessageInfo2 = function getErrorMessageInfo2(errorList) {
|
|
479
|
+
var errorMessage = '';
|
|
480
|
+
if (errorList !== null && errorList !== void 0 && errorList.length) {
|
|
481
|
+
if (errorList.length === 1) {
|
|
482
|
+
errorMessage = errorList[0].label + ' ' + errorTypes[errorList[0].type];
|
|
483
|
+
} else {
|
|
484
|
+
errorMessage = "".concat(errorList.length, " ").concat(locales.getText('pisell2.text.warnings'));
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
return errorMessage;
|
|
488
|
+
};
|
|
489
|
+
var getAllErrorList = function getAllErrorList(item) {
|
|
490
|
+
var _ref4 = item._data || {},
|
|
491
|
+
resourceMaps = _ref4.resourceMaps;
|
|
492
|
+
var _ref5 = item._extend || {},
|
|
493
|
+
resource = _ref5.resource;
|
|
494
|
+
var errorList = [];
|
|
495
|
+
Object.entries(resource).forEach(function (_ref6) {
|
|
496
|
+
var _ref7 = _slicedToArray(_ref6, 2),
|
|
497
|
+
key = _ref7[0],
|
|
498
|
+
value = _ref7[1];
|
|
499
|
+
value.forEach(function (val) {
|
|
500
|
+
var _resourceMaps$key;
|
|
501
|
+
var list = getErrorListInfo2((_resourceMaps$key = resourceMaps[key]) === null || _resourceMaps$key === void 0 ? void 0 : _resourceMaps$key.renderListMaps[val.relation_id], item);
|
|
502
|
+
errorList.push.apply(errorList, _toConsumableArray(list));
|
|
503
|
+
console.log(list, 'list');
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
return errorList;
|
|
507
|
+
};
|
|
508
|
+
var mapListItems = function mapListItems(items) {
|
|
509
|
+
return items.map(function (item) {
|
|
510
|
+
return {
|
|
511
|
+
id: item.id || item.form_record_id,
|
|
512
|
+
label: item.labelText,
|
|
513
|
+
isError: !item.usable
|
|
514
|
+
};
|
|
515
|
+
});
|
|
516
|
+
};
|
|
517
|
+
var getGeneralParams = function getGeneralParams(item, state, isParallelResource) {
|
|
518
|
+
var _item$_extend5, _item$_extend6, _item$_extend7, _item$_extend8;
|
|
519
|
+
var pet = state.pet,
|
|
520
|
+
service = state.service;
|
|
521
|
+
var _ref8 = pet || {},
|
|
522
|
+
_ref8$holders = _ref8.holders,
|
|
523
|
+
holders = _ref8$holders === void 0 ? [] : _ref8$holders;
|
|
524
|
+
var parallelResourceOtherParams = {};
|
|
525
|
+
var multiResources;
|
|
526
|
+
if (isParallelResource) {
|
|
527
|
+
var hasDataItem = getProductExtend({
|
|
528
|
+
cacheItem: _objectSpread(_objectSpread({}, item), {}, {
|
|
529
|
+
new: 0
|
|
530
|
+
}),
|
|
531
|
+
state: state
|
|
532
|
+
});
|
|
533
|
+
var _ref9 = hasDataItem._data || {},
|
|
534
|
+
resourceMaps = _ref9.resourceMaps,
|
|
535
|
+
resources = _ref9.resources;
|
|
536
|
+
parallelResourceOtherParams.errorMessage = getErrorMessageInfo2(getAllErrorList(hasDataItem));
|
|
537
|
+
multiResources = resources.map(function (resource) {
|
|
538
|
+
var _detail$select_type, _value$;
|
|
539
|
+
var key = resource.form_id;
|
|
540
|
+
var detail = resourceMaps === null || resourceMaps === void 0 ? void 0 : resourceMaps[key];
|
|
541
|
+
var isMultiple = (detail === null || detail === void 0 || (_detail$select_type = detail.select_type) === null || _detail$select_type === void 0 ? void 0 : _detail$select_type.type) === 'multiple';
|
|
542
|
+
var value = item._extend.resource[key];
|
|
543
|
+
return {
|
|
544
|
+
is_hide_like: isMultiple,
|
|
545
|
+
isParallelResource: true,
|
|
546
|
+
maxLength: isMultiple && detail.select_type.max,
|
|
547
|
+
resourceMode: isMultiple ? 'multiple' : undefined,
|
|
548
|
+
serviceId: item._id,
|
|
549
|
+
resourceId: key,
|
|
550
|
+
_id: key,
|
|
551
|
+
id: (value || []).map(function (val) {
|
|
552
|
+
return val.relation_id;
|
|
553
|
+
}),
|
|
554
|
+
status: (value === null || value === void 0 || (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.like_status) || 'common',
|
|
555
|
+
lists: detail !== null && detail !== void 0 && detail.renderList ? mapListItems(detail === null || detail === void 0 ? void 0 : detail.renderList) : []
|
|
556
|
+
};
|
|
557
|
+
});
|
|
558
|
+
} else {
|
|
559
|
+
var _item$_extend4;
|
|
560
|
+
var _ref10 = service || {},
|
|
561
|
+
resourcesOrigin = _ref10.resourcesOrigin;
|
|
562
|
+
var resource = formatResources({
|
|
563
|
+
cacheItem: item,
|
|
564
|
+
resourcesOrigin: resourcesOrigin,
|
|
565
|
+
isDay: false
|
|
566
|
+
});
|
|
567
|
+
multiResources = [{
|
|
568
|
+
_id: item._id,
|
|
569
|
+
id: item._extend.resource,
|
|
570
|
+
status: ((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.like_status) || 'common',
|
|
571
|
+
lists: mapListItems(resource)
|
|
572
|
+
}];
|
|
573
|
+
}
|
|
574
|
+
return _objectSpread({
|
|
575
|
+
format: ['HH:mm', 'HH:mm'],
|
|
576
|
+
show_time: true,
|
|
577
|
+
duration_type: 'minutes',
|
|
578
|
+
// 当前可选择holder列表
|
|
579
|
+
holders: formatHolders(holders),
|
|
580
|
+
isShowAction: isShowAddTime(state, item),
|
|
581
|
+
actionText: locales.getText('page.booking.text.add-time'),
|
|
582
|
+
isMultipleResource: true,
|
|
583
|
+
multiResources: multiResources,
|
|
584
|
+
holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
|
|
585
|
+
start_date: item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.startDate,
|
|
586
|
+
end_date: (item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.endDate) || (item === null || item === void 0 || (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.end_date)
|
|
587
|
+
}, parallelResourceOtherParams);
|
|
588
|
+
};
|
|
326
589
|
|
|
327
590
|
/**
|
|
328
591
|
* @title: 格式化商品数据
|
|
329
|
-
* @description:
|
|
592
|
+
* @description:
|
|
330
593
|
* @param {any} lists
|
|
331
594
|
* @return {*}
|
|
332
595
|
* @Author: WangHan
|
|
@@ -334,59 +597,63 @@ export var formItems = function formItems(items) {
|
|
|
334
597
|
*/
|
|
335
598
|
export var formatProducts = function formatProducts(lists, state) {
|
|
336
599
|
var isRenderGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
600
|
+
var isGeneral = arguments.length > 3 ? arguments[3] : undefined;
|
|
601
|
+
var isParallelResource = arguments.length > 4 ? arguments[4] : undefined;
|
|
337
602
|
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
338
603
|
var normalList = [];
|
|
339
604
|
var groupList = [];
|
|
340
605
|
var formItem = function formItem(item) {
|
|
341
|
-
var _item$
|
|
606
|
+
var _item$_extend9, _item$_extend10, _item$_extend11, _item$_extend13, _item$_extend14, _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19, _resourceItem, _item$_extend20, _item$_extend21, _item$_extend22, _item$_extend23;
|
|
342
607
|
var _isDayBookingProduct = isDayBookingProduct(item, state);
|
|
343
|
-
var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$
|
|
344
|
-
var options = formatOptions(item === null || item === void 0 || (_item$
|
|
345
|
-
var bundle = formatBundle(item === null || item === void 0 || (_item$
|
|
608
|
+
var clientTitle = getHolderName(state, item === null || item === void 0 || (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.holder_id);
|
|
609
|
+
var options = formatOptions(item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.option);
|
|
610
|
+
var bundle = formatBundle(item === null || item === void 0 || (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.bundle);
|
|
346
611
|
// 是否是普通商品
|
|
347
612
|
var isNormalProduct = !appointmentTypes.includes(item === null || item === void 0 ? void 0 : item.extension_type) || (state === null || state === void 0 ? void 0 : state.renderType) === 'eventBooking';
|
|
348
613
|
var resourceItem = {};
|
|
349
614
|
var errorMessage = '';
|
|
350
|
-
if (_isDayBookingProduct) {
|
|
351
|
-
var _item$
|
|
352
|
-
resourceItem = getResourceItem(item === null || item === void 0 || (_item$
|
|
615
|
+
if (_isDayBookingProduct || isGeneral) {
|
|
616
|
+
var _item$_extend12;
|
|
617
|
+
resourceItem = getResourceItem(item === null || item === void 0 || (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.resource, state);
|
|
353
618
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
354
619
|
}
|
|
355
|
-
|
|
620
|
+
var generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
621
|
+
return _objectSpread(_objectSpread({
|
|
356
622
|
id: item === null || item === void 0 ? void 0 : item.id,
|
|
357
623
|
_id: item === null || item === void 0 ? void 0 : item._id,
|
|
358
624
|
name: item === null || item === void 0 ? void 0 : item.title,
|
|
359
|
-
price: item === null || item === void 0 || (_item$
|
|
360
|
-
total: item === null || item === void 0 || (_item$
|
|
361
|
-
origin_total: item === null || item === void 0 || (_item$
|
|
625
|
+
price: item === null || item === void 0 || (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.price,
|
|
626
|
+
total: item === null || item === void 0 || (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.total,
|
|
627
|
+
origin_total: item === null || item === void 0 || (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.origin_total,
|
|
362
628
|
num: item === null || item === void 0 ? void 0 : item._extend.quantity,
|
|
363
629
|
image: item === null || item === void 0 ? void 0 : item.cover,
|
|
364
630
|
isShowNote: true,
|
|
365
631
|
note: item === null || item === void 0 ? void 0 : item.note,
|
|
366
|
-
like_status: item === null || item === void 0 || (_item$
|
|
632
|
+
like_status: item === null || item === void 0 || (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.like_status,
|
|
367
633
|
bundle: bundle,
|
|
368
634
|
options: options,
|
|
369
635
|
errorMessage: errorMessage,
|
|
370
|
-
product_option_string: item === null || item === void 0 || (_item$
|
|
371
|
-
discount_reason: item === null || item === void 0 || (_item$
|
|
372
|
-
resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$
|
|
636
|
+
product_option_string: item === null || item === void 0 || (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 || (_item$_extend17 = _item$_extend17.other) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.product_option_string,
|
|
637
|
+
discount_reason: item === null || item === void 0 || (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.discount_reason,
|
|
638
|
+
resource_id: isNormalProduct ? 0 : item === null || item === void 0 || (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.resource,
|
|
373
639
|
relation_form_name: isNormalProduct ? '' : ((_resourceItem = resourceItem) === null || _resourceItem === void 0 ? void 0 : _resourceItem.labelText) || item.relation_form_name,
|
|
374
640
|
holder_title: clientTitle,
|
|
375
|
-
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$
|
|
376
|
-
end_date: !isNormalProduct ? item === null || item === void 0 || (_item$
|
|
377
|
-
holder_id: (item === null || item === void 0 || (_item$
|
|
641
|
+
start_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.start_date : '',
|
|
642
|
+
end_date: !isNormalProduct ? item === null || item === void 0 || (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.end_date : '',
|
|
643
|
+
holder_id: (item === null || item === void 0 || (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.holder_id) || 0,
|
|
378
644
|
isNormalProduct: isNormalProduct,
|
|
379
645
|
locale: state.locale,
|
|
380
646
|
symbol: state.amountSymbol,
|
|
381
|
-
items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$
|
|
647
|
+
items: isEventBooking(state) ? [] : formItems((item === null || item === void 0 || (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.items) || [])
|
|
648
|
+
}, generalParams), {}, {
|
|
382
649
|
_origin: item
|
|
383
|
-
};
|
|
650
|
+
});
|
|
384
651
|
};
|
|
385
652
|
|
|
386
653
|
// 将商品分为组商品和非组商品
|
|
387
654
|
lists.forEach(function (item) {
|
|
388
|
-
var _item$
|
|
389
|
-
if (!(item !== null && item !== void 0 && (_item$
|
|
655
|
+
var _item$_extend24;
|
|
656
|
+
if (!(item !== null && item !== void 0 && (_item$_extend24 = item._extend) !== null && _item$_extend24 !== void 0 && _item$_extend24.groupId)) {
|
|
390
657
|
normalList.push(formItem(item));
|
|
391
658
|
} else {
|
|
392
659
|
groupList.push(item);
|
|
@@ -395,14 +662,15 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
395
662
|
|
|
396
663
|
// 根据item._extend.groupId 进行分组
|
|
397
664
|
var groups = groupList.reduce(function (prev, item) {
|
|
398
|
-
var _item$
|
|
399
|
-
var groupId = item === null || item === void 0 || (_item$
|
|
665
|
+
var _item$_extend25;
|
|
666
|
+
var groupId = item === null || item === void 0 || (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.groupId;
|
|
400
667
|
if (!prev[groupId]) {
|
|
401
668
|
prev[groupId] = [];
|
|
402
669
|
}
|
|
403
670
|
prev[groupId].push(item);
|
|
404
671
|
return prev;
|
|
405
672
|
}, {});
|
|
673
|
+
console.log(normalList, 'normalList');
|
|
406
674
|
if (isRenderGroup) {
|
|
407
675
|
return Object.values(groups).map(function (d) {
|
|
408
676
|
return formItem(concatBookings(d));
|
|
@@ -416,7 +684,7 @@ export var formatProducts = function formatProducts(lists, state) {
|
|
|
416
684
|
|
|
417
685
|
/**
|
|
418
686
|
* @title: 禁用日期
|
|
419
|
-
* @description:
|
|
687
|
+
* @description:
|
|
420
688
|
* @param {any} current
|
|
421
689
|
* @param {string} position
|
|
422
690
|
* @param {any} startDate
|
|
@@ -439,7 +707,7 @@ export var disabledDate = function disabledDate(current, position, currentDate)
|
|
|
439
707
|
|
|
440
708
|
/**
|
|
441
709
|
* @title: 是否是跨日预约
|
|
442
|
-
* @description:
|
|
710
|
+
* @description:
|
|
443
711
|
* @param {any} state
|
|
444
712
|
* @return {*}
|
|
445
713
|
* @Author: WangHan
|
|
@@ -459,7 +727,7 @@ export var isAppointmentProduct = function isAppointmentProduct(item) {
|
|
|
459
727
|
};
|
|
460
728
|
/**
|
|
461
729
|
* @title: 是否是terminal上的跨日预约
|
|
462
|
-
* @description:
|
|
730
|
+
* @description:
|
|
463
731
|
* @param {any} state
|
|
464
732
|
* @return {*}
|
|
465
733
|
* @Author: WangHan
|
|
@@ -480,15 +748,15 @@ export var formatDayDate = function formatDayDate(_extend) {
|
|
|
480
748
|
|
|
481
749
|
/**
|
|
482
750
|
* @title: 根据营业日时间格式化时间
|
|
483
|
-
* @description:
|
|
751
|
+
* @description:
|
|
484
752
|
* @param {any} state
|
|
485
753
|
* @return {*}
|
|
486
754
|
* @Author: WangHan
|
|
487
755
|
* @Date: 2024-12-04 12:07
|
|
488
756
|
*/
|
|
489
|
-
export var formatDayTime = function formatDayTime(
|
|
490
|
-
var startDate =
|
|
491
|
-
endDate =
|
|
757
|
+
export var formatDayTime = function formatDayTime(_ref11) {
|
|
758
|
+
var startDate = _ref11.startDate,
|
|
759
|
+
endDate = _ref11.endDate;
|
|
492
760
|
// 营业日时间
|
|
493
761
|
var shopOpeningTime = localStorage.getItem('shopOpeningHours') || '00:00';
|
|
494
762
|
|
|
@@ -519,7 +787,7 @@ export var formatDateTime = function formatDateTime(start_date, end_date) {
|
|
|
519
787
|
|
|
520
788
|
/**
|
|
521
789
|
* @title: 初始化日期
|
|
522
|
-
* @description:
|
|
790
|
+
* @description:
|
|
523
791
|
* @return {*}
|
|
524
792
|
* @Author: WangHan
|
|
525
793
|
* @Date: 2024-12-06 17:24
|
|
@@ -533,15 +801,15 @@ export var initDate = function initDate() {
|
|
|
533
801
|
|
|
534
802
|
/**
|
|
535
803
|
* @title: 是否有预约商品
|
|
536
|
-
* @description:
|
|
804
|
+
* @description:
|
|
537
805
|
* @return {*}
|
|
538
806
|
* @Author: WangHan
|
|
539
807
|
* @Date: 2024-12-12 15:47
|
|
540
808
|
*/
|
|
541
809
|
export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(state) {
|
|
542
|
-
var _state$bookingConfig2, _state$
|
|
810
|
+
var _state$bookingConfig2, _state$service3, _state$pet2;
|
|
543
811
|
var form_id = (state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.appointment_subject) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.form_id) || 0;
|
|
544
|
-
var services = ((_state$
|
|
812
|
+
var services = ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
|
|
545
813
|
var pets = ((_state$pet2 = state.pet) === null || _state$pet2 === void 0 || (_state$pet2 = _state$pet2.value) === null || _state$pet2 === void 0 ? void 0 : _state$pet2[form_id]) || [];
|
|
546
814
|
|
|
547
815
|
// 没选择表单,则直接提示
|
|
@@ -565,8 +833,8 @@ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(stat
|
|
|
565
833
|
// 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
|
|
566
834
|
// services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
|
|
567
835
|
services: services.filter(function (item) {
|
|
568
|
-
var _item$
|
|
569
|
-
return ((_item$
|
|
836
|
+
var _item$_extend26;
|
|
837
|
+
return ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.holder_id) == d.form_record_id && checkType(item.extension_type);
|
|
570
838
|
})
|
|
571
839
|
});
|
|
572
840
|
});
|
|
@@ -578,7 +846,7 @@ export var isHasDayAppointmentProduct = function isHasDayAppointmentProduct(stat
|
|
|
578
846
|
|
|
579
847
|
/**
|
|
580
848
|
* @title: 过滤出如果是预约商品,则只获取跨日的预约商品
|
|
581
|
-
* @description:
|
|
849
|
+
* @description:
|
|
582
850
|
* @param {any} lists
|
|
583
851
|
* @return {*}
|
|
584
852
|
* @Author: WangHan
|
|
@@ -604,7 +872,7 @@ export var getDayProducts = function getDayProducts(holderId, lists, isTerminal)
|
|
|
604
872
|
|
|
605
873
|
/**
|
|
606
874
|
* @title: 格式化表单数据
|
|
607
|
-
* @description:
|
|
875
|
+
* @description:
|
|
608
876
|
* @param {any} state
|
|
609
877
|
* @return {*}
|
|
610
878
|
* @Author: WangHan
|
|
@@ -619,15 +887,15 @@ export var getPets = function getPets(state) {
|
|
|
619
887
|
|
|
620
888
|
/**
|
|
621
889
|
* @title: 得出预约商品
|
|
622
|
-
* @description:
|
|
890
|
+
* @description:
|
|
623
891
|
* @param {any} state
|
|
624
892
|
* @return {*}
|
|
625
893
|
* @Author: WangHan
|
|
626
894
|
* @Date: 2024-12-30 22:26
|
|
627
895
|
*/
|
|
628
896
|
export var getAppointmentService = function getAppointmentService(state) {
|
|
629
|
-
var _state$
|
|
630
|
-
var services = ((_state$
|
|
897
|
+
var _state$service4;
|
|
898
|
+
var services = ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value) || [];
|
|
631
899
|
var lists = services.filter(function (item) {
|
|
632
900
|
return appointmentTypes.includes(item.extension_type);
|
|
633
901
|
});
|
|
@@ -636,7 +904,7 @@ export var getAppointmentService = function getAppointmentService(state) {
|
|
|
636
904
|
|
|
637
905
|
/**
|
|
638
906
|
* @title: 判断是否打开删除宠物弹窗
|
|
639
|
-
* @description:
|
|
907
|
+
* @description:
|
|
640
908
|
* @param {any} state
|
|
641
909
|
* @param {any} newVal
|
|
642
910
|
* @return {*}
|
|
@@ -658,9 +926,9 @@ export var isOpenDeletePet = function isOpenDeletePet(state, newVal) {
|
|
|
658
926
|
|
|
659
927
|
// 被删除的表单中是否有预约商品
|
|
660
928
|
var servicePets = deletePets.map(function (item) {
|
|
661
|
-
var _state$
|
|
929
|
+
var _state$service5;
|
|
662
930
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
663
|
-
services: (_state$
|
|
931
|
+
services: (_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.value) === null || _state$service5 === void 0 ? void 0 : _state$service5.filter(function (d) {
|
|
664
932
|
var _d$_extend;
|
|
665
933
|
return ((_d$_extend = d._extend) === null || _d$_extend === void 0 ? void 0 : _d$_extend.holder_id) == item.form_record_id;
|
|
666
934
|
})
|
|
@@ -682,7 +950,7 @@ export var isOpenDeletePet = function isOpenDeletePet(state, newVal) {
|
|
|
682
950
|
|
|
683
951
|
/**
|
|
684
952
|
* @title: 当前选中的表单id
|
|
685
|
-
* @description:
|
|
953
|
+
* @description:
|
|
686
954
|
* @param {any} state
|
|
687
955
|
* @return {*}
|
|
688
956
|
* @Author: WangHan
|
|
@@ -695,7 +963,7 @@ export var holderId = function holderId(state) {
|
|
|
695
963
|
|
|
696
964
|
/**
|
|
697
965
|
* @title: 计算总价
|
|
698
|
-
* @description:
|
|
966
|
+
* @description:
|
|
699
967
|
* @param {any} data
|
|
700
968
|
* @return {*}
|
|
701
969
|
* @Author: WangHan
|
|
@@ -710,7 +978,7 @@ function calculateTotalPrice(data) {
|
|
|
710
978
|
|
|
711
979
|
/**
|
|
712
980
|
* @title: 更新单规格价格
|
|
713
|
-
* @description:
|
|
981
|
+
* @description:
|
|
714
982
|
* @param {any} currentValue
|
|
715
983
|
* @param {any} single
|
|
716
984
|
* @return {*}
|
|
@@ -738,17 +1006,17 @@ function updateSinglePrice(currentValue, single) {
|
|
|
738
1006
|
|
|
739
1007
|
/**
|
|
740
1008
|
* @title: 更新套餐价格
|
|
741
|
-
* @description:
|
|
1009
|
+
* @description:
|
|
742
1010
|
* @param {any} currentValue
|
|
743
1011
|
* @param {any} param2
|
|
744
1012
|
* @return {*}
|
|
745
1013
|
* @Author: WangHan
|
|
746
1014
|
* @Date: 2024-12-31 15:17
|
|
747
1015
|
*/
|
|
748
|
-
function updateBundlePrice(currentValue,
|
|
749
|
-
var
|
|
750
|
-
bundle =
|
|
751
|
-
single =
|
|
1016
|
+
function updateBundlePrice(currentValue, _ref12) {
|
|
1017
|
+
var _ref13 = _slicedToArray(_ref12, 2),
|
|
1018
|
+
bundle = _ref13[0],
|
|
1019
|
+
single = _ref13[1];
|
|
752
1020
|
var _bundle = [];
|
|
753
1021
|
var _loop2 = function _loop2() {
|
|
754
1022
|
var item = currentValue[index];
|
|
@@ -785,7 +1053,7 @@ function updateBundlePrice(currentValue, _ref2) {
|
|
|
785
1053
|
|
|
786
1054
|
/**
|
|
787
1055
|
* @title: 平铺套餐数据
|
|
788
|
-
* @description:
|
|
1056
|
+
* @description:
|
|
789
1057
|
* @param {any} newPackageData
|
|
790
1058
|
* @return {*}
|
|
791
1059
|
* @Author: WangHan
|
|
@@ -860,7 +1128,7 @@ function flatData(newPackageData) {
|
|
|
860
1128
|
|
|
861
1129
|
/**
|
|
862
1130
|
* @title: 更新套餐的价格
|
|
863
|
-
* @description:
|
|
1131
|
+
* @description:
|
|
864
1132
|
* @param {any} currentValue
|
|
865
1133
|
* @param {any} newBundleData
|
|
866
1134
|
* @return {*}
|
|
@@ -876,7 +1144,7 @@ export function updateNormalBundlePrice(currentValue, newBundleData) {
|
|
|
876
1144
|
|
|
877
1145
|
/**
|
|
878
1146
|
* @title: 更新普通商品价格
|
|
879
|
-
* @description:
|
|
1147
|
+
* @description:
|
|
880
1148
|
* @param {any} ids
|
|
881
1149
|
* @param {any} state
|
|
882
1150
|
* @return {*}
|
|
@@ -884,13 +1152,13 @@ export function updateNormalBundlePrice(currentValue, newBundleData) {
|
|
|
884
1152
|
* @Date: 2024-12-31 15:15
|
|
885
1153
|
*/
|
|
886
1154
|
var normalServicePrice = /*#__PURE__*/function () {
|
|
887
|
-
var
|
|
888
|
-
var _state$
|
|
1155
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ids, state) {
|
|
1156
|
+
var _state$service6, _state$client, _data$list;
|
|
889
1157
|
var services, customerId, data, _lists;
|
|
890
1158
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
891
1159
|
while (1) switch (_context.prev = _context.next) {
|
|
892
1160
|
case 0:
|
|
893
|
-
services = ((_state$
|
|
1161
|
+
services = ((_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : _state$service6.value) || [];
|
|
894
1162
|
customerId = (state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || 0;
|
|
895
1163
|
_context.next = 4;
|
|
896
1164
|
return state.apis.getServices({
|
|
@@ -959,13 +1227,13 @@ var normalServicePrice = /*#__PURE__*/function () {
|
|
|
959
1227
|
}, _callee);
|
|
960
1228
|
}));
|
|
961
1229
|
return function normalServicePrice(_x, _x2) {
|
|
962
|
-
return
|
|
1230
|
+
return _ref14.apply(this, arguments);
|
|
963
1231
|
};
|
|
964
1232
|
}();
|
|
965
1233
|
|
|
966
1234
|
/**
|
|
967
1235
|
* @title: 更新预约商品报价单
|
|
968
|
-
* @description:
|
|
1236
|
+
* @description:
|
|
969
1237
|
* @param {any} state
|
|
970
1238
|
* @param {any} cacheItem
|
|
971
1239
|
* @return {*}
|
|
@@ -973,16 +1241,16 @@ var normalServicePrice = /*#__PURE__*/function () {
|
|
|
973
1241
|
* @Date: 2024-12-25 16:41
|
|
974
1242
|
*/
|
|
975
1243
|
export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
976
|
-
var
|
|
977
|
-
var _state$
|
|
1244
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(state, _ref15) {
|
|
1245
|
+
var _state$service7;
|
|
978
1246
|
var start_date, end_date, product_id, defaultReturn, _state$client2, _state$service$cacheI, _res$data, _res$data2, format, customer_id, _product_id, multi_day_price, startDate, endDate, params, res, _prices;
|
|
979
1247
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
980
1248
|
while (1) switch (_context2.prev = _context2.next) {
|
|
981
1249
|
case 0:
|
|
982
|
-
start_date =
|
|
1250
|
+
start_date = _ref15.start_date, end_date = _ref15.end_date, product_id = _ref15.product_id;
|
|
983
1251
|
defaultReturn = {
|
|
984
1252
|
multiDayPrices: [],
|
|
985
|
-
price: Number(state === null || state === void 0 || (_state$
|
|
1253
|
+
price: Number(state === null || state === void 0 || (_state$service7 = state.service) === null || _state$service7 === void 0 || (_state$service7 = _state$service7.cacheItem) === null || _state$service7 === void 0 || (_state$service7 = _state$service7._extend) === null || _state$service7 === void 0 ? void 0 : _state$service7.price) || 0
|
|
986
1254
|
};
|
|
987
1255
|
_context2.prev = 2;
|
|
988
1256
|
format = 'YYYY-MM-DD';
|
|
@@ -1042,21 +1310,21 @@ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
|
1042
1310
|
}, _callee2, null, [[2, 21]]);
|
|
1043
1311
|
}));
|
|
1044
1312
|
return function updateAppointmentServicePrice(_x3, _x4) {
|
|
1045
|
-
return
|
|
1313
|
+
return _ref16.apply(this, arguments);
|
|
1046
1314
|
};
|
|
1047
1315
|
}();
|
|
1048
1316
|
|
|
1049
1317
|
/**
|
|
1050
1318
|
* @title: 更新普通商品报价单价格
|
|
1051
|
-
* @description:
|
|
1319
|
+
* @description:
|
|
1052
1320
|
* @param {any} state
|
|
1053
1321
|
* @return {*}
|
|
1054
1322
|
* @Author: WangHan
|
|
1055
1323
|
* @Date: 2024-12-24 11:32
|
|
1056
1324
|
*/
|
|
1057
1325
|
export var updateServicePrice = function updateServicePrice(state) {
|
|
1058
|
-
var _state$
|
|
1059
|
-
var services = ((_state$
|
|
1326
|
+
var _state$service8, _newNormalIds;
|
|
1327
|
+
var services = ((_state$service8 = state.service) === null || _state$service8 === void 0 ? void 0 : _state$service8.value) || [];
|
|
1060
1328
|
|
|
1061
1329
|
// 普通商品
|
|
1062
1330
|
var normalServices = services === null || services === void 0 ? void 0 : services.filter(function (item) {
|