@pisell/private-materials 6.3.138 → 6.3.139
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 +58 -24
- package/es/components/scanOrder/components/Cart/index.less +61 -8
- package/es/components/scanOrder/components/Check/index.js +232 -51
- package/es/components/scanOrder/components/Check/index.less +30 -0
- package/es/components/scanOrder/components/Content/index.js +147 -92
- 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/context.js +98 -3
- package/es/components/scanOrder/locales.d.ts +55 -0
- package/es/components/scanOrder/locales.js +55 -0
- package/es/components/scanOrder/types.d.ts +23 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/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/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 +43 -9
- package/lib/components/scanOrder/components/Cart/index.less +61 -8
- package/lib/components/scanOrder/components/Check/index.js +97 -8
- package/lib/components/scanOrder/components/Check/index.less +30 -0
- package/lib/components/scanOrder/components/Content/index.js +69 -32
- 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/context.js +80 -2
- package/lib/components/scanOrder/locales.d.ts +55 -0
- package/lib/components/scanOrder/locales.js +55 -0
- package/lib/components/scanOrder/types.d.ts +23 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/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/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
|
@@ -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;
|
|
@@ -11,8 +11,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
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
12
|
import React, { 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,16 @@ 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;
|
|
73
82
|
var _useScanOrderLogin = useScanOrderLogin(),
|
|
74
83
|
isLogin = _useScanOrderLogin.isLogin,
|
|
75
84
|
openLoginModal = _useScanOrderLogin.openLoginModal;
|
|
@@ -102,10 +111,6 @@ function ReadyState() {
|
|
|
102
111
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
103
112
|
pendingFormPayload = _useState8[0],
|
|
104
113
|
setPendingFormPayload = _useState8[1];
|
|
105
|
-
var _useState9 = useState('default'),
|
|
106
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
107
|
-
entryMode = _useState10[0],
|
|
108
|
-
setEntryMode = _useState10[1];
|
|
109
114
|
/** checkResourceAvailable 返回 requestEntryPax === 1 时,在协议/表单之后弹人数并写入 scanOrder otherParams */
|
|
110
115
|
var requestEntryPaxRef = useRef(0);
|
|
111
116
|
var requestPaxMinRef = useRef(1);
|
|
@@ -118,6 +123,14 @@ function ReadyState() {
|
|
|
118
123
|
var currentLocale = locales.getLocale();
|
|
119
124
|
return nameMap[currentLocale] || nameMap.original || nameMap.en || '';
|
|
120
125
|
};
|
|
126
|
+
|
|
127
|
+
/** 解析可能是纯字符串或多语言对象的文案,兜底 current locale -> original -> en -> 空串 */
|
|
128
|
+
var resolveLocalizedText = function resolveLocalizedText(value) {
|
|
129
|
+
if (value == null) return '';
|
|
130
|
+
if (typeof value === 'string') return value;
|
|
131
|
+
if (_typeof(value) !== 'object') return String(value);
|
|
132
|
+
return getLocalizedName(value);
|
|
133
|
+
};
|
|
121
134
|
var normalizeFormPayload = function normalizeFormPayload(formPayload, partyroomBookingPayload) {
|
|
122
135
|
var _ref, _ref2, _sourcePayload$id;
|
|
123
136
|
var sourcePayload = formPayload !== null && formPayload !== void 0 ? formPayload : partyroomBookingPayload;
|
|
@@ -134,13 +147,21 @@ function ReadyState() {
|
|
|
134
147
|
setting: sourceDetail === null || sourceDetail === void 0 ? void 0 : sourceDetail.setting
|
|
135
148
|
};
|
|
136
149
|
};
|
|
137
|
-
|
|
150
|
+
var app = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
|
|
138
151
|
// 跳转到订单详情页
|
|
139
152
|
var handleOrderDetail = function handleOrderDetail(order_id) {
|
|
153
|
+
var _app$history, _app$history2;
|
|
140
154
|
var link = "/order/details?id=".concat(order_id);
|
|
141
|
-
|
|
155
|
+
if (app !== null && app !== void 0 && (_app$history = app.history) !== null && _app$history !== void 0 && _app$history.replace) {
|
|
156
|
+
app.history.replace(link);
|
|
157
|
+
} else if (app !== null && app !== void 0 && (_app$history2 = app.history) !== null && _app$history2 !== void 0 && _app$history2.push) {
|
|
158
|
+
app.history.push(link);
|
|
159
|
+
} else {
|
|
160
|
+
location.replace(link);
|
|
161
|
+
}
|
|
142
162
|
};
|
|
143
163
|
var handleBack = function handleBack() {
|
|
164
|
+
var _app$history3, _app$history4;
|
|
144
165
|
if (currentStep !== 'product') {
|
|
145
166
|
prevStep();
|
|
146
167
|
return;
|
|
@@ -149,7 +170,13 @@ function ReadyState() {
|
|
|
149
170
|
handleOrderDetail(entryContext.order_id);
|
|
150
171
|
return;
|
|
151
172
|
}
|
|
152
|
-
|
|
173
|
+
if (app !== null && app !== void 0 && (_app$history3 = app.history) !== null && _app$history3 !== void 0 && _app$history3.replace) {
|
|
174
|
+
app.history.replace('/');
|
|
175
|
+
} else if (app !== null && app !== void 0 && (_app$history4 = app.history) !== null && _app$history4 !== void 0 && _app$history4.push) {
|
|
176
|
+
app.history.push('/');
|
|
177
|
+
} else {
|
|
178
|
+
location.replace('/');
|
|
179
|
+
}
|
|
153
180
|
};
|
|
154
181
|
var enterProductStep = /*#__PURE__*/function () {
|
|
155
182
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -171,7 +198,8 @@ function ReadyState() {
|
|
|
171
198
|
console.warn('[scanOrder] applyItemRulePrefill failed', _context.t0);
|
|
172
199
|
case 10:
|
|
173
200
|
_context.prev = 10;
|
|
174
|
-
|
|
201
|
+
// 步骤缓存命中时,currentStep 可能已恢复到 'check';不把它拉回 'product'
|
|
202
|
+
if (currentStep !== 'check') goToStep('product');
|
|
175
203
|
return _context.finish(10);
|
|
176
204
|
case 13:
|
|
177
205
|
case "end":
|
|
@@ -200,7 +228,16 @@ function ReadyState() {
|
|
|
200
228
|
case 3:
|
|
201
229
|
return _context2.abrupt("return");
|
|
202
230
|
case 4:
|
|
203
|
-
|
|
231
|
+
if (!isGatePassed('paxEntered')) {
|
|
232
|
+
_context2.next = 8;
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
_context2.next = 7;
|
|
236
|
+
return enterProductStep();
|
|
237
|
+
case 7:
|
|
238
|
+
return _context2.abrupt("return");
|
|
239
|
+
case 8:
|
|
240
|
+
_context2.next = 10;
|
|
204
241
|
return new Promise(function (resolve) {
|
|
205
242
|
var _tableFormRecordRef$c;
|
|
206
243
|
if (typeof (utils === null || utils === void 0 ? void 0 : utils.action) !== 'function') {
|
|
@@ -219,33 +256,34 @@ function ReadyState() {
|
|
|
219
256
|
}
|
|
220
257
|
});
|
|
221
258
|
});
|
|
222
|
-
case
|
|
259
|
+
case 10:
|
|
223
260
|
pax = _context2.sent;
|
|
224
261
|
if (!(pax == null)) {
|
|
225
|
-
_context2.next =
|
|
262
|
+
_context2.next = 14;
|
|
226
263
|
break;
|
|
227
264
|
}
|
|
228
265
|
location.replace('/');
|
|
229
266
|
return _context2.abrupt("return");
|
|
230
|
-
case
|
|
231
|
-
_context2.prev =
|
|
232
|
-
_context2.next =
|
|
267
|
+
case 14:
|
|
268
|
+
_context2.prev = 14;
|
|
269
|
+
_context2.next = 17;
|
|
233
270
|
return runModuleAction('setEntryPaxNumber', pax);
|
|
234
|
-
case
|
|
235
|
-
|
|
271
|
+
case 17:
|
|
272
|
+
markGate('paxEntered');
|
|
273
|
+
_context2.next = 23;
|
|
236
274
|
break;
|
|
237
|
-
case
|
|
238
|
-
_context2.prev =
|
|
239
|
-
_context2.t0 = _context2["catch"](
|
|
275
|
+
case 20:
|
|
276
|
+
_context2.prev = 20;
|
|
277
|
+
_context2.t0 = _context2["catch"](14);
|
|
240
278
|
console.warn('[scanOrder] setOtherParams failed', _context2.t0);
|
|
241
|
-
case
|
|
242
|
-
_context2.next =
|
|
279
|
+
case 23:
|
|
280
|
+
_context2.next = 25;
|
|
243
281
|
return enterProductStep();
|
|
244
|
-
case
|
|
282
|
+
case 25:
|
|
245
283
|
case "end":
|
|
246
284
|
return _context2.stop();
|
|
247
285
|
}
|
|
248
|
-
}, _callee2, null, [[
|
|
286
|
+
}, _callee2, null, [[14, 20]]);
|
|
249
287
|
}));
|
|
250
288
|
return function runEntryPaxGateThenEnterProduct() {
|
|
251
289
|
return _ref4.apply(this, arguments);
|
|
@@ -283,6 +321,7 @@ function ReadyState() {
|
|
|
283
321
|
content: null
|
|
284
322
|
});
|
|
285
323
|
setPendingFormPayload(null);
|
|
324
|
+
markGate('formSubmitted');
|
|
286
325
|
void runEntryPaxGateThenEnterProduct();
|
|
287
326
|
};
|
|
288
327
|
var handleFormConfirm = function handleFormConfirm() {
|
|
@@ -296,7 +335,8 @@ function ReadyState() {
|
|
|
296
335
|
open: false,
|
|
297
336
|
content: null
|
|
298
337
|
});
|
|
299
|
-
|
|
338
|
+
markGate('policyAccepted');
|
|
339
|
+
if (pendingFormPayload && !isGatePassed('formSubmitted')) {
|
|
300
340
|
openFormModal(pendingFormPayload);
|
|
301
341
|
return;
|
|
302
342
|
}
|
|
@@ -309,7 +349,7 @@ function ReadyState() {
|
|
|
309
349
|
useEffect(function () {
|
|
310
350
|
var checkResourceAvailable = /*#__PURE__*/function () {
|
|
311
351
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
312
|
-
var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, content;
|
|
352
|
+
var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, tips, content;
|
|
313
353
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
314
354
|
while (1) switch (_context3.prev = _context3.next) {
|
|
315
355
|
case 0:
|
|
@@ -332,19 +372,20 @@ function ReadyState() {
|
|
|
332
372
|
requestPaxMinRef.current = Number(requestPaxMin) || 1;
|
|
333
373
|
requestPaxMaxRef.current = Number(requestPaxMax) || 1;
|
|
334
374
|
tableFormRecordRef.current = table_form_record || {};
|
|
375
|
+
setTableName(getLocalizedName(table_form_record === null || table_form_record === void 0 ? void 0 : table_form_record.name));
|
|
335
376
|
normalizedFormPayload = normalizeFormPayload(form, partyroom_booking);
|
|
336
377
|
isAdditionalOrder = mode === 'additional_order' || mode === 'additional_order_with_code';
|
|
337
378
|
setEntryMode(isAdditionalOrder ? 'additional_order' : 'default');
|
|
338
379
|
// 资源空闲:按需依次弹 协议 -> 表单 -> 人数,最后进入商品选择
|
|
339
380
|
if (!(mode === 'idle')) {
|
|
340
|
-
_context3.next =
|
|
381
|
+
_context3.next = 35;
|
|
341
382
|
break;
|
|
342
383
|
}
|
|
343
384
|
normalizedPolicyPayload = _typeof(policy) === 'object' && policy !== null ? policy : {
|
|
344
385
|
id: policy
|
|
345
|
-
};
|
|
346
|
-
if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id)) {
|
|
347
|
-
_context3.next =
|
|
386
|
+
}; // 步骤缓存:同一 resourceId 会话内已确认过协议则跳过
|
|
387
|
+
if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id && !isGatePassed('policyAccepted'))) {
|
|
388
|
+
_context3.next = 28;
|
|
348
389
|
break;
|
|
349
390
|
}
|
|
350
391
|
setPendingFormPayload(normalizedFormPayload);
|
|
@@ -353,65 +394,71 @@ function ReadyState() {
|
|
|
353
394
|
content: normalizedPolicyPayload
|
|
354
395
|
});
|
|
355
396
|
return _context3.abrupt("return");
|
|
356
|
-
case
|
|
357
|
-
if (!normalizedFormPayload) {
|
|
358
|
-
_context3.next =
|
|
397
|
+
case 28:
|
|
398
|
+
if (!(normalizedFormPayload && !isGatePassed('formSubmitted'))) {
|
|
399
|
+
_context3.next = 31;
|
|
359
400
|
break;
|
|
360
401
|
}
|
|
361
402
|
openFormModal(normalizedFormPayload);
|
|
362
403
|
return _context3.abrupt("return");
|
|
363
|
-
case
|
|
364
|
-
_context3.next =
|
|
404
|
+
case 31:
|
|
405
|
+
_context3.next = 33;
|
|
365
406
|
return runEntryPaxGateThenEnterProduct();
|
|
366
|
-
case
|
|
367
|
-
_context3.next =
|
|
407
|
+
case 33:
|
|
408
|
+
_context3.next = 54;
|
|
368
409
|
break;
|
|
369
|
-
case
|
|
410
|
+
case 35:
|
|
370
411
|
if (!isAdditionalOrder) {
|
|
371
|
-
_context3.next =
|
|
412
|
+
_context3.next = 44;
|
|
372
413
|
break;
|
|
373
414
|
}
|
|
374
|
-
|
|
415
|
+
if (!hasOrderId) {
|
|
416
|
+
_context3.next = 41;
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
_context3.next = 39;
|
|
375
420
|
return enterProductStep();
|
|
376
|
-
case 37:
|
|
377
|
-
_context3.next = 40;
|
|
378
|
-
break;
|
|
379
421
|
case 39:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
422
|
+
_context3.next = 42;
|
|
423
|
+
break;
|
|
424
|
+
case 41:
|
|
425
|
+
handleOrderDetail(order_id);
|
|
426
|
+
case 42:
|
|
427
|
+
_context3.next = 54;
|
|
428
|
+
break;
|
|
429
|
+
case 44:
|
|
430
|
+
if (!(mode === 'submit_disabled')) {
|
|
431
|
+
_context3.next = 51;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
// 禁止下单模式:允许进入商品选择,但下一步按钮需被禁用,点击提示 errorTips
|
|
435
|
+
tips = resolveLocalizedText(errorTips) || String(locales.getText('pisell2.scan.order.submit.disabled.default') || '');
|
|
436
|
+
setSubmitDisabledTips(tips);
|
|
437
|
+
_context3.next = 49;
|
|
438
|
+
return enterProductStep();
|
|
439
|
+
case 49:
|
|
440
|
+
_context3.next = 54;
|
|
441
|
+
break;
|
|
442
|
+
case 51:
|
|
443
|
+
// 其他情况,视为不在营业或者异常,返回异常提示
|
|
444
|
+
content = resolveLocalizedText(errorTips);
|
|
445
|
+
if (!content) {
|
|
446
|
+
if (mode === 'resource_busy') {
|
|
447
|
+
content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
|
|
391
448
|
} else {
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
} else {
|
|
395
|
-
// 其他情况,视为不在营业或者异常,返回异常提示
|
|
396
|
-
content = errorTips || '';
|
|
397
|
-
if (!content) {
|
|
398
|
-
if (mode === 'resource_block') {
|
|
399
|
-
content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
|
|
400
|
-
} else {
|
|
401
|
-
content = String(locales.getText('pisell2.scan.order.store.status.exception') || '');
|
|
402
|
-
}
|
|
449
|
+
content = String(locales.getText('pisell2.scan.order.store.status.exception') || '');
|
|
403
450
|
}
|
|
404
|
-
Modal.info({
|
|
405
|
-
title: locales.getText('pisell2.scan.order.step.error'),
|
|
406
|
-
content: String(content || '').trim(),
|
|
407
|
-
okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
|
|
408
|
-
maskClosable: false,
|
|
409
|
-
onOk: function onOk() {
|
|
410
|
-
location.replace('/');
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
451
|
}
|
|
414
|
-
|
|
452
|
+
Modal.info({
|
|
453
|
+
title: locales.getText('pisell2.scan.order.step.error'),
|
|
454
|
+
content: String(content || '').trim(),
|
|
455
|
+
okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
|
|
456
|
+
maskClosable: false,
|
|
457
|
+
onOk: function onOk() {
|
|
458
|
+
location.replace('/');
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
case 54:
|
|
415
462
|
case "end":
|
|
416
463
|
return _context3.stop();
|
|
417
464
|
}
|
|
@@ -421,8 +468,10 @@ function ReadyState() {
|
|
|
421
468
|
return _ref5.apply(this, arguments);
|
|
422
469
|
};
|
|
423
470
|
}();
|
|
471
|
+
// 等 ScanOrderProvider 的步骤缓存 hydrate 完成再跑,确保 gate 标记已就位
|
|
472
|
+
if (!isCacheHydrated) return;
|
|
424
473
|
checkResourceAvailable();
|
|
425
|
-
}, []);
|
|
474
|
+
}, [isCacheHydrated]);
|
|
426
475
|
useEffect(function () {
|
|
427
476
|
window.scrollTo({
|
|
428
477
|
top: 0,
|
|
@@ -521,9 +570,16 @@ function ReadyState() {
|
|
|
521
570
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
522
571
|
while (1) switch (_context4.prev = _context4.next) {
|
|
523
572
|
case 0:
|
|
573
|
+
if (!submitDisabledTips) {
|
|
574
|
+
_context4.next = 3;
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
message.warning(submitDisabledTips, 2);
|
|
578
|
+
return _context4.abrupt("return");
|
|
579
|
+
case 3:
|
|
524
580
|
firstFailure = Array.isArray(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
|
|
525
581
|
if (!((cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed) === false)) {
|
|
526
|
-
_context4.next =
|
|
582
|
+
_context4.next = 10;
|
|
527
583
|
break;
|
|
528
584
|
}
|
|
529
585
|
failedProductIds = getFirstFailedProductIds();
|
|
@@ -531,21 +587,18 @@ function ReadyState() {
|
|
|
531
587
|
scrollAndHighlightProductsByIds(failedProductIds);
|
|
532
588
|
}
|
|
533
589
|
failureTips = String((firstFailure === null || firstFailure === void 0 ? void 0 : firstFailure.validationMessage) || '').trim();
|
|
534
|
-
|
|
535
|
-
content: failureTips,
|
|
536
|
-
duration: 2
|
|
537
|
-
});
|
|
590
|
+
message.warning(failureTips, 2);
|
|
538
591
|
return _context4.abrupt("return");
|
|
539
|
-
case
|
|
540
|
-
_context4.next =
|
|
592
|
+
case 10:
|
|
593
|
+
_context4.next = 12;
|
|
541
594
|
return runModuleAction('getOtherParams');
|
|
542
|
-
case
|
|
595
|
+
case 12:
|
|
543
596
|
otherParams = _context4.sent;
|
|
544
597
|
console.log('otherParams >>>>> ', otherParams);
|
|
545
598
|
dineInConfig = (_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {};
|
|
546
599
|
isPauseOrder = dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig['availability.paused']; // 如果暂停接单直接弹提示,点完确定回首页
|
|
547
600
|
if (!isPauseOrder) {
|
|
548
|
-
_context4.next =
|
|
601
|
+
_context4.next = 19;
|
|
549
602
|
break;
|
|
550
603
|
}
|
|
551
604
|
Modal.info({
|
|
@@ -557,7 +610,7 @@ function ReadyState() {
|
|
|
557
610
|
}
|
|
558
611
|
});
|
|
559
612
|
return _context4.abrupt("return");
|
|
560
|
-
case
|
|
613
|
+
case 19:
|
|
561
614
|
// 需要先确认当前是否登录,如果没有则需要登录
|
|
562
615
|
if (!isLogin) {
|
|
563
616
|
openLoginModal({
|
|
@@ -570,7 +623,7 @@ function ReadyState() {
|
|
|
570
623
|
} else {
|
|
571
624
|
goToStep('check');
|
|
572
625
|
}
|
|
573
|
-
case
|
|
626
|
+
case 20:
|
|
574
627
|
case "end":
|
|
575
628
|
return _context4.stop();
|
|
576
629
|
}
|
|
@@ -605,14 +658,16 @@ function ReadyState() {
|
|
|
605
658
|
onCancel: function onCancel() {},
|
|
606
659
|
onNext: gotoCheckOrder,
|
|
607
660
|
items: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [],
|
|
608
|
-
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {}
|
|
661
|
+
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {},
|
|
662
|
+
disabled: !!submitDisabledTips
|
|
609
663
|
})) : null), isShowFooter ? /*#__PURE__*/React.createElement(Footer, {
|
|
610
664
|
cartItems: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.cartItems) || [],
|
|
611
665
|
summary: (viewModel === null || viewModel === void 0 ? void 0 : viewModel.summary) || {},
|
|
612
666
|
actionText: footerActionText,
|
|
613
667
|
onAction: function onAction() {
|
|
614
668
|
return gotoCheckOrder();
|
|
615
|
-
}
|
|
669
|
+
},
|
|
670
|
+
disabled: !!submitDisabledTips
|
|
616
671
|
}) : null, policyModal.open ? /*#__PURE__*/React.createElement(PolicyModal, {
|
|
617
672
|
open: policyModal.open,
|
|
618
673
|
onCancel: closePolicyAndBack,
|
|
@@ -14,7 +14,9 @@ export default function Footer(props) {
|
|
|
14
14
|
var cartItems = props.cartItems,
|
|
15
15
|
summary = props.summary,
|
|
16
16
|
actionText = props.actionText,
|
|
17
|
-
onAction = props.onAction
|
|
17
|
+
onAction = props.onAction,
|
|
18
|
+
_props$disabled = props.disabled,
|
|
19
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
18
20
|
var _useState = useState(false),
|
|
19
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
22
|
cartOpen = _useState2[0],
|
|
@@ -51,7 +53,7 @@ export default function Footer(props) {
|
|
|
51
53
|
}))), /*#__PURE__*/React.createElement(Button, {
|
|
52
54
|
type: "primary",
|
|
53
55
|
size: "large",
|
|
54
|
-
className: "pisell-scan-order-footer-btn",
|
|
56
|
+
className: "pisell-scan-order-footer-btn".concat(disabled ? ' pisell-scan-order-footer-btn-disabled' : ''),
|
|
55
57
|
onClick: onAction
|
|
56
58
|
}, actionText))), /*#__PURE__*/React.createElement(Cart, {
|
|
57
59
|
open: cartOpen,
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
justify-content: space-between;
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: 12px;
|
|
9
|
-
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
height: 70px;
|
|
11
|
+
padding: 0 16px;
|
|
10
12
|
border-top: 1px solid #eaecf0;
|
|
11
13
|
background: #f9fafb;
|
|
12
|
-
border-radius:
|
|
14
|
+
border-radius: 0;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.pisell-scan-order-footer-left {
|
|
@@ -33,8 +35,13 @@
|
|
|
33
35
|
|
|
34
36
|
.pisell-scan-order-footer-btn {
|
|
35
37
|
min-width: 128px;
|
|
36
|
-
height:
|
|
37
|
-
border-radius:
|
|
38
|
+
height: 48px;
|
|
39
|
+
border-radius: 12px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-scan-order-footer-btn-disabled {
|
|
43
|
+
opacity: 0.45;
|
|
44
|
+
cursor: not-allowed;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
.pisell-scan-order-footer-right {
|
|
@@ -57,8 +64,10 @@
|
|
|
57
64
|
right: 0;
|
|
58
65
|
bottom: 0;
|
|
59
66
|
z-index: 30;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
padding-bottom:
|
|
67
|
+
height: calc(70px + constant(safe-area-inset-bottom));
|
|
68
|
+
height: calc(70px + env(safe-area-inset-bottom, 0px));
|
|
69
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
70
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
71
|
+
border-radius: 0;
|
|
63
72
|
}
|
|
64
73
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* FulfillmentMode
|
|
5
|
+
*
|
|
6
|
+
* 通过 scanOrder module 读取 getFulfillmentModes() 返回的 { enableTableService, enablePickup }:
|
|
7
|
+
* - 两个都开启:渲染可切换的 Radio.Group,默认 Table service,挂载即同步一次 setPickupReferenceMode。
|
|
8
|
+
* - 只开启一个:仅渲染单行文案提示当前取餐方式,并同步一次 setPickupReferenceMode。
|
|
9
|
+
* - 都未开启:不渲染。
|
|
10
|
+
*/
|
|
11
|
+
export default function FulfillmentMode(): JSX.Element | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import { Radio } from 'antd';
|
|
9
|
+
import { locales } from '@pisell/utils';
|
|
10
|
+
import { useScanOrderContext } from "../../context";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
/**
|
|
13
|
+
* FulfillmentMode
|
|
14
|
+
*
|
|
15
|
+
* 通过 scanOrder module 读取 getFulfillmentModes() 返回的 { enableTableService, enablePickup }:
|
|
16
|
+
* - 两个都开启:渲染可切换的 Radio.Group,默认 Table service,挂载即同步一次 setPickupReferenceMode。
|
|
17
|
+
* - 只开启一个:仅渲染单行文案提示当前取餐方式,并同步一次 setPickupReferenceMode。
|
|
18
|
+
* - 都未开启:不渲染。
|
|
19
|
+
*/
|
|
20
|
+
export default function FulfillmentMode() {
|
|
21
|
+
var _useScanOrderContext = useScanOrderContext(),
|
|
22
|
+
scanOrderModule = _useScanOrderContext.scanOrderModule;
|
|
23
|
+
var _useState = useState({}),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
modes = _useState2[0],
|
|
26
|
+
setModes = _useState2[1];
|
|
27
|
+
var _useState3 = useState('table_service'),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
mode = _useState4[0],
|
|
30
|
+
setMode = _useState4[1];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (!scanOrderModule) return;
|
|
33
|
+
var next = (typeof scanOrderModule.getFulfillmentModes === 'function' ? scanOrderModule.getFulfillmentModes() : undefined) || {};
|
|
34
|
+
setModes(next);
|
|
35
|
+
var onlyTable = !!next.enableTableService && !next.enablePickup;
|
|
36
|
+
var onlyPickup = !next.enableTableService && !!next.enablePickup;
|
|
37
|
+
var initial = onlyPickup ? 'counter_pickup' : onlyTable ? 'table_service' : 'table_service';
|
|
38
|
+
setMode(initial);
|
|
39
|
+
if ((next.enableTableService || next.enablePickup) && typeof scanOrderModule.setPickupReferenceMode === 'function') {
|
|
40
|
+
scanOrderModule.setPickupReferenceMode(initial);
|
|
41
|
+
}
|
|
42
|
+
}, [scanOrderModule]);
|
|
43
|
+
var enableTableService = modes.enableTableService,
|
|
44
|
+
enablePickup = modes.enablePickup;
|
|
45
|
+
var labelTitle = useMemo(function () {
|
|
46
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.title'));
|
|
47
|
+
}, []);
|
|
48
|
+
var tableServiceText = useMemo(function () {
|
|
49
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.table_service'));
|
|
50
|
+
}, []);
|
|
51
|
+
var pickupText = useMemo(function () {
|
|
52
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.pickup'));
|
|
53
|
+
}, []);
|
|
54
|
+
if (!enableTableService && !enablePickup) return null;
|
|
55
|
+
if (!enableTableService || !enablePickup) {
|
|
56
|
+
var singleLabel = enablePickup ? pickupText : tableServiceText;
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "pisell-scan-order-fulfillment pisell-scan-order-fulfillment-single"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
+
className: "pisell-scan-order-fulfillment-title"
|
|
61
|
+
}, labelTitle), /*#__PURE__*/React.createElement("span", {
|
|
62
|
+
className: "pisell-scan-order-fulfillment-value"
|
|
63
|
+
}, singleLabel));
|
|
64
|
+
}
|
|
65
|
+
var handleChange = function handleChange(next) {
|
|
66
|
+
if (next === mode) return;
|
|
67
|
+
setMode(next);
|
|
68
|
+
if (typeof (scanOrderModule === null || scanOrderModule === void 0 ? void 0 : scanOrderModule.setPickupReferenceMode) === 'function') {
|
|
69
|
+
scanOrderModule.setPickupReferenceMode(next);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "pisell-scan-order-fulfillment"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: "pisell-scan-order-fulfillment-title"
|
|
76
|
+
}, labelTitle), /*#__PURE__*/React.createElement(Radio.Group, {
|
|
77
|
+
className: "pisell-scan-order-fulfillment-group",
|
|
78
|
+
optionType: "button",
|
|
79
|
+
buttonStyle: "solid",
|
|
80
|
+
value: mode,
|
|
81
|
+
onChange: function onChange(event) {
|
|
82
|
+
var _event$target;
|
|
83
|
+
return handleChange(event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);
|
|
84
|
+
}
|
|
85
|
+
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
|
86
|
+
value: "table_service"
|
|
87
|
+
}, tableServiceText), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
88
|
+
value: "counter_pickup"
|
|
89
|
+
}, pickupText)));
|
|
90
|
+
}
|