@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-scan-order-fulfillment {
|
|
2
|
+
padding: 4px 16px;
|
|
3
|
+
margin-bottom: 12px;
|
|
4
|
+
background: #fff;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
|
|
7
|
+
.pisell-scan-order-fulfillment-title {
|
|
8
|
+
color: #101828;
|
|
9
|
+
font-size: 16px;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
margin-bottom: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pisell-scan-order-fulfillment-group {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode-radio-button-wrapper {
|
|
19
|
+
flex: 1;
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pisell-scan-order-fulfillment-single {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
|
|
31
|
+
.pisell-scan-order-fulfillment-title {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pisell-scan-order-fulfillment-value {
|
|
36
|
+
color: #344054;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ManualPickupRefModalProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
confirmLoading?: boolean;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onConfirm: (value: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* ManualPickupRefModal
|
|
11
|
+
*
|
|
12
|
+
* 当 scanOrder.checkManualPickupRef() 返回 enabled=true 时,弹出让用户输入
|
|
13
|
+
* 昵称/buzzer 的弹窗。确认时回调 onConfirm(value),由外部负责 setPickupRef 与下单。
|
|
14
|
+
*/
|
|
15
|
+
export default function ManualPickupRefModal({ open, confirmLoading, onCancel, onConfirm, }: ManualPickupRefModalProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
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 { Input, Modal } from 'antd';
|
|
9
|
+
import { Button } from '@pisell/materials';
|
|
10
|
+
import { locales } from '@pisell/utils';
|
|
11
|
+
import "./index.less";
|
|
12
|
+
/**
|
|
13
|
+
* ManualPickupRefModal
|
|
14
|
+
*
|
|
15
|
+
* 当 scanOrder.checkManualPickupRef() 返回 enabled=true 时,弹出让用户输入
|
|
16
|
+
* 昵称/buzzer 的弹窗。确认时回调 onConfirm(value),由外部负责 setPickupRef 与下单。
|
|
17
|
+
*/
|
|
18
|
+
export default function ManualPickupRefModal(_ref) {
|
|
19
|
+
var open = _ref.open,
|
|
20
|
+
_ref$confirmLoading = _ref.confirmLoading,
|
|
21
|
+
confirmLoading = _ref$confirmLoading === void 0 ? false : _ref$confirmLoading,
|
|
22
|
+
onCancel = _ref.onCancel,
|
|
23
|
+
onConfirm = _ref.onConfirm;
|
|
24
|
+
var _useState = useState(''),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
value = _useState2[0],
|
|
27
|
+
setValue = _useState2[1];
|
|
28
|
+
useEffect(function () {
|
|
29
|
+
if (open) setValue('');
|
|
30
|
+
}, [open]);
|
|
31
|
+
var title = useMemo(function () {
|
|
32
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.title'));
|
|
33
|
+
}, []);
|
|
34
|
+
var heading = useMemo(function () {
|
|
35
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.heading'));
|
|
36
|
+
}, []);
|
|
37
|
+
var description = useMemo(function () {
|
|
38
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.description'));
|
|
39
|
+
}, []);
|
|
40
|
+
var placeholder = useMemo(function () {
|
|
41
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.placeholder'));
|
|
42
|
+
}, []);
|
|
43
|
+
var confirmText = useMemo(function () {
|
|
44
|
+
return String(locales.getText('pisell2.event.confirm') || 'Confirm');
|
|
45
|
+
}, []);
|
|
46
|
+
var trimmed = value.trim();
|
|
47
|
+
var canConfirm = !!trimmed && !confirmLoading;
|
|
48
|
+
var handleConfirm = function handleConfirm() {
|
|
49
|
+
if (!canConfirm) return;
|
|
50
|
+
onConfirm(trimmed);
|
|
51
|
+
};
|
|
52
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
53
|
+
open: open,
|
|
54
|
+
title: title,
|
|
55
|
+
footer: null,
|
|
56
|
+
onCancel: onCancel,
|
|
57
|
+
maskClosable: false,
|
|
58
|
+
destroyOnClose: true,
|
|
59
|
+
centered: true,
|
|
60
|
+
className: "pisell-scan-order-pickup-ref-modal"
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "pisell-scan-order-pickup-ref-body"
|
|
63
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: "pisell-scan-order-pickup-ref-heading"
|
|
65
|
+
}, heading), /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "pisell-scan-order-pickup-ref-desc"
|
|
67
|
+
}, description), /*#__PURE__*/React.createElement(Input, {
|
|
68
|
+
size: "large",
|
|
69
|
+
placeholder: placeholder,
|
|
70
|
+
value: value,
|
|
71
|
+
onChange: function onChange(event) {
|
|
72
|
+
var _event$target;
|
|
73
|
+
return setValue((event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value) || '');
|
|
74
|
+
},
|
|
75
|
+
onPressEnter: handleConfirm,
|
|
76
|
+
className: "pisell-scan-order-pickup-ref-input",
|
|
77
|
+
maxLength: 32,
|
|
78
|
+
allowClear: true
|
|
79
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
type: "primary",
|
|
81
|
+
block: true,
|
|
82
|
+
size: "large",
|
|
83
|
+
disabled: !canConfirm,
|
|
84
|
+
loading: confirmLoading,
|
|
85
|
+
onClick: handleConfirm
|
|
86
|
+
}, confirmText)));
|
|
87
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.pisell-scan-order-pickup-ref-modal {
|
|
2
|
+
.pisell-lowcode-modal-content {
|
|
3
|
+
border-radius: 16px;
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-lowcode-modal-header {
|
|
8
|
+
padding: 16px 20px;
|
|
9
|
+
border-bottom: 1px solid #eaecf0;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell-lowcode-modal-title {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
color: #101828;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-lowcode-modal-body {
|
|
20
|
+
padding: 24px 20px 28px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pisell-lowcode-modal-close {
|
|
24
|
+
top: 14px;
|
|
25
|
+
inset-inline-end: 16px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pisell-scan-order-pickup-ref-body {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
|
|
35
|
+
.pisell-scan-order-pickup-ref-heading {
|
|
36
|
+
text-align: center;
|
|
37
|
+
color: #101828;
|
|
38
|
+
font-size: 24px;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
line-height: 1.3;
|
|
41
|
+
margin-top: 4px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pisell-scan-order-pickup-ref-desc {
|
|
45
|
+
text-align: center;
|
|
46
|
+
color: #667085;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
margin-bottom: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pisell-scan-order-pickup-ref-input {
|
|
53
|
+
height: 48px;
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
|
|
56
|
+
input {
|
|
57
|
+
text-align: center;
|
|
58
|
+
font-size: 16px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -2,6 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
10
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
12
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -12,7 +17,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
17
|
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; }
|
|
13
18
|
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; } }
|
|
14
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import React, { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
20
|
+
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
21
|
import { locales } from '@pisell/utils';
|
|
17
22
|
import { useScanOrderModule, safeRunModuleAction, SCAN_ORDER_STEPS, createScanOrderViewModel } from "./hooks";
|
|
18
23
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
@@ -55,7 +60,41 @@ export function ScanOrderProvider(_ref) {
|
|
|
55
60
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
56
61
|
footerActionText = _useState12[0],
|
|
57
62
|
setFooterActionText = _useState12[1];
|
|
63
|
+
var _useState13 = useState(''),
|
|
64
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
65
|
+
tableName = _useState14[0],
|
|
66
|
+
setTableName = _useState14[1];
|
|
67
|
+
var _useState15 = useState('default'),
|
|
68
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
69
|
+
entryMode = _useState16[0],
|
|
70
|
+
setEntryMode = _useState16[1];
|
|
71
|
+
var _useState17 = useState(''),
|
|
72
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
73
|
+
submitDisabledTips = _useState18[0],
|
|
74
|
+
setSubmitDisabledTips = _useState18[1];
|
|
75
|
+
var _useState19 = useState(false),
|
|
76
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
77
|
+
isCacheHydrated = _useState20[0],
|
|
78
|
+
setIsCacheHydrated = _useState20[1];
|
|
79
|
+
var hydratedRef = useRef(false);
|
|
58
80
|
var stepList = _toConsumableArray(SCAN_ORDER_STEPS);
|
|
81
|
+
|
|
82
|
+
// ─── 步骤缓存:gate 标记读写 ───
|
|
83
|
+
var isGatePassed = useCallback(function (flag) {
|
|
84
|
+
var _scanOrderModule$getU;
|
|
85
|
+
var gate = scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$getU = scanOrderModule.getUIState) === null || _scanOrderModule$getU === void 0 ? void 0 : _scanOrderModule$getU.call(scanOrderModule, 'gate');
|
|
86
|
+
return Boolean(gate === null || gate === void 0 ? void 0 : gate[flag]);
|
|
87
|
+
}, [scanOrderModule]);
|
|
88
|
+
var markGate = useCallback(function (flag) {
|
|
89
|
+
var _scanOrderModule$getU2;
|
|
90
|
+
if (!(scanOrderModule !== null && scanOrderModule !== void 0 && scanOrderModule.setUIState)) return;
|
|
91
|
+
var prev = ((_scanOrderModule$getU2 = scanOrderModule.getUIState) === null || _scanOrderModule$getU2 === void 0 ? void 0 : _scanOrderModule$getU2.call(scanOrderModule, 'gate')) || {};
|
|
92
|
+
scanOrderModule.setUIState('gate', _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, flag, true)));
|
|
93
|
+
}, [scanOrderModule]);
|
|
94
|
+
var clearStepCache = useCallback(function () {
|
|
95
|
+
var _scanOrderModule$clea;
|
|
96
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$clea = scanOrderModule.clearUIState) === null || _scanOrderModule$clea === void 0 || _scanOrderModule$clea.call(scanOrderModule);
|
|
97
|
+
}, [scanOrderModule]);
|
|
59
98
|
var refreshViewModel = /*#__PURE__*/function () {
|
|
60
99
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
61
100
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -149,6 +188,52 @@ export function ScanOrderProvider(_ref) {
|
|
|
149
188
|
return _ref4.apply(this, arguments);
|
|
150
189
|
};
|
|
151
190
|
}();
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 步骤缓存 hydrate:首次 module 就绪时读取 SDK UI 缓存
|
|
194
|
+
* - 若缓存里的 entryContext.resourceId 与本次入参不一致,整桶作废(clearUIState)后仅写入新 entryContext
|
|
195
|
+
* - 一致则按 pendingStep > step 的顺序恢复 currentStep;pendingStep 命中后立即消费
|
|
196
|
+
* - 基于 cacheId 分桶,无 cacheId 时 SDK 层降级为 no-op
|
|
197
|
+
*/
|
|
198
|
+
useEffect(function () {
|
|
199
|
+
var _scanOrderModule$getU3, _scanOrderModule$getU4, _scanOrderModule$getU5;
|
|
200
|
+
if (hydratedRef.current || !scanOrderModule) return;
|
|
201
|
+
hydratedRef.current = true;
|
|
202
|
+
var currentResourceId = entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id;
|
|
203
|
+
var currentHasOrderId = Boolean(entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id);
|
|
204
|
+
var currentBiz = entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz;
|
|
205
|
+
var cachedEntry = (_scanOrderModule$getU3 = scanOrderModule.getUIState) === null || _scanOrderModule$getU3 === void 0 ? void 0 : _scanOrderModule$getU3.call(scanOrderModule, 'entryContext');
|
|
206
|
+
var entrySame = cachedEntry && cachedEntry.resourceId === currentResourceId && cachedEntry.biz === currentBiz;
|
|
207
|
+
if (!entrySame) {
|
|
208
|
+
var _scanOrderModule$clea2, _scanOrderModule$setU;
|
|
209
|
+
(_scanOrderModule$clea2 = scanOrderModule.clearUIState) === null || _scanOrderModule$clea2 === void 0 || _scanOrderModule$clea2.call(scanOrderModule);
|
|
210
|
+
(_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'entryContext', {
|
|
211
|
+
resourceId: currentResourceId,
|
|
212
|
+
hasOrderId: currentHasOrderId,
|
|
213
|
+
biz: currentBiz
|
|
214
|
+
});
|
|
215
|
+
setIsCacheHydrated(true);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
var pending = (_scanOrderModule$getU4 = scanOrderModule.getUIState) === null || _scanOrderModule$getU4 === void 0 ? void 0 : _scanOrderModule$getU4.call(scanOrderModule, 'pendingStep');
|
|
219
|
+
if (pending && stepList.includes(pending)) {
|
|
220
|
+
var _scanOrderModule$dele;
|
|
221
|
+
(_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
|
|
222
|
+
setCurrentStep(pending);
|
|
223
|
+
setIsCacheHydrated(true);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
var cached = (_scanOrderModule$getU5 = scanOrderModule.getUIState) === null || _scanOrderModule$getU5 === void 0 ? void 0 : _scanOrderModule$getU5.call(scanOrderModule, 'step');
|
|
227
|
+
if (cached && stepList.includes(cached)) setCurrentStep(cached);
|
|
228
|
+
setIsCacheHydrated(true);
|
|
229
|
+
}, [scanOrderModule, entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz]);
|
|
230
|
+
|
|
231
|
+
/** hydrate 完成后,currentStep 变化即写回缓存 */
|
|
232
|
+
useEffect(function () {
|
|
233
|
+
var _scanOrderModule$setU2;
|
|
234
|
+
if (!hydratedRef.current || !isCacheHydrated || !scanOrderModule) return;
|
|
235
|
+
(_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'step', currentStep);
|
|
236
|
+
}, [currentStep, isCacheHydrated, scanOrderModule]);
|
|
152
237
|
useEffect(function () {
|
|
153
238
|
var _pisellOS$effects, _pisellOS$effects$on;
|
|
154
239
|
if (!scanOrderModule) return;
|
|
@@ -292,6 +377,9 @@ export function ScanOrderProvider(_ref) {
|
|
|
292
377
|
stepList: stepList,
|
|
293
378
|
viewModel: viewModel,
|
|
294
379
|
footerActionText: footerActionText,
|
|
380
|
+
tableName: tableName,
|
|
381
|
+
entryMode: entryMode,
|
|
382
|
+
submitDisabledTips: submitDisabledTips,
|
|
295
383
|
isReady: !isLoading && !errorMessage,
|
|
296
384
|
setCurrentStep: setCurrentStep,
|
|
297
385
|
goToStep: goToStep,
|
|
@@ -300,9 +388,16 @@ export function ScanOrderProvider(_ref) {
|
|
|
300
388
|
refreshViewModel: refreshViewModel,
|
|
301
389
|
runModuleAction: runModuleAction,
|
|
302
390
|
setFooterActionText: setFooterActionText,
|
|
303
|
-
|
|
391
|
+
setTableName: setTableName,
|
|
392
|
+
setEntryMode: setEntryMode,
|
|
393
|
+
setSubmitDisabledTips: setSubmitDisabledTips,
|
|
394
|
+
updateOrderNote: updateOrderNote,
|
|
395
|
+
isCacheHydrated: isCacheHydrated,
|
|
396
|
+
markGate: markGate,
|
|
397
|
+
isGatePassed: isGatePassed,
|
|
398
|
+
clearStepCache: clearStepCache
|
|
304
399
|
};
|
|
305
|
-
}, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText]);
|
|
400
|
+
}, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText, tableName, entryMode, submitDisabledTips, isCacheHydrated, markGate, isGatePassed, clearStepCache]);
|
|
306
401
|
return /*#__PURE__*/React.createElement(ScanOrderContext.Provider, {
|
|
307
402
|
value: value
|
|
308
403
|
}, children);
|
|
@@ -17,6 +17,17 @@ declare const _default: {
|
|
|
17
17
|
'pisell2.scan.order.store.status.exception': string;
|
|
18
18
|
'pisell2.scan.order.note.title': string;
|
|
19
19
|
'pisell2.scan.order.note.placeholder': string;
|
|
20
|
+
'pisell2.scan.order.fulfillment.title': string;
|
|
21
|
+
'pisell2.scan.order.fulfillment.table_service': string;
|
|
22
|
+
'pisell2.scan.order.fulfillment.pickup': string;
|
|
23
|
+
'pisell2.scan.order.current.table': string;
|
|
24
|
+
'pisell2.scan.order.pickup.ref.title': string;
|
|
25
|
+
'pisell2.scan.order.pickup.ref.heading': string;
|
|
26
|
+
'pisell2.scan.order.pickup.ref.description': string;
|
|
27
|
+
'pisell2.scan.order.pickup.ref.placeholder': string;
|
|
28
|
+
'pisell2.scan.order.products.title': string;
|
|
29
|
+
'pisell2.scan.order.products.empty.tip': string;
|
|
30
|
+
'pisell2.scan.order.submit.disabled.default': string;
|
|
20
31
|
'pisell2.appointment.booking.empty.data': string;
|
|
21
32
|
'pisell2.appointment.deposit.close': string;
|
|
22
33
|
'pisell2.appointment.policy': string;
|
|
@@ -41,6 +52,17 @@ declare const _default: {
|
|
|
41
52
|
'pisell2.scan.order.store.status.exception': string;
|
|
42
53
|
'pisell2.scan.order.note.title': string;
|
|
43
54
|
'pisell2.scan.order.note.placeholder': string;
|
|
55
|
+
'pisell2.scan.order.fulfillment.title': string;
|
|
56
|
+
'pisell2.scan.order.fulfillment.table_service': string;
|
|
57
|
+
'pisell2.scan.order.fulfillment.pickup': string;
|
|
58
|
+
'pisell2.scan.order.current.table': string;
|
|
59
|
+
'pisell2.scan.order.pickup.ref.title': string;
|
|
60
|
+
'pisell2.scan.order.pickup.ref.heading': string;
|
|
61
|
+
'pisell2.scan.order.pickup.ref.description': string;
|
|
62
|
+
'pisell2.scan.order.pickup.ref.placeholder': string;
|
|
63
|
+
'pisell2.scan.order.products.title': string;
|
|
64
|
+
'pisell2.scan.order.products.empty.tip': string;
|
|
65
|
+
'pisell2.scan.order.submit.disabled.default': string;
|
|
44
66
|
'pisell2.appointment.booking.empty.data': string;
|
|
45
67
|
'pisell2.appointment.deposit.close': string;
|
|
46
68
|
'pisell2.appointment.policy': string;
|
|
@@ -65,6 +87,17 @@ declare const _default: {
|
|
|
65
87
|
'pisell2.scan.order.store.status.exception': string;
|
|
66
88
|
'pisell2.scan.order.note.title': string;
|
|
67
89
|
'pisell2.scan.order.note.placeholder': string;
|
|
90
|
+
'pisell2.scan.order.fulfillment.title': string;
|
|
91
|
+
'pisell2.scan.order.fulfillment.table_service': string;
|
|
92
|
+
'pisell2.scan.order.fulfillment.pickup': string;
|
|
93
|
+
'pisell2.scan.order.current.table': string;
|
|
94
|
+
'pisell2.scan.order.pickup.ref.title': string;
|
|
95
|
+
'pisell2.scan.order.pickup.ref.heading': string;
|
|
96
|
+
'pisell2.scan.order.pickup.ref.description': string;
|
|
97
|
+
'pisell2.scan.order.pickup.ref.placeholder': string;
|
|
98
|
+
'pisell2.scan.order.products.title': string;
|
|
99
|
+
'pisell2.scan.order.products.empty.tip': string;
|
|
100
|
+
'pisell2.scan.order.submit.disabled.default': string;
|
|
68
101
|
'pisell2.appointment.booking.empty.data': string;
|
|
69
102
|
'pisell2.appointment.deposit.close': string;
|
|
70
103
|
'pisell2.appointment.policy': string;
|
|
@@ -89,6 +122,17 @@ declare const _default: {
|
|
|
89
122
|
'pisell2.scan.order.store.status.exception': string;
|
|
90
123
|
'pisell2.scan.order.note.title': string;
|
|
91
124
|
'pisell2.scan.order.note.placeholder': string;
|
|
125
|
+
'pisell2.scan.order.fulfillment.title': string;
|
|
126
|
+
'pisell2.scan.order.fulfillment.table_service': string;
|
|
127
|
+
'pisell2.scan.order.fulfillment.pickup': string;
|
|
128
|
+
'pisell2.scan.order.current.table': string;
|
|
129
|
+
'pisell2.scan.order.pickup.ref.title': string;
|
|
130
|
+
'pisell2.scan.order.pickup.ref.heading': string;
|
|
131
|
+
'pisell2.scan.order.pickup.ref.description': string;
|
|
132
|
+
'pisell2.scan.order.pickup.ref.placeholder': string;
|
|
133
|
+
'pisell2.scan.order.products.title': string;
|
|
134
|
+
'pisell2.scan.order.products.empty.tip': string;
|
|
135
|
+
'pisell2.scan.order.submit.disabled.default': string;
|
|
92
136
|
'pisell2.appointment.booking.empty.data': string;
|
|
93
137
|
'pisell2.appointment.deposit.close': string;
|
|
94
138
|
'pisell2.appointment.policy': string;
|
|
@@ -113,6 +157,17 @@ declare const _default: {
|
|
|
113
157
|
'pisell2.scan.order.store.status.exception': string;
|
|
114
158
|
'pisell2.scan.order.note.title': string;
|
|
115
159
|
'pisell2.scan.order.note.placeholder': string;
|
|
160
|
+
'pisell2.scan.order.fulfillment.title': string;
|
|
161
|
+
'pisell2.scan.order.fulfillment.table_service': string;
|
|
162
|
+
'pisell2.scan.order.fulfillment.pickup': string;
|
|
163
|
+
'pisell2.scan.order.current.table': string;
|
|
164
|
+
'pisell2.scan.order.pickup.ref.title': string;
|
|
165
|
+
'pisell2.scan.order.pickup.ref.heading': string;
|
|
166
|
+
'pisell2.scan.order.pickup.ref.description': string;
|
|
167
|
+
'pisell2.scan.order.pickup.ref.placeholder': string;
|
|
168
|
+
'pisell2.scan.order.products.title': string;
|
|
169
|
+
'pisell2.scan.order.products.empty.tip': string;
|
|
170
|
+
'pisell2.scan.order.submit.disabled.default': string;
|
|
116
171
|
'pisell2.appointment.booking.empty.data': string;
|
|
117
172
|
'pisell2.appointment.deposit.close': string;
|
|
118
173
|
'pisell2.appointment.policy': string;
|
|
@@ -17,6 +17,17 @@ export default {
|
|
|
17
17
|
'pisell2.scan.order.store.status.exception': 'The store is currently closed or in an abnormal state. Please contact staff.',
|
|
18
18
|
'pisell2.scan.order.note.title': 'Order notes',
|
|
19
19
|
'pisell2.scan.order.note.placeholder': 'Add order notes',
|
|
20
|
+
'pisell2.scan.order.fulfillment.title': 'Fulfillment',
|
|
21
|
+
'pisell2.scan.order.fulfillment.table_service': 'Table service',
|
|
22
|
+
'pisell2.scan.order.fulfillment.pickup': 'Pickup',
|
|
23
|
+
'pisell2.scan.order.current.table': 'Current table',
|
|
24
|
+
'pisell2.scan.order.pickup.ref.title': 'Table Service',
|
|
25
|
+
'pisell2.scan.order.pickup.ref.heading': 'Use any name you like',
|
|
26
|
+
'pisell2.scan.order.pickup.ref.description': 'Enter your nickname, or anything fun!',
|
|
27
|
+
'pisell2.scan.order.pickup.ref.placeholder': 'e.g. John',
|
|
28
|
+
'pisell2.scan.order.products.title': 'Products',
|
|
29
|
+
'pisell2.scan.order.products.empty.tip': 'Please select products',
|
|
30
|
+
'pisell2.scan.order.submit.disabled.default': 'Order submission is currently disabled.',
|
|
20
31
|
'pisell2.appointment.booking.empty.data': 'No data',
|
|
21
32
|
'pisell2.appointment.deposit.close': 'Close',
|
|
22
33
|
'pisell2.appointment.policy': 'You have read and agreed to this policy',
|
|
@@ -41,6 +52,17 @@ export default {
|
|
|
41
52
|
'pisell2.scan.order.store.status.exception': '当前店铺不在营业中或者状态异常,请联系工作人员',
|
|
42
53
|
'pisell2.scan.order.note.title': '备注',
|
|
43
54
|
'pisell2.scan.order.note.placeholder': '请输入备注',
|
|
55
|
+
'pisell2.scan.order.fulfillment.title': '取餐方式',
|
|
56
|
+
'pisell2.scan.order.fulfillment.table_service': '送餐到桌',
|
|
57
|
+
'pisell2.scan.order.fulfillment.pickup': '到店自取',
|
|
58
|
+
'pisell2.scan.order.current.table': '当前桌台',
|
|
59
|
+
'pisell2.scan.order.pickup.ref.title': '桌边服务',
|
|
60
|
+
'pisell2.scan.order.pickup.ref.heading': '随便起个名字吧',
|
|
61
|
+
'pisell2.scan.order.pickup.ref.description': '输入你的昵称,或任何有趣的名字!',
|
|
62
|
+
'pisell2.scan.order.pickup.ref.placeholder': '例如:小明',
|
|
63
|
+
'pisell2.scan.order.products.title': '商品',
|
|
64
|
+
'pisell2.scan.order.products.empty.tip': '请选择商品',
|
|
65
|
+
'pisell2.scan.order.submit.disabled.default': '当前暂不可下单',
|
|
44
66
|
'pisell2.appointment.booking.empty.data': '暂无数据',
|
|
45
67
|
'pisell2.appointment.deposit.close': '关闭',
|
|
46
68
|
'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
|
|
@@ -65,6 +87,17 @@ export default {
|
|
|
65
87
|
'pisell2.scan.order.store.status.exception': '當前店鋪不在營業中或者狀態異常,請聯繫工作人員',
|
|
66
88
|
'pisell2.scan.order.note.title': '備註',
|
|
67
89
|
'pisell2.scan.order.note.placeholder': '請輸入備註',
|
|
90
|
+
'pisell2.scan.order.fulfillment.title': '取餐方式',
|
|
91
|
+
'pisell2.scan.order.fulfillment.table_service': '送餐到桌',
|
|
92
|
+
'pisell2.scan.order.fulfillment.pickup': '到店自取',
|
|
93
|
+
'pisell2.scan.order.current.table': '當前桌台',
|
|
94
|
+
'pisell2.scan.order.pickup.ref.title': '桌邊服務',
|
|
95
|
+
'pisell2.scan.order.pickup.ref.heading': '隨便起個名字吧',
|
|
96
|
+
'pisell2.scan.order.pickup.ref.description': '輸入你的暱稱,或任何有趣的名字!',
|
|
97
|
+
'pisell2.scan.order.pickup.ref.placeholder': '例如:小明',
|
|
98
|
+
'pisell2.scan.order.products.title': '商品',
|
|
99
|
+
'pisell2.scan.order.products.empty.tip': '請選擇商品',
|
|
100
|
+
'pisell2.scan.order.submit.disabled.default': '當前暫不可下單',
|
|
68
101
|
'pisell2.appointment.booking.empty.data': '暫無數據',
|
|
69
102
|
'pisell2.appointment.deposit.close': '关闭',
|
|
70
103
|
'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
|
|
@@ -89,6 +122,17 @@ export default {
|
|
|
89
122
|
'pisell2.scan.order.store.status.exception': '現在、店舗は営業時間外または状態が異常です。スタッフまでお問い合わせください。',
|
|
90
123
|
'pisell2.scan.order.note.title': '備考',
|
|
91
124
|
'pisell2.scan.order.note.placeholder': '備考を入力してください',
|
|
125
|
+
'pisell2.scan.order.fulfillment.title': '受け取り方法',
|
|
126
|
+
'pisell2.scan.order.fulfillment.table_service': 'テーブルサービス',
|
|
127
|
+
'pisell2.scan.order.fulfillment.pickup': 'ピックアップ',
|
|
128
|
+
'pisell2.scan.order.current.table': '現在のテーブル',
|
|
129
|
+
'pisell2.scan.order.pickup.ref.title': 'テーブルサービス',
|
|
130
|
+
'pisell2.scan.order.pickup.ref.heading': '好きな名前をどうぞ',
|
|
131
|
+
'pisell2.scan.order.pickup.ref.description': 'ニックネームや楽しい名前を入力してね!',
|
|
132
|
+
'pisell2.scan.order.pickup.ref.placeholder': '例: ジョン',
|
|
133
|
+
'pisell2.scan.order.products.title': '商品',
|
|
134
|
+
'pisell2.scan.order.products.empty.tip': '商品を選択してください',
|
|
135
|
+
'pisell2.scan.order.submit.disabled.default': '現在、注文を送信できません。',
|
|
92
136
|
'pisell2.appointment.booking.empty.data': 'データなし',
|
|
93
137
|
'pisell2.appointment.deposit.close': '閉じる',
|
|
94
138
|
'pisell2.appointment.policy': 'このポリシーを読み、同意しました',
|
|
@@ -113,6 +157,17 @@ export default {
|
|
|
113
157
|
'pisell2.scan.order.store.status.exception': 'A loja está fechada no momento ou em estado anormal. Entre em contato com a equipe.',
|
|
114
158
|
'pisell2.scan.order.note.title': 'Observações do pedido',
|
|
115
159
|
'pisell2.scan.order.note.placeholder': 'Adicione observações do pedido',
|
|
160
|
+
'pisell2.scan.order.fulfillment.title': 'Forma de retirada',
|
|
161
|
+
'pisell2.scan.order.fulfillment.table_service': 'Serviço à mesa',
|
|
162
|
+
'pisell2.scan.order.fulfillment.pickup': 'Retirada',
|
|
163
|
+
'pisell2.scan.order.current.table': 'Mesa atual',
|
|
164
|
+
'pisell2.scan.order.pickup.ref.title': 'Serviço à mesa',
|
|
165
|
+
'pisell2.scan.order.pickup.ref.heading': 'Use o nome que quiser',
|
|
166
|
+
'pisell2.scan.order.pickup.ref.description': 'Digite seu apelido ou algo divertido!',
|
|
167
|
+
'pisell2.scan.order.pickup.ref.placeholder': 'Ex.: João',
|
|
168
|
+
'pisell2.scan.order.products.title': 'Produtos',
|
|
169
|
+
'pisell2.scan.order.products.empty.tip': 'Selecione produtos',
|
|
170
|
+
'pisell2.scan.order.submit.disabled.default': 'No momento, não é possível enviar pedidos.',
|
|
116
171
|
'pisell2.appointment.booking.empty.data': 'Sem dados',
|
|
117
172
|
'pisell2.appointment.deposit.close': 'Fechar',
|
|
118
173
|
'pisell2.appointment.policy': 'Você leu e concordou com esta política',
|
|
@@ -11,6 +11,15 @@ export interface ScanOrderProps {
|
|
|
11
11
|
entryContext?: ScanOrderEntryContext;
|
|
12
12
|
}
|
|
13
13
|
export declare type ScanOrderStepKey = 'init' | 'product' | 'check' | 'error';
|
|
14
|
+
export declare type ScanOrderEntryMode = 'default' | 'additional_order';
|
|
15
|
+
/** 步骤缓存中记录的 gate 标记(对应协议 / 表单 / 人数 modal 是否已走过) */
|
|
16
|
+
export declare type ScanOrderGateKey = 'policyAccepted' | 'formSubmitted' | 'paxEntered';
|
|
17
|
+
/** 存入 sessionStorage 桶内的 entryContext 快照(用于校验是否同一扫码场景) */
|
|
18
|
+
export interface ScanOrderCachedEntryContext {
|
|
19
|
+
resourceId?: string;
|
|
20
|
+
hasOrderId?: boolean;
|
|
21
|
+
biz?: string;
|
|
22
|
+
}
|
|
14
23
|
export interface ScanOrderViewModel {
|
|
15
24
|
menuItems: any[];
|
|
16
25
|
cartItems: any[];
|
|
@@ -30,8 +39,14 @@ export interface ScanOrderContextValue {
|
|
|
30
39
|
stepList: ScanOrderStepKey[];
|
|
31
40
|
viewModel: ScanOrderViewModel;
|
|
32
41
|
footerActionText: string;
|
|
42
|
+
tableName: string;
|
|
43
|
+
entryMode: ScanOrderEntryMode;
|
|
44
|
+
submitDisabledTips: string;
|
|
33
45
|
isReady: boolean;
|
|
34
46
|
setCurrentStep: (step: ScanOrderStepKey) => void;
|
|
47
|
+
setTableName: (name: string) => void;
|
|
48
|
+
setEntryMode: (mode: ScanOrderEntryMode) => void;
|
|
49
|
+
setSubmitDisabledTips: (tips: string) => void;
|
|
35
50
|
goToStep: (step: ScanOrderStepKey) => void;
|
|
36
51
|
nextStep: () => void;
|
|
37
52
|
prevStep: () => void;
|
|
@@ -39,6 +54,14 @@ export interface ScanOrderContextValue {
|
|
|
39
54
|
runModuleAction: (actionName: string, ...args: any[]) => Promise<any>;
|
|
40
55
|
setFooterActionText: (text: string) => void;
|
|
41
56
|
updateOrderNote: (note: string) => Promise<void>;
|
|
57
|
+
/** 步骤缓存 hydrate 是否已完成(未完成时不建议写入 step,避免覆盖缓存) */
|
|
58
|
+
isCacheHydrated: boolean;
|
|
59
|
+
/** 将 gate 标记为已完成(写入 sessionStorage 桶) */
|
|
60
|
+
markGate: (flag: ScanOrderGateKey) => void;
|
|
61
|
+
/** 查询某个 gate 是否已完成 */
|
|
62
|
+
isGatePassed: (flag: ScanOrderGateKey) => boolean;
|
|
63
|
+
/** 整桶清空(提交成功 / restoreOrder 等场景) */
|
|
64
|
+
clearStepCache: () => void;
|
|
42
65
|
}
|
|
43
66
|
export interface ScanOrderProviderProps {
|
|
44
67
|
entryContext: ScanOrderEntryContext;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|