@pisell/private-materials 3.2.23 → 3.2.25
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -33
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +13 -5
- package/es/components/appointmentBooking/components/Cart/Item/index.less +8 -6
- package/es/components/appointmentBooking/components/Cart/index.js +3 -2
- package/es/components/appointmentBooking/components/Cart/index.less +1 -1
- package/es/components/appointmentBooking/components/Content/index.js +14 -2
- package/es/components/appointmentBooking/components/Content/index.less +15 -0
- package/es/components/appointmentBooking/components/Date/index.js +2 -2
- package/es/components/appointmentBooking/components/Date/index.less +6 -0
- package/es/components/appointmentBooking/components/Footer/index.js +7 -2
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +50 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/es/components/appointmentBooking/components/Guest/index.js +24 -4
- package/es/components/appointmentBooking/components/Guest/index.less +3 -3
- package/es/components/appointmentBooking/components/Header/index.js +6 -1
- package/es/components/appointmentBooking/components/Resource/index.js +6 -24
- package/es/components/appointmentBooking/components/Resource/index.less +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +1 -14
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +22 -17
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +10 -10
- package/es/components/appointmentBooking/hooks.d.ts +6 -3
- package/es/components/appointmentBooking/hooks.js +52 -32
- package/es/components/appointmentBooking/index.js +8 -9
- package/es/components/appointmentBooking/locales.d.ts +6 -0
- package/es/components/appointmentBooking/locales.js +6 -0
- package/es/components/appointmentBooking/utils.d.ts +9 -0
- package/es/components/appointmentBooking/utils.js +18 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +11 -10
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -2
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -2
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +44 -18
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +15 -4
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +8 -6
- package/lib/components/appointmentBooking/components/Cart/index.js +3 -2
- package/lib/components/appointmentBooking/components/Cart/index.less +1 -1
- package/lib/components/appointmentBooking/components/Content/index.js +8 -2
- package/lib/components/appointmentBooking/components/Content/index.less +15 -0
- package/lib/components/appointmentBooking/components/Date/index.js +34 -28
- package/lib/components/appointmentBooking/components/Date/index.less +6 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +5 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.js +74 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.less +28 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +21 -4
- package/lib/components/appointmentBooking/components/Guest/index.less +3 -3
- package/lib/components/appointmentBooking/components/Header/index.js +6 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +4 -8
- package/lib/components/appointmentBooking/components/Resource/index.less +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +0 -12
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +12 -4
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -8
- package/lib/components/appointmentBooking/hooks.d.ts +6 -3
- package/lib/components/appointmentBooking/hooks.js +26 -14
- package/lib/components/appointmentBooking/index.js +7 -7
- package/lib/components/appointmentBooking/locales.d.ts +6 -0
- package/lib/components/appointmentBooking/locales.js +6 -0
- package/lib/components/appointmentBooking/utils.d.ts +9 -0
- package/lib/components/appointmentBooking/utils.js +9 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +3 -8
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -2
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -45,12 +45,10 @@ var Resource = () => {
|
|
|
45
45
|
const [selectedResource, setSelectedResource] = (0, import_react.useState)(0);
|
|
46
46
|
const { appointmentBooking, resources, carts, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
47
47
|
const { getResourceList, autoSelectAllProductResources } = (0, import_hooks.useAppointmentBookingResource)();
|
|
48
|
-
console.log(resources, carts, appointmentBooking, "lists, products");
|
|
49
48
|
(0, import_react.useEffect)(() => {
|
|
50
|
-
var _a, _b, _c;
|
|
51
49
|
const _resources = getResourceList();
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
autoSelectAllProductResources();
|
|
51
|
+
getResourceList();
|
|
54
52
|
}, []);
|
|
55
53
|
(0, import_react.useEffect)(() => {
|
|
56
54
|
var _a;
|
|
@@ -64,8 +62,8 @@ var Resource = () => {
|
|
|
64
62
|
{
|
|
65
63
|
id: 0,
|
|
66
64
|
image: import_guests.default,
|
|
67
|
-
title: "
|
|
68
|
-
subtitle: "for
|
|
65
|
+
title: import_utils.locales.getText("pisell2.appointment.any.professional"),
|
|
66
|
+
subtitle: import_utils.locales.getText("pisell2.appointment.for.maximum.availability")
|
|
69
67
|
}
|
|
70
68
|
];
|
|
71
69
|
const currentResource = (0, import_react.useMemo)(() => {
|
|
@@ -81,13 +79,11 @@ var Resource = () => {
|
|
|
81
79
|
}
|
|
82
80
|
}, [resources, carts]);
|
|
83
81
|
const resourcesResult = (0, import_react.useMemo)(() => {
|
|
84
|
-
console.log(currentResource, resources, "wh98765756");
|
|
85
82
|
return anyResource.concat((currentResource == null ? void 0 : currentResource.renderList) || []);
|
|
86
83
|
}, [currentResource]);
|
|
87
84
|
const onClick = (e) => {
|
|
88
85
|
var _a;
|
|
89
86
|
setSelectedResource(e.id);
|
|
90
|
-
console.log(currentResource, e, carts, "whcurrentResourcecurrentResource");
|
|
91
87
|
if (e.id) {
|
|
92
88
|
return appointmentBooking.updateCart({
|
|
93
89
|
_id: (_a = carts == null ? void 0 : carts[0]) == null ? void 0 : _a._id,
|
|
@@ -42,7 +42,6 @@ var import_utils2 = require("../../../booking/utils");
|
|
|
42
42
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
43
43
|
var import_context = require("../../context");
|
|
44
44
|
var import_hooks = require("../../hooks");
|
|
45
|
-
var import_utils3 = require("../../utils");
|
|
46
45
|
var import_index = require("./index.less");
|
|
47
46
|
var Services = () => {
|
|
48
47
|
const searchRef = (0, import_react.useRef)();
|
|
@@ -51,18 +50,7 @@ var Services = () => {
|
|
|
51
50
|
const { utils } = context.appHelper || {};
|
|
52
51
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
53
52
|
const { products, setProducts } = (0, import_context.useAppointmentBookingContext)();
|
|
54
|
-
const { accountLists } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
55
|
-
const accountRef = (0, import_react.useRef)(accountLists);
|
|
56
|
-
const currentUser = (0, import_utils3.formatCurrentUser)();
|
|
57
53
|
(0, import_react.useEffect)(() => {
|
|
58
|
-
console.log(accountLists, accountRef, "wh978896786");
|
|
59
|
-
}, [accountLists, accountRef]);
|
|
60
|
-
(0, import_react.useEffect)(() => {
|
|
61
|
-
var _a;
|
|
62
|
-
console.log(accountRef.current, currentUser, "accountRef");
|
|
63
|
-
if (!((_a = accountRef.current) == null ? void 0 : _a.length) && currentUser) {
|
|
64
|
-
appointmentBooking.addAccount([currentUser]);
|
|
65
|
-
}
|
|
66
54
|
const { productModuleParams } = appointmentBooking.otherParams || {};
|
|
67
55
|
appointmentBooking.loadProducts(productModuleParams).then((res) => {
|
|
68
56
|
setProducts(res || []);
|
|
@@ -36,14 +36,22 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_materials = require("@pisell/materials");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_context = require("../../context");
|
|
39
|
+
var import_hooks = require("../../hooks");
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
|
-
var Resource = (
|
|
41
|
+
var Resource = () => {
|
|
41
42
|
const [selectedResource, setSelectedResource] = (0, import_react.useState)("");
|
|
42
|
-
const { times,
|
|
43
|
-
|
|
43
|
+
const { times, appointmentBooking, setSelectedTime, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
44
|
+
const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
getResourceTimeSlot();
|
|
47
|
+
}, []);
|
|
44
48
|
const getAutoSelect = async (val) => {
|
|
45
49
|
setSelectedTime(val);
|
|
46
|
-
const {
|
|
50
|
+
const { resourceCodes } = getResourceList();
|
|
51
|
+
const { errorList } = await appointmentBooking.autoSelectAllProductResources(
|
|
52
|
+
resourceCodes == null ? void 0 : resourceCodes[1],
|
|
53
|
+
val
|
|
54
|
+
);
|
|
47
55
|
const result = await appointmentBooking.submitTimeSlot(val);
|
|
48
56
|
console.log(errorList, result, "wh9896788");
|
|
49
57
|
};
|
|
@@ -40,7 +40,6 @@ var import_antd = require("antd");
|
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
42
42
|
var import_materials = require("@pisell/materials");
|
|
43
|
-
var import_icons = require("@ant-design/icons");
|
|
44
43
|
var import_hooks = require("../../hooks");
|
|
45
44
|
var import_utils2 = require("../../utils");
|
|
46
45
|
var import_voucher = require("../../../booking/components/voucher/index.less");
|
|
@@ -118,6 +117,7 @@ var VoucherCard = (props) => {
|
|
|
118
117
|
const val = await shopDiscount.scanCode(code);
|
|
119
118
|
if (val == null ? void 0 : val.isAvailable) {
|
|
120
119
|
cart == null ? void 0 : cart.batchSetItems(val.productList);
|
|
120
|
+
setCode("");
|
|
121
121
|
} else {
|
|
122
122
|
(0, import_materials.PisellToast)({
|
|
123
123
|
content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
|
|
@@ -205,13 +205,7 @@ var VoucherCard = (props) => {
|
|
|
205
205
|
size: "small",
|
|
206
206
|
placeholder: import_utils.locales.getText(
|
|
207
207
|
"pisell2.text.goodpass.enter-code"
|
|
208
|
-
)
|
|
209
|
-
suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
|
|
210
|
-
import_icons.QuestionCircleOutlined,
|
|
211
|
-
{
|
|
212
|
-
style: { color: "rgba(0,0,0,.45)" }
|
|
213
|
-
}
|
|
214
|
-
))
|
|
208
|
+
)
|
|
215
209
|
}
|
|
216
210
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
|
217
211
|
));
|
|
@@ -55,7 +55,10 @@ export declare const useAppointmentBookingAccount: () => {
|
|
|
55
55
|
* @Date: 2025-04-15 11:29
|
|
56
56
|
*/
|
|
57
57
|
export declare const useAppointmentBookingResource: () => {
|
|
58
|
-
getResourceTimeSlot: (
|
|
59
|
-
getResourceList: () =>
|
|
60
|
-
|
|
58
|
+
getResourceTimeSlot: (index?: number) => Promise<void>;
|
|
59
|
+
getResourceList: () => {
|
|
60
|
+
resources: any;
|
|
61
|
+
resourceCodes: any;
|
|
62
|
+
};
|
|
63
|
+
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
61
64
|
};
|
|
@@ -57,14 +57,18 @@ var useAppointmentBookingStep = () => {
|
|
|
57
57
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
58
58
|
const { appointmentBooking, setCurrentStep, setIsLastStep } = (0, import_context.useAppointmentBookingContext)();
|
|
59
59
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
60
|
+
const getCurrentAndLastStep = () => {
|
|
61
|
+
const _currentStep = appointmentBooking.getCurrentStep();
|
|
62
|
+
setCurrentStep(_currentStep);
|
|
63
|
+
setIsLastStep((_currentStep == null ? void 0 : _currentStep.index) === stepList.length - 1);
|
|
64
|
+
};
|
|
60
65
|
(0, import_react.useEffect)(() => {
|
|
66
|
+
getCurrentAndLastStep();
|
|
61
67
|
pisellOS.effects.on(
|
|
62
68
|
"appointmentBooking_step:changed",
|
|
63
69
|
async (res) => {
|
|
64
70
|
if (res.path === "currentStep") {
|
|
65
|
-
|
|
66
|
-
setCurrentStep(_currentStep);
|
|
67
|
-
setIsLastStep((_currentStep == null ? void 0 : _currentStep.index) === stepList.length - 1);
|
|
71
|
+
getCurrentAndLastStep();
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
);
|
|
@@ -121,32 +125,29 @@ var useAppointmentBookingAccount = () => {
|
|
|
121
125
|
const appointmentBooking = useAppointmentBooking();
|
|
122
126
|
const [accountLists, setAccountLists] = (0, import_react.useState)([]);
|
|
123
127
|
const getAccountLists = async () => {
|
|
124
|
-
var _a, _b, _c;
|
|
125
128
|
const data = await appointmentBooking.getAccounts();
|
|
129
|
+
console.log("appointmentBooking_accountList:changed", data);
|
|
126
130
|
setAccountLists(data || []);
|
|
127
|
-
console.log("currentUser4455777", appointmentBooking, (_c = (_b = (_a = appointmentBooking.store) == null ? void 0 : _a.accountList) == null ? void 0 : _b.store) == null ? void 0 : _c.accountList, data);
|
|
128
131
|
};
|
|
129
132
|
(0, import_react.useEffect)(() => {
|
|
133
|
+
getAccountLists();
|
|
130
134
|
pisellOS.effects.on(
|
|
131
135
|
"appointmentBooking_accountList:changed",
|
|
132
136
|
async (res) => {
|
|
133
137
|
if (res.path === "accounts") {
|
|
138
|
+
console.log("appointmentBooking_accountList:changed", res);
|
|
134
139
|
getAccountLists();
|
|
135
140
|
}
|
|
136
141
|
}
|
|
137
142
|
);
|
|
138
|
-
getAccountLists();
|
|
139
143
|
}, []);
|
|
140
144
|
return { accountLists };
|
|
141
145
|
};
|
|
142
146
|
var useAppointmentBookingResource = () => {
|
|
143
147
|
const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
|
|
144
148
|
const { resourceSort } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
|
|
145
|
-
const getResourceTimeSlot = async (params) => {
|
|
146
|
-
const data = await appointmentBooking.getTimeSlotByAllResources(params);
|
|
147
|
-
setTimes(data || []);
|
|
148
|
-
};
|
|
149
149
|
const getResourceList = () => {
|
|
150
|
+
var _a;
|
|
150
151
|
let resources = appointmentBooking.getResourcesList();
|
|
151
152
|
resources = resources.map((item) => {
|
|
152
153
|
return {
|
|
@@ -154,15 +155,26 @@ var useAppointmentBookingResource = () => {
|
|
|
154
155
|
resources: (0, import_utils.sortResources)((item == null ? void 0 : item.resources) || [], resourceSort)
|
|
155
156
|
};
|
|
156
157
|
});
|
|
158
|
+
const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
|
|
159
|
+
const resourceCodes = _resources.map((item) => item.code);
|
|
157
160
|
setResources(resources || []);
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
return { resources, resourceCodes };
|
|
162
|
+
};
|
|
163
|
+
const getResourceTimeSlot = async (index) => {
|
|
164
|
+
const { resourceCodes } = getResourceList();
|
|
165
|
+
const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
|
|
166
|
+
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
167
|
+
setTimes(data || []);
|
|
160
168
|
};
|
|
161
|
-
const autoSelectAllProductResources = async (
|
|
169
|
+
const autoSelectAllProductResources = async (index) => {
|
|
170
|
+
const { resourceCodes } = getResourceList();
|
|
171
|
+
const code = resourceCodes == null ? void 0 : resourceCodes[index || 0];
|
|
172
|
+
const data = await appointmentBooking.getTimeSlotByAllResources(code);
|
|
162
173
|
let res = await appointmentBooking.autoSelectAllProductResources(code);
|
|
163
174
|
setResourceOtherParams({
|
|
164
175
|
...resourceOtherParams,
|
|
165
|
-
...res
|
|
176
|
+
...res,
|
|
177
|
+
resourceCodes
|
|
166
178
|
});
|
|
167
179
|
return res;
|
|
168
180
|
};
|
|
@@ -39,6 +39,7 @@ var import_context = require("./context");
|
|
|
39
39
|
var import_Content = __toESM(require("./components/Content"));
|
|
40
40
|
var import_locales = __toESM(require("./locales"));
|
|
41
41
|
var import_hooks = require("./hooks");
|
|
42
|
+
var import_utils2 = require("./utils");
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var AppointmentBooking = () => {
|
|
44
45
|
var _a;
|
|
@@ -46,15 +47,14 @@ var AppointmentBooking = () => {
|
|
|
46
47
|
const utils = context.appHelper.utils || {};
|
|
47
48
|
import_utils.locales.init(import_locales.default, ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en");
|
|
48
49
|
const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
|
|
49
|
-
const
|
|
50
|
-
console.log(appointmentBooking, "wh97886786currentUser4455777");
|
|
50
|
+
const currentUser = (0, import_utils2.formatCurrentUser)();
|
|
51
51
|
(0, import_react.useEffect)(() => {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
appointmentBooking.getAccounts().then((data) => {
|
|
53
|
+
if (!data.length) {
|
|
54
|
+
appointmentBooking.addAccount([currentUser]);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
54
57
|
}, []);
|
|
55
|
-
(0, import_react.useEffect)(() => {
|
|
56
|
-
console.log(accountLists, "wh98867555");
|
|
57
|
-
}, [accountLists]);
|
|
58
58
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -85,6 +85,8 @@ declare const _default: {
|
|
|
85
85
|
'pisell2.appointment.friday': string;
|
|
86
86
|
'pisell2.appointment.saturday': string;
|
|
87
87
|
'pisell2.appointment.sunday': string;
|
|
88
|
+
'pisell2.appointment.any.professional': string;
|
|
89
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
88
90
|
'pisell2.text.apply': string;
|
|
89
91
|
'pisell2.text.goodpass': string;
|
|
90
92
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -181,6 +183,8 @@ declare const _default: {
|
|
|
181
183
|
'pisell2.appointment.friday': string;
|
|
182
184
|
'pisell2.appointment.saturday': string;
|
|
183
185
|
'pisell2.appointment.sunday': string;
|
|
186
|
+
'pisell2.appointment.any.professional': string;
|
|
187
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
184
188
|
'pisell2.text.apply': string;
|
|
185
189
|
'pisell2.text.goodpass': string;
|
|
186
190
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -277,6 +281,8 @@ declare const _default: {
|
|
|
277
281
|
'pisell2.appointment.friday': string;
|
|
278
282
|
'pisell2.appointment.saturday': string;
|
|
279
283
|
'pisell2.appointment.sunday': string;
|
|
284
|
+
'pisell2.appointment.any.professional': string;
|
|
285
|
+
'pisell2.appointment.for.maximum.availability': string;
|
|
280
286
|
'pisell2.text.apply': string;
|
|
281
287
|
'pisell2.text.goodpass': string;
|
|
282
288
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -109,6 +109,8 @@ var locales_default = {
|
|
|
109
109
|
"pisell2.appointment.friday": "Fri",
|
|
110
110
|
"pisell2.appointment.saturday": "Sat",
|
|
111
111
|
"pisell2.appointment.sunday": "Sun",
|
|
112
|
+
"pisell2.appointment.any.professional": "Any professional",
|
|
113
|
+
"pisell2.appointment.for.maximum.availability": "for maximum availability",
|
|
112
114
|
"pisell2.text.apply": "Apply",
|
|
113
115
|
"pisell2.text.goodpass": "GoodPass",
|
|
114
116
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
@@ -205,6 +207,8 @@ var locales_default = {
|
|
|
205
207
|
"pisell2.appointment.friday": "周五",
|
|
206
208
|
"pisell2.appointment.saturday": "周六",
|
|
207
209
|
"pisell2.appointment.sunday": "周日",
|
|
210
|
+
"pisell2.appointment.any.professional": "随机分配",
|
|
211
|
+
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
208
212
|
"pisell2.text.apply": "应用",
|
|
209
213
|
"pisell2.text.goodpass": "商品券",
|
|
210
214
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
@@ -301,6 +305,8 @@ var locales_default = {
|
|
|
301
305
|
"pisell2.appointment.friday": "周五",
|
|
302
306
|
"pisell2.appointment.saturday": "周六",
|
|
303
307
|
"pisell2.appointment.sunday": "周日",
|
|
308
|
+
"pisell2.appointment.any.professional": "隨機分配",
|
|
309
|
+
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
304
310
|
"pisell2.text.apply": "應用",
|
|
305
311
|
"pisell2.text.goodpass": "商品券",
|
|
306
312
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
@@ -75,3 +75,12 @@ export declare const formatCurrentUser: () => {
|
|
|
75
75
|
* @Date: 2025-04-15 17:05
|
|
76
76
|
*/
|
|
77
77
|
export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @title: 购物车中是否有空的资源数据
|
|
80
|
+
* @description:
|
|
81
|
+
* @param {any} carts
|
|
82
|
+
* @return {*}
|
|
83
|
+
* @Author: WangHan
|
|
84
|
+
* @Date: 2025-04-15 21:51
|
|
85
|
+
*/
|
|
86
|
+
export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
|
|
@@ -39,6 +39,7 @@ __export(utils_exports, {
|
|
|
39
39
|
getMeAccount: () => getMeAccount,
|
|
40
40
|
getScheduleColors: () => getScheduleColors,
|
|
41
41
|
getUsableSchedules: () => getUsableSchedules,
|
|
42
|
+
isEmptyCartsResourceId: () => isEmptyCartsResourceId,
|
|
42
43
|
isEmptyGuest: () => isEmptyGuest,
|
|
43
44
|
resourceTitle: () => resourceTitle,
|
|
44
45
|
sortResources: () => sortResources
|
|
@@ -120,6 +121,7 @@ var formatCarts = (data, resources) => {
|
|
|
120
121
|
const utils = context.appHelper.utils || {};
|
|
121
122
|
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
122
123
|
const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
|
|
124
|
+
console.log(data, resources, "formatCartsformatCarts");
|
|
123
125
|
return data == null ? void 0 : data.map((d) => {
|
|
124
126
|
var _a2, _b;
|
|
125
127
|
const currentResource = resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
|
|
@@ -127,7 +129,7 @@ var formatCarts = (data, resources) => {
|
|
|
127
129
|
currentResources = currentResources == null ? void 0 : currentResources.map((d2) => {
|
|
128
130
|
return {
|
|
129
131
|
...d2,
|
|
130
|
-
label: d2 == null ? void 0 : d2.main_field
|
|
132
|
+
label: (d2 == null ? void 0 : d2.main_field) || (d2 == null ? void 0 : d2.id)
|
|
131
133
|
};
|
|
132
134
|
});
|
|
133
135
|
return {
|
|
@@ -202,6 +204,11 @@ var isEmptyGuest = (carts, accounts) => {
|
|
|
202
204
|
}
|
|
203
205
|
return false;
|
|
204
206
|
};
|
|
207
|
+
var isEmptyCartsResourceId = (carts) => {
|
|
208
|
+
const isEmptyResourceId = carts == null ? void 0 : carts.some((d) => !(d == null ? void 0 : d.resource_id));
|
|
209
|
+
console.log(isEmptyResourceId, "isEmptyResourceId");
|
|
210
|
+
return isEmptyResourceId;
|
|
211
|
+
};
|
|
205
212
|
// Annotate the CommonJS export names for ESM import in node:
|
|
206
213
|
0 && (module.exports = {
|
|
207
214
|
formatBackgroundColors,
|
|
@@ -214,6 +221,7 @@ var isEmptyGuest = (carts, accounts) => {
|
|
|
214
221
|
getMeAccount,
|
|
215
222
|
getScheduleColors,
|
|
216
223
|
getUsableSchedules,
|
|
224
|
+
isEmptyCartsResourceId,
|
|
217
225
|
isEmptyGuest,
|
|
218
226
|
resourceTitle,
|
|
219
227
|
sortResources
|
|
@@ -39,7 +39,6 @@ var import_antd = require("antd");
|
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
41
41
|
var import_materials = require("@pisell/materials");
|
|
42
|
-
var import_icons = require("@ant-design/icons");
|
|
43
42
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
44
43
|
var import_index = require("./index.less");
|
|
45
44
|
var ShopDiscountHooks = {
|
|
@@ -145,6 +144,7 @@ var VoucherCard = (props) => {
|
|
|
145
144
|
value: val.productList
|
|
146
145
|
}
|
|
147
146
|
});
|
|
147
|
+
setCode("");
|
|
148
148
|
} else {
|
|
149
149
|
(0, import_materials.PisellToast)({
|
|
150
150
|
content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
|
|
@@ -193,6 +193,7 @@ var VoucherCard = (props) => {
|
|
|
193
193
|
dispatch({
|
|
194
194
|
type: "setService",
|
|
195
195
|
payload: {
|
|
196
|
+
edit: true,
|
|
196
197
|
value: detail.productList
|
|
197
198
|
}
|
|
198
199
|
});
|
|
@@ -208,13 +209,7 @@ var VoucherCard = (props) => {
|
|
|
208
209
|
setCode((_a2 = e.target) == null ? void 0 : _a2.value);
|
|
209
210
|
},
|
|
210
211
|
size: "small",
|
|
211
|
-
placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
|
|
212
|
-
suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
|
|
213
|
-
import_icons.QuestionCircleOutlined,
|
|
214
|
-
{
|
|
215
|
-
style: { color: "rgba(0,0,0,.45)" }
|
|
216
|
-
}
|
|
217
|
-
))
|
|
212
|
+
placeholder: import_utils.locales.getText("pisell2.text.goodpass.enter-code")
|
|
218
213
|
}
|
|
219
214
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
|
|
220
215
|
));
|
|
@@ -162,10 +162,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
162
162
|
export declare const getDuration: (duration: number | {
|
|
163
163
|
type: string;
|
|
164
164
|
value: number;
|
|
165
|
-
}) => number |
|
|
165
|
+
}) => number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
};
|
|
168
|
+
} | "flexible";
|
|
169
169
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
170
170
|
export declare const getIsEdit: (state: any) => boolean;
|
|
171
171
|
export {};
|