@pisell/private-materials 6.3.138 → 6.3.140
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 +2 -2
- package/build/lowcode/preview.js +153 -426
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +24 -5
- package/es/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- 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/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- 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/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.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/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- 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/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 +0 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- 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 +0 -1
- 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/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -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/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/scanOrder/components/Cart/index.d.ts +2 -0
- package/es/components/scanOrder/components/Cart/index.js +181 -76
- package/es/components/scanOrder/components/Cart/index.less +72 -13
- package/es/components/scanOrder/components/Check/index.js +261 -75
- package/es/components/scanOrder/components/Check/index.less +30 -0
- package/es/components/scanOrder/components/Content/index.js +382 -144
- package/es/components/scanOrder/components/Footer/index.d.ts +2 -0
- package/es/components/scanOrder/components/Footer/index.js +4 -2
- package/es/components/scanOrder/components/Footer/index.less +16 -7
- package/es/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
- package/es/components/scanOrder/components/FulfillmentMode/index.js +90 -0
- package/es/components/scanOrder/components/FulfillmentMode/index.less +40 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.js +87 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
- package/es/components/scanOrder/components/Menu/index.d.ts +11 -0
- package/es/components/scanOrder/components/Menu/index.js +140 -169
- package/es/components/scanOrder/components/Voucher/index.d.ts +8 -0
- package/es/components/scanOrder/components/Voucher/index.js +250 -0
- package/es/components/scanOrder/context.js +123 -3
- package/es/components/scanOrder/hooks.js +4 -1
- package/es/components/scanOrder/locales.d.ts +120 -0
- package/es/components/scanOrder/locales.js +120 -0
- package/es/components/scanOrder/types.d.ts +33 -0
- package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
- package/es/components/scanOrder/utils/toShoppingCartProducts.js +137 -9
- package/es/components/scanOrder/utils/transformProductDetail.js +21 -4
- 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/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +9 -1
- 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/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/systemSettings/registry/components/GroupModal.js +8 -1
- package/es/components/systemSettings/registry/components/ItemModal.js +3 -0
- package/es/components/systemSettings/registry/index.js +3 -1
- package/es/components/systemSettings/registry/services.d.ts +2 -0
- package/es/components/systemSettings/registry/types.d.ts +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/venueBooking/components/Addons/index.js +42 -33
- package/es/components/venueBooking/components/Cart/index.js +26 -14
- package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +129 -17
- package/es/components/venueBooking/context.js +6 -6
- package/es/components/venueBooking/hooks.d.ts +16 -3
- package/es/components/venueBooking/hooks.js +16 -4
- package/es/components/venueBooking/types.d.ts +19 -2
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/es/pro/Selector/demo.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +19 -4
- package/lib/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- 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/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.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/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- 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/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 +0 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- 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 +0 -1
- 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/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -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/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Cart/index.d.ts +2 -0
- package/lib/components/scanOrder/components/Cart/index.js +117 -28
- package/lib/components/scanOrder/components/Cart/index.less +72 -13
- package/lib/components/scanOrder/components/Check/index.js +109 -15
- package/lib/components/scanOrder/components/Check/index.less +30 -0
- package/lib/components/scanOrder/components/Content/index.js +175 -48
- package/lib/components/scanOrder/components/Footer/index.d.ts +2 -0
- package/lib/components/scanOrder/components/Footer/index.js +2 -2
- package/lib/components/scanOrder/components/Footer/index.less +16 -7
- package/lib/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
- package/lib/components/scanOrder/components/FulfillmentMode/index.js +96 -0
- package/lib/components/scanOrder/components/FulfillmentMode/index.less +40 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.js +116 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
- package/lib/components/scanOrder/components/Menu/index.d.ts +11 -0
- package/lib/components/scanOrder/components/Menu/index.js +23 -36
- package/lib/components/scanOrder/components/Voucher/index.d.ts +8 -0
- package/lib/components/scanOrder/components/Voucher/index.js +162 -0
- package/lib/components/scanOrder/context.js +91 -2
- package/lib/components/scanOrder/hooks.js +4 -1
- package/lib/components/scanOrder/locales.d.ts +120 -0
- package/lib/components/scanOrder/locales.js +120 -0
- package/lib/components/scanOrder/types.d.ts +33 -0
- package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
- package/lib/components/scanOrder/utils/toShoppingCartProducts.js +88 -6
- package/lib/components/scanOrder/utils/transformProductDetail.js +10 -3
- 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/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- 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/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/systemSettings/registry/components/GroupModal.js +71 -72
- package/lib/components/systemSettings/registry/components/ItemModal.js +2 -1
- package/lib/components/systemSettings/registry/index.js +3 -1
- package/lib/components/systemSettings/registry/services.d.ts +2 -0
- package/lib/components/systemSettings/registry/types.d.ts +3 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/venueBooking/components/Addons/index.js +15 -8
- package/lib/components/venueBooking/components/Cart/index.js +8 -2
- package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +118 -18
- package/lib/components/venueBooking/context.js +2 -1
- package/lib/components/venueBooking/hooks.d.ts +16 -3
- package/lib/components/venueBooking/hooks.js +8 -2
- package/lib/components/venueBooking/types.d.ts +19 -2
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -0
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lowcode/admin-auth-channel-auth/meta.ts +116 -0
- package/lowcode/admin-auth-online-shop-auth/meta.ts +81 -5
- package/package.json +1 -1
|
@@ -36,22 +36,28 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_Cart = __toESM(require("../Cart"));
|
|
39
|
+
var import_FulfillmentMode = __toESM(require("../FulfillmentMode"));
|
|
40
|
+
var import_ManualPickupRefModal = __toESM(require("../ManualPickupRefModal"));
|
|
39
41
|
var import_context = require("../../context");
|
|
40
42
|
var import_hooks = require("../../hooks");
|
|
41
43
|
var import_index = require("./index.less");
|
|
42
44
|
function Check() {
|
|
43
|
-
const { viewModel, runModuleAction, refreshViewModel } = (0, import_context.useScanOrderContext)();
|
|
45
|
+
const { viewModel, runModuleAction, refreshViewModel, tableName, entryMode, clearStepCache } = (0, import_context.useScanOrderContext)();
|
|
46
|
+
const isAdditionalOrder = entryMode === "additional_order";
|
|
44
47
|
const [submitting, setSubmitting] = (0, import_react.useState)(false);
|
|
45
48
|
const [note, setNote] = (0, import_react.useState)((viewModel == null ? void 0 : viewModel.note) || "");
|
|
49
|
+
const [pickupRefOpen, setPickupRefOpen] = (0, import_react.useState)(false);
|
|
46
50
|
const utils = (0, import_hooks.contextUtils)();
|
|
47
51
|
const [dineInConfig, setDineInConfig] = (0, import_react.useState)(null);
|
|
48
|
-
const getConfig = async () => {
|
|
52
|
+
const getConfig = (0, import_react.useCallback)(async () => {
|
|
49
53
|
const otherParams = await runModuleAction("getOtherParams");
|
|
50
54
|
console.log("otherParams >>>>> ", otherParams);
|
|
51
55
|
const dineInConfig2 = (otherParams == null ? void 0 : otherParams.dineInConfig) ?? {};
|
|
52
56
|
setDineInConfig(dineInConfig2);
|
|
53
|
-
};
|
|
54
|
-
|
|
57
|
+
}, [runModuleAction]);
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
getConfig();
|
|
60
|
+
}, []);
|
|
55
61
|
const isShowOrderNote = (0, import_react.useMemo)(() => {
|
|
56
62
|
return dineInConfig == null ? void 0 : dineInConfig["sale.allow_order_notes"];
|
|
57
63
|
}, [dineInConfig]);
|
|
@@ -65,28 +71,64 @@ function Check() {
|
|
|
65
71
|
import_utils.locales.getText("pisell2.text.add-order-notes") || import_utils.locales.getText("pisell2.scan.order.note.placeholder") || "请输入备注"
|
|
66
72
|
);
|
|
67
73
|
}, []);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
const currentTableText = (0, import_react.useMemo)(
|
|
75
|
+
() => String(
|
|
76
|
+
import_utils.locales.getText("pisell2.scan.order.current.table") || "Current table"
|
|
77
|
+
),
|
|
78
|
+
[]
|
|
79
|
+
);
|
|
80
|
+
const productsTitle = (0, import_react.useMemo)(
|
|
81
|
+
() => String(import_utils.locales.getText("pisell2.scan.order.products.title") || "Products"),
|
|
82
|
+
[]
|
|
83
|
+
);
|
|
84
|
+
const showCheckStepEmptyCartTip = () => {
|
|
85
|
+
import_antd.message.error(import_utils.locales.getText("pisell2.scan.order.check.cart.empty.tip") || "Please go back to add products");
|
|
86
|
+
};
|
|
87
|
+
const doSubmit = async () => {
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
89
|
+
const items = (viewModel == null ? void 0 : viewModel.cartItems) || [];
|
|
90
|
+
if (items.length === 0) {
|
|
91
|
+
showCheckStepEmptyCartTip();
|
|
92
|
+
setSubmitting(false);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
71
95
|
try {
|
|
72
96
|
setSubmitting(true);
|
|
73
97
|
await runModuleAction("updateTempOrderNote", note);
|
|
74
98
|
const res = await runModuleAction("submitScanOrder");
|
|
75
99
|
console.log("submitScanOrder >>>>> ", res);
|
|
76
|
-
|
|
100
|
+
clearStepCache();
|
|
101
|
+
if ((dineInConfig == null ? void 0 : dineInConfig["sale.require_payment_on_submit"]) && !isAdditionalOrder) {
|
|
102
|
+
try {
|
|
103
|
+
await runModuleAction("restoreOrder");
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.warn("[scanOrder] restoreOrder after payment failed", error);
|
|
106
|
+
}
|
|
77
107
|
utils.action({
|
|
78
108
|
type: "pisell1.payment",
|
|
79
109
|
data: {
|
|
80
110
|
order_id: (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.order_id,
|
|
81
|
-
total_amount: (_b = viewModel == null ? void 0 : viewModel.summary) == null ? void 0 :
|
|
111
|
+
total_amount: ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.order_wait_pay_amount) || ((_c = viewModel == null ? void 0 : viewModel.summary) == null ? void 0 : _c.total_amount)
|
|
82
112
|
},
|
|
83
|
-
callback: (
|
|
113
|
+
callback: async (_e2) => {
|
|
84
114
|
}
|
|
85
115
|
});
|
|
86
116
|
} else {
|
|
87
|
-
if ((
|
|
88
|
-
|
|
89
|
-
|
|
117
|
+
if ((_d = res == null ? void 0 : res.data) == null ? void 0 : _d.order_id) {
|
|
118
|
+
try {
|
|
119
|
+
await runModuleAction("restoreOrder");
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.warn("[scanOrder] restoreOrder before redirect failed", error);
|
|
122
|
+
}
|
|
123
|
+
const link = `/order/details?id=${(_e = res == null ? void 0 : res.data) == null ? void 0 : _e.order_id}`;
|
|
124
|
+
const app = (_f = utils == null ? void 0 : utils.getApp) == null ? void 0 : _f.call(utils);
|
|
125
|
+
if ((_g = app == null ? void 0 : app.history) == null ? void 0 : _g.replace) {
|
|
126
|
+
app.history.replace(link);
|
|
127
|
+
} else if ((_h = app == null ? void 0 : app.history) == null ? void 0 : _h.push) {
|
|
128
|
+
app.history.push(link);
|
|
129
|
+
} else {
|
|
130
|
+
location.replace(link);
|
|
131
|
+
}
|
|
90
132
|
}
|
|
91
133
|
}
|
|
92
134
|
await refreshViewModel();
|
|
@@ -97,6 +139,50 @@ function Check() {
|
|
|
97
139
|
setSubmitting(false);
|
|
98
140
|
}
|
|
99
141
|
};
|
|
142
|
+
const handleSubmit = async () => {
|
|
143
|
+
if (submitting) return;
|
|
144
|
+
const cartItems = (viewModel == null ? void 0 : viewModel.cartItems) || [];
|
|
145
|
+
if (cartItems.length === 0) {
|
|
146
|
+
showCheckStepEmptyCartTip();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (isAdditionalOrder) {
|
|
150
|
+
await doSubmit();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
setSubmitting(true);
|
|
155
|
+
const manualPickup = await runModuleAction("checkManualPickupRef");
|
|
156
|
+
if (manualPickup == null ? void 0 : manualPickup.enabled) {
|
|
157
|
+
setPickupRefOpen(true);
|
|
158
|
+
setSubmitting(false);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
} catch (error) {
|
|
162
|
+
console.error("[scanOrder] checkManualPickupRef failed", error);
|
|
163
|
+
import_antd.message.error((error == null ? void 0 : error.message) || "Submit order failed");
|
|
164
|
+
setSubmitting(false);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
await doSubmit();
|
|
168
|
+
};
|
|
169
|
+
const handlePickupRefConfirm = async (value) => {
|
|
170
|
+
try {
|
|
171
|
+
setSubmitting(true);
|
|
172
|
+
await runModuleAction("setPickupRef", value);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
console.error("[scanOrder] setPickupRef failed", error);
|
|
175
|
+
import_antd.message.error((error == null ? void 0 : error.message) || "Submit order failed");
|
|
176
|
+
setSubmitting(false);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setPickupRefOpen(false);
|
|
180
|
+
await doSubmit();
|
|
181
|
+
};
|
|
182
|
+
const handlePickupRefCancel = () => {
|
|
183
|
+
if (submitting) return;
|
|
184
|
+
setPickupRefOpen(false);
|
|
185
|
+
};
|
|
100
186
|
const noteContent = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check-note" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check-note-title" }, noteTitle), /* @__PURE__ */ import_react.default.createElement(
|
|
101
187
|
import_antd.Input.TextArea,
|
|
102
188
|
{
|
|
@@ -110,7 +196,7 @@ function Check() {
|
|
|
110
196
|
}
|
|
111
197
|
}
|
|
112
198
|
));
|
|
113
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check" }, /* @__PURE__ */ import_react.default.createElement(
|
|
199
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check" }, tableName ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check-current-table" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-scan-order-check-current-table-label" }, currentTableText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-scan-order-check-current-table-value" }, tableName)) : null, !isAdditionalOrder ? /* @__PURE__ */ import_react.default.createElement(import_FulfillmentMode.default, null) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-check-products-title" }, productsTitle), /* @__PURE__ */ import_react.default.createElement(
|
|
114
200
|
import_Cart.default,
|
|
115
201
|
{
|
|
116
202
|
embedded: true,
|
|
@@ -121,7 +207,15 @@ function Check() {
|
|
|
121
207
|
items: (viewModel == null ? void 0 : viewModel.cartItems) || [],
|
|
122
208
|
summary: (viewModel == null ? void 0 : viewModel.summary) || {},
|
|
123
209
|
confirmLoading: submitting,
|
|
124
|
-
extraContent: isShowOrderNote ? noteContent : void 0
|
|
210
|
+
extraContent: !isAdditionalOrder && isShowOrderNote ? noteContent : void 0
|
|
211
|
+
}
|
|
212
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
213
|
+
import_ManualPickupRefModal.default,
|
|
214
|
+
{
|
|
215
|
+
open: pickupRefOpen,
|
|
216
|
+
confirmLoading: submitting,
|
|
217
|
+
onCancel: handlePickupRefCancel,
|
|
218
|
+
onConfirm: handlePickupRefConfirm
|
|
125
219
|
}
|
|
126
220
|
));
|
|
127
221
|
}
|
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.pisell-scan-order-check-current-table {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
gap: 12px;
|
|
11
|
+
padding: 12px 16px;
|
|
12
|
+
background: #fff;
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
|
|
15
|
+
.pisell-scan-order-check-current-table-label {
|
|
16
|
+
color: #101828;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pisell-scan-order-check-current-table-value {
|
|
22
|
+
color: #344054;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pisell-scan-order-check-products-title {
|
|
29
|
+
padding: 0 16px;
|
|
30
|
+
margin-bottom: 8px;
|
|
31
|
+
color: #101828;
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
}
|
|
35
|
+
|
|
6
36
|
.pisell-scan-order-check-note {
|
|
7
37
|
padding: 0;
|
|
8
38
|
margin-top: 30px;
|
|
@@ -71,7 +71,7 @@ function extractEntryPaxNumber(payload) {
|
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
73
|
function ReadyState() {
|
|
74
|
-
var _a, _b, _c, _d;
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
75
75
|
const {
|
|
76
76
|
currentStep,
|
|
77
77
|
prevStep,
|
|
@@ -82,7 +82,18 @@ function ReadyState() {
|
|
|
82
82
|
refreshViewModel,
|
|
83
83
|
footerActionText,
|
|
84
84
|
setFooterActionText,
|
|
85
|
-
cartValidation
|
|
85
|
+
cartValidation,
|
|
86
|
+
setTableName,
|
|
87
|
+
entryMode,
|
|
88
|
+
setEntryMode,
|
|
89
|
+
submitDisabledTips,
|
|
90
|
+
setSubmitDisabledTips,
|
|
91
|
+
scanOrderModule,
|
|
92
|
+
isCacheHydrated,
|
|
93
|
+
markGate,
|
|
94
|
+
isGatePassed,
|
|
95
|
+
resumeStep,
|
|
96
|
+
consumeResumeStep
|
|
86
97
|
} = (0, import_context.useScanOrderContext)();
|
|
87
98
|
const { isLogin, openLoginModal } = (0, import_hooks.useScanOrderLogin)();
|
|
88
99
|
const utils = (0, import_hooks.contextUtils)();
|
|
@@ -100,15 +111,61 @@ function ReadyState() {
|
|
|
100
111
|
content: null
|
|
101
112
|
});
|
|
102
113
|
const [pendingFormPayload, setPendingFormPayload] = (0, import_react.useState)(null);
|
|
103
|
-
const [
|
|
114
|
+
const [productList, setProductList] = (0, import_react.useState)([]);
|
|
115
|
+
const productListLoadedRef = (0, import_react.useRef)(false);
|
|
116
|
+
const productListPromiseRef = (0, import_react.useRef)(null);
|
|
117
|
+
const ensureProductListLoaded = (0, import_react.useCallback)(async () => {
|
|
118
|
+
if (productListLoadedRef.current) return;
|
|
119
|
+
if (productListPromiseRef.current) {
|
|
120
|
+
await productListPromiseRef.current.catch(() => {
|
|
121
|
+
});
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const request = (async () => {
|
|
125
|
+
try {
|
|
126
|
+
const res = await runModuleAction("getProductList");
|
|
127
|
+
if (Array.isArray(res)) {
|
|
128
|
+
productListLoadedRef.current = true;
|
|
129
|
+
setProductList(res);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
import_antd.Modal.confirm({
|
|
133
|
+
title: res == null ? void 0 : res.message,
|
|
134
|
+
okText: String(import_utils.locales.getText("pisell2.event.confirm") || "OK"),
|
|
135
|
+
cancelButtonProps: { style: { display: "none" } },
|
|
136
|
+
maskClosable: false,
|
|
137
|
+
onOk: () => {
|
|
138
|
+
location.replace("/");
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
} catch (error) {
|
|
142
|
+
console.warn("[scanOrder] getProductList failed", error);
|
|
143
|
+
} finally {
|
|
144
|
+
productListPromiseRef.current = null;
|
|
145
|
+
}
|
|
146
|
+
})();
|
|
147
|
+
productListPromiseRef.current = request;
|
|
148
|
+
await request;
|
|
149
|
+
}, [runModuleAction]);
|
|
104
150
|
const requestEntryPaxRef = (0, import_react.useRef)(0);
|
|
105
151
|
const requestPaxMinRef = (0, import_react.useRef)(1);
|
|
106
152
|
const requestPaxMaxRef = (0, import_react.useRef)(1);
|
|
107
153
|
const tableFormRecordRef = (0, import_react.useRef)(null);
|
|
154
|
+
const entryPaxModalWasPresentedRef = (0, import_react.useRef)(false);
|
|
108
155
|
const getLocalizedName = (nameMap) => {
|
|
109
156
|
if (!nameMap) return "";
|
|
110
157
|
const currentLocale = import_utils.locales.getLocale();
|
|
111
|
-
|
|
158
|
+
const localized = nameMap[currentLocale];
|
|
159
|
+
if (typeof localized === "string" && localized) return localized;
|
|
160
|
+
const original = nameMap.original;
|
|
161
|
+
if (typeof original === "string" && original) return original;
|
|
162
|
+
return "";
|
|
163
|
+
};
|
|
164
|
+
const resolveLocalizedText = (value) => {
|
|
165
|
+
if (value == null) return "";
|
|
166
|
+
if (typeof value === "string") return value;
|
|
167
|
+
if (typeof value !== "object") return String(value);
|
|
168
|
+
return getLocalizedName(value);
|
|
112
169
|
};
|
|
113
170
|
const normalizeFormPayload = (formPayload, partyroomBookingPayload) => {
|
|
114
171
|
const sourcePayload = formPayload ?? partyroomBookingPayload;
|
|
@@ -125,9 +182,45 @@ function ReadyState() {
|
|
|
125
182
|
setting: sourceDetail == null ? void 0 : sourceDetail.setting
|
|
126
183
|
};
|
|
127
184
|
};
|
|
185
|
+
const app = (_a = utils == null ? void 0 : utils.getApp) == null ? void 0 : _a.call(utils);
|
|
186
|
+
const navigateToHome = () => {
|
|
187
|
+
var _a2, _b2;
|
|
188
|
+
if ((_a2 = app == null ? void 0 : app.history) == null ? void 0 : _a2.replace) {
|
|
189
|
+
app.history.replace("/");
|
|
190
|
+
} else if ((_b2 = app == null ? void 0 : app.history) == null ? void 0 : _b2.push) {
|
|
191
|
+
app.history.push("/");
|
|
192
|
+
} else {
|
|
193
|
+
location.replace("/");
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const requestEntryPaxModal = () => new Promise((resolve) => {
|
|
197
|
+
var _a2;
|
|
198
|
+
if (typeof (utils == null ? void 0 : utils.action) !== "function") {
|
|
199
|
+
resolve(null);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
utils.action({
|
|
203
|
+
type: "pisell1.handlePaxModal",
|
|
204
|
+
data: {
|
|
205
|
+
tableName: getLocalizedName((_a2 = tableFormRecordRef.current) == null ? void 0 : _a2.name),
|
|
206
|
+
requestPaxMin: requestPaxMinRef.current,
|
|
207
|
+
requestPaxMax: requestPaxMaxRef.current
|
|
208
|
+
},
|
|
209
|
+
callback: (result) => {
|
|
210
|
+
resolve(extractEntryPaxNumber(result));
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
128
214
|
const handleOrderDetail = (order_id) => {
|
|
215
|
+
var _a2, _b2;
|
|
129
216
|
const link = `/order/details?id=${order_id}`;
|
|
130
|
-
|
|
217
|
+
if ((_a2 = app == null ? void 0 : app.history) == null ? void 0 : _a2.replace) {
|
|
218
|
+
app.history.replace(link);
|
|
219
|
+
} else if ((_b2 = app == null ? void 0 : app.history) == null ? void 0 : _b2.push) {
|
|
220
|
+
app.history.push(link);
|
|
221
|
+
} else {
|
|
222
|
+
location.replace(link);
|
|
223
|
+
}
|
|
131
224
|
};
|
|
132
225
|
const handleBack = () => {
|
|
133
226
|
if (currentStep !== "product") {
|
|
@@ -138,7 +231,23 @@ function ReadyState() {
|
|
|
138
231
|
handleOrderDetail(entryContext.order_id);
|
|
139
232
|
return;
|
|
140
233
|
}
|
|
141
|
-
|
|
234
|
+
if (entryPaxModalWasPresentedRef.current) {
|
|
235
|
+
void (async () => {
|
|
236
|
+
const pax = await requestEntryPaxModal();
|
|
237
|
+
if (pax == null) {
|
|
238
|
+
navigateToHome();
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
await runModuleAction("setEntryPaxNumber", pax);
|
|
243
|
+
await refreshViewModel();
|
|
244
|
+
} catch (error) {
|
|
245
|
+
console.warn("[scanOrder] setEntryPaxNumber on back pax confirm failed", error);
|
|
246
|
+
}
|
|
247
|
+
})();
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
navigateToHome();
|
|
142
251
|
};
|
|
143
252
|
const enterProductStep = async () => {
|
|
144
253
|
try {
|
|
@@ -147,7 +256,9 @@ function ReadyState() {
|
|
|
147
256
|
} catch (error) {
|
|
148
257
|
console.warn("[scanOrder] applyItemRulePrefill failed", error);
|
|
149
258
|
} finally {
|
|
150
|
-
|
|
259
|
+
const target = resumeStep === "check" ? "check" : "product";
|
|
260
|
+
if (resumeStep) consumeResumeStep();
|
|
261
|
+
goToStep(target);
|
|
151
262
|
}
|
|
152
263
|
};
|
|
153
264
|
const runEntryPaxGateThenEnterProduct = async () => {
|
|
@@ -155,30 +266,19 @@ function ReadyState() {
|
|
|
155
266
|
await enterProductStep();
|
|
156
267
|
return;
|
|
157
268
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
utils.action({
|
|
165
|
-
type: "pisell1.handlePaxModal",
|
|
166
|
-
data: {
|
|
167
|
-
tableName: getLocalizedName((_a2 = tableFormRecordRef.current) == null ? void 0 : _a2.name),
|
|
168
|
-
requestPaxMin: requestPaxMinRef.current,
|
|
169
|
-
requestPaxMax: requestPaxMaxRef.current
|
|
170
|
-
},
|
|
171
|
-
callback: (result) => {
|
|
172
|
-
resolve(extractEntryPaxNumber(result));
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
});
|
|
269
|
+
if (isGatePassed("paxEntered")) {
|
|
270
|
+
await enterProductStep();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
entryPaxModalWasPresentedRef.current = true;
|
|
274
|
+
const pax = await requestEntryPaxModal();
|
|
176
275
|
if (pax == null) {
|
|
177
|
-
|
|
276
|
+
navigateToHome();
|
|
178
277
|
return;
|
|
179
278
|
}
|
|
180
279
|
try {
|
|
181
280
|
await runModuleAction("setEntryPaxNumber", pax);
|
|
281
|
+
markGate("paxEntered");
|
|
182
282
|
} catch (error) {
|
|
183
283
|
console.warn("[scanOrder] setOtherParams failed", error);
|
|
184
284
|
}
|
|
@@ -216,6 +316,7 @@ function ReadyState() {
|
|
|
216
316
|
content: null
|
|
217
317
|
});
|
|
218
318
|
setPendingFormPayload(null);
|
|
319
|
+
markGate("formSubmitted");
|
|
219
320
|
void runEntryPaxGateThenEnterProduct();
|
|
220
321
|
};
|
|
221
322
|
const handleFormConfirm = () => {
|
|
@@ -229,7 +330,8 @@ function ReadyState() {
|
|
|
229
330
|
open: false,
|
|
230
331
|
content: null
|
|
231
332
|
});
|
|
232
|
-
|
|
333
|
+
markGate("policyAccepted");
|
|
334
|
+
if (pendingFormPayload && !isGatePassed("formSubmitted")) {
|
|
233
335
|
openFormModal(pendingFormPayload);
|
|
234
336
|
return;
|
|
235
337
|
}
|
|
@@ -241,6 +343,7 @@ function ReadyState() {
|
|
|
241
343
|
};
|
|
242
344
|
(0, import_react.useEffect)(() => {
|
|
243
345
|
const checkResourceAvailable = async () => {
|
|
346
|
+
var _a2;
|
|
244
347
|
const hasOrderId = !!(entryContext == null ? void 0 : entryContext.order_id);
|
|
245
348
|
const {
|
|
246
349
|
mode,
|
|
@@ -262,12 +365,13 @@ function ReadyState() {
|
|
|
262
365
|
requestPaxMinRef.current = Number(requestPaxMin) || 1;
|
|
263
366
|
requestPaxMaxRef.current = Number(requestPaxMax) || 1;
|
|
264
367
|
tableFormRecordRef.current = table_form_record || {};
|
|
368
|
+
setTableName(getLocalizedName(table_form_record == null ? void 0 : table_form_record.name));
|
|
265
369
|
const normalizedFormPayload = normalizeFormPayload(form, partyroom_booking);
|
|
266
370
|
const isAdditionalOrder = mode === "additional_order" || mode === "additional_order_with_code";
|
|
267
371
|
setEntryMode(isAdditionalOrder ? "additional_order" : "default");
|
|
268
372
|
if (mode === "idle") {
|
|
269
373
|
const normalizedPolicyPayload = typeof policy === "object" && policy !== null ? policy : { id: policy };
|
|
270
|
-
if (normalizedPolicyPayload == null ? void 0 : normalizedPolicyPayload.id) {
|
|
374
|
+
if ((normalizedPolicyPayload == null ? void 0 : normalizedPolicyPayload.id) && !isGatePassed("policyAccepted")) {
|
|
271
375
|
setPendingFormPayload(normalizedFormPayload);
|
|
272
376
|
setPolicyModal({
|
|
273
377
|
open: true,
|
|
@@ -275,27 +379,37 @@ function ReadyState() {
|
|
|
275
379
|
});
|
|
276
380
|
return;
|
|
277
381
|
}
|
|
278
|
-
if (normalizedFormPayload) {
|
|
382
|
+
if (normalizedFormPayload && !isGatePassed("formSubmitted")) {
|
|
279
383
|
openFormModal(normalizedFormPayload);
|
|
280
384
|
return;
|
|
281
385
|
}
|
|
282
386
|
await runEntryPaxGateThenEnterProduct();
|
|
283
387
|
} else if (isAdditionalOrder) {
|
|
284
388
|
await enterProductStep();
|
|
389
|
+
} else if (mode === "submit_disabled") {
|
|
390
|
+
const tips = resolveLocalizedText(errorTips) || String(import_utils.locales.getText("pisell2.scan.order.submit.disabled.default") || "");
|
|
391
|
+
setSubmitDisabledTips(tips);
|
|
392
|
+
await enterProductStep();
|
|
285
393
|
} else if (mode === "resource_busy") {
|
|
286
394
|
if (!isLogin) {
|
|
395
|
+
(_a2 = scanOrderModule == null ? void 0 : scanOrderModule.setUIState) == null ? void 0 : _a2.call(scanOrderModule, "pendingStep", currentStep);
|
|
287
396
|
openLoginModal({
|
|
288
397
|
callback: (status) => {
|
|
398
|
+
var _a3, _b2;
|
|
289
399
|
if (status === "success") {
|
|
400
|
+
(_a3 = scanOrderModule == null ? void 0 : scanOrderModule.deleteUIState) == null ? void 0 : _a3.call(scanOrderModule, "pendingStep");
|
|
290
401
|
handleOrderDetail(order_id);
|
|
402
|
+
return;
|
|
291
403
|
}
|
|
404
|
+
(_b2 = scanOrderModule == null ? void 0 : scanOrderModule.deleteUIState) == null ? void 0 : _b2.call(scanOrderModule, "pendingStep");
|
|
405
|
+
location.replace("/");
|
|
292
406
|
}
|
|
293
407
|
});
|
|
294
408
|
} else {
|
|
295
409
|
handleOrderDetail(order_id);
|
|
296
410
|
}
|
|
297
411
|
} else {
|
|
298
|
-
let content = errorTips
|
|
412
|
+
let content = resolveLocalizedText(errorTips);
|
|
299
413
|
if (!content) {
|
|
300
414
|
if (mode === "resource_block") {
|
|
301
415
|
content = String(
|
|
@@ -309,7 +423,7 @@ function ReadyState() {
|
|
|
309
423
|
}
|
|
310
424
|
import_antd.Modal.info({
|
|
311
425
|
title: import_utils.locales.getText("pisell2.scan.order.step.error"),
|
|
312
|
-
content:
|
|
426
|
+
content: resolveLocalizedText(content).trim(),
|
|
313
427
|
okText: String(import_utils.locales.getText("pisell2.event.confirm") || "OK"),
|
|
314
428
|
maskClosable: false,
|
|
315
429
|
onOk: () => {
|
|
@@ -318,8 +432,9 @@ function ReadyState() {
|
|
|
318
432
|
});
|
|
319
433
|
}
|
|
320
434
|
};
|
|
435
|
+
if (!isCacheHydrated) return;
|
|
321
436
|
checkResourceAvailable();
|
|
322
|
-
}, []);
|
|
437
|
+
}, [isCacheHydrated]);
|
|
323
438
|
(0, import_react.useEffect)(() => {
|
|
324
439
|
window.scrollTo({
|
|
325
440
|
top: 0,
|
|
@@ -341,7 +456,14 @@ function ReadyState() {
|
|
|
341
456
|
}, [currentStep, cartValidation == null ? void 0 : cartValidation.passed]);
|
|
342
457
|
const stepRegistry = {
|
|
343
458
|
init: /* @__PURE__ */ import_react.default.createElement(import_Initializing.default, null),
|
|
344
|
-
product: /* @__PURE__ */ import_react.default.createElement(
|
|
459
|
+
product: /* @__PURE__ */ import_react.default.createElement(
|
|
460
|
+
import_Menu.default,
|
|
461
|
+
{
|
|
462
|
+
onCheckout: () => goToStep("check"),
|
|
463
|
+
productList,
|
|
464
|
+
onEnsureProductList: ensureProductListLoaded
|
|
465
|
+
}
|
|
466
|
+
),
|
|
345
467
|
check: /* @__PURE__ */ import_react.default.createElement(import_Check.default, null),
|
|
346
468
|
error: /* @__PURE__ */ import_react.default.createElement(import_ErrorState.default, { message: import_utils.locales.getText("pisell2.scan.order.store.status.exception") })
|
|
347
469
|
};
|
|
@@ -386,6 +508,11 @@ function ReadyState() {
|
|
|
386
508
|
return highlighted;
|
|
387
509
|
};
|
|
388
510
|
const gotoCheckOrder = async () => {
|
|
511
|
+
var _a2;
|
|
512
|
+
if (submitDisabledTips) {
|
|
513
|
+
import_antd.message.warning(submitDisabledTips, 2);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
389
516
|
const firstFailure = Array.isArray(cartValidation == null ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
|
|
390
517
|
if ((cartValidation == null ? void 0 : cartValidation.passed) === false) {
|
|
391
518
|
const failedProductIds = getFirstFailedProductIds();
|
|
@@ -393,10 +520,7 @@ function ReadyState() {
|
|
|
393
520
|
scrollAndHighlightProductsByIds(failedProductIds);
|
|
394
521
|
}
|
|
395
522
|
const failureTips = String((firstFailure == null ? void 0 : firstFailure.validationMessage) || "").trim();
|
|
396
|
-
(
|
|
397
|
-
content: failureTips,
|
|
398
|
-
duration: 2
|
|
399
|
-
});
|
|
523
|
+
import_antd.message.warning(failureTips, 2);
|
|
400
524
|
return;
|
|
401
525
|
}
|
|
402
526
|
const otherParams = await runModuleAction("getOtherParams");
|
|
@@ -415,16 +539,17 @@ function ReadyState() {
|
|
|
415
539
|
return;
|
|
416
540
|
}
|
|
417
541
|
if (!isLogin) {
|
|
542
|
+
(_a2 = scanOrderModule == null ? void 0 : scanOrderModule.setUIState) == null ? void 0 : _a2.call(scanOrderModule, "pendingStep", "check");
|
|
418
543
|
openLoginModal({
|
|
419
544
|
callback: (status) => {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
545
|
+
var _a3;
|
|
546
|
+
(_a3 = scanOrderModule == null ? void 0 : scanOrderModule.deleteUIState) == null ? void 0 : _a3.call(scanOrderModule, "pendingStep");
|
|
547
|
+
if (status === "success") goToStep("check");
|
|
423
548
|
}
|
|
424
549
|
});
|
|
425
|
-
|
|
426
|
-
goToStep("check");
|
|
550
|
+
return;
|
|
427
551
|
}
|
|
552
|
+
goToStep("check");
|
|
428
553
|
};
|
|
429
554
|
const isMobileView = (0, import_utils.isMobile)();
|
|
430
555
|
const isShowFooter = (0, import_react.useMemo)(() => {
|
|
@@ -451,7 +576,8 @@ function ReadyState() {
|
|
|
451
576
|
},
|
|
452
577
|
onNext: gotoCheckOrder,
|
|
453
578
|
items: (viewModel == null ? void 0 : viewModel.cartItems) || [],
|
|
454
|
-
summary: (viewModel == null ? void 0 : viewModel.summary) || {}
|
|
579
|
+
summary: (viewModel == null ? void 0 : viewModel.summary) || {},
|
|
580
|
+
disabled: !!submitDisabledTips
|
|
455
581
|
}
|
|
456
582
|
)) : null
|
|
457
583
|
), isShowFooter ? /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -460,7 +586,8 @@ function ReadyState() {
|
|
|
460
586
|
cartItems: (viewModel == null ? void 0 : viewModel.cartItems) || [],
|
|
461
587
|
summary: (viewModel == null ? void 0 : viewModel.summary) || {},
|
|
462
588
|
actionText: footerActionText,
|
|
463
|
-
onAction: () => gotoCheckOrder()
|
|
589
|
+
onAction: () => gotoCheckOrder(),
|
|
590
|
+
disabled: !!submitDisabledTips
|
|
464
591
|
}
|
|
465
592
|
) : null, policyModal.open ? /* @__PURE__ */ import_react.default.createElement(
|
|
466
593
|
import_PolicyModal.default,
|
|
@@ -478,7 +605,7 @@ function ReadyState() {
|
|
|
478
605
|
open: formModal.open,
|
|
479
606
|
platform: isMobileView ? "h5" : "pc",
|
|
480
607
|
onCancel: closeFormModalAndBack,
|
|
481
|
-
title: ((
|
|
608
|
+
title: ((_b = formModal.content) == null ? void 0 : _b.title) || import_utils.locales.getText("pisell2.appointment.fill-form") || "填写信息",
|
|
482
609
|
mobileModalHeight: "90vh",
|
|
483
610
|
width: isMobileView ? "100%" : 900,
|
|
484
611
|
className: "pisell-scan-order-form-modal",
|
|
@@ -497,10 +624,10 @@ function ReadyState() {
|
|
|
497
624
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-order-form-modal-body" }, FormCard ? /* @__PURE__ */ import_react.default.createElement(
|
|
498
625
|
FormCard,
|
|
499
626
|
{
|
|
500
|
-
id: ((
|
|
627
|
+
id: ((_c = formModal.content) == null ? void 0 : _c.id) || 0,
|
|
501
628
|
ref: formModalRef,
|
|
502
629
|
isGetLastData: false,
|
|
503
|
-
setting: ((
|
|
630
|
+
setting: ((_d = formModal.content) == null ? void 0 : _d.setting) || { isHidden: 1 },
|
|
504
631
|
formWrapStyle: { padding: "16px" },
|
|
505
632
|
isV2API: true,
|
|
506
633
|
isShowSkeleton: true,
|
|
@@ -512,7 +639,7 @@ function ReadyState() {
|
|
|
512
639
|
},
|
|
513
640
|
onFormValueChange: () => {
|
|
514
641
|
},
|
|
515
|
-
defaultValues: ((
|
|
642
|
+
defaultValues: ((_e = formModal.content) == null ? void 0 : _e.defaultValues) || {},
|
|
516
643
|
isClearData: false
|
|
517
644
|
}
|
|
518
645
|
) : null)
|
|
@@ -39,7 +39,7 @@ var import_Cart = __toESM(require("../Cart"));
|
|
|
39
39
|
var import_shopping_cart = __toESM(require("../../../appointmentBooking/assets/shopping-cart.svg"));
|
|
40
40
|
var import_index = require("./index.less");
|
|
41
41
|
function Footer(props) {
|
|
42
|
-
const { cartItems, summary, actionText, onAction } = props;
|
|
42
|
+
const { cartItems, summary, actionText, onAction, disabled = false } = props;
|
|
43
43
|
const [cartOpen, setCartOpen] = (0, import_react.useState)(false);
|
|
44
44
|
const totalAmount = (0, import_react.useMemo)(() => {
|
|
45
45
|
const rawAmount = (summary == null ? void 0 : summary.total_amount) ?? (summary == null ? void 0 : summary.expect_amount) ?? (summary == null ? void 0 : summary.amount) ?? (summary == null ? void 0 : summary.total) ?? (summary == null ? void 0 : summary.totalAmount) ?? (summary == null ? void 0 : summary.payable_amount) ?? 0;
|
|
@@ -60,7 +60,7 @@ function Footer(props) {
|
|
|
60
60
|
{
|
|
61
61
|
type: "primary",
|
|
62
62
|
size: "large",
|
|
63
|
-
className: "pisell-scan-order-footer-btn"
|
|
63
|
+
className: `pisell-scan-order-footer-btn${disabled ? " pisell-scan-order-footer-btn-disabled" : ""}`,
|
|
64
64
|
onClick: onAction
|
|
65
65
|
},
|
|
66
66
|
actionText
|