@pisell/private-materials 3.2.11 → 3.2.13
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 +14 -18
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +6 -6
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/booking/addons/index.js +7 -5
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +3 -3
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/index.js +58 -48
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.js +57 -5
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +20 -2
- package/es/components/booking/info2/service/editService/index.js +4 -3
- package/es/components/booking/info2/service/editService/utils.d.ts +4 -2
- package/es/components/booking/info2/service/editService/utils.js +18 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- 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/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/booking/addons/index.js +7 -5
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +2 -2
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/index.js +3 -2
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +3 -2
- package/lib/components/booking/info2/service/addService/utils.js +36 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/Resources/index.js +16 -1
- package/lib/components/booking/info2/service/editService/index.js +3 -2
- package/lib/components/booking/info2/service/editService/utils.d.ts +4 -2
- package/lib/components/booking/info2/service/editService/utils.js +48 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- 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/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/package.json +4 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/es/components/parallelResourcBooking/assets/alert-circle.png +0 -0
- package/es/components/parallelResourcBooking/assets/calendar-heart.svg +0 -5
- package/es/components/parallelResourcBooking/assets/compass.svg +0 -13
- package/es/components/parallelResourcBooking/assets/image.svg +0 -5
- package/es/components/parallelResourcBooking/assets/phone.svg +0 -5
- package/es/components/parallelResourcBooking/assets/shopping-cart.svg +0 -10
- package/es/components/parallelResourcBooking/components/ErrorTip/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/ErrorTip/index.js +0 -14
- package/es/components/parallelResourcBooking/components/ErrorTip/index.less +0 -51
- package/es/components/parallelResourcBooking/components/OpenCard/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/OpenCard/index.js +0 -65
- package/es/components/parallelResourcBooking/components/OpenCard/index.less +0 -52
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.js +0 -274
- package/es/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/Total.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/Total.js +0 -46
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.js +0 -63
- package/es/components/parallelResourcBooking/components/Provider/Cart/Item/index.less +0 -87
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.js +0 -30
- package/es/components/parallelResourcBooking/components/Provider/Cart/index.less +0 -2
- package/es/components/parallelResourcBooking/components/Provider/Content/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Content/index.js +0 -65
- package/es/components/parallelResourcBooking/components/Provider/Content/index.less +0 -31
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.js +0 -34
- package/es/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/es/components/parallelResourcBooking/components/Provider/Event/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Event/index.js +0 -93
- package/es/components/parallelResourcBooking/components/Provider/Event/index.less +0 -20
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.js +0 -76
- package/es/components/parallelResourcBooking/components/Provider/Footer/index.less +0 -64
- package/es/components/parallelResourcBooking/components/Provider/Header/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Header/index.js +0 -75
- package/es/components/parallelResourcBooking/components/Provider/Header/index.less +0 -2
- package/es/components/parallelResourcBooking/components/Provider/Information/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Information/index.js +0 -178
- package/es/components/parallelResourcBooking/components/Provider/Information/index.less +0 -92
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.js +0 -34
- package/es/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.js +0 -27
- package/es/components/parallelResourcBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/es/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -3
- package/es/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.js +0 -79
- package/es/components/parallelResourcBooking/components/Provider/Resource/index.less +0 -46
- package/es/components/parallelResourcBooking/components/Provider/SelectHolderModal.d.ts +0 -3
- package/es/components/parallelResourcBooking/components/Provider/SelectHolderModal.js +0 -90
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/parallelResourcBooking/components/Provider/SelectProduct/index.less +0 -131
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +0 -26
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +0 -25
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -11
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +0 -65
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +0 -32
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +0 -69
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +0 -12
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -13
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +0 -152
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +0 -35
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +0 -20
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +0 -28
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -5
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +0 -38
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +0 -87
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +0 -28
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +0 -25
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +0 -269
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +0 -119
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +0 -256
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +0 -173
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +0 -4
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.js +0 -36
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.less +0 -2
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/es/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.js +0 -70
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -3
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.js +0 -38
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.d.ts +0 -3
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.js +0 -33
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -3
- package/es/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.js +0 -30
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.js +0 -337
- package/es/components/parallelResourcBooking/components/bookingDetailModal/index.less +0 -82
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.d.ts +0 -17
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.js +0 -52
- package/es/components/parallelResourcBooking/components/bookingServiceList/index.less +0 -6
- package/es/components/parallelResourcBooking/components/eventCard/index.d.ts +0 -14
- package/es/components/parallelResourcBooking/components/eventCard/index.js +0 -116
- package/es/components/parallelResourcBooking/components/eventCard/index.less +0 -81
- package/es/components/parallelResourcBooking/components/productCard/index.d.ts +0 -16
- package/es/components/parallelResourcBooking/components/productCard/index.js +0 -79
- package/es/components/parallelResourcBooking/components/productCard/index.less +0 -60
- package/es/components/parallelResourcBooking/components/progressBar/index.d.ts +0 -16
- package/es/components/parallelResourcBooking/components/progressBar/index.js +0 -93
- package/es/components/parallelResourcBooking/components/progressBar/index.less +0 -15
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.d.ts +0 -23
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.js +0 -148
- package/es/components/parallelResourcBooking/components/resourceDisplay/index.less +0 -95
- package/es/components/parallelResourcBooking/components/resourceUsability/index.d.ts +0 -12
- package/es/components/parallelResourcBooking/components/resourceUsability/index.js +0 -44
- package/es/components/parallelResourcBooking/components/resourceUsability/index.less +0 -40
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -10
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.js +0 -37
- package/es/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.less +0 -58
- package/es/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/es/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.js +0 -127
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.d.ts +0 -13
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.js +0 -142
- package/es/components/parallelResourcBooking/components/scheduleCalendar/index.less +0 -222
- package/es/components/parallelResourcBooking/components/selectHolder/index.d.ts +0 -22
- package/es/components/parallelResourcBooking/components/selectHolder/index.js +0 -118
- package/es/components/parallelResourcBooking/components/selectHolder/index.less +0 -70
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.js +0 -168
- package/es/components/parallelResourcBooking/components/timeResourceSelector/index.less +0 -74
- package/es/components/parallelResourcBooking/index.d.ts +0 -4
- package/es/components/parallelResourcBooking/index.js +0 -58
- package/es/components/parallelResourcBooking/index.less +0 -22
- package/es/components/parallelResourcBooking/locales.d.ts +0 -216
- package/es/components/parallelResourcBooking/locales.js +0 -251
- package/es/components/parallelResourcBooking/mock.d.ts +0 -627
- package/es/components/parallelResourcBooking/mock.js +0 -1172
- package/es/components/parallelResourcBooking/status.d.ts +0 -21
- package/es/components/parallelResourcBooking/status.js +0 -51
- package/es/components/parallelResourcBooking/type.d.ts +0 -17
- package/es/components/parallelResourcBooking/type.js +0 -1
- package/es/components/parallelResourcBooking/utils.d.ts +0 -45
- package/es/components/parallelResourcBooking/utils.js +0 -99
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/parallelResourcBooking/assets/alert-circle.png +0 -0
- package/lib/components/parallelResourcBooking/assets/calendar-heart.svg +0 -5
- package/lib/components/parallelResourcBooking/assets/compass.svg +0 -13
- package/lib/components/parallelResourcBooking/assets/image.svg +0 -5
- package/lib/components/parallelResourcBooking/assets/phone.svg +0 -5
- package/lib/components/parallelResourcBooking/assets/shopping-cart.svg +0 -10
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.js +0 -30
- package/lib/components/parallelResourcBooking/components/ErrorTip/index.less +0 -51
- package/lib/components/parallelResourcBooking/components/OpenCard/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/OpenCard/index.js +0 -90
- package/lib/components/parallelResourcBooking/components/OpenCard/index.less +0 -52
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.js +0 -158
- package/lib/components/parallelResourcBooking/components/Provider/Cart/ContinueButton/index.less +0 -0
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/Total.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/Total.js +0 -82
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.js +0 -92
- package/lib/components/parallelResourcBooking/components/Provider/Cart/Item/index.less +0 -87
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.js +0 -59
- package/lib/components/parallelResourcBooking/components/Provider/Cart/index.less +0 -2
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.js +0 -90
- package/lib/components/parallelResourcBooking/components/Provider/Content/index.less +0 -31
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.js +0 -60
- package/lib/components/parallelResourcBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.js +0 -100
- package/lib/components/parallelResourcBooking/components/Provider/Event/index.less +0 -20
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.js +0 -87
- package/lib/components/parallelResourcBooking/components/Provider/Footer/index.less +0 -64
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.js +0 -80
- package/lib/components/parallelResourcBooking/components/Provider/Header/index.less +0 -2
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.js +0 -151
- package/lib/components/parallelResourcBooking/components/Provider/Information/index.less +0 -92
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.js +0 -67
- package/lib/components/parallelResourcBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.js +0 -57
- package/lib/components/parallelResourcBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/lib/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -3
- package/lib/components/parallelResourcBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.js +0 -90
- package/lib/components/parallelResourcBooking/components/Provider/Resource/index.less +0 -46
- package/lib/components/parallelResourcBooking/components/Provider/SelectHolderModal.d.ts +0 -3
- package/lib/components/parallelResourcBooking/components/Provider/SelectHolderModal.js +0 -97
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/parallelResourcBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.js +0 -55
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.less +0 -25
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -11
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.js +0 -78
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +0 -32
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.js +0 -86
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.less +0 -12
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -13
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.js +0 -121
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.less +0 -35
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.js +0 -37
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.less +0 -28
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -5
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.js +0 -58
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +0 -87
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.js +0 -55
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.less +0 -25
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.js +0 -196
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/index.less +0 -119
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.d.ts +0 -63
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/CalendarDate/state.js +0 -198
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +0 -122
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.less +0 -4
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.d.ts +0 -14
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.js +0 -70
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/index.less +0 -2
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.d.ts +0 -34
- package/lib/components/parallelResourcBooking/components/bookingAvailabilityCalendar/utils.js +0 -70
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -3
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/BookingOptions.js +0 -75
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.d.ts +0 -3
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Resource.js +0 -66
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -3
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/components/Schedule.js +0 -69
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.d.ts +0 -7
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.js +0 -248
- package/lib/components/parallelResourcBooking/components/bookingDetailModal/index.less +0 -82
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.d.ts +0 -17
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.js +0 -79
- package/lib/components/parallelResourcBooking/components/bookingServiceList/index.less +0 -6
- package/lib/components/parallelResourcBooking/components/eventCard/index.d.ts +0 -14
- package/lib/components/parallelResourcBooking/components/eventCard/index.js +0 -124
- package/lib/components/parallelResourcBooking/components/eventCard/index.less +0 -81
- package/lib/components/parallelResourcBooking/components/productCard/index.d.ts +0 -16
- package/lib/components/parallelResourcBooking/components/productCard/index.js +0 -77
- package/lib/components/parallelResourcBooking/components/productCard/index.less +0 -60
- package/lib/components/parallelResourcBooking/components/progressBar/index.d.ts +0 -16
- package/lib/components/parallelResourcBooking/components/progressBar/index.js +0 -100
- package/lib/components/parallelResourcBooking/components/progressBar/index.less +0 -15
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.d.ts +0 -23
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.js +0 -116
- package/lib/components/parallelResourcBooking/components/resourceDisplay/index.less +0 -95
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.d.ts +0 -12
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.js +0 -76
- package/lib/components/parallelResourcBooking/components/resourceUsability/index.less +0 -40
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -10
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.js +0 -73
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/ProductItem/index.less +0 -58
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.d.ts +0 -12
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/calendarItem.js +0 -135
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.d.ts +0 -13
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.js +0 -125
- package/lib/components/parallelResourcBooking/components/scheduleCalendar/index.less +0 -222
- package/lib/components/parallelResourcBooking/components/selectHolder/index.d.ts +0 -22
- package/lib/components/parallelResourcBooking/components/selectHolder/index.js +0 -106
- package/lib/components/parallelResourcBooking/components/selectHolder/index.less +0 -70
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.d.ts +0 -20
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.js +0 -146
- package/lib/components/parallelResourcBooking/components/timeResourceSelector/index.less +0 -74
- package/lib/components/parallelResourcBooking/index.d.ts +0 -4
- package/lib/components/parallelResourcBooking/index.js +0 -78
- package/lib/components/parallelResourcBooking/index.less +0 -22
- package/lib/components/parallelResourcBooking/locales.d.ts +0 -216
- package/lib/components/parallelResourcBooking/locales.js +0 -239
- package/lib/components/parallelResourcBooking/mock.d.ts +0 -627
- package/lib/components/parallelResourcBooking/mock.js +0 -1352
- package/lib/components/parallelResourcBooking/status.d.ts +0 -21
- package/lib/components/parallelResourcBooking/status.js +0 -70
- package/lib/components/parallelResourcBooking/type.d.ts +0 -17
- package/lib/components/parallelResourcBooking/type.js +0 -17
- package/lib/components/parallelResourcBooking/utils.d.ts +0 -45
- package/lib/components/parallelResourcBooking/utils.js +0 -90
|
@@ -1,269 +0,0 @@
|
|
|
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 { useState, useImperativeHandle, forwardRef, useMemo } from 'react';
|
|
8
|
-
import Dayjs from 'dayjs';
|
|
9
|
-
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
10
|
-
import { PisellModal, Iconfont } from '@pisell/materials';
|
|
11
|
-
import { isMobile } from '@pisell/utils';
|
|
12
|
-
Dayjs.extend(isSameOrBefore);
|
|
13
|
-
import { weekListText, statusColor, getStatus, getCallToBookStatus } from "./state";
|
|
14
|
-
import classNames from 'classnames';
|
|
15
|
-
import Status from "./Status";
|
|
16
|
-
|
|
17
|
-
// 引入组件
|
|
18
|
-
// import { useDrawer } from '@/pisell-design/hooks';
|
|
19
|
-
|
|
20
|
-
import "./index.less";
|
|
21
|
-
var CalendarDate = function CalendarDate(props, ref) {
|
|
22
|
-
var cutTime = props.cutTime,
|
|
23
|
-
getLimitData = props.getLimitData,
|
|
24
|
-
dateLimitData = props.dateLimitData,
|
|
25
|
-
loading = props.loading;
|
|
26
|
-
var _useState = useState(''),
|
|
27
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
-
productId = _useState2[0],
|
|
29
|
-
setProductId = _useState2[1];
|
|
30
|
-
var _useState3 = useState(''),
|
|
31
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
-
currentDate = _useState4[0],
|
|
33
|
-
setCurrentDate = _useState4[1];
|
|
34
|
-
// 生成7天的时间列表
|
|
35
|
-
var _useState5 = useState([]),
|
|
36
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
37
|
-
dateMonthList = _useState6[0],
|
|
38
|
-
setDateMonthList = _useState6[1];
|
|
39
|
-
// 切换的月份
|
|
40
|
-
var _useState7 = useState(function () {
|
|
41
|
-
return Dayjs();
|
|
42
|
-
}),
|
|
43
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
|
-
currentMonth = _useState8[0],
|
|
45
|
-
setCurrentMonth = _useState8[1];
|
|
46
|
-
var _useState9 = useState(false),
|
|
47
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
48
|
-
open = _useState10[0],
|
|
49
|
-
setOpen = _useState10[1];
|
|
50
|
-
|
|
51
|
-
// 计算开始渲染的列
|
|
52
|
-
var startingColumn = 0 % 7; // 0 表示星期日
|
|
53
|
-
var columns = Array.from({
|
|
54
|
-
length: 7
|
|
55
|
-
}, function (_, index) {
|
|
56
|
-
return (index + 7 - startingColumn) % 7;
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @title: 接口和当前月进行对比
|
|
61
|
-
* @description:
|
|
62
|
-
* @param {*}
|
|
63
|
-
* @return {*}
|
|
64
|
-
* @Author: 严文强
|
|
65
|
-
* @Date: 2024-02-01 20:30
|
|
66
|
-
*/
|
|
67
|
-
var calendarDays = function calendarDays(days, list) {
|
|
68
|
-
var index = list === null || list === void 0 ? void 0 : list.find(function (i) {
|
|
69
|
-
return (i === null || i === void 0 ? void 0 : i.day) == days;
|
|
70
|
-
});
|
|
71
|
-
if (!index) {
|
|
72
|
-
return 0;
|
|
73
|
-
} else {
|
|
74
|
-
return index === null || index === void 0 ? void 0 : index.status;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @title: 获取当前月日期
|
|
80
|
-
* @description:
|
|
81
|
-
* @param {*}
|
|
82
|
-
* @return {*}
|
|
83
|
-
* @Author: 严文强
|
|
84
|
-
* @Date: 2024-02-01 20:30
|
|
85
|
-
*/
|
|
86
|
-
var getMonthData = function getMonthData(date) {
|
|
87
|
-
var firstDay = Dayjs("".concat(date, "-01"));
|
|
88
|
-
var startDay = firstDay.day(); // 获取本月1号是星期几
|
|
89
|
-
var daysInMonth = firstDay.daysInMonth(); // 获取本月总天数
|
|
90
|
-
var monthData = [];
|
|
91
|
-
// 填充前面的空白
|
|
92
|
-
for (var i = 0; i < startDay; i++) {
|
|
93
|
-
monthData.push({
|
|
94
|
-
day: -1,
|
|
95
|
-
// 表示前一个月的日期
|
|
96
|
-
date: Dayjs(firstDay).subtract(startDay - i, 'day').toDate()
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 填充本月的日期
|
|
101
|
-
for (var _i = 1; _i <= daysInMonth; _i++) {
|
|
102
|
-
monthData.push({
|
|
103
|
-
day: _i,
|
|
104
|
-
date: firstDay.date(_i).format('YYYY-MM-DD')
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return monthData;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @title: 计算是否已经切换到当前月,如果是则禁止继续点击上一个月
|
|
112
|
-
* @description:
|
|
113
|
-
* @param {*}
|
|
114
|
-
* @return {*}
|
|
115
|
-
* @Author: 严文强
|
|
116
|
-
* @Date: 2024-02-01 19:27
|
|
117
|
-
*/
|
|
118
|
-
var lastMonthDisable = function lastMonthDisable() {
|
|
119
|
-
var newCurrentMonth = currentMonth.format('YYYY-MM');
|
|
120
|
-
var lastDate = Dayjs(newCurrentMonth).subtract(1, 'month');
|
|
121
|
-
return lastDate.isBefore(Dayjs(), 'month');
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @title: 切换上个月
|
|
126
|
-
* @description:
|
|
127
|
-
* @param {*}
|
|
128
|
-
* @return {*}
|
|
129
|
-
* @Author: 严文强
|
|
130
|
-
* @Date: 2024-02-01 19:15
|
|
131
|
-
*/
|
|
132
|
-
var lastMonth = function lastMonth() {
|
|
133
|
-
var currentLastText = currentMonth.format('YYYY-MM');
|
|
134
|
-
var newLastMonth = Dayjs(currentLastText).subtract(1, 'month');
|
|
135
|
-
setCurrentMonth(newLastMonth);
|
|
136
|
-
setDateMonthList(getMonthData(newLastMonth.format('YYYY-MM')));
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @title: 切换下个月
|
|
141
|
-
* @description:
|
|
142
|
-
* @param {*}
|
|
143
|
-
* @return {*}
|
|
144
|
-
* @Author: 严文强
|
|
145
|
-
* @Date: 2024-02-01 19:15
|
|
146
|
-
*/
|
|
147
|
-
var nextMonth = function nextMonth() {
|
|
148
|
-
var currentMonthText = currentMonth.format('YYYY-MM');
|
|
149
|
-
var newNextMonth = Dayjs(currentMonthText).add(1, 'month');
|
|
150
|
-
setCurrentMonth(newNextMonth);
|
|
151
|
-
setDateMonthList(getMonthData(newNextMonth.format('YYYY-MM')));
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @title: 根据当前选择的月份剩余量
|
|
156
|
-
* @description:
|
|
157
|
-
* @return {*}
|
|
158
|
-
* @Author: xiangxiang.shao
|
|
159
|
-
* @Date: 2024-02-07 14:13
|
|
160
|
-
*/
|
|
161
|
-
// useEffect(() => {
|
|
162
|
-
// if (productId) {
|
|
163
|
-
// getLimitData(
|
|
164
|
-
// currentMonth.format('YYYY-MM-01'),
|
|
165
|
-
// currentMonth.endOf('month').format('YYYY-MM-DD')
|
|
166
|
-
// );
|
|
167
|
-
// }
|
|
168
|
-
// }, [currentMonth.format('YYYY-MM'), productId]);
|
|
169
|
-
|
|
170
|
-
var CalendarDateContent = useMemo(function () {
|
|
171
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
172
|
-
className: 'calendar-box'
|
|
173
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
174
|
-
className: 'calendar-header'
|
|
175
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
176
|
-
className: classNames('calendar-last-month', {
|
|
177
|
-
'last-month-disabled': lastMonthDisable()
|
|
178
|
-
}),
|
|
179
|
-
onClick: function onClick() {
|
|
180
|
-
if (lastMonthDisable()) return;
|
|
181
|
-
lastMonth();
|
|
182
|
-
}
|
|
183
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
184
|
-
type: "pisell2-chevron-left"
|
|
185
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
186
|
-
className: 'calendar-current-month'
|
|
187
|
-
}, currentMonth.format('MMMM YYYY')), /*#__PURE__*/React.createElement("div", {
|
|
188
|
-
className: 'calendar-next-month',
|
|
189
|
-
onClick: function onClick() {
|
|
190
|
-
nextMonth();
|
|
191
|
-
}
|
|
192
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
193
|
-
type: "pisell2-chevron-right"
|
|
194
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
195
|
-
className: 'calendar-content'
|
|
196
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
197
|
-
className: 'calendar-weeks'
|
|
198
|
-
}, columns.map(function (col) {
|
|
199
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
200
|
-
key: col,
|
|
201
|
-
className: 'calendar-weeks-items'
|
|
202
|
-
}, weekListText[Number(col)]);
|
|
203
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
204
|
-
className: 'calendar-days'
|
|
205
|
-
}, dateMonthList.map(function (day, index) {
|
|
206
|
-
var date = Dayjs(day.date).format('YYYY-MM-DD');
|
|
207
|
-
var _getStatus = getStatus(dateLimitData, date, cutTime),
|
|
208
|
-
status = _getStatus.status,
|
|
209
|
-
disabled = _getStatus.disabled;
|
|
210
|
-
var isShowCallToBook = getCallToBookStatus(date, dateLimitData, cutTime);
|
|
211
|
-
// 在当天和cut-off time的日期之前这段日期,如果某天还存在可预约的商品,才显示Call to book。
|
|
212
|
-
var currentStatus = isShowCallToBook && (status === 'lots_of_space' || status === 'filling_up_fast') ? 'call_to_book' : status;
|
|
213
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
214
|
-
key: index,
|
|
215
|
-
className: classNames('calendar-days-items', {
|
|
216
|
-
disabledDate: disabled || loading,
|
|
217
|
-
disabledSelect: status === 'sold_out',
|
|
218
|
-
selectDate: currentDate === date,
|
|
219
|
-
'other-month-days': (day === null || day === void 0 ? void 0 : day.day) < 1
|
|
220
|
-
}),
|
|
221
|
-
onClick: function onClick() {
|
|
222
|
-
if (loading) return;
|
|
223
|
-
props.dateChange(date);
|
|
224
|
-
// hideModal();
|
|
225
|
-
}
|
|
226
|
-
}, (day === null || day === void 0 ? void 0 : day.day) >= 1 && /*#__PURE__*/React.createElement("div", {
|
|
227
|
-
style: {
|
|
228
|
-
'--lineColor': !loading ? statusColor[currentStatus] : ''
|
|
229
|
-
},
|
|
230
|
-
className: classNames('day-text', {
|
|
231
|
-
'day-line': !disabled
|
|
232
|
-
})
|
|
233
|
-
}, (day === null || day === void 0 ? void 0 : day.day) < 1 ? '' : day === null || day === void 0 ? void 0 : day.day));
|
|
234
|
-
}))), /*#__PURE__*/React.createElement(Status, {
|
|
235
|
-
style: {
|
|
236
|
-
margin: 0
|
|
237
|
-
}
|
|
238
|
-
}));
|
|
239
|
-
}, [currentMonth, dateMonthList, getLimitData, currentDate]);
|
|
240
|
-
useImperativeHandle(ref, function () {
|
|
241
|
-
return {
|
|
242
|
-
open: function open(date, id) {
|
|
243
|
-
// setProductId(id);
|
|
244
|
-
// showModal();
|
|
245
|
-
setOpen(true);
|
|
246
|
-
var daysText = Dayjs(date).format('YYYY-MM');
|
|
247
|
-
setCurrentMonth(Dayjs(date));
|
|
248
|
-
setCurrentDate(date);
|
|
249
|
-
setDateMonthList(getMonthData(daysText));
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
});
|
|
253
|
-
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
254
|
-
open: open,
|
|
255
|
-
title: 'device',
|
|
256
|
-
mobileModalHeight: 'auto',
|
|
257
|
-
platform: isMobile() ? 'h5' : 'pc',
|
|
258
|
-
bodyStyle: {
|
|
259
|
-
padding: isMobile() ? '16px 24px' : 32
|
|
260
|
-
},
|
|
261
|
-
destroyOnClose: true,
|
|
262
|
-
className: "select-holder-modal",
|
|
263
|
-
footer: null,
|
|
264
|
-
onCancel: function onCancel() {
|
|
265
|
-
return setOpen(false);
|
|
266
|
-
}
|
|
267
|
-
}, CalendarDateContent);
|
|
268
|
-
};
|
|
269
|
-
export default /*#__PURE__*/forwardRef(CalendarDate);
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
.calendar-box {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
|
|
5
|
-
.calendar-header {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
|
|
10
|
-
.calendar-last-month,
|
|
11
|
-
.calendar-next-month {
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
align-items: center;
|
|
15
|
-
font-size: 20px;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.calendar-current-month {
|
|
20
|
-
text-align: center;
|
|
21
|
-
color: #101828;
|
|
22
|
-
font-weight: 600;
|
|
23
|
-
flex: 1;
|
|
24
|
-
font-size: 16px;
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
line-height: 24px;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.calendar-content {
|
|
31
|
-
margin: 10px 0 20px;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
gap: 16px;
|
|
35
|
-
|
|
36
|
-
.calendar-weeks {
|
|
37
|
-
display: grid;
|
|
38
|
-
grid-template-columns: repeat(7, 1fr);
|
|
39
|
-
gap: 8px;
|
|
40
|
-
|
|
41
|
-
.calendar-weeks-items {
|
|
42
|
-
color: #101828;
|
|
43
|
-
text-align: center;
|
|
44
|
-
font-size: 12px;
|
|
45
|
-
font-style: normal;
|
|
46
|
-
font-weight: 400;
|
|
47
|
-
line-height: 18px;
|
|
48
|
-
/* 150% */
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.calendar-days {
|
|
53
|
-
display: grid;
|
|
54
|
-
grid-template-columns: repeat(7, 1fr);
|
|
55
|
-
gap: 12px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.calendar-days-items {
|
|
61
|
-
position: relative;
|
|
62
|
-
display: flex;
|
|
63
|
-
height: 64px;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
align-items: center;
|
|
67
|
-
flex: 1 0 0;
|
|
68
|
-
border-radius: 8px;
|
|
69
|
-
border: 1px solid #d0d5dd;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
|
|
72
|
-
.day-text {
|
|
73
|
-
position: absolute;
|
|
74
|
-
left: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
top: 0;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
color: #101828;
|
|
82
|
-
text-align: center;
|
|
83
|
-
font-size: 16px;
|
|
84
|
-
font-style: normal;
|
|
85
|
-
font-weight: 500;
|
|
86
|
-
line-height: 24px;
|
|
87
|
-
|
|
88
|
-
&.day-line::before {
|
|
89
|
-
position: absolute;
|
|
90
|
-
bottom: 12px;
|
|
91
|
-
content: '';
|
|
92
|
-
width: 24px;
|
|
93
|
-
height: 4px;
|
|
94
|
-
flex-shrink: 0;
|
|
95
|
-
border-radius: 2px;
|
|
96
|
-
background: var(--lineColor);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&.disabledDate {
|
|
101
|
-
// border: 1px solid #eaecf0;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
background: var(--Gray-100, #f2f4f7);
|
|
104
|
-
border: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&.disabledSelect {
|
|
108
|
-
cursor: pointer;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&.selectDate {
|
|
112
|
-
border: 2px solid var(--Primary-600, #7f56d9);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.other-month-days {
|
|
116
|
-
background: none;
|
|
117
|
-
border: none;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title: 获取包括今天的后七天日期
|
|
3
|
-
* @description:
|
|
4
|
-
* @param {*}
|
|
5
|
-
* @return {*}
|
|
6
|
-
* @Author: 严文强
|
|
7
|
-
* @Date: 2024-02-01 11:00
|
|
8
|
-
*/
|
|
9
|
-
export declare const getNextSevenDaysList: (defaultDay: string) => string[];
|
|
10
|
-
/**
|
|
11
|
-
* @title: 将年月日信息只展示为天
|
|
12
|
-
* @description: 如果为今天 则返回ToDay
|
|
13
|
-
* @param {*}
|
|
14
|
-
* @return {*}
|
|
15
|
-
* @Author: 严文强
|
|
16
|
-
* @Date: 2024-02-01 11:00
|
|
17
|
-
*/
|
|
18
|
-
export declare const ShowDayOnly: (date: string) => string;
|
|
19
|
-
/**
|
|
20
|
-
* @title: 日历星期多语言
|
|
21
|
-
* @description:
|
|
22
|
-
* @param {*}
|
|
23
|
-
* @return {*}
|
|
24
|
-
* @Author: 严文强
|
|
25
|
-
* @Date: 2024-02-01 18:42
|
|
26
|
-
*/
|
|
27
|
-
export declare const weekListText: string[];
|
|
28
|
-
/**
|
|
29
|
-
* @title: 不同状态颜色值
|
|
30
|
-
* @description:
|
|
31
|
-
* @param {*}
|
|
32
|
-
* @return {*}
|
|
33
|
-
* @Author: xiangxiang.shao
|
|
34
|
-
* @Date: 2024-02-19 11:35
|
|
35
|
-
*/
|
|
36
|
-
export declare const statusColor: {
|
|
37
|
-
call_to_book: string;
|
|
38
|
-
lots_of_space: string;
|
|
39
|
-
filling_up_fast: string;
|
|
40
|
-
sold_out: string;
|
|
41
|
-
unavailable: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* @title: 根据预约量数据判断当前状态
|
|
45
|
-
* @description:
|
|
46
|
-
* @param {*}
|
|
47
|
-
* @return {*}
|
|
48
|
-
* @Author: xiangxiang.shao
|
|
49
|
-
* @Date: 2024-02-19 11:35
|
|
50
|
-
*/
|
|
51
|
-
export declare const getStatus: (dateLimit: any, currentDate: string, cutTime: any) => {
|
|
52
|
-
status: string;
|
|
53
|
-
disabled: boolean;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* @title: 根据当前日期以设定判断当前是否是call_to_book状态
|
|
57
|
-
* @description:
|
|
58
|
-
* @param {*}
|
|
59
|
-
* @return {*}
|
|
60
|
-
* @Author: xiangxiang.shao
|
|
61
|
-
* @Date: 2024-02-21 10:10
|
|
62
|
-
*/
|
|
63
|
-
export declare const getCallToBookStatus: (currentDate: string, dateLimitData: any, cutTime: any) => boolean;
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import Dayjs from 'dayjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @title: 获取包括今天的后七天日期
|
|
5
|
-
* @description:
|
|
6
|
-
* @param {*}
|
|
7
|
-
* @return {*}
|
|
8
|
-
* @Author: 严文强
|
|
9
|
-
* @Date: 2024-02-01 11:00
|
|
10
|
-
*/
|
|
11
|
-
export var getNextSevenDaysList = function getNextSevenDaysList(defaultDay) {
|
|
12
|
-
// 获取当前日期
|
|
13
|
-
var currentDate = Dayjs(defaultDay);
|
|
14
|
-
// 创建一个数组来存储最近7天的日期
|
|
15
|
-
var nextSevenDays = [];
|
|
16
|
-
// 循环遍历最近7天的日期
|
|
17
|
-
for (var i = 0; i < 7; i++) {
|
|
18
|
-
// 获取当前日期的前7天
|
|
19
|
-
var previousDay = currentDate.add(i, 'day');
|
|
20
|
-
// 将日期添加到数组中
|
|
21
|
-
nextSevenDays.push(previousDay.format('YYYY-MM-DD'));
|
|
22
|
-
}
|
|
23
|
-
return nextSevenDays;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @title: 将年月日信息只展示为天
|
|
28
|
-
* @description: 如果为今天 则返回ToDay
|
|
29
|
-
* @param {*}
|
|
30
|
-
* @return {*}
|
|
31
|
-
* @Author: 严文强
|
|
32
|
-
* @Date: 2024-02-01 11:00
|
|
33
|
-
*/
|
|
34
|
-
export var ShowDayOnly = function ShowDayOnly(date) {
|
|
35
|
-
//
|
|
36
|
-
var defaultDay = Dayjs().format('YYYY-MM-DD');
|
|
37
|
-
if (date == defaultDay) {
|
|
38
|
-
return 'ToDay';
|
|
39
|
-
}
|
|
40
|
-
return Dayjs(date).format('DD');
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @title: 日历星期多语言
|
|
45
|
-
* @description:
|
|
46
|
-
* @param {*}
|
|
47
|
-
* @return {*}
|
|
48
|
-
* @Author: 严文强
|
|
49
|
-
* @Date: 2024-02-01 18:42
|
|
50
|
-
*/
|
|
51
|
-
export var weekListText = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @title: 不同状态颜色值
|
|
55
|
-
* @description:
|
|
56
|
-
* @param {*}
|
|
57
|
-
* @return {*}
|
|
58
|
-
* @Author: xiangxiang.shao
|
|
59
|
-
* @Date: 2024-02-19 11:35
|
|
60
|
-
*/
|
|
61
|
-
export var statusColor = {
|
|
62
|
-
call_to_book: '#444CE7',
|
|
63
|
-
// 请致电预订
|
|
64
|
-
lots_of_space: '#099250',
|
|
65
|
-
// 库存充足
|
|
66
|
-
filling_up_fast: '#EAAA08',
|
|
67
|
-
// 库存紧张
|
|
68
|
-
sold_out: '#D92D20',
|
|
69
|
-
// 无库存
|
|
70
|
-
unavailable: 'rgba(68, 76, 231, 0.00)' // 不可用
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @title: 根据预约量数据判断当前状态
|
|
75
|
-
* @description:
|
|
76
|
-
* @param {*}
|
|
77
|
-
* @return {*}
|
|
78
|
-
* @Author: xiangxiang.shao
|
|
79
|
-
* @Date: 2024-02-19 11:35
|
|
80
|
-
*/
|
|
81
|
-
export var getStatus = function getStatus(dateLimit, currentDate, cutTime) {
|
|
82
|
-
var status = '';
|
|
83
|
-
var disabled = false;
|
|
84
|
-
var dataItem = dateLimit[currentDate];
|
|
85
|
-
console.log(currentDate);
|
|
86
|
-
var startTime = Dayjs(cutTime === null || cutTime === void 0 ? void 0 : cutTime.shop_time).format('YYYY-MM-DD HH:mm');
|
|
87
|
-
var startDate = Dayjs(cutTime === null || cutTime === void 0 ? void 0 : cutTime.shop_time).format('YYYY-MM-DD');
|
|
88
|
-
var endTime = Dayjs(startTime).add(cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit, cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type);
|
|
89
|
-
var endDay = endTime.format('YYYY-MM-DD');
|
|
90
|
-
try {
|
|
91
|
-
// 没有当天数据, 禁止
|
|
92
|
-
if (!dataItem) {
|
|
93
|
-
return {
|
|
94
|
-
status: status,
|
|
95
|
-
disabled: true
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 如果当天 大于最早的可用时间的天 禁止
|
|
100
|
-
// if (currentDate > endDay) {
|
|
101
|
-
// return {
|
|
102
|
-
// status,
|
|
103
|
-
// disabled: true,
|
|
104
|
-
// };
|
|
105
|
-
// }
|
|
106
|
-
|
|
107
|
-
// //如果当天 等于 最早可用时间的天, 则找times里的最早开始时间是否小于 店铺的最早可用时间
|
|
108
|
-
// if (currentDate === startDate) {
|
|
109
|
-
// let times = dataItem.times || [];
|
|
110
|
-
|
|
111
|
-
// let useable = times.find((d: any) => {
|
|
112
|
-
// return startTime < d.start_at;
|
|
113
|
-
// });
|
|
114
|
-
// if (!useable) {
|
|
115
|
-
// return {
|
|
116
|
-
// status,
|
|
117
|
-
// disabled: true,
|
|
118
|
-
// };
|
|
119
|
-
// }
|
|
120
|
-
// }
|
|
121
|
-
} catch (err) {
|
|
122
|
-
return {
|
|
123
|
-
status: status,
|
|
124
|
-
disabled: true
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
if (!Object.keys(dateLimit).length) {
|
|
128
|
-
return {
|
|
129
|
-
status: status,
|
|
130
|
-
disabled: true
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
var times = dataItem.times || [];
|
|
134
|
-
if (!times.length) {
|
|
135
|
-
disabled = true;
|
|
136
|
-
} else {
|
|
137
|
-
var useable = null;
|
|
138
|
-
if (cutTime.type === 'ongoing' && currentDate === startDate) {
|
|
139
|
-
var _cutTime$ongoing, _cutTime$ongoing2;
|
|
140
|
-
// 活动结束前都可以购买
|
|
141
|
-
if ((cutTime === null || cutTime === void 0 || (_cutTime$ongoing = cutTime['ongoing']) === null || _cutTime$ongoing === void 0 ? void 0 : _cutTime$ongoing.type) === 'before_end') {
|
|
142
|
-
// 在活动时间范围内 或者 在活动还没开始前可选
|
|
143
|
-
useable = times.find(function (d) {
|
|
144
|
-
return startTime >= d.start_at && startTime < d.end_at || d.start_at >= startTime;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
if ((cutTime === null || cutTime === void 0 || (_cutTime$ongoing2 = cutTime['ongoing']) === null || _cutTime$ongoing2 === void 0 ? void 0 : _cutTime$ongoing2.type) === 'after_start') {
|
|
148
|
-
// 在活动时间范围内 或者 在活动还没开始前可选
|
|
149
|
-
useable = times.find(function (d) {
|
|
150
|
-
var _cutTime$ongoing3;
|
|
151
|
-
var _endAt = Dayjs(d.start_at).add(cutTime === null || cutTime === void 0 || (_cutTime$ongoing3 = cutTime['ongoing']) === null || _cutTime$ongoing3 === void 0 ? void 0 : _cutTime$ongoing3.unit, 'minutes');
|
|
152
|
-
var _endTime = _endAt.format('YYYY-MM-DD HH:mm');
|
|
153
|
-
return startTime >= d.start_at && startTime <= _endTime || d.start_at >= startTime;
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
useable = times.find(function (d) {
|
|
158
|
-
return startTime < d.start_at;
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
if (!useable) {
|
|
162
|
-
return {
|
|
163
|
-
status: status,
|
|
164
|
-
disabled: true
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// 是否含有无限制数据
|
|
169
|
-
var haveUnLimit = times.find(function (item) {
|
|
170
|
-
return item.limit === 0;
|
|
171
|
-
});
|
|
172
|
-
if (haveUnLimit) {
|
|
173
|
-
status = 'lots_of_space';
|
|
174
|
-
} else {
|
|
175
|
-
var allLimit = times.reduce(function (prev, next) {
|
|
176
|
-
return prev + next.limit;
|
|
177
|
-
}, 0);
|
|
178
|
-
var allOrderCount = times.reduce(function (prev, next) {
|
|
179
|
-
return prev + next.order_count;
|
|
180
|
-
}, 0);
|
|
181
|
-
var percent = (allLimit - allOrderCount) / allLimit;
|
|
182
|
-
if (percent > 0.5) {
|
|
183
|
-
// 库存充足
|
|
184
|
-
status = 'lots_of_space';
|
|
185
|
-
} else if (percent <= 0.5 && percent > 0) {
|
|
186
|
-
// 库存紧张
|
|
187
|
-
status = 'filling_up_fast';
|
|
188
|
-
} else if (percent <= 0) {
|
|
189
|
-
// 无库存
|
|
190
|
-
status = 'sold_out';
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
status: status,
|
|
196
|
-
disabled: disabled
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @title: 根据当前日期以设定判断当前是否是call_to_book状态
|
|
202
|
-
* @description:
|
|
203
|
-
* @param {*}
|
|
204
|
-
* @return {*}
|
|
205
|
-
* @Author: xiangxiang.shao
|
|
206
|
-
* @Date: 2024-02-21 10:10
|
|
207
|
-
*/
|
|
208
|
-
export var getCallToBookStatus = function getCallToBookStatus(currentDate, dateLimitData, cutTime) {
|
|
209
|
-
var _dateLimitData$curren;
|
|
210
|
-
var timeList = ((_dateLimitData$curren = dateLimitData[currentDate]) === null || _dateLimitData$curren === void 0 ? void 0 : _dateLimitData$curren.times) || [];
|
|
211
|
-
var isShowCallToBook = false;
|
|
212
|
-
if (!currentDate || !(cutTime !== null && cutTime !== void 0 && cutTime.shop_time) || !(cutTime !== null && cutTime !== void 0 && cutTime.unit) || !(cutTime !== null && cutTime !== void 0 && cutTime.unit_type)) {
|
|
213
|
-
isShowCallToBook = false;
|
|
214
|
-
return isShowCallToBook;
|
|
215
|
-
}
|
|
216
|
-
// currentDate在当前日期和截止日期之间
|
|
217
|
-
// if (cutTime?.unit_type === 'days') {
|
|
218
|
-
// if (
|
|
219
|
-
// Dayjs(currentDate).isBefore(
|
|
220
|
-
// Dayjs(Dayjs().format('YYYY-MM-DD')).add(cutTime?.unit, 'days')
|
|
221
|
-
// )
|
|
222
|
-
// ) {
|
|
223
|
-
// isShowCallToBook = true;
|
|
224
|
-
// } else {
|
|
225
|
-
// isShowCallToBook = false;
|
|
226
|
-
// }
|
|
227
|
-
// }
|
|
228
|
-
if ((cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'hours' || (cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'minutes' || (cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type) === 'days') {
|
|
229
|
-
var startTime = Dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
230
|
-
var endTime = Dayjs(startTime).add(cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit, cutTime === null || cutTime === void 0 ? void 0 : cutTime.unit_type).format('YYYY-MM-DD HH:mm:ss');
|
|
231
|
-
if (Dayjs(currentDate).isBefore(Dayjs(endTime.split(' ')[0]))) {
|
|
232
|
-
isShowCallToBook = true;
|
|
233
|
-
} else {
|
|
234
|
-
// 如果日期相等,则判断timeList是否全在时间范围内,如果全在时间范围内,则返回true
|
|
235
|
-
if (currentDate === endTime.split(' ')[0]) {
|
|
236
|
-
var _timeList$find;
|
|
237
|
-
var haveTime = timeList === null || timeList === void 0 || (_timeList$find = timeList.find) === null || _timeList$find === void 0 ? void 0 : _timeList$find.call(timeList, function (item) {
|
|
238
|
-
var end_at = "".concat(item.date, " ").concat(item.end_at);
|
|
239
|
-
// 当前时间在开始时间和结束时间之间 end_at < endTime
|
|
240
|
-
if (Dayjs(end_at).valueOf() > Dayjs(endTime).valueOf()) {
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
if (haveTime) {
|
|
245
|
-
isShowCallToBook = false;
|
|
246
|
-
} else {
|
|
247
|
-
isShowCallToBook = true;
|
|
248
|
-
}
|
|
249
|
-
} else {
|
|
250
|
-
isShowCallToBook = false;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// 判断开始时间和结束时间是否大于1天
|
|
254
|
-
}
|
|
255
|
-
return isShowCallToBook;
|
|
256
|
-
};
|