@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
|
@@ -9,10 +9,10 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
9
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
12
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
13
13
|
import { isMobile, locales } from '@pisell/utils';
|
|
14
|
-
import { Modal } from 'antd';
|
|
15
|
-
import { Button, PisellModal
|
|
14
|
+
import { message, Modal } from 'antd';
|
|
15
|
+
import { Button, PisellModal } from '@pisell/materials';
|
|
16
16
|
import { useScanOrderContext } from "../../context";
|
|
17
17
|
import Header from "../Header";
|
|
18
18
|
import Footer from "../Footer";
|
|
@@ -58,7 +58,7 @@ function extractEntryPaxNumber(payload) {
|
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
function ReadyState() {
|
|
61
|
-
var _formModal$content, _formModal$content2, _formModal$content3, _formModal$content4;
|
|
61
|
+
var _utils$getApp, _formModal$content, _formModal$content2, _formModal$content3, _formModal$content4;
|
|
62
62
|
var _useScanOrderContext = useScanOrderContext(),
|
|
63
63
|
currentStep = _useScanOrderContext.currentStep,
|
|
64
64
|
prevStep = _useScanOrderContext.prevStep,
|
|
@@ -69,7 +69,18 @@ function ReadyState() {
|
|
|
69
69
|
refreshViewModel = _useScanOrderContext.refreshViewModel,
|
|
70
70
|
footerActionText = _useScanOrderContext.footerActionText,
|
|
71
71
|
setFooterActionText = _useScanOrderContext.setFooterActionText,
|
|
72
|
-
cartValidation = _useScanOrderContext.cartValidation
|
|
72
|
+
cartValidation = _useScanOrderContext.cartValidation,
|
|
73
|
+
setTableName = _useScanOrderContext.setTableName,
|
|
74
|
+
entryMode = _useScanOrderContext.entryMode,
|
|
75
|
+
setEntryMode = _useScanOrderContext.setEntryMode,
|
|
76
|
+
submitDisabledTips = _useScanOrderContext.submitDisabledTips,
|
|
77
|
+
setSubmitDisabledTips = _useScanOrderContext.setSubmitDisabledTips,
|
|
78
|
+
scanOrderModule = _useScanOrderContext.scanOrderModule,
|
|
79
|
+
isCacheHydrated = _useScanOrderContext.isCacheHydrated,
|
|
80
|
+
markGate = _useScanOrderContext.markGate,
|
|
81
|
+
isGatePassed = _useScanOrderContext.isGatePassed,
|
|
82
|
+
resumeStep = _useScanOrderContext.resumeStep,
|
|
83
|
+
consumeResumeStep = _useScanOrderContext.consumeResumeStep;
|
|
73
84
|
var _useScanOrderLogin = useScanOrderLogin(),
|
|
74
85
|
isLogin = _useScanOrderLogin.isLogin,
|
|
75
86
|
openLoginModal = _useScanOrderLogin.openLoginModal;
|
|
@@ -102,28 +113,134 @@ function ReadyState() {
|
|
|
102
113
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
103
114
|
pendingFormPayload = _useState8[0],
|
|
104
115
|
setPendingFormPayload = _useState8[1];
|
|
105
|
-
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 商品列表状态:挂在 ReadyState 而不是 Menu 本地,保证从 check 返回 product 时命中缓存、不重发请求
|
|
119
|
+
* (stepRegistry 切换会让 Menu unmount,本地 useState 会丢;ReadyState 在整段会话内不 unmount)
|
|
120
|
+
* - productListLoadedRef:同步判定是否已有有效结果,避免 setState 异步窗口内重复请求
|
|
121
|
+
* - productListPromiseRef:in-flight promise 去重,让并发调用合并成同一次请求
|
|
122
|
+
*/
|
|
123
|
+
var _useState9 = useState([]),
|
|
106
124
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
107
|
-
|
|
108
|
-
|
|
125
|
+
productList = _useState10[0],
|
|
126
|
+
setProductList = _useState10[1];
|
|
127
|
+
var productListLoadedRef = useRef(false);
|
|
128
|
+
var productListPromiseRef = useRef(null);
|
|
129
|
+
var ensureProductListLoaded = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
130
|
+
var request;
|
|
131
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
132
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
133
|
+
case 0:
|
|
134
|
+
if (!productListLoadedRef.current) {
|
|
135
|
+
_context2.next = 2;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
return _context2.abrupt("return");
|
|
139
|
+
case 2:
|
|
140
|
+
if (!productListPromiseRef.current) {
|
|
141
|
+
_context2.next = 6;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
_context2.next = 5;
|
|
145
|
+
return productListPromiseRef.current.catch(function () {});
|
|
146
|
+
case 5:
|
|
147
|
+
return _context2.abrupt("return");
|
|
148
|
+
case 6:
|
|
149
|
+
request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
150
|
+
var res;
|
|
151
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
152
|
+
while (1) switch (_context.prev = _context.next) {
|
|
153
|
+
case 0:
|
|
154
|
+
_context.prev = 0;
|
|
155
|
+
_context.next = 3;
|
|
156
|
+
return runModuleAction('getProductList');
|
|
157
|
+
case 3:
|
|
158
|
+
res = _context.sent;
|
|
159
|
+
if (!Array.isArray(res)) {
|
|
160
|
+
_context.next = 8;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
productListLoadedRef.current = true;
|
|
164
|
+
setProductList(res);
|
|
165
|
+
return _context.abrupt("return");
|
|
166
|
+
case 8:
|
|
167
|
+
// 非数组错误载荷:沿用原 Menu 内的 Modal.confirm + 跳首页逻辑
|
|
168
|
+
Modal.confirm({
|
|
169
|
+
title: res === null || res === void 0 ? void 0 : res.message,
|
|
170
|
+
okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
|
|
171
|
+
cancelButtonProps: {
|
|
172
|
+
style: {
|
|
173
|
+
display: 'none'
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
maskClosable: false,
|
|
177
|
+
onOk: function onOk() {
|
|
178
|
+
location.replace('/');
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
_context.next = 14;
|
|
182
|
+
break;
|
|
183
|
+
case 11:
|
|
184
|
+
_context.prev = 11;
|
|
185
|
+
_context.t0 = _context["catch"](0);
|
|
186
|
+
console.warn('[scanOrder] getProductList failed', _context.t0);
|
|
187
|
+
case 14:
|
|
188
|
+
_context.prev = 14;
|
|
189
|
+
productListPromiseRef.current = null;
|
|
190
|
+
return _context.finish(14);
|
|
191
|
+
case 17:
|
|
192
|
+
case "end":
|
|
193
|
+
return _context.stop();
|
|
194
|
+
}
|
|
195
|
+
}, _callee, null, [[0, 11, 14, 17]]);
|
|
196
|
+
}))();
|
|
197
|
+
productListPromiseRef.current = request;
|
|
198
|
+
_context2.next = 10;
|
|
199
|
+
return request;
|
|
200
|
+
case 10:
|
|
201
|
+
case "end":
|
|
202
|
+
return _context2.stop();
|
|
203
|
+
}
|
|
204
|
+
}, _callee2);
|
|
205
|
+
})), [runModuleAction]);
|
|
206
|
+
|
|
109
207
|
/** checkResourceAvailable 返回 requestEntryPax === 1 时,在协议/表单之后弹人数并写入 scanOrder otherParams */
|
|
110
208
|
var requestEntryPaxRef = useRef(0);
|
|
111
209
|
var requestPaxMinRef = useRef(1);
|
|
112
210
|
var requestPaxMaxRef = useRef(1);
|
|
113
211
|
var tableFormRecordRef = useRef(null);
|
|
212
|
+
/** 本次会话是否曾实际弹出过入口人数弹窗(商品页返回首页前可二次弹窗) */
|
|
213
|
+
var entryPaxModalWasPresentedRef = useRef(false);
|
|
114
214
|
|
|
115
|
-
/** 根据当前语言从多语言 name
|
|
215
|
+
/** 根据当前语言从多语言 name 对象中取值,兜底当前语言 -> original -> 空串 */
|
|
116
216
|
var getLocalizedName = function getLocalizedName(nameMap) {
|
|
117
217
|
if (!nameMap) return '';
|
|
118
218
|
var currentLocale = locales.getLocale();
|
|
119
|
-
|
|
219
|
+
var localized = nameMap[currentLocale];
|
|
220
|
+
if (typeof localized === 'string' && localized) return localized;
|
|
221
|
+
var original = nameMap.original;
|
|
222
|
+
if (typeof original === 'string' && original) return original;
|
|
223
|
+
return '';
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* 解析可能是纯字符串或多语言对象的文案
|
|
228
|
+
* - 字符串:原样返回
|
|
229
|
+
* - 多语言对象(如 { en, 'zh-CN', original, ... }):取当前语言,兜底 original
|
|
230
|
+
* - 其它:空串
|
|
231
|
+
*/
|
|
232
|
+
var resolveLocalizedText = function resolveLocalizedText(value) {
|
|
233
|
+
if (value == null) return '';
|
|
234
|
+
if (typeof value === 'string') return value;
|
|
235
|
+
if (_typeof(value) !== 'object') return String(value);
|
|
236
|
+
return getLocalizedName(value);
|
|
120
237
|
};
|
|
121
238
|
var normalizeFormPayload = function normalizeFormPayload(formPayload, partyroomBookingPayload) {
|
|
122
|
-
var
|
|
239
|
+
var _ref3, _ref4, _sourcePayload$id;
|
|
123
240
|
var sourcePayload = formPayload !== null && formPayload !== void 0 ? formPayload : partyroomBookingPayload;
|
|
124
241
|
if (!sourcePayload) return null;
|
|
125
242
|
var isPrimitivePayload = typeof sourcePayload === 'number' || typeof sourcePayload === 'string';
|
|
126
|
-
var rawId = isPrimitivePayload ? sourcePayload : (
|
|
243
|
+
var rawId = isPrimitivePayload ? sourcePayload : (_ref3 = (_ref4 = (_sourcePayload$id = sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.id) !== null && _sourcePayload$id !== void 0 ? _sourcePayload$id : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.form_id) !== null && _ref4 !== void 0 ? _ref4 : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.resource_form_id) !== null && _ref3 !== void 0 ? _ref3 : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.partyroom_booking;
|
|
127
244
|
var formId = Number(rawId);
|
|
128
245
|
if (Number.isNaN(formId) || formId <= 0) return null;
|
|
129
246
|
var sourceDetail = _typeof(sourcePayload) === 'object' && sourcePayload !== null ? sourcePayload : {};
|
|
@@ -134,11 +251,53 @@ function ReadyState() {
|
|
|
134
251
|
setting: sourceDetail === null || sourceDetail === void 0 ? void 0 : sourceDetail.setting
|
|
135
252
|
};
|
|
136
253
|
};
|
|
254
|
+
var app = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
|
|
255
|
+
|
|
256
|
+
/** 回站点首页(与商品步返回兜底一致) */
|
|
257
|
+
var navigateToHome = function navigateToHome() {
|
|
258
|
+
var _app$history, _app$history2;
|
|
259
|
+
if (app !== null && app !== void 0 && (_app$history = app.history) !== null && _app$history !== void 0 && _app$history.replace) {
|
|
260
|
+
app.history.replace('/');
|
|
261
|
+
} else if (app !== null && app !== void 0 && (_app$history2 = app.history) !== null && _app$history2 !== void 0 && _app$history2.push) {
|
|
262
|
+
app.history.push('/');
|
|
263
|
+
} else {
|
|
264
|
+
location.replace('/');
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/** 弹出入口人数弹窗,返回有效人数或取消/关闭时为 null */
|
|
269
|
+
var requestEntryPaxModal = function requestEntryPaxModal() {
|
|
270
|
+
return new Promise(function (resolve) {
|
|
271
|
+
var _tableFormRecordRef$c;
|
|
272
|
+
if (typeof (utils === null || utils === void 0 ? void 0 : utils.action) !== 'function') {
|
|
273
|
+
resolve(null);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
utils.action({
|
|
277
|
+
type: 'pisell1.handlePaxModal',
|
|
278
|
+
data: {
|
|
279
|
+
tableName: getLocalizedName((_tableFormRecordRef$c = tableFormRecordRef.current) === null || _tableFormRecordRef$c === void 0 ? void 0 : _tableFormRecordRef$c.name),
|
|
280
|
+
requestPaxMin: requestPaxMinRef.current,
|
|
281
|
+
requestPaxMax: requestPaxMaxRef.current
|
|
282
|
+
},
|
|
283
|
+
callback: function callback(result) {
|
|
284
|
+
resolve(extractEntryPaxNumber(result));
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
};
|
|
137
289
|
|
|
138
290
|
// 跳转到订单详情页
|
|
139
291
|
var handleOrderDetail = function handleOrderDetail(order_id) {
|
|
292
|
+
var _app$history3, _app$history4;
|
|
140
293
|
var link = "/order/details?id=".concat(order_id);
|
|
141
|
-
|
|
294
|
+
if (app !== null && app !== void 0 && (_app$history3 = app.history) !== null && _app$history3 !== void 0 && _app$history3.replace) {
|
|
295
|
+
app.history.replace(link);
|
|
296
|
+
} else if (app !== null && app !== void 0 && (_app$history4 = app.history) !== null && _app$history4 !== void 0 && _app$history4.push) {
|
|
297
|
+
app.history.push(link);
|
|
298
|
+
} else {
|
|
299
|
+
location.replace(link);
|
|
300
|
+
}
|
|
142
301
|
};
|
|
143
302
|
var handleBack = function handleBack() {
|
|
144
303
|
if (currentStep !== 'product') {
|
|
@@ -149,106 +308,144 @@ function ReadyState() {
|
|
|
149
308
|
handleOrderDetail(entryContext.order_id);
|
|
150
309
|
return;
|
|
151
310
|
}
|
|
152
|
-
|
|
311
|
+
if (entryPaxModalWasPresentedRef.current) {
|
|
312
|
+
void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
313
|
+
var pax;
|
|
314
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
315
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
316
|
+
case 0:
|
|
317
|
+
_context3.next = 2;
|
|
318
|
+
return requestEntryPaxModal();
|
|
319
|
+
case 2:
|
|
320
|
+
pax = _context3.sent;
|
|
321
|
+
if (!(pax == null)) {
|
|
322
|
+
_context3.next = 6;
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
navigateToHome();
|
|
326
|
+
return _context3.abrupt("return");
|
|
327
|
+
case 6:
|
|
328
|
+
_context3.prev = 6;
|
|
329
|
+
_context3.next = 9;
|
|
330
|
+
return runModuleAction('setEntryPaxNumber', pax);
|
|
331
|
+
case 9:
|
|
332
|
+
_context3.next = 11;
|
|
333
|
+
return refreshViewModel();
|
|
334
|
+
case 11:
|
|
335
|
+
_context3.next = 16;
|
|
336
|
+
break;
|
|
337
|
+
case 13:
|
|
338
|
+
_context3.prev = 13;
|
|
339
|
+
_context3.t0 = _context3["catch"](6);
|
|
340
|
+
console.warn('[scanOrder] setEntryPaxNumber on back pax confirm failed', _context3.t0);
|
|
341
|
+
case 16:
|
|
342
|
+
case "end":
|
|
343
|
+
return _context3.stop();
|
|
344
|
+
}
|
|
345
|
+
}, _callee3, null, [[6, 13]]);
|
|
346
|
+
}))();
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
navigateToHome();
|
|
153
350
|
};
|
|
154
351
|
var enterProductStep = /*#__PURE__*/function () {
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
|
|
352
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
353
|
+
var target;
|
|
354
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
355
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
158
356
|
case 0:
|
|
159
|
-
|
|
160
|
-
|
|
357
|
+
_context4.prev = 0;
|
|
358
|
+
_context4.next = 3;
|
|
161
359
|
return runModuleAction('applyItemRulePrefill');
|
|
162
360
|
case 3:
|
|
163
|
-
|
|
361
|
+
_context4.next = 5;
|
|
164
362
|
return refreshViewModel();
|
|
165
363
|
case 5:
|
|
166
|
-
|
|
364
|
+
_context4.next = 10;
|
|
167
365
|
break;
|
|
168
366
|
case 7:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
console.warn('[scanOrder] applyItemRulePrefill failed',
|
|
367
|
+
_context4.prev = 7;
|
|
368
|
+
_context4.t0 = _context4["catch"](0);
|
|
369
|
+
console.warn('[scanOrder] applyItemRulePrefill failed', _context4.t0);
|
|
172
370
|
case 10:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
371
|
+
_context4.prev = 10;
|
|
372
|
+
// bootstrap 结束后统一由 resumeStep 决定最终去向:
|
|
373
|
+
// - resumeStep === 'check' → 恢复到结算页(此时 dineInConfig 已加载)
|
|
374
|
+
// - 其它(null / 'product') → 正常进入商品页
|
|
375
|
+
target = resumeStep === 'check' ? 'check' : 'product';
|
|
376
|
+
if (resumeStep) consumeResumeStep();
|
|
377
|
+
goToStep(target);
|
|
378
|
+
return _context4.finish(10);
|
|
379
|
+
case 15:
|
|
177
380
|
case "end":
|
|
178
|
-
return
|
|
381
|
+
return _context4.stop();
|
|
179
382
|
}
|
|
180
|
-
},
|
|
383
|
+
}, _callee4, null, [[0, 7, 10, 15]]);
|
|
181
384
|
}));
|
|
182
385
|
return function enterProductStep() {
|
|
183
|
-
return
|
|
386
|
+
return _ref6.apply(this, arguments);
|
|
184
387
|
};
|
|
185
388
|
}();
|
|
186
389
|
|
|
187
390
|
/** 需要时先走人数弹窗与 setOtherParams(entryPaxNumber),再进入商品步 */
|
|
188
391
|
var runEntryPaxGateThenEnterProduct = /*#__PURE__*/function () {
|
|
189
|
-
var
|
|
392
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
190
393
|
var pax;
|
|
191
|
-
return _regeneratorRuntime().wrap(function
|
|
192
|
-
while (1) switch (
|
|
394
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
395
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
193
396
|
case 0:
|
|
194
397
|
if (!(requestEntryPaxRef.current !== 1)) {
|
|
195
|
-
|
|
398
|
+
_context5.next = 4;
|
|
196
399
|
break;
|
|
197
400
|
}
|
|
198
|
-
|
|
401
|
+
_context5.next = 3;
|
|
199
402
|
return enterProductStep();
|
|
200
403
|
case 3:
|
|
201
|
-
return
|
|
404
|
+
return _context5.abrupt("return");
|
|
202
405
|
case 4:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
callback: function callback(result) {
|
|
218
|
-
resolve(extractEntryPaxNumber(result));
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
case 6:
|
|
223
|
-
pax = _context2.sent;
|
|
406
|
+
if (!isGatePassed('paxEntered')) {
|
|
407
|
+
_context5.next = 8;
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
_context5.next = 7;
|
|
411
|
+
return enterProductStep();
|
|
412
|
+
case 7:
|
|
413
|
+
return _context5.abrupt("return");
|
|
414
|
+
case 8:
|
|
415
|
+
entryPaxModalWasPresentedRef.current = true;
|
|
416
|
+
_context5.next = 11;
|
|
417
|
+
return requestEntryPaxModal();
|
|
418
|
+
case 11:
|
|
419
|
+
pax = _context5.sent;
|
|
224
420
|
if (!(pax == null)) {
|
|
225
|
-
|
|
421
|
+
_context5.next = 15;
|
|
226
422
|
break;
|
|
227
423
|
}
|
|
228
|
-
|
|
229
|
-
return
|
|
230
|
-
case 10:
|
|
231
|
-
_context2.prev = 10;
|
|
232
|
-
_context2.next = 13;
|
|
233
|
-
return runModuleAction('setEntryPaxNumber', pax);
|
|
234
|
-
case 13:
|
|
235
|
-
_context2.next = 18;
|
|
236
|
-
break;
|
|
424
|
+
navigateToHome();
|
|
425
|
+
return _context5.abrupt("return");
|
|
237
426
|
case 15:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
427
|
+
_context5.prev = 15;
|
|
428
|
+
_context5.next = 18;
|
|
429
|
+
return runModuleAction('setEntryPaxNumber', pax);
|
|
241
430
|
case 18:
|
|
242
|
-
|
|
431
|
+
markGate('paxEntered');
|
|
432
|
+
_context5.next = 24;
|
|
433
|
+
break;
|
|
434
|
+
case 21:
|
|
435
|
+
_context5.prev = 21;
|
|
436
|
+
_context5.t0 = _context5["catch"](15);
|
|
437
|
+
console.warn('[scanOrder] setOtherParams failed', _context5.t0);
|
|
438
|
+
case 24:
|
|
439
|
+
_context5.next = 26;
|
|
243
440
|
return enterProductStep();
|
|
244
|
-
case
|
|
441
|
+
case 26:
|
|
245
442
|
case "end":
|
|
246
|
-
return
|
|
443
|
+
return _context5.stop();
|
|
247
444
|
}
|
|
248
|
-
},
|
|
445
|
+
}, _callee5, null, [[15, 21]]);
|
|
249
446
|
}));
|
|
250
447
|
return function runEntryPaxGateThenEnterProduct() {
|
|
251
|
-
return
|
|
448
|
+
return _ref7.apply(this, arguments);
|
|
252
449
|
};
|
|
253
450
|
}();
|
|
254
451
|
var closePolicyAndBack = function closePolicyAndBack() {
|
|
@@ -283,6 +480,7 @@ function ReadyState() {
|
|
|
283
480
|
content: null
|
|
284
481
|
});
|
|
285
482
|
setPendingFormPayload(null);
|
|
483
|
+
markGate('formSubmitted');
|
|
286
484
|
void runEntryPaxGateThenEnterProduct();
|
|
287
485
|
};
|
|
288
486
|
var handleFormConfirm = function handleFormConfirm() {
|
|
@@ -296,7 +494,8 @@ function ReadyState() {
|
|
|
296
494
|
open: false,
|
|
297
495
|
content: null
|
|
298
496
|
});
|
|
299
|
-
|
|
497
|
+
markGate('policyAccepted');
|
|
498
|
+
if (pendingFormPayload && !isGatePassed('formSubmitted')) {
|
|
300
499
|
openFormModal(pendingFormPayload);
|
|
301
500
|
return;
|
|
302
501
|
}
|
|
@@ -308,16 +507,16 @@ function ReadyState() {
|
|
|
308
507
|
};
|
|
309
508
|
useEffect(function () {
|
|
310
509
|
var checkResourceAvailable = /*#__PURE__*/function () {
|
|
311
|
-
var
|
|
312
|
-
var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, content;
|
|
313
|
-
return _regeneratorRuntime().wrap(function
|
|
314
|
-
while (1) switch (
|
|
510
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
511
|
+
var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, tips, _scanOrderModule$setU, content;
|
|
512
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
513
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
315
514
|
case 0:
|
|
316
515
|
hasOrderId = !!(entryContext !== null && entryContext !== void 0 && entryContext.order_id);
|
|
317
|
-
|
|
516
|
+
_context6.next = 3;
|
|
318
517
|
return runModuleAction('checkResourceAvailable', entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, hasOrderId);
|
|
319
518
|
case 3:
|
|
320
|
-
_yield$runModuleActio =
|
|
519
|
+
_yield$runModuleActio = _context6.sent;
|
|
321
520
|
mode = _yield$runModuleActio.mode;
|
|
322
521
|
order_id = _yield$runModuleActio.order_id;
|
|
323
522
|
errorTips = _yield$runModuleActio.errorTips;
|
|
@@ -332,19 +531,20 @@ function ReadyState() {
|
|
|
332
531
|
requestPaxMinRef.current = Number(requestPaxMin) || 1;
|
|
333
532
|
requestPaxMaxRef.current = Number(requestPaxMax) || 1;
|
|
334
533
|
tableFormRecordRef.current = table_form_record || {};
|
|
534
|
+
setTableName(getLocalizedName(table_form_record === null || table_form_record === void 0 ? void 0 : table_form_record.name));
|
|
335
535
|
normalizedFormPayload = normalizeFormPayload(form, partyroom_booking);
|
|
336
536
|
isAdditionalOrder = mode === 'additional_order' || mode === 'additional_order_with_code';
|
|
337
537
|
setEntryMode(isAdditionalOrder ? 'additional_order' : 'default');
|
|
338
538
|
// 资源空闲:按需依次弹 协议 -> 表单 -> 人数,最后进入商品选择
|
|
339
539
|
if (!(mode === 'idle')) {
|
|
340
|
-
|
|
540
|
+
_context6.next = 35;
|
|
341
541
|
break;
|
|
342
542
|
}
|
|
343
543
|
normalizedPolicyPayload = _typeof(policy) === 'object' && policy !== null ? policy : {
|
|
344
544
|
id: policy
|
|
345
|
-
};
|
|
346
|
-
if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id)) {
|
|
347
|
-
|
|
545
|
+
}; // 步骤缓存:同一 resourceId 会话内已确认过协议则跳过
|
|
546
|
+
if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id && !isGatePassed('policyAccepted'))) {
|
|
547
|
+
_context6.next = 28;
|
|
348
548
|
break;
|
|
349
549
|
}
|
|
350
550
|
setPendingFormPayload(normalizedFormPayload);
|
|
@@ -352,40 +552,63 @@ function ReadyState() {
|
|
|
352
552
|
open: true,
|
|
353
553
|
content: normalizedPolicyPayload
|
|
354
554
|
});
|
|
355
|
-
return
|
|
356
|
-
case
|
|
357
|
-
if (!normalizedFormPayload) {
|
|
358
|
-
|
|
555
|
+
return _context6.abrupt("return");
|
|
556
|
+
case 28:
|
|
557
|
+
if (!(normalizedFormPayload && !isGatePassed('formSubmitted'))) {
|
|
558
|
+
_context6.next = 31;
|
|
359
559
|
break;
|
|
360
560
|
}
|
|
361
561
|
openFormModal(normalizedFormPayload);
|
|
362
|
-
return
|
|
363
|
-
case
|
|
364
|
-
|
|
562
|
+
return _context6.abrupt("return");
|
|
563
|
+
case 31:
|
|
564
|
+
_context6.next = 33;
|
|
365
565
|
return runEntryPaxGateThenEnterProduct();
|
|
366
|
-
case
|
|
367
|
-
|
|
566
|
+
case 33:
|
|
567
|
+
_context6.next = 48;
|
|
368
568
|
break;
|
|
369
|
-
case
|
|
569
|
+
case 35:
|
|
370
570
|
if (!isAdditionalOrder) {
|
|
371
|
-
|
|
571
|
+
_context6.next = 40;
|
|
372
572
|
break;
|
|
373
573
|
}
|
|
374
|
-
|
|
574
|
+
_context6.next = 38;
|
|
375
575
|
return enterProductStep();
|
|
376
|
-
case
|
|
377
|
-
|
|
576
|
+
case 38:
|
|
577
|
+
_context6.next = 48;
|
|
378
578
|
break;
|
|
379
|
-
case
|
|
579
|
+
case 40:
|
|
580
|
+
if (!(mode === 'submit_disabled')) {
|
|
581
|
+
_context6.next = 47;
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
// 禁止下单模式:允许进入商品选择,但下一步按钮需被禁用,点击提示 errorTips
|
|
585
|
+
tips = resolveLocalizedText(errorTips) || String(locales.getText('pisell2.scan.order.submit.disabled.default') || '');
|
|
586
|
+
setSubmitDisabledTips(tips);
|
|
587
|
+
_context6.next = 45;
|
|
588
|
+
return enterProductStep();
|
|
589
|
+
case 45:
|
|
590
|
+
_context6.next = 48;
|
|
591
|
+
break;
|
|
592
|
+
case 47:
|
|
380
593
|
if (mode === 'resource_busy') {
|
|
381
594
|
// 如果资源是占用,则跳转到订单详情页
|
|
382
595
|
// 需要检测当前是否已经登录,如果未登录则先登录再跳转
|
|
596
|
+
// 若用户直接关闭登录弹窗(非登录成功),由于当前还卡在 initialize 步骤,
|
|
597
|
+
// 没有合法后续状态,统一兜底回首页避免卡死。
|
|
383
598
|
if (!isLogin) {
|
|
599
|
+
// 登录回流意图:登录成功后 hydrate 阶段消费 pendingStep,避免卡在 init
|
|
600
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'pendingStep', currentStep);
|
|
384
601
|
openLoginModal({
|
|
385
602
|
callback: function callback(status) {
|
|
603
|
+
var _scanOrderModule$dele2;
|
|
386
604
|
if (status === 'success') {
|
|
605
|
+
var _scanOrderModule$dele;
|
|
606
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
|
|
387
607
|
handleOrderDetail(order_id);
|
|
608
|
+
return;
|
|
388
609
|
}
|
|
610
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele2 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele2 === void 0 || _scanOrderModule$dele2.call(scanOrderModule, 'pendingStep');
|
|
611
|
+
location.replace('/');
|
|
389
612
|
}
|
|
390
613
|
});
|
|
391
614
|
} else {
|
|
@@ -393,7 +616,7 @@ function ReadyState() {
|
|
|
393
616
|
}
|
|
394
617
|
} else {
|
|
395
618
|
// 其他情况,视为不在营业或者异常,返回异常提示
|
|
396
|
-
content = errorTips
|
|
619
|
+
content = resolveLocalizedText(errorTips);
|
|
397
620
|
if (!content) {
|
|
398
621
|
if (mode === 'resource_block') {
|
|
399
622
|
content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
|
|
@@ -403,7 +626,7 @@ function ReadyState() {
|
|
|
403
626
|
}
|
|
404
627
|
Modal.info({
|
|
405
628
|
title: locales.getText('pisell2.scan.order.step.error'),
|
|
406
|
-
content:
|
|
629
|
+
content: resolveLocalizedText(content).trim(),
|
|
407
630
|
okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
|
|
408
631
|
maskClosable: false,
|
|
409
632
|
onOk: function onOk() {
|
|
@@ -411,18 +634,20 @@ function ReadyState() {
|
|
|
411
634
|
}
|
|
412
635
|
});
|
|
413
636
|
}
|
|
414
|
-
case
|
|
637
|
+
case 48:
|
|
415
638
|
case "end":
|
|
416
|
-
return
|
|
639
|
+
return _context6.stop();
|
|
417
640
|
}
|
|
418
|
-
},
|
|
641
|
+
}, _callee6);
|
|
419
642
|
}));
|
|
420
643
|
return function checkResourceAvailable() {
|
|
421
|
-
return
|
|
644
|
+
return _ref8.apply(this, arguments);
|
|
422
645
|
};
|
|
423
646
|
}();
|
|
647
|
+
// 等 ScanOrderProvider 的步骤缓存 hydrate 完成再跑,确保 gate 标记已就位
|
|
648
|
+
if (!isCacheHydrated) return;
|
|
424
649
|
checkResourceAvailable();
|
|
425
|
-
}, []);
|
|
650
|
+
}, [isCacheHydrated]);
|
|
426
651
|
useEffect(function () {
|
|
427
652
|
window.scrollTo({
|
|
428
653
|
top: 0,
|
|
@@ -445,7 +670,9 @@ function ReadyState() {
|
|
|
445
670
|
product: /*#__PURE__*/React.createElement(Menu, {
|
|
446
671
|
onCheckout: function onCheckout() {
|
|
447
672
|
return goToStep('check');
|
|
448
|
-
}
|
|
673
|
+
},
|
|
674
|
+
productList: productList,
|
|
675
|
+
onEnsureProductList: ensureProductListLoaded
|
|
449
676
|
}),
|
|
450
677
|
check: /*#__PURE__*/React.createElement(Check, null),
|
|
451
678
|
error: /*#__PURE__*/React.createElement(ErrorState, {
|
|
@@ -515,15 +742,22 @@ function ReadyState() {
|
|
|
515
742
|
|
|
516
743
|
// 跳转到订单确认页
|
|
517
744
|
var gotoCheckOrder = /*#__PURE__*/function () {
|
|
518
|
-
var
|
|
745
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
519
746
|
var _otherParams$dineInCo;
|
|
520
|
-
var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab;
|
|
521
|
-
return _regeneratorRuntime().wrap(function
|
|
522
|
-
while (1) switch (
|
|
747
|
+
var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab, _scanOrderModule$setU2;
|
|
748
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
749
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
523
750
|
case 0:
|
|
751
|
+
if (!submitDisabledTips) {
|
|
752
|
+
_context7.next = 3;
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
message.warning(submitDisabledTips, 2);
|
|
756
|
+
return _context7.abrupt("return");
|
|
757
|
+
case 3:
|
|
524
758
|
firstFailure = Array.isArray(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
|
|
525
759
|
if (!((cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed) === false)) {
|
|
526
|
-
|
|
760
|
+
_context7.next = 10;
|
|
527
761
|
break;
|
|
528
762
|
}
|
|
529
763
|
failedProductIds = getFirstFailedProductIds();
|
|
@@ -531,21 +765,18 @@ function ReadyState() {
|
|
|
531
765
|
scrollAndHighlightProductsByIds(failedProductIds);
|
|
532
766
|
}
|
|
533
767
|
failureTips = String((firstFailure === null || firstFailure === void 0 ? void 0 : firstFailure.validationMessage) || '').trim();
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
return _context4.abrupt("return");
|
|
539
|
-
case 7:
|
|
540
|
-
_context4.next = 9;
|
|
768
|
+
message.warning(failureTips, 2);
|
|
769
|
+
return _context7.abrupt("return");
|
|
770
|
+
case 10:
|
|
771
|
+
_context7.next = 12;
|
|
541
772
|
return runModuleAction('getOtherParams');
|
|
542
|
-
case
|
|
543
|
-
otherParams =
|
|
773
|
+
case 12:
|
|
774
|
+
otherParams = _context7.sent;
|
|
544
775
|
console.log('otherParams >>>>> ', otherParams);
|
|
545
776
|
dineInConfig = (_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {};
|
|
546
777
|
isPauseOrder = dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig['availability.paused']; // 如果暂停接单直接弹提示,点完确定回首页
|
|
547
778
|
if (!isPauseOrder) {
|
|
548
|
-
|
|
779
|
+
_context7.next = 19;
|
|
549
780
|
break;
|
|
550
781
|
}
|
|
551
782
|
Modal.info({
|
|
@@ -556,28 +787,33 @@ function ReadyState() {
|
|
|
556
787
|
location.replace('/');
|
|
557
788
|
}
|
|
558
789
|
});
|
|
559
|
-
return
|
|
560
|
-
case
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
callback: function callback(status) {
|
|
565
|
-
if (status === 'success') {
|
|
566
|
-
goToStep('check');
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
});
|
|
570
|
-
} else {
|
|
571
|
-
goToStep('check');
|
|
790
|
+
return _context7.abrupt("return");
|
|
791
|
+
case 19:
|
|
792
|
+
if (isLogin) {
|
|
793
|
+
_context7.next = 23;
|
|
794
|
+
break;
|
|
572
795
|
}
|
|
573
|
-
|
|
796
|
+
// 登录前落盘跳转意图:弹窗 callback 能触发时由本函数消费,
|
|
797
|
+
// 整页跳转回流时由 Provider 的 hydrate 消费(参见 venueBooking 同名实现)
|
|
798
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'pendingStep', 'check');
|
|
799
|
+
openLoginModal({
|
|
800
|
+
callback: function callback(status) {
|
|
801
|
+
var _scanOrderModule$dele3;
|
|
802
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele3 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele3 === void 0 || _scanOrderModule$dele3.call(scanOrderModule, 'pendingStep');
|
|
803
|
+
if (status === 'success') goToStep('check');
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
return _context7.abrupt("return");
|
|
807
|
+
case 23:
|
|
808
|
+
goToStep('check');
|
|
809
|
+
case 24:
|
|
574
810
|
case "end":
|
|
575
|
-
return
|
|
811
|
+
return _context7.stop();
|
|
576
812
|
}
|
|
577
|
-
},
|
|
813
|
+
}, _callee7);
|
|
578
814
|
}));
|
|
579
815
|
return function gotoCheckOrder() {
|
|
580
|
-
return
|
|
816
|
+
return _ref9.apply(this, arguments);
|
|
581
817
|
};
|
|
582
818
|
}();
|
|
583
819
|
var isMobileView = isMobile();
|
|
@@ -605,14 +841,16 @@ function ReadyState() {
|
|
|
605
841
|
onCancel: function onCancel() {},
|
|
606
842
|
onNext: gotoCheckOrder,
|
|
607
843
|
items: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [],
|
|
608
|
-
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {}
|
|
844
|
+
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {},
|
|
845
|
+
disabled: !!submitDisabledTips
|
|
609
846
|
})) : null), isShowFooter ? /*#__PURE__*/React.createElement(Footer, {
|
|
610
847
|
cartItems: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [],
|
|
611
848
|
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {},
|
|
612
849
|
actionText: footerActionText,
|
|
613
850
|
onAction: function onAction() {
|
|
614
851
|
return gotoCheckOrder();
|
|
615
|
-
}
|
|
852
|
+
},
|
|
853
|
+
disabled: !!submitDisabledTips
|
|
616
854
|
}) : null, policyModal.open ? /*#__PURE__*/React.createElement(PolicyModal, {
|
|
617
855
|
open: policyModal.open,
|
|
618
856
|
onCancel: closePolicyAndBack,
|