@pisell/private-materials 6.3.159 → 6.3.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +43 -4
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/utils.d.ts +6 -1
- package/es/components/appointmentBooking/utils.js +123 -32
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/hooks/useQuotation.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/es/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/es/components/ecocup/cupList/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellCashCounting/hooks.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/productStockCheckModal/index.d.ts +5 -0
- package/es/components/productStockCheckModal/index.js +148 -0
- package/es/components/productStockCheckModal/index.less +122 -0
- package/es/components/productStockCheckModal/locales.d.ts +63 -0
- package/es/components/productStockCheckModal/locales.js +62 -0
- package/es/components/productStockCheckModal/types.d.ts +26 -0
- package/es/components/productStockCheckModal/types.js +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/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/resources/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/walletList/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useCartProductStockCheck.d.ts +10 -0
- package/es/hooks/useCartProductStockCheck.js +153 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/es/plus/orderList/config.d.ts +3 -2
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +1 -0
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +169 -8
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +141 -5
- package/es/plus/saasDevice/devicePlanning/locales.d.ts +125 -0
- package/es/plus/saasDevice/devicePlanning/locales.js +125 -0
- package/es/plus/saasLogin/utils.d.ts +5 -5
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/plus/walletPassGallery/index.d.ts +1 -0
- package/es/pro/Selector/demo.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +42 -5
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.d.ts +6 -1
- package/lib/components/appointmentBooking/utils.js +36 -2
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellCashCounting/hooks.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/productStockCheckModal/index.d.ts +5 -0
- package/lib/components/productStockCheckModal/index.js +134 -0
- package/lib/components/productStockCheckModal/index.less +122 -0
- package/lib/components/productStockCheckModal/locales.d.ts +63 -0
- package/lib/components/productStockCheckModal/locales.js +86 -0
- package/lib/components/productStockCheckModal/types.d.ts +26 -0
- package/lib/components/productStockCheckModal/types.js +17 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/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/resources/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/walletList/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/useCartProductStockCheck.d.ts +10 -0
- package/lib/hooks/useCartProductStockCheck.js +97 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/lib/plus/orderList/config.d.ts +3 -2
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +174 -16
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +141 -5
- package/lib/plus/saasDevice/devicePlanning/locales.d.ts +125 -0
- package/lib/plus/saasDevice/devicePlanning/locales.js +125 -0
- package/lib/plus/saasLogin/utils.d.ts +5 -5
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/index.d.ts +1 -0
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lowcode/product-stock-check-modal/meta.ts +94 -0
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.stock.check.modal.title': string;
|
|
4
|
+
'pisell2.product.stock.check.modal.all_items_title': string;
|
|
5
|
+
'pisell2.product.stock.check.modal.subtitle': string;
|
|
6
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': string;
|
|
7
|
+
'pisell2.product.stock.check.modal.status.sold_out': string;
|
|
8
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': string;
|
|
9
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': string;
|
|
10
|
+
'pisell2.product.stock.check.modal.btn.go_back': string;
|
|
11
|
+
'pisell2.product.stock.check.modal.btn.expand': string;
|
|
12
|
+
'pisell2.product.stock.check.modal.btn.collapse': string;
|
|
13
|
+
};
|
|
14
|
+
'zh-CN': {
|
|
15
|
+
'pisell2.product.stock.check.modal.title': string;
|
|
16
|
+
'pisell2.product.stock.check.modal.all_items_title': string;
|
|
17
|
+
'pisell2.product.stock.check.modal.subtitle': string;
|
|
18
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': string;
|
|
19
|
+
'pisell2.product.stock.check.modal.status.sold_out': string;
|
|
20
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': string;
|
|
21
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': string;
|
|
22
|
+
'pisell2.product.stock.check.modal.btn.go_back': string;
|
|
23
|
+
'pisell2.product.stock.check.modal.btn.expand': string;
|
|
24
|
+
'pisell2.product.stock.check.modal.btn.collapse': string;
|
|
25
|
+
};
|
|
26
|
+
'zh-TW': {
|
|
27
|
+
'pisell2.product.stock.check.modal.title': string;
|
|
28
|
+
'pisell2.product.stock.check.modal.all_items_title': string;
|
|
29
|
+
'pisell2.product.stock.check.modal.subtitle': string;
|
|
30
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': string;
|
|
31
|
+
'pisell2.product.stock.check.modal.status.sold_out': string;
|
|
32
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': string;
|
|
33
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': string;
|
|
34
|
+
'pisell2.product.stock.check.modal.btn.go_back': string;
|
|
35
|
+
'pisell2.product.stock.check.modal.btn.expand': string;
|
|
36
|
+
'pisell2.product.stock.check.modal.btn.collapse': string;
|
|
37
|
+
};
|
|
38
|
+
ja: {
|
|
39
|
+
'pisell2.product.stock.check.modal.title': string;
|
|
40
|
+
'pisell2.product.stock.check.modal.all_items_title': string;
|
|
41
|
+
'pisell2.product.stock.check.modal.subtitle': string;
|
|
42
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': string;
|
|
43
|
+
'pisell2.product.stock.check.modal.status.sold_out': string;
|
|
44
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': string;
|
|
45
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': string;
|
|
46
|
+
'pisell2.product.stock.check.modal.btn.go_back': string;
|
|
47
|
+
'pisell2.product.stock.check.modal.btn.expand': string;
|
|
48
|
+
'pisell2.product.stock.check.modal.btn.collapse': string;
|
|
49
|
+
};
|
|
50
|
+
pt: {
|
|
51
|
+
'pisell2.product.stock.check.modal.title': string;
|
|
52
|
+
'pisell2.product.stock.check.modal.all_items_title': string;
|
|
53
|
+
'pisell2.product.stock.check.modal.subtitle': string;
|
|
54
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': string;
|
|
55
|
+
'pisell2.product.stock.check.modal.status.sold_out': string;
|
|
56
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': string;
|
|
57
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': string;
|
|
58
|
+
'pisell2.product.stock.check.modal.btn.go_back': string;
|
|
59
|
+
'pisell2.product.stock.check.modal.btn.expand': string;
|
|
60
|
+
'pisell2.product.stock.check.modal.btn.collapse': string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.stock.check.modal.title': 'Some Items Are Unavailable',
|
|
4
|
+
'pisell2.product.stock.check.modal.all_items_title': 'All Items Are Unavailable',
|
|
5
|
+
'pisell2.product.stock.check.modal.subtitle': 'The following items are out of stock. Please remove them to continue.',
|
|
6
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': 'Selected quantity',
|
|
7
|
+
'pisell2.product.stock.check.modal.status.sold_out': 'Sold Out',
|
|
8
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': 'Remove & Continue',
|
|
9
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': 'Cart is empty. Please add items.',
|
|
10
|
+
'pisell2.product.stock.check.modal.btn.go_back': 'Go Back',
|
|
11
|
+
'pisell2.product.stock.check.modal.btn.expand': 'Expand',
|
|
12
|
+
'pisell2.product.stock.check.modal.btn.collapse': 'Collapse'
|
|
13
|
+
},
|
|
14
|
+
'zh-CN': {
|
|
15
|
+
'pisell2.product.stock.check.modal.title': '部分商品已售罄',
|
|
16
|
+
'pisell2.product.stock.check.modal.all_items_title': '全部商品已售罄',
|
|
17
|
+
'pisell2.product.stock.check.modal.subtitle': '以下商品库存不足,请移除后继续下单',
|
|
18
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': '已选数量',
|
|
19
|
+
'pisell2.product.stock.check.modal.status.sold_out': '已售罄',
|
|
20
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': '移除售罄商品并继续',
|
|
21
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': '购物车已空,请重新选择',
|
|
22
|
+
'pisell2.product.stock.check.modal.btn.go_back': '返回修改',
|
|
23
|
+
'pisell2.product.stock.check.modal.btn.expand': '展开',
|
|
24
|
+
'pisell2.product.stock.check.modal.btn.collapse': '收起'
|
|
25
|
+
},
|
|
26
|
+
'zh-TW': {
|
|
27
|
+
'pisell2.product.stock.check.modal.title': '部分商品已售罄',
|
|
28
|
+
'pisell2.product.stock.check.modal.all_items_title': '全部商品已售罄',
|
|
29
|
+
'pisell2.product.stock.check.modal.subtitle': '以下商品庫存不足,請移除後繼續下單',
|
|
30
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': '已選數量',
|
|
31
|
+
'pisell2.product.stock.check.modal.status.sold_out': '已售罄',
|
|
32
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': '移除售罄商品並繼續',
|
|
33
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': '購物車已空,請重新選擇',
|
|
34
|
+
'pisell2.product.stock.check.modal.btn.go_back': '返回修改',
|
|
35
|
+
'pisell2.product.stock.check.modal.btn.expand': '展開',
|
|
36
|
+
'pisell2.product.stock.check.modal.btn.collapse': '收起'
|
|
37
|
+
},
|
|
38
|
+
'ja': {
|
|
39
|
+
'pisell2.product.stock.check.modal.title': '一部の商品が購入不可',
|
|
40
|
+
'pisell2.product.stock.check.modal.all_items_title': '全ての商品が売り切れ',
|
|
41
|
+
'pisell2.product.stock.check.modal.subtitle': '下記の商品は在庫切れです。削除してからご注文を続けてください。',
|
|
42
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': '選択数量',
|
|
43
|
+
'pisell2.product.stock.check.modal.status.sold_out': '売り切れ',
|
|
44
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': '売り切れ商品を削除して続行',
|
|
45
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': 'カートが空です。商品を追加してください。',
|
|
46
|
+
'pisell2.product.stock.check.modal.btn.go_back': '戻る',
|
|
47
|
+
'pisell2.product.stock.check.modal.btn.expand': '展開',
|
|
48
|
+
'pisell2.product.stock.check.modal.btn.collapse': '收起'
|
|
49
|
+
},
|
|
50
|
+
'pt': {
|
|
51
|
+
'pisell2.product.stock.check.modal.title': 'Alguns itens estão indisponíveis',
|
|
52
|
+
'pisell2.product.stock.check.modal.all_items_title': 'Todos os itens estão indisponíveis',
|
|
53
|
+
'pisell2.product.stock.check.modal.subtitle': 'Os itens abaixo estão sem estoque. Remova-os para continuar.',
|
|
54
|
+
'pisell2.product.stock.check.modal.item.quantity.prefix': 'Quantidade selecionada',
|
|
55
|
+
'pisell2.product.stock.check.modal.status.sold_out': 'Esgotado',
|
|
56
|
+
'pisell2.product.stock.check.modal.btn.remove_continue': 'Remover e continuar',
|
|
57
|
+
'pisell2.product.stock.check.modal.btn.remove_all_continue': 'Carrinho vazio. Adicione itens.',
|
|
58
|
+
'pisell2.product.stock.check.modal.btn.go_back': 'Voltar',
|
|
59
|
+
'pisell2.product.stock.check.modal.btn.expand': 'Expandir',
|
|
60
|
+
'pisell2.product.stock.check.modal.btn.collapse': 'Recolher'
|
|
61
|
+
}
|
|
62
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ProductStockCheckModalProps {
|
|
2
|
+
onOpen?: () => void;
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
onReturn?: (data: any) => void;
|
|
5
|
+
onContinue?: (data: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UnavailableProduct {
|
|
8
|
+
title: string;
|
|
9
|
+
quantity?: number;
|
|
10
|
+
cart_id?: number;
|
|
11
|
+
product_id?: number;
|
|
12
|
+
product_variant_id?: number;
|
|
13
|
+
cover?: string;
|
|
14
|
+
specifications?: string;
|
|
15
|
+
reason_code?: 'stock_not_enough' | string;
|
|
16
|
+
reason?: string;
|
|
17
|
+
selected_quantity?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ProductStockCheckModalRef {
|
|
20
|
+
open: (params: ModalParams) => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface ModalParams {
|
|
24
|
+
unavailableProducts?: UnavailableProduct[];
|
|
25
|
+
isAllItemsSoldOut?: boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 下单接口商品库存检测逻辑
|
|
3
|
+
* 购物车不可用商品清理 + 返回清空缓存 Hook
|
|
4
|
+
*/
|
|
5
|
+
declare const useCartProductStockCheck: () => {
|
|
6
|
+
handleContinue: ({ cartProducts, data, callback, appointmentBooking }: any) => void;
|
|
7
|
+
handleReturn: ({ cartProducts, data, callback, appointmentBooking, setTimes, isSkipClearData }: any) => Promise<void>;
|
|
8
|
+
checkProductStock: (productStockModalRef: any, res: any, cartProducts: any) => any;
|
|
9
|
+
};
|
|
10
|
+
export default useCartProductStockCheck;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
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); }
|
|
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
|
+
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
|
+
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
|
+
import { useCallback } from "react";
|
|
6
|
+
import { handleGoToStep } from "../components/appointmentBooking/utils";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 下单接口商品库存检测逻辑
|
|
10
|
+
* 购物车不可用商品清理 + 返回清空缓存 Hook
|
|
11
|
+
*/
|
|
12
|
+
var useCartProductStockCheck = function useCartProductStockCheck() {
|
|
13
|
+
/**
|
|
14
|
+
* 过滤不可用商品并更新购物车
|
|
15
|
+
* @param {Array} cartProducts - 当前购物车商品列表
|
|
16
|
+
* @param {Object} data - 接口返回的不可用商品数据
|
|
17
|
+
* @param {Function} dispatch - redux dispatch
|
|
18
|
+
* @param {Function} [callback] - 过滤完成后的回调
|
|
19
|
+
* @returns {Array} 过滤后的新购物车
|
|
20
|
+
*/
|
|
21
|
+
var filterUnavailableProducts = /*#__PURE__*/function () {
|
|
22
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cartProducts, data, callback, appointmentBooking) {
|
|
23
|
+
var unavailableIds, newCart;
|
|
24
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
if (!(!(cartProducts !== null && cartProducts !== void 0 && cartProducts.length) || !(data !== null && data !== void 0 && data.length))) {
|
|
28
|
+
_context.next = 2;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
return _context.abrupt("return");
|
|
32
|
+
case 2:
|
|
33
|
+
// 1. 获取不可用商品ID
|
|
34
|
+
unavailableIds = data.map(function (item) {
|
|
35
|
+
return item === null || item === void 0 ? void 0 : item.product_id;
|
|
36
|
+
}); // 2. 过滤掉不可用商品
|
|
37
|
+
newCart = (cartProducts === null || cartProducts === void 0 ? void 0 : cartProducts.filter(function (item) {
|
|
38
|
+
var _item$_origin;
|
|
39
|
+
return unavailableIds.includes((item === null || item === void 0 || (_item$_origin = item._origin) === null || _item$_origin === void 0 || (_item$_origin = _item$_origin.product) === null || _item$_origin === void 0 ? void 0 : _item$_origin.product_id) || (item === null || item === void 0 ? void 0 : item.id));
|
|
40
|
+
})) || [];
|
|
41
|
+
if (!appointmentBooking) {
|
|
42
|
+
_context.next = 9;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
// 3. 删除购物车商品
|
|
46
|
+
newCart.forEach(function (item) {
|
|
47
|
+
appointmentBooking.deleteCart(item === null || item === void 0 ? void 0 : item._id);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// 4. 获取新购物车数据
|
|
51
|
+
_context.next = 8;
|
|
52
|
+
return appointmentBooking.getCart();
|
|
53
|
+
case 8:
|
|
54
|
+
newCart = _context.sent;
|
|
55
|
+
case 9:
|
|
56
|
+
// 5. 执行回调
|
|
57
|
+
callback && callback(newCart);
|
|
58
|
+
return _context.abrupt("return", newCart);
|
|
59
|
+
case 11:
|
|
60
|
+
case "end":
|
|
61
|
+
return _context.stop();
|
|
62
|
+
}
|
|
63
|
+
}, _callee);
|
|
64
|
+
}));
|
|
65
|
+
return function filterUnavailableProducts(_x, _x2, _x3, _x4) {
|
|
66
|
+
return _ref.apply(this, arguments);
|
|
67
|
+
};
|
|
68
|
+
}();
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 处理继续下单:清理不可用商品 + 重新初始化
|
|
72
|
+
* @param preparDetail 购物车详情数据
|
|
73
|
+
* @param data 接口返回的不可用商品数据
|
|
74
|
+
* @param _init 重新初始化方法(外部传入)
|
|
75
|
+
*/
|
|
76
|
+
var handleContinue = function handleContinue(_ref2) {
|
|
77
|
+
var cartProducts = _ref2.cartProducts,
|
|
78
|
+
data = _ref2.data,
|
|
79
|
+
callback = _ref2.callback,
|
|
80
|
+
appointmentBooking = _ref2.appointmentBooking;
|
|
81
|
+
filterUnavailableProducts(cartProducts, data, callback, appointmentBooking);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 返回上一页 + 清空缓存
|
|
86
|
+
*/
|
|
87
|
+
var handleReturn = /*#__PURE__*/function () {
|
|
88
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
89
|
+
var cartProducts, data, callback, appointmentBooking, setTimes, _ref3$isSkipClearData, isSkipClearData;
|
|
90
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
91
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
cartProducts = _ref3.cartProducts, data = _ref3.data, callback = _ref3.callback, appointmentBooking = _ref3.appointmentBooking, setTimes = _ref3.setTimes, _ref3$isSkipClearData = _ref3.isSkipClearData, isSkipClearData = _ref3$isSkipClearData === void 0 ? true : _ref3$isSkipClearData;
|
|
94
|
+
_context2.next = 3;
|
|
95
|
+
return filterUnavailableProducts(cartProducts, data, callback, appointmentBooking);
|
|
96
|
+
case 3:
|
|
97
|
+
// 跳转到选择服务步骤
|
|
98
|
+
handleGoToStep({
|
|
99
|
+
appointmentBooking: appointmentBooking,
|
|
100
|
+
setTimes: setTimes,
|
|
101
|
+
isSkipClearData: isSkipClearData
|
|
102
|
+
});
|
|
103
|
+
case 4:
|
|
104
|
+
case "end":
|
|
105
|
+
return _context2.stop();
|
|
106
|
+
}
|
|
107
|
+
}, _callee2);
|
|
108
|
+
}));
|
|
109
|
+
return function handleReturn(_x5) {
|
|
110
|
+
return _ref4.apply(this, arguments);
|
|
111
|
+
};
|
|
112
|
+
}();
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* 统一校验商品库存
|
|
116
|
+
* @param productStockModalRef 弹窗实例 ref
|
|
117
|
+
* @param res 接口返回数据
|
|
118
|
+
* @param handleLoading 关闭 loading 方法(可选)
|
|
119
|
+
* @returns 是否需要中断后续逻辑
|
|
120
|
+
*/
|
|
121
|
+
var checkProductStock = useCallback(function (productStockModalRef, res, cartProducts) {
|
|
122
|
+
var _productStockModalRef;
|
|
123
|
+
// 无弹窗实例 → 不校验
|
|
124
|
+
if (!(productStockModalRef !== null && productStockModalRef !== void 0 && productStockModalRef.current)) return false;
|
|
125
|
+
var _ref5 = res || {},
|
|
126
|
+
unavailable_products = _ref5.unavailable_products;
|
|
127
|
+
if (!(unavailable_products !== null && unavailable_products !== void 0 && unavailable_products.length) || !(cartProducts !== null && cartProducts !== void 0 && cartProducts.length)) return false;
|
|
128
|
+
var _isAllItemsSoldOut = false;
|
|
129
|
+
// 1. 获取不可用购物车ids
|
|
130
|
+
var unavailableIds = unavailable_products.map(function (item) {
|
|
131
|
+
return item.product_id;
|
|
132
|
+
});
|
|
133
|
+
// 2. 判断preparDetail.prepartion和unavailableCartIds比对,是否所有购物车都不可用
|
|
134
|
+
var allUnavailable = cartProducts === null || cartProducts === void 0 ? void 0 : cartProducts.every(function (item) {
|
|
135
|
+
var _item$_origin2;
|
|
136
|
+
return unavailableIds.includes((item === null || item === void 0 || (_item$_origin2 = item._origin) === null || _item$_origin2 === void 0 || (_item$_origin2 = _item$_origin2.product) === null || _item$_origin2 === void 0 ? void 0 : _item$_origin2.product_id) || (item === null || item === void 0 ? void 0 : item.id));
|
|
137
|
+
});
|
|
138
|
+
_isAllItemsSoldOut = allUnavailable;
|
|
139
|
+
|
|
140
|
+
// 执行库存校验弹窗
|
|
141
|
+
var needStop = (_productStockModalRef = productStockModalRef.current) === null || _productStockModalRef === void 0 ? void 0 : _productStockModalRef.open({
|
|
142
|
+
unavailableProducts: unavailable_products,
|
|
143
|
+
isAllItemsSoldOut: _isAllItemsSoldOut
|
|
144
|
+
});
|
|
145
|
+
return needStop;
|
|
146
|
+
}, []);
|
|
147
|
+
return {
|
|
148
|
+
handleContinue: handleContinue,
|
|
149
|
+
handleReturn: handleReturn,
|
|
150
|
+
checkProductStock: checkProductStock
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
export default useCartProductStockCheck;
|
package/es/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export { default as SaasRegister } from './plus/saasRegister';
|
|
|
55
55
|
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
|
56
56
|
export { default as PinModal } from './components/pinModal';
|
|
57
57
|
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
|
58
|
+
export { default as ProductStockCheckModal } from './components/productStockCheckModal';
|
|
58
59
|
export { ChannelAuthSetting, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, } from './components/authentication/admin';
|
|
59
60
|
export type { SaaSAdminAuthProps, OrgAdminAuthProps, DeviceAuthProps, POSOperatorAuthProps, CustomerOAuthConfigProps, } from './components/authentication/admin';
|
|
60
61
|
export { default as ContactInfo } from './plus/contactInfo';
|
package/es/index.js
CHANGED
|
@@ -58,6 +58,7 @@ export { default as SaasRegister } from "./plus/saasRegister";
|
|
|
58
58
|
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
|
59
59
|
export { default as PinModal } from "./components/pinModal";
|
|
60
60
|
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
|
61
|
+
export { default as ProductStockCheckModal } from "./components/productStockCheckModal";
|
|
61
62
|
export { ChannelAuthSetting, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
|
|
62
63
|
export { default as ContactInfo } from "./plus/contactInfo";
|
|
63
64
|
export { default as ContactInfoModal } from "./plus/contactInfoModal";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* 获取表格列配置(支持多语言)
|
|
3
4
|
* @param locales - 多语言对象
|
|
@@ -8,7 +9,7 @@ export declare const getTableColumns: (locales: any) => ({
|
|
|
8
9
|
dataIndex: string;
|
|
9
10
|
key: string;
|
|
10
11
|
width: number;
|
|
11
|
-
render: (value: any, record: any) => JSX.Element
|
|
12
|
+
render: (value: any, record: any) => "-" | JSX.Element;
|
|
12
13
|
isShow?: undefined;
|
|
13
14
|
} | {
|
|
14
15
|
title: any;
|
|
@@ -37,7 +38,7 @@ export declare const getTableColumns: (locales: any) => ({
|
|
|
37
38
|
key: string;
|
|
38
39
|
isShow: boolean;
|
|
39
40
|
width: number;
|
|
40
|
-
render: (value: any) => JSX.Element
|
|
41
|
+
render: (value: any) => "-" | JSX.Element;
|
|
41
42
|
})[];
|
|
42
43
|
export declare const getQuickFilterList: (locales: any) => ({
|
|
43
44
|
name: string;
|