@pisell/private-materials 3.3.74 → 3.3.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.js +2 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Date/index.js +14 -24
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.js +3 -3
- package/es/components/booking/addons/index.js +3 -12
- package/es/components/booking/addons/model.js +0 -5
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
- package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- 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/amount.js +1 -2
- package/es/components/booking/components/footer/index.js +3 -9
- package/es/components/booking/components/footer/utils.js +35 -73
- package/es/components/booking/components/voucher/index.js +66 -110
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +1 -16
- package/es/components/booking/info/client/index.js +3 -12
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +1 -3
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -6
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +4 -9
- package/es/components/booking/info2/serve.d.ts +1 -1
- package/es/components/booking/info2/serve.js +8 -12
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +3 -5
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +2 -5
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/utils.d.ts +1 -1
- package/es/components/booking/info2/utils.js +2 -3
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/es/components/booking/info2/utilsByBooking.js +3 -5
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +3 -6
- 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/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.d.ts +1 -0
- package/es/components/booking/utils.d.ts +0 -1
- package/es/components/booking/utils.js +0 -4
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- 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/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- 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 +2 -2
- package/es/components/eftposPay/tip.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/ErrorTip/index.d.ts +0 -1
- 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/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/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/components/scheduleCalendar/calendarItem.d.ts +0 -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/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- 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/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/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/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/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/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/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/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +6 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/ticketBooking/utils/index.d.ts +1 -5
- package/es/components/ticketBooking/utils/index.js +6 -58
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Date/index.js +5 -12
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.js +3 -3
- package/lib/components/booking/addons/index.js +2 -12
- package/lib/components/booking/addons/model.js +0 -3
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
- package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- 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/amount.js +1 -2
- package/lib/components/booking/components/footer/index.js +5 -10
- package/lib/components/booking/components/footer/utils.js +11 -47
- package/lib/components/booking/components/voucher/index.js +67 -111
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -19
- package/lib/components/booking/info/client/index.js +3 -10
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +0 -2
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +1 -3
- package/lib/components/booking/info/utils.js +3 -1
- package/lib/components/booking/info2/index.js +9 -9
- package/lib/components/booking/info2/serve.d.ts +1 -1
- package/lib/components/booking/info2/serve.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +2 -4
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +2 -5
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/utils.d.ts +1 -1
- package/lib/components/booking/info2/utils.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/lib/components/booking/info2/utilsByBooking.js +2 -3
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +3 -6
- 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/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.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +0 -1
- package/lib/components/booking/utils.js +0 -6
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- 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/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- 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 +2 -2
- package/lib/components/eftposPay/tip.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/ErrorTip/index.d.ts +0 -1
- 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/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/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/components/scheduleCalendar/calendarItem.d.ts +0 -1
- 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/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- 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/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/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/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/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/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/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/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -8
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/ticketBooking/utils/index.d.ts +1 -5
- package/lib/components/ticketBooking/utils/index.js +5 -48
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/package.json +4 -4
- package/es/components/booking/components/voucher/utils.d.ts +0 -4
- package/es/components/booking/components/voucher/utils.js +0 -15
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/lib/components/booking/components/voucher/utils.d.ts +0 -4
- package/lib/components/booking/components/voucher/utils.js +0 -43
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
|
@@ -42,7 +42,6 @@ var import_materials = require("@pisell/materials");
|
|
|
42
42
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var import_ahooks = require("ahooks");
|
|
45
|
-
var import_utils2 = require("./utils");
|
|
46
45
|
var ShopDiscountHooks = {
|
|
47
46
|
onInited: "shopDiscount:onInited",
|
|
48
47
|
onDestroy: "shopDiscount:onDestroy",
|
|
@@ -55,33 +54,37 @@ var ShopDiscountHooks = {
|
|
|
55
54
|
};
|
|
56
55
|
var services = {};
|
|
57
56
|
var VoucherCard = (props) => {
|
|
58
|
-
var _a, _b
|
|
57
|
+
var _a, _b;
|
|
59
58
|
const context = (0, import_useEngineContext.default)();
|
|
60
|
-
const { state, dispatch
|
|
59
|
+
const { state, dispatch } = props;
|
|
61
60
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
62
61
|
const { pisellos } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
63
62
|
const [code, setCode] = (0, import_react.useState)("");
|
|
64
63
|
const [discountList, setDisCountList] = (0, import_react.useState)([]);
|
|
65
|
-
const
|
|
66
|
-
const addonsValueRef = (0, import_react.useRef)(state.addons.value);
|
|
64
|
+
const productRef = (0, import_react.useRef)(state.service.value);
|
|
67
65
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
68
66
|
const shopDiscount = pisellos.getModule("shopDiscount");
|
|
69
67
|
services = state.service;
|
|
70
|
-
(0,
|
|
68
|
+
const availableData = (0, import_react.useMemo)(() => {
|
|
69
|
+
if (!isBooking4Shop) return [];
|
|
70
|
+
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
71
|
+
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
72
|
+
return {
|
|
73
|
+
...discount,
|
|
74
|
+
savedAmount: shopDiscount2.calcDiscountApplicableProductTotalPrice(discount)
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}, [discountList, isBooking4Shop]);
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
71
79
|
if (isBooking4Shop) {
|
|
72
80
|
shopDiscount.setCustomer(state.client.value);
|
|
73
81
|
}
|
|
74
|
-
}, [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop]
|
|
75
|
-
wait: 200
|
|
76
|
-
});
|
|
82
|
+
}, [(_b = state.client.value) == null ? void 0 : _b.id, isBooking4Shop]);
|
|
77
83
|
(0, import_react.useEffect)(() => {
|
|
78
84
|
if (isBooking4Shop) {
|
|
79
|
-
shopDiscount.setProductList(
|
|
80
|
-
...state.service.value,
|
|
81
|
-
...state.addons.value
|
|
82
|
-
]);
|
|
85
|
+
shopDiscount.setProductList(state.service.value);
|
|
83
86
|
}
|
|
84
|
-
}, [state.service.value,
|
|
87
|
+
}, [state.service.value, isBooking4Shop]);
|
|
85
88
|
const serviceMemo = (0, import_react.useMemo)(() => {
|
|
86
89
|
var _a2;
|
|
87
90
|
const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
|
|
@@ -89,6 +92,7 @@ var VoucherCard = (props) => {
|
|
|
89
92
|
return {
|
|
90
93
|
booking_id: value.booking_id,
|
|
91
94
|
id: value.id,
|
|
95
|
+
_id: value._id,
|
|
92
96
|
price: value.price,
|
|
93
97
|
total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
|
|
94
98
|
discount_list: value.discount_list,
|
|
@@ -97,141 +101,89 @@ var VoucherCard = (props) => {
|
|
|
97
101
|
});
|
|
98
102
|
return val;
|
|
99
103
|
}, [state.service.value]);
|
|
100
|
-
const addonsMemo = (0, import_react.useMemo)(() => {
|
|
101
|
-
var _a2;
|
|
102
|
-
const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
|
|
103
|
-
var _a3, _b2;
|
|
104
|
-
return {
|
|
105
|
-
booking_id: value.booking_id,
|
|
106
|
-
id: value.id,
|
|
107
|
-
_id: value._id,
|
|
108
|
-
price: value.price,
|
|
109
|
-
total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
|
|
110
|
-
discount_list: value.discount_list,
|
|
111
|
-
_key: value._key,
|
|
112
|
-
num: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.quantity
|
|
113
|
-
};
|
|
114
|
-
});
|
|
115
|
-
return val;
|
|
116
|
-
}, [state.addons.value]);
|
|
117
|
-
const disabled = (0, import_react.useMemo)(() => {
|
|
118
|
-
var _a2;
|
|
119
|
-
if (["paid", "partially_paid"].includes((_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status) && [...addonsMemo, ...serviceMemo].every((item) => item.booking_id)) {
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
return false;
|
|
123
|
-
}, [state, addonsMemo, serviceMemo]);
|
|
124
104
|
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
125
105
|
() => {
|
|
126
106
|
var _a2, _b2;
|
|
127
|
-
if (
|
|
107
|
+
if (productRef.current === state.service.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
|
|
128
108
|
return;
|
|
129
109
|
}
|
|
130
110
|
if (isBooking4Shop) {
|
|
131
|
-
const val = shopDiscount.calcDiscount(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
111
|
+
const val = shopDiscount.calcDiscount(state.service.value);
|
|
112
|
+
productRef.current = val.productList;
|
|
113
|
+
dispatch({
|
|
114
|
+
type: "setService",
|
|
115
|
+
payload: {
|
|
116
|
+
...services,
|
|
117
|
+
value: ((val == null ? void 0 : val.productList) || []).filter(Boolean)
|
|
118
|
+
}
|
|
119
|
+
});
|
|
138
120
|
}
|
|
139
121
|
},
|
|
140
122
|
{ wait: 500 }
|
|
141
123
|
);
|
|
142
124
|
(0, import_react.useEffect)(() => {
|
|
143
125
|
run();
|
|
144
|
-
}, [JSON.stringify(serviceMemo),
|
|
126
|
+
}, [JSON.stringify(serviceMemo), isBooking4Shop]);
|
|
145
127
|
const fn = (0, import_ahooks.useMemoizedFn)((result) => {
|
|
146
128
|
var _a2;
|
|
147
129
|
if (!(result == null ? void 0 : result.productList) || ((_a2 = result == null ? void 0 : result.productList) == null ? void 0 : _a2.some((item) => !item))) {
|
|
148
130
|
return;
|
|
149
131
|
}
|
|
150
|
-
|
|
132
|
+
dispatch({
|
|
133
|
+
type: "setService",
|
|
134
|
+
payload: {
|
|
135
|
+
...services,
|
|
136
|
+
value: result.productList
|
|
137
|
+
}
|
|
138
|
+
});
|
|
151
139
|
});
|
|
152
140
|
(0, import_react.useEffect)(() => {
|
|
153
141
|
if (!isBooking4Shop) return;
|
|
154
|
-
const onScanCustomerChange = (customer) => {
|
|
155
|
-
dispatch({
|
|
156
|
-
type: "setClient",
|
|
157
|
-
payload: {
|
|
158
|
-
value: customer
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
const onDiscountListChange = (discount) => {
|
|
163
|
-
setDisCountList(discount);
|
|
164
|
-
};
|
|
165
142
|
pisellos.effects.on(
|
|
166
143
|
ShopDiscountHooks.onScanCustomerChange,
|
|
167
|
-
|
|
144
|
+
(customer) => {
|
|
145
|
+
dispatch({
|
|
146
|
+
type: "setClient",
|
|
147
|
+
payload: {
|
|
148
|
+
value: customer
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
168
152
|
);
|
|
169
153
|
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
|
|
170
154
|
pisellos.effects.on(
|
|
171
155
|
ShopDiscountHooks.onDiscountListChange,
|
|
172
|
-
|
|
156
|
+
(discount) => {
|
|
157
|
+
setDisCountList(discount);
|
|
158
|
+
}
|
|
173
159
|
);
|
|
174
160
|
return () => {
|
|
175
161
|
shopDiscount.clear();
|
|
176
|
-
pisellos.effects.off(ShopDiscountHooks.onCustomerChange
|
|
177
|
-
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult
|
|
178
|
-
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange
|
|
162
|
+
pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
|
|
163
|
+
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
|
|
164
|
+
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
|
|
179
165
|
};
|
|
180
166
|
}, [state.bookingId, isBooking4Shop, fn]);
|
|
181
|
-
const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
|
|
182
|
-
const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
|
|
183
|
-
serviceValueRef.current = serviceList;
|
|
184
|
-
addonsValueRef.current = addonsList;
|
|
185
|
-
let other = {};
|
|
186
|
-
if (edit) {
|
|
187
|
-
other = {
|
|
188
|
-
edit: true
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
dispatch({
|
|
192
|
-
type: "setService",
|
|
193
|
-
payload: {
|
|
194
|
-
value: serviceList,
|
|
195
|
-
...other
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
dispatch({
|
|
199
|
-
type: "setAddons",
|
|
200
|
-
payload: {
|
|
201
|
-
value: addonsList,
|
|
202
|
-
...other
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
167
|
const onScanCode = async () => {
|
|
207
168
|
const val = await shopDiscount.scanCode(code);
|
|
208
169
|
console.log(val);
|
|
209
170
|
if (val == null ? void 0 : val.isAvailable) {
|
|
210
|
-
|
|
171
|
+
productRef.current = val.productList;
|
|
172
|
+
dispatch({
|
|
173
|
+
type: "setService",
|
|
174
|
+
payload: {
|
|
175
|
+
value: val.productList,
|
|
176
|
+
edit: true
|
|
177
|
+
}
|
|
178
|
+
});
|
|
211
179
|
setCode("");
|
|
212
180
|
} else {
|
|
213
181
|
(0, import_materials.PisellToast)({
|
|
214
|
-
content:
|
|
182
|
+
content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
|
|
215
183
|
});
|
|
216
184
|
}
|
|
217
185
|
};
|
|
218
|
-
const availableData = (0, import_react.useMemo)(() => {
|
|
219
|
-
if (!isBooking4Shop) return [];
|
|
220
|
-
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
221
|
-
return discountList.filter((item) => !!item.isAvailable).map((discount) => {
|
|
222
|
-
return {
|
|
223
|
-
...discount,
|
|
224
|
-
isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
|
|
225
|
-
savedAmount: shopDiscount2.calcDiscountApplicableProductTotalPrice(discount)
|
|
226
|
-
};
|
|
227
|
-
});
|
|
228
|
-
}, [discountList, isBooking4Shop, disabled]);
|
|
229
186
|
if (!isBooking4Shop) return null;
|
|
230
|
-
const mixedSort = (val) => {
|
|
231
|
-
return [...val].sort((a, b) => {
|
|
232
|
-
return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
|
|
233
|
-
});
|
|
234
|
-
};
|
|
235
187
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-voucher-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
|
|
236
188
|
"span",
|
|
237
189
|
{
|
|
@@ -262,8 +214,7 @@ var VoucherCard = (props) => {
|
|
|
262
214
|
import_materials.PisellGoodPassCard,
|
|
263
215
|
{
|
|
264
216
|
style: { width: "100%" },
|
|
265
|
-
dataSource:
|
|
266
|
-
mixedSort,
|
|
217
|
+
dataSource: availableData,
|
|
267
218
|
onChange: (val) => {
|
|
268
219
|
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
269
220
|
const detail = shopDiscount2.setDiscountSelected({
|
|
@@ -271,7 +222,13 @@ var VoucherCard = (props) => {
|
|
|
271
222
|
isSelected: val.isSelected
|
|
272
223
|
});
|
|
273
224
|
console.log("setDiscountSelected:", detail);
|
|
274
|
-
|
|
225
|
+
dispatch({
|
|
226
|
+
type: "setService",
|
|
227
|
+
payload: {
|
|
228
|
+
edit: true,
|
|
229
|
+
value: detail.productList
|
|
230
|
+
}
|
|
231
|
+
});
|
|
275
232
|
}
|
|
276
233
|
}
|
|
277
234
|
) : null,
|
|
@@ -284,7 +241,6 @@ var VoucherCard = (props) => {
|
|
|
284
241
|
setCode((_a2 = e.target) == null ? void 0 : _a2.value);
|
|
285
242
|
},
|
|
286
243
|
size: "small",
|
|
287
|
-
allowClear: true,
|
|
288
244
|
placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
|
|
289
245
|
}
|
|
290
246
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
|
@@ -29,7 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/booking/hooks/useQuotation.tsx
|
|
30
30
|
var useQuotation_exports = {};
|
|
31
31
|
__export(useQuotation_exports, {
|
|
32
|
-
calculateTotalPrice: () => calculateTotalPrice,
|
|
33
32
|
default: () => useQuotation_default
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(useQuotation_exports);
|
|
@@ -39,7 +38,6 @@ var import_useEngineContext = __toESM(require("../../../../es/hooks/useEngineCon
|
|
|
39
38
|
var import_utils2 = require("@pisell/utils");
|
|
40
39
|
var import_materials = require("@pisell/materials");
|
|
41
40
|
var import_serve = require("../info/service/serve");
|
|
42
|
-
var import_decimal = __toESM(require("decimal.js"));
|
|
43
41
|
var formatBundleItemMap = (product) => {
|
|
44
42
|
return product.bundle_group.reduce((pre, cur) => {
|
|
45
43
|
const curObj = {};
|
|
@@ -52,13 +50,6 @@ var formatBundleItemMap = (product) => {
|
|
|
52
50
|
};
|
|
53
51
|
}, {});
|
|
54
52
|
};
|
|
55
|
-
var calculateTotalPrice = (data) => {
|
|
56
|
-
const _price = data.reduce((total, item) => {
|
|
57
|
-
const _price2 = (item == null ? void 0 : item.price) || (item == null ? void 0 : item.add_price);
|
|
58
|
-
return total + _price2 * item.num;
|
|
59
|
-
}, 0);
|
|
60
|
-
return parseFloat(_price);
|
|
61
|
-
};
|
|
62
53
|
var setNewCartValue = (cartValue, newProducts) => {
|
|
63
54
|
if (!newProducts.length) {
|
|
64
55
|
return {
|
|
@@ -90,15 +81,10 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
90
81
|
isChangePrice = true;
|
|
91
82
|
isBundleChange = true;
|
|
92
83
|
}
|
|
93
|
-
if (bundleItemMap[bundle.id].price_type === "markdown") {
|
|
94
|
-
bundleItemMap[bundle.id].price = new import_decimal.default(bundleItemMap[bundle.id].price || 0).mul(-1).toNumber();
|
|
95
|
-
}
|
|
96
|
-
const selectBundleInfo = item._extend.other.bundle.find((item2) => item2.id === bundle.id);
|
|
97
|
-
const optionPrice = calculateTotalPrice((selectBundleInfo == null ? void 0 : selectBundleInfo.option) || []);
|
|
98
84
|
return {
|
|
99
85
|
...bundle,
|
|
100
86
|
base_price: bundleItemMap[bundle.id].base_price,
|
|
101
|
-
price:
|
|
87
|
+
price: bundleItemMap[bundle.id].price
|
|
102
88
|
// product_price: bundleItemMap[item.id].product_price,
|
|
103
89
|
};
|
|
104
90
|
});
|
|
@@ -208,7 +194,3 @@ var useQuotation = (state, dispatch) => {
|
|
|
208
194
|
};
|
|
209
195
|
};
|
|
210
196
|
var useQuotation_default = useQuotation;
|
|
211
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
212
|
-
0 && (module.exports = {
|
|
213
|
-
calculateTotalPrice
|
|
214
|
-
});
|
|
@@ -45,7 +45,6 @@ var import_utils2 = require("../../utils");
|
|
|
45
45
|
var import_serve = require("./serve");
|
|
46
46
|
var import_ahooks = require("ahooks");
|
|
47
47
|
var import_utils3 = require("../clientVariant/utils");
|
|
48
|
-
var import_useGetHolderList = __toESM(require("../hooks/useGetHolderList"));
|
|
49
48
|
var isLoadClient = false;
|
|
50
49
|
var Client = () => {
|
|
51
50
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
@@ -54,7 +53,6 @@ var Client = () => {
|
|
|
54
53
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
55
54
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
56
55
|
const [franchiseeLoading, setFranchiseeLoading] = (0, import_react.useState)(0);
|
|
57
|
-
const getHolders = (0, import_useGetHolderList.default)(state, dispatch);
|
|
58
56
|
const [params, setParams] = (0, import_react.useState)({
|
|
59
57
|
skip: 1,
|
|
60
58
|
num: 10,
|
|
@@ -204,7 +202,6 @@ var Client = () => {
|
|
|
204
202
|
if (data) {
|
|
205
203
|
handleSelectClient([data]);
|
|
206
204
|
}
|
|
207
|
-
getHolders();
|
|
208
205
|
getClients({
|
|
209
206
|
...state.client.clientsParams,
|
|
210
207
|
search: "",
|
|
@@ -223,17 +220,13 @@ var Client = () => {
|
|
|
223
220
|
showAcceptsMarketing: false
|
|
224
221
|
},
|
|
225
222
|
callback: (customer_id, params2) => {
|
|
226
|
-
var _a2, _b2, _c2
|
|
227
|
-
const waiverForm = ((_d2 = (_c2 = (_b2 = (_a2 = state.client) == null ? void 0 : _a2.clients) == null ? void 0 : _b2[0].waiver_form) == null ? void 0 : _c2.map) == null ? void 0 : _d2.call(_c2, (item) => ({
|
|
228
|
-
...item,
|
|
229
|
-
is_filled: 0
|
|
230
|
-
}))) || [];
|
|
223
|
+
var _a2, _b2, _c2;
|
|
231
224
|
dispatch({
|
|
232
225
|
type: "setClient",
|
|
233
226
|
payload: {
|
|
234
227
|
clients: [
|
|
235
|
-
...((
|
|
236
|
-
...((
|
|
228
|
+
...((_a2 = params2 == null ? void 0 : params2[0]) == null ? void 0 : _a2.customer) ? [{ ...(_b2 = params2 == null ? void 0 : params2[0]) == null ? void 0 : _b2.customer, id: customer_id }] : [],
|
|
229
|
+
...((_c2 = state.client) == null ? void 0 : _c2.clients) || []
|
|
237
230
|
]
|
|
238
231
|
}
|
|
239
232
|
});
|
|
@@ -87,7 +87,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
87
87
|
isShowChangeHolder,
|
|
88
88
|
isShowChangeResource: true,
|
|
89
89
|
isShowAddHolderButton: true,
|
|
90
|
-
isShowEditProduct:
|
|
90
|
+
isShowEditProduct: true
|
|
91
91
|
};
|
|
92
92
|
}, [
|
|
93
93
|
state == null ? void 0 : state.bookingId,
|
|
@@ -229,7 +229,6 @@ var Info = (props) => {
|
|
|
229
229
|
(item, type) => {
|
|
230
230
|
const isSession = (0, import_utils2.isSessionProduct)(item);
|
|
231
231
|
let isEject = (0, import_utils2.getIsEject)(item, type);
|
|
232
|
-
const isOnlySession = (0, import_utils2.getIsOnlySession)(item);
|
|
233
232
|
if (isDay) {
|
|
234
233
|
isEject = type === "detail" || item.bundle_group_count > 0 || item.option_group_count > 0 || item.is_variant > 0;
|
|
235
234
|
}
|
|
@@ -245,7 +244,6 @@ var Info = (props) => {
|
|
|
245
244
|
package: true
|
|
246
245
|
},
|
|
247
246
|
is_eject: isEject ? 1 : 0,
|
|
248
|
-
isOnlySession,
|
|
249
247
|
customer_id: customerId,
|
|
250
248
|
isOS: isSession
|
|
251
249
|
},
|
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
244
244
|
* @Author: WangHan
|
|
245
245
|
* @Date: 2024-12-24 11:32
|
|
246
246
|
*/
|
|
247
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -178,7 +178,7 @@ var handleChangeHolder = (products, currentItem, other) => {
|
|
|
178
178
|
...item,
|
|
179
179
|
_extend: {
|
|
180
180
|
...item._extend,
|
|
181
|
-
holder_id:
|
|
181
|
+
holder_id: other.id
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
}
|
|
@@ -514,8 +514,6 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
514
514
|
actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
|
515
515
|
isMultipleResource: true,
|
|
516
516
|
multiResources,
|
|
517
|
-
holderMaxCount: item == null ? void 0 : item._extend.quantity,
|
|
518
|
-
holderMode: (item == null ? void 0 : item._extend.quantity) > 1 ? "multiple" : void 0,
|
|
519
517
|
isErrorHolder: getIsSubjectRequire(state),
|
|
520
518
|
addHolderButtonText: ((_c = (_b = formData == null ? void 0 : formData[0]) == null ? void 0 : _b.form) == null ? void 0 : _c.title) || "",
|
|
521
519
|
holder_id: (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.holder_id,
|
|
@@ -56,7 +56,6 @@ var import_antd = require("antd");
|
|
|
56
56
|
var import_classnames = __toESM(require("classnames"));
|
|
57
57
|
var import_useCreateBookingPageHeader = __toESM(require("../hooks/useCreateBookingPageHeader"));
|
|
58
58
|
var import_locales2 = require("../../../utils/locales");
|
|
59
|
-
var import_ahooks = require("ahooks");
|
|
60
59
|
var defaultModules = {
|
|
61
60
|
client: 1,
|
|
62
61
|
date: 1,
|
|
@@ -165,10 +164,13 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
165
164
|
}
|
|
166
165
|
try {
|
|
167
166
|
setTimeout(async () => {
|
|
168
|
-
var _a2
|
|
169
|
-
let data = await (0, import_serve.getResourceList)(
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
var _a2;
|
|
168
|
+
let data = await (0, import_serve.getResourceList)(
|
|
169
|
+
{
|
|
170
|
+
date: currentDate
|
|
171
|
+
},
|
|
172
|
+
(_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.bookingId
|
|
173
|
+
);
|
|
172
174
|
data.date = currentDate;
|
|
173
175
|
localStorage.setItem("bookingResourceList", JSON.stringify(data));
|
|
174
176
|
modal.dispatch({
|
|
@@ -184,13 +186,11 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
184
186
|
console.log(err, "err");
|
|
185
187
|
}
|
|
186
188
|
};
|
|
187
|
-
(0,
|
|
189
|
+
(0, import_react.useEffect)(() => {
|
|
188
190
|
if (currentDate) {
|
|
189
191
|
getResourcesData();
|
|
190
192
|
}
|
|
191
|
-
}, [currentDate]
|
|
192
|
-
wait: 300
|
|
193
|
-
});
|
|
193
|
+
}, [currentDate]);
|
|
194
194
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
|
|
195
195
|
import_tabPane.default,
|
|
196
196
|
{
|
|
@@ -26,7 +26,7 @@ __export(serve_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(serve_exports);
|
|
27
27
|
var import_utils = require("../utils");
|
|
28
28
|
var import_utils2 = require("./utils");
|
|
29
|
-
var getResourceList = async (params, bookingId
|
|
29
|
+
var getResourceList = async (params, bookingId) => {
|
|
30
30
|
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/resource/list`, params);
|
|
31
31
|
return (0, import_utils2.getFormatResourceListAndMap)(data, bookingId);
|
|
32
32
|
};
|
|
@@ -47,7 +47,7 @@ var import_utils2 = require("./utils");
|
|
|
47
47
|
var import_utils3 = require("../../../utils");
|
|
48
48
|
var import_utils4 = require("@pisell/utils");
|
|
49
49
|
var import_ahooks = require("ahooks");
|
|
50
|
-
var import_utils5 = require("
|
|
50
|
+
var import_utils5 = require("../../../info/service2/utils");
|
|
51
51
|
var shopList = [
|
|
52
52
|
2886,
|
|
53
53
|
4422,
|
|
@@ -190,7 +190,6 @@ var Info = (props) => {
|
|
|
190
190
|
var _a2, _b2;
|
|
191
191
|
const isSession = (0, import_utils3.isSessionProduct)(item);
|
|
192
192
|
const isEject = (0, import_utils3.getIsEject)(item, type);
|
|
193
|
-
const isOnlySession = (0, import_utils3.getIsOnlySession)(item);
|
|
194
193
|
let lock = false;
|
|
195
194
|
state.action({
|
|
196
195
|
type: "pisell1.handleOpenProductModal",
|
|
@@ -202,10 +201,9 @@ var Info = (props) => {
|
|
|
202
201
|
session: isSession,
|
|
203
202
|
variant: true,
|
|
204
203
|
package: true,
|
|
205
|
-
number: (0, import_utils5.
|
|
204
|
+
number: (0, import_utils5.isNormalProductByDurationSchedule)(item)
|
|
206
205
|
},
|
|
207
206
|
is_eject: isEject ? 1 : 0,
|
|
208
|
-
isOnlySession,
|
|
209
207
|
isOS: isSession,
|
|
210
208
|
customer_id: (_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id
|
|
211
209
|
},
|
|
@@ -51,7 +51,6 @@ var import_utils4 = require("../addService/utils");
|
|
|
51
51
|
var import_materials = require("@pisell/materials");
|
|
52
52
|
var import_utils5 = require("../../../info/utils");
|
|
53
53
|
var import_utils6 = require("../../../info/service2/utils");
|
|
54
|
-
var import_utils7 = require("../../../../ticketBooking/utils");
|
|
55
54
|
var submitLock = false;
|
|
56
55
|
var Info = (_, ref) => {
|
|
57
56
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
@@ -192,11 +191,9 @@ var Info = (_, ref) => {
|
|
|
192
191
|
}
|
|
193
192
|
_item._extend = _extend;
|
|
194
193
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
195
|
-
_item._serviceKey = (0, import_utils7.genServiceKey)(_item);
|
|
196
194
|
let _id = _item == null ? void 0 : _item._id;
|
|
197
195
|
if (!_list.some((d) => d._id === _id)) {
|
|
198
|
-
|
|
199
|
-
_list = detail.list;
|
|
196
|
+
_list.push(_item);
|
|
200
197
|
} else {
|
|
201
198
|
if (isChangeTotal.current) {
|
|
202
199
|
delete _item.discount_list;
|
|
@@ -335,7 +332,7 @@ var Info = (_, ref) => {
|
|
|
335
332
|
session: isSession,
|
|
336
333
|
variant: true,
|
|
337
334
|
package: true,
|
|
338
|
-
number: (0,
|
|
335
|
+
number: (0, import_utils6.isNormalProductByDurationSchedule)(item)
|
|
339
336
|
},
|
|
340
337
|
isOS: isSession,
|
|
341
338
|
customer_id: (_e2 = (_d2 = state.client) == null ? void 0 : _d2.value) == null ? void 0 : _e2.id,
|