@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
|
@@ -10,11 +10,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import React, { useMemo, useState } from 'react';
|
|
12
12
|
import { locales } from '@pisell/utils';
|
|
13
|
-
import { Button } from '@pisell/materials';
|
|
13
|
+
import { Button, PisellToast } from '@pisell/materials';
|
|
14
14
|
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
15
|
-
import { useAppointmentBookingLogin, useAppointmentBookingResource, useAppointmentBookingAccount } from "../../../hooks";
|
|
15
|
+
import { useAppointmentBookingLogin, useAppointmentBookingResource, useAppointmentBookingAccount, useShopDiscount } from "../../../hooks";
|
|
16
16
|
import { useAppointmentBookingContext } from "../../../context";
|
|
17
|
-
import { formatCustomer } from "../../../utils";
|
|
17
|
+
import { formatCustomer, isEmptyCartsResourceId } from "../../../utils";
|
|
18
18
|
import "./index.less";
|
|
19
19
|
var ContinueButton = function ContinueButton() {
|
|
20
20
|
var _currentStep$step2;
|
|
@@ -29,23 +29,29 @@ var ContinueButton = function ContinueButton() {
|
|
|
29
29
|
openLoginModal = _useAppointmentBookin.openLoginModal;
|
|
30
30
|
var _useAppointmentBookin2 = useAppointmentBookingAccount(),
|
|
31
31
|
accountLists = _useAppointmentBookin2.accountLists;
|
|
32
|
+
var shopDiscount = useShopDiscount();
|
|
32
33
|
var _useAppointmentBookin3 = useAppointmentBookingContext(),
|
|
33
34
|
currentStep = _useAppointmentBookin3.currentStep,
|
|
34
35
|
isLastStep = _useAppointmentBookin3.isLastStep,
|
|
35
36
|
carts = _useAppointmentBookin3.carts,
|
|
36
37
|
appointmentBooking = _useAppointmentBookin3.appointmentBooking,
|
|
37
|
-
resourceOtherParams = _useAppointmentBookin3.resourceOtherParams
|
|
38
|
+
resourceOtherParams = _useAppointmentBookin3.resourceOtherParams,
|
|
39
|
+
summary = _useAppointmentBookin3.summary;
|
|
38
40
|
var _useAppointmentBookin4 = useAppointmentBookingResource(),
|
|
39
|
-
getResourceTimeSlot = _useAppointmentBookin4.getResourceTimeSlot
|
|
41
|
+
getResourceTimeSlot = _useAppointmentBookin4.getResourceTimeSlot,
|
|
42
|
+
getResourceList = _useAppointmentBookin4.getResourceList;
|
|
40
43
|
var disabled = useMemo(function () {
|
|
41
|
-
var _currentStep$step
|
|
44
|
+
var _currentStep$step;
|
|
42
45
|
var key = currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key;
|
|
43
46
|
if (!carts.length) return true;
|
|
44
47
|
|
|
45
48
|
// 选择资源部分需要判断是否有不可用的资源
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
// if (
|
|
50
|
+
// key === 'select-resource' &&
|
|
51
|
+
// resourceOtherParams?.errorList?.length > 0
|
|
52
|
+
// ) {
|
|
53
|
+
// return true;
|
|
54
|
+
// }
|
|
49
55
|
|
|
50
56
|
// 如果是选择服务页面,则判断是否账户下有空的购物车
|
|
51
57
|
// if (key === 'select-service' && isEmptyGuest(carts, accountLists)) {
|
|
@@ -55,6 +61,18 @@ var ContinueButton = function ContinueButton() {
|
|
|
55
61
|
return false;
|
|
56
62
|
}, [currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key, carts, accountLists, resourceOtherParams === null || resourceOtherParams === void 0 ? void 0 : resourceOtherParams.errorList]);
|
|
57
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @title: 清空数据
|
|
66
|
+
* @description:
|
|
67
|
+
* @return {*}
|
|
68
|
+
* @Author: WangHan
|
|
69
|
+
* @Date: 2025-04-16 17:55
|
|
70
|
+
*/
|
|
71
|
+
var clearData = function clearData() {
|
|
72
|
+
appointmentBooking.destroy();
|
|
73
|
+
shopDiscount.destroy();
|
|
74
|
+
};
|
|
75
|
+
|
|
58
76
|
/**
|
|
59
77
|
* @title: 下一步
|
|
60
78
|
* @description:
|
|
@@ -65,12 +83,12 @@ var ContinueButton = function ContinueButton() {
|
|
|
65
83
|
var handleNextStep = /*#__PURE__*/function () {
|
|
66
84
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
67
85
|
var _currentStep$step3, _currentStep$step4;
|
|
68
|
-
var res;
|
|
86
|
+
var res, _freeResult$data, _ref2, order_id, total_amount, freeResult, _utils$history, url, _freeResult$data2;
|
|
69
87
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
70
88
|
while (1) switch (_context.prev = _context.next) {
|
|
71
89
|
case 0:
|
|
72
90
|
if (!isLastStep) {
|
|
73
|
-
_context.next =
|
|
91
|
+
_context.next = 24;
|
|
74
92
|
break;
|
|
75
93
|
}
|
|
76
94
|
setLoading(true);
|
|
@@ -79,29 +97,47 @@ var ContinueButton = function ContinueButton() {
|
|
|
79
97
|
return appointmentBooking.submitOrder();
|
|
80
98
|
case 5:
|
|
81
99
|
res = _context.sent;
|
|
100
|
+
if (!((summary === null || summary === void 0 ? void 0 : summary.total) > 0)) {
|
|
101
|
+
_context.next = 10;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
// 拉起支付弹窗
|
|
82
105
|
utils.action({
|
|
83
106
|
type: 'pisell1.payment',
|
|
84
|
-
data: res === null || res === void 0 ? void 0 : res.data
|
|
85
|
-
callback: function callback(e) {
|
|
86
|
-
console.log(e, currentStep, 'wh9896788');
|
|
87
|
-
// PisellToast({
|
|
88
|
-
// content: result?.err?.message || '',
|
|
89
|
-
// });
|
|
90
|
-
// checkoutCallback.current && checkoutCallback.current(e);
|
|
91
|
-
}
|
|
107
|
+
data: res === null || res === void 0 ? void 0 : res.data
|
|
92
108
|
});
|
|
93
|
-
|
|
94
|
-
_context.next = 13;
|
|
109
|
+
_context.next = 16;
|
|
95
110
|
break;
|
|
96
111
|
case 10:
|
|
97
|
-
|
|
112
|
+
// 免费领取
|
|
113
|
+
_ref2 = (res === null || res === void 0 ? void 0 : res.data) || {}, order_id = _ref2.order_id, total_amount = _ref2.total_amount;
|
|
114
|
+
_context.next = 13;
|
|
115
|
+
return appointmentBooking.getFreeProduct(order_id);
|
|
116
|
+
case 13:
|
|
117
|
+
freeResult = _context.sent;
|
|
118
|
+
console.log(freeResult, 'freeResult');
|
|
119
|
+
if (freeResult !== null && freeResult !== void 0 && (_freeResult$data = freeResult.data) !== null && _freeResult$data !== void 0 && _freeResult$data.status) {
|
|
120
|
+
url = "/payment-finish/success?order_id=".concat(order_id, "&amount=").concat(Number(total_amount));
|
|
121
|
+
utils === null || utils === void 0 || (_utils$history = utils.history) === null || _utils$history === void 0 || _utils$history.replace(url);
|
|
122
|
+
} else {
|
|
123
|
+
PisellToast({
|
|
124
|
+
content: freeResult === null || freeResult === void 0 || (_freeResult$data2 = freeResult.data) === null || _freeResult$data2 === void 0 ? void 0 : _freeResult$data2.message
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
case 16:
|
|
128
|
+
clearData();
|
|
129
|
+
setLoading(false);
|
|
130
|
+
_context.next = 23;
|
|
131
|
+
break;
|
|
132
|
+
case 20:
|
|
133
|
+
_context.prev = 20;
|
|
98
134
|
_context.t0 = _context["catch"](2);
|
|
99
135
|
setLoading(false);
|
|
100
|
-
case
|
|
136
|
+
case 23:
|
|
101
137
|
return _context.abrupt("return");
|
|
102
|
-
case
|
|
138
|
+
case 24:
|
|
103
139
|
if ((currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key) === 'select-resource') {
|
|
104
|
-
getResourceTimeSlot(
|
|
140
|
+
getResourceTimeSlot();
|
|
105
141
|
}
|
|
106
142
|
if ((currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key) === 'select-time') {
|
|
107
143
|
// getResourceTimeSlot('resources');
|
|
@@ -114,11 +150,11 @@ var ContinueButton = function ContinueButton() {
|
|
|
114
150
|
// console.log(errorList, result, 'wh9896788');
|
|
115
151
|
}
|
|
116
152
|
return _context.abrupt("return", appointmentBooking.next());
|
|
117
|
-
case
|
|
153
|
+
case 27:
|
|
118
154
|
case "end":
|
|
119
155
|
return _context.stop();
|
|
120
156
|
}
|
|
121
|
-
}, _callee, null, [[2,
|
|
157
|
+
}, _callee, null, [[2, 20]]);
|
|
122
158
|
}));
|
|
123
159
|
return function handleNextStep() {
|
|
124
160
|
return _ref.apply(this, arguments);
|
|
@@ -133,16 +169,21 @@ var ContinueButton = function ContinueButton() {
|
|
|
133
169
|
* @Date: 2025-01-16 16:30
|
|
134
170
|
*/
|
|
135
171
|
var handleContinue = /*#__PURE__*/function () {
|
|
136
|
-
var
|
|
172
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
173
|
+
var _currentStep$step5;
|
|
174
|
+
var key;
|
|
137
175
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
138
176
|
while (1) switch (_context2.prev = _context2.next) {
|
|
139
177
|
case 0:
|
|
178
|
+
key = currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key;
|
|
179
|
+
console.log(currentStep, isLastStep, isLogin, 'wh9896788222');
|
|
180
|
+
// 如果当前是确认信息页面,则到结算页面
|
|
140
181
|
if (!isLastStep) {
|
|
141
|
-
_context2.next =
|
|
182
|
+
_context2.next = 5;
|
|
142
183
|
break;
|
|
143
184
|
}
|
|
144
185
|
if (isLogin) {
|
|
145
|
-
_context2.next =
|
|
186
|
+
_context2.next = 5;
|
|
146
187
|
break;
|
|
147
188
|
}
|
|
148
189
|
return _context2.abrupt("return", openLoginModal({
|
|
@@ -159,16 +200,25 @@ var ContinueButton = function ContinueButton() {
|
|
|
159
200
|
}
|
|
160
201
|
}
|
|
161
202
|
}));
|
|
162
|
-
case
|
|
203
|
+
case 5:
|
|
204
|
+
if (!(key === 'select-resource' && isEmptyCartsResourceId(carts))) {
|
|
205
|
+
_context2.next = 8;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
PisellToast({
|
|
209
|
+
content: locales.getText('pisell2.appointment.no.available.time')
|
|
210
|
+
});
|
|
211
|
+
return _context2.abrupt("return");
|
|
212
|
+
case 8:
|
|
163
213
|
handleNextStep();
|
|
164
|
-
case
|
|
214
|
+
case 9:
|
|
165
215
|
case "end":
|
|
166
216
|
return _context2.stop();
|
|
167
217
|
}
|
|
168
218
|
}, _callee2);
|
|
169
219
|
}));
|
|
170
220
|
return function handleContinue() {
|
|
171
|
-
return
|
|
221
|
+
return _ref3.apply(this, arguments);
|
|
172
222
|
};
|
|
173
223
|
}();
|
|
174
224
|
|
|
@@ -20,7 +20,7 @@ var Total = function Total(_ref) {
|
|
|
20
20
|
total = summary.total;
|
|
21
21
|
console.log(summary, 'summarysummary');
|
|
22
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "
|
|
23
|
+
className: "appointment-total-wrap ".concat(className)
|
|
24
24
|
}, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
25
25
|
className: "gst-wrap"
|
|
26
26
|
}, /*#__PURE__*/React.createElement("span", null, taxTitle, isFooter ? ': ' : ''), /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
@@ -10,22 +10,26 @@ import ShoppingCart from "../../../../shoppingCart";
|
|
|
10
10
|
import ContinueButton from "../ContinueButton";
|
|
11
11
|
import { useAppointmentBooking } from "../../../hooks";
|
|
12
12
|
import { useAppointmentBookingContext } from "../../../context";
|
|
13
|
-
import { useAppointmentBookingAccount } from "../../../hooks";
|
|
13
|
+
import { useAppointmentBookingAccount, useAppointmentBookingResource } from "../../../hooks";
|
|
14
14
|
import { formatHolder, formatCarts, formatCurrentUser } from "../../../utils";
|
|
15
15
|
import VoucherCard from "../../Voucher";
|
|
16
16
|
import Total from "./Total";
|
|
17
17
|
import "./index.less";
|
|
18
|
-
var CartItem = function CartItem() {
|
|
18
|
+
var CartItem = function CartItem(_ref) {
|
|
19
19
|
var _currentStep$step, _currentStep$step2;
|
|
20
|
+
var onConfirm = _ref.onConfirm;
|
|
20
21
|
var appointmentBooking = useAppointmentBooking();
|
|
21
22
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
22
23
|
carts = _useAppointmentBookin.carts,
|
|
23
24
|
isLastStep = _useAppointmentBookin.isLastStep,
|
|
24
25
|
currentStep = _useAppointmentBookin.currentStep,
|
|
25
|
-
resources = _useAppointmentBookin.resources
|
|
26
|
+
resources = _useAppointmentBookin.resources,
|
|
27
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
28
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
|
|
26
29
|
var _useAppointmentBookin2 = useAppointmentBookingAccount(),
|
|
27
30
|
accountLists = _useAppointmentBookin2.accountLists;
|
|
28
|
-
|
|
31
|
+
var _useAppointmentBookin3 = useAppointmentBookingResource(),
|
|
32
|
+
getResourceList = _useAppointmentBookin3.getResourceList;
|
|
29
33
|
var currentUser = formatCurrentUser();
|
|
30
34
|
var holderIds = useMemo(function () {
|
|
31
35
|
return accountLists.map(function (item) {
|
|
@@ -55,6 +59,10 @@ var CartItem = function CartItem() {
|
|
|
55
59
|
|
|
56
60
|
// 更改资源
|
|
57
61
|
if (type === 'change_resource') {
|
|
62
|
+
// 清空资源分配失败数据
|
|
63
|
+
setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
|
|
64
|
+
errorList: null
|
|
65
|
+
}));
|
|
58
66
|
return appointmentBooking.updateCart({
|
|
59
67
|
_id: e === null || e === void 0 ? void 0 : e._id,
|
|
60
68
|
resources: [val]
|
|
@@ -62,7 +70,7 @@ var CartItem = function CartItem() {
|
|
|
62
70
|
}
|
|
63
71
|
};
|
|
64
72
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "cart-item-wrap ".concat(isMobile() ? 'cart-mobile-item-wrap' : '')
|
|
73
|
+
className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
|
|
66
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
67
75
|
className: "content"
|
|
68
76
|
}, /*#__PURE__*/React.createElement(ShoppingCart, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.cart-item-wrap {
|
|
2
|
-
height:
|
|
1
|
+
.appointment-cart-item-wrap {
|
|
2
|
+
height: calc(100vh - 100px);
|
|
3
3
|
.content {
|
|
4
4
|
background: #fff;
|
|
5
5
|
padding: 0 16px;
|
|
6
|
-
max-height:
|
|
6
|
+
max-height: calc(100% - 240px);
|
|
7
7
|
overflow-y: auto;
|
|
8
8
|
|
|
9
9
|
.pisell-lowcode__shopping-cart-content {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.appointment-total-wrap {
|
|
27
27
|
color: var(--Text-Text_1, #1b1b1b);
|
|
28
28
|
font-size: 20px;
|
|
29
29
|
font-weight: 600;
|
|
@@ -67,15 +67,17 @@
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.cart-mobile-item-wrap {
|
|
70
|
+
.appointment-cart-mobile-item-wrap {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
position: relative;
|
|
74
|
+
height: 100%;
|
|
74
75
|
|
|
75
76
|
.content {
|
|
76
77
|
flex: 1;
|
|
77
78
|
overflow-y: auto;
|
|
78
|
-
padding: 0 0
|
|
79
|
+
padding: 0 0 210px;
|
|
80
|
+
max-height: 100%;
|
|
79
81
|
}
|
|
80
82
|
.appointment-footer {
|
|
81
83
|
z-index: 10;
|
|
@@ -18,8 +18,9 @@ var Cart = function Cart(_ref) {
|
|
|
18
18
|
padding: '20px'
|
|
19
19
|
},
|
|
20
20
|
destroyOnClose: true,
|
|
21
|
-
className: "
|
|
22
|
-
footer: null
|
|
21
|
+
className: "appointment-cart-modal",
|
|
22
|
+
footer: null,
|
|
23
|
+
forceRender: true
|
|
23
24
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24
25
|
style: {
|
|
25
26
|
flex: 1,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.
|
|
1
|
+
.appointment-cart-modal {
|
|
2
2
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
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
9
|
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); }
|
|
@@ -20,7 +26,9 @@ import "./index.less";
|
|
|
20
26
|
var Layout = function Layout() {
|
|
21
27
|
var _currentStep$step, _currentStep$step3, _currentStep$step4;
|
|
22
28
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
23
|
-
currentStep = _useAppointmentBookin.currentStep
|
|
29
|
+
currentStep = _useAppointmentBookin.currentStep,
|
|
30
|
+
setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
|
|
31
|
+
resourceOtherParams = _useAppointmentBookin.resourceOtherParams;
|
|
24
32
|
|
|
25
33
|
// 不要删除
|
|
26
34
|
useAppointmentBookingCart();
|
|
@@ -30,6 +38,10 @@ var Layout = function Layout() {
|
|
|
30
38
|
params = _useState2[0],
|
|
31
39
|
setParams = _useState2[1];
|
|
32
40
|
useEffect(function () {
|
|
41
|
+
// 清空资源分配失败数据
|
|
42
|
+
setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
|
|
43
|
+
errorList: null
|
|
44
|
+
}));
|
|
33
45
|
window.scrollTo({
|
|
34
46
|
top: 0,
|
|
35
47
|
behavior: 'smooth'
|
|
@@ -70,7 +82,7 @@ var Layout = function Layout() {
|
|
|
70
82
|
var _header$getBoundingCl, _footer$getBoundingCl;
|
|
71
83
|
var header = document.querySelector('.event-progress-bar');
|
|
72
84
|
var footer = document.querySelector('.pisell-section-footers-wrapper');
|
|
73
|
-
var content = document.querySelector('.
|
|
85
|
+
var content = document.querySelector('.parallel-content-mobile-wrap');
|
|
74
86
|
var headerHeight = (header === null || header === void 0 || (_header$getBoundingCl = header.getBoundingClientRect()) === null || _header$getBoundingCl === void 0 ? void 0 : _header$getBoundingCl.height) || 0;
|
|
75
87
|
var footerHeight = (footer === null || footer === void 0 || (_footer$getBoundingCl = footer.getBoundingClientRect()) === null || _footer$getBoundingCl === void 0 ? void 0 : _footer$getBoundingCl.height) || 0;
|
|
76
88
|
var windowHeight = window.innerHeight;
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
width: 634px;
|
|
11
11
|
// padding: 16px 0;
|
|
12
12
|
|
|
13
|
+
.appointment-resource-wrap {
|
|
14
|
+
padding: 16px 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.booking-tab-product {
|
|
14
18
|
.booking-tabs-wrap {
|
|
15
19
|
top: 77px !important;
|
|
@@ -38,7 +42,18 @@
|
|
|
38
42
|
flex: none;
|
|
39
43
|
// padding: 16px 16px 0;
|
|
40
44
|
|
|
45
|
+
.calendar-date-box {
|
|
46
|
+
padding: 0 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.appointment-resource-wrap {
|
|
50
|
+
padding: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
.booking-tab-product {
|
|
54
|
+
.booking-tabs-wrap {
|
|
55
|
+
top: 0 !important;
|
|
56
|
+
}
|
|
42
57
|
.booking-category-list {
|
|
43
58
|
padding: 0 20px;
|
|
44
59
|
}
|
|
@@ -19,7 +19,7 @@ import Dayjs from 'dayjs';
|
|
|
19
19
|
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
20
20
|
Dayjs.extend(isSameOrBefore);
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
-
import { locales } from '@pisell/utils';
|
|
22
|
+
import { locales, isMobile } from '@pisell/utils';
|
|
23
23
|
import { CaretLeftOutlined, CaretRightOutlined } from '@ant-design/icons';
|
|
24
24
|
import { useAppointmentBookingContext } from "../../context";
|
|
25
25
|
import "./index.less";
|
|
@@ -200,7 +200,7 @@ var CalendarDate = function CalendarDate(props) {
|
|
|
200
200
|
setLoading(true);
|
|
201
201
|
};
|
|
202
202
|
return /*#__PURE__*/React.createElement("div", {
|
|
203
|
-
className: 'calendar-date-box'
|
|
203
|
+
className: "calendar-date-box ".concat(isMobile() ? 'calendar-date-mobile-box' : '')
|
|
204
204
|
}, !dateMonthList.length ? /*#__PURE__*/React.createElement(Skeleton, {
|
|
205
205
|
loading: true,
|
|
206
206
|
active: true,
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
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
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
8
8
|
import { SectionFooters, Button, Badge, Image } from '@pisell/materials';
|
|
9
9
|
import { useState } from 'react';
|
|
10
10
|
import ContinueButton from "../Cart/ContinueButton";
|
|
@@ -14,12 +14,17 @@ import Cart from "../Cart";
|
|
|
14
14
|
import Total from "../Cart/Item/Total";
|
|
15
15
|
import "./index.less";
|
|
16
16
|
var Footer = function Footer() {
|
|
17
|
+
var _currentStep$step;
|
|
17
18
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
18
|
-
carts = _useAppointmentBookin.carts
|
|
19
|
+
carts = _useAppointmentBookin.carts,
|
|
20
|
+
currentStep = _useAppointmentBookin.currentStep;
|
|
19
21
|
var _useState = useState(false),
|
|
20
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
23
|
open = _useState2[0],
|
|
22
24
|
setOpen = _useState2[1];
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
setOpen(false);
|
|
27
|
+
}, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
|
|
23
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionFooters, {
|
|
24
29
|
className: "section-footer-wrap",
|
|
25
30
|
left: /*#__PURE__*/React.createElement(Total, {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import { PisellModal } from '@pisell/materials';
|
|
9
|
+
import "./index.less";
|
|
10
|
+
var GuestOptionsModal = function GuestOptionsModal(props) {
|
|
11
|
+
var open = props.open,
|
|
12
|
+
onCancel = props.onCancel,
|
|
13
|
+
options = props.options,
|
|
14
|
+
_onClick = props.onClick,
|
|
15
|
+
holderItem = props.holderItem;
|
|
16
|
+
var lists = useMemo(function () {
|
|
17
|
+
var _options = _toConsumableArray(options);
|
|
18
|
+
if (!(holderItem !== null && holderItem !== void 0 && holderItem.isGuest)) {
|
|
19
|
+
_options = _options.filter(function (option) {
|
|
20
|
+
return option.key !== 'remove';
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return _options;
|
|
24
|
+
}, [options]);
|
|
25
|
+
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
26
|
+
open: open,
|
|
27
|
+
platform: 'h5',
|
|
28
|
+
closable: true,
|
|
29
|
+
bodyStyle: {
|
|
30
|
+
padding: '0 24px'
|
|
31
|
+
},
|
|
32
|
+
destroyOnClose: true,
|
|
33
|
+
footer: null,
|
|
34
|
+
onCancel: onCancel,
|
|
35
|
+
mobileModalHeight: 'auto',
|
|
36
|
+
className: 'guest-option-modal',
|
|
37
|
+
headerDivider: false
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "guest-options-wrap"
|
|
40
|
+
}, lists.map(function (item) {
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
key: item.key,
|
|
43
|
+
className: "guest-options-wrap-item ".concat(item.key === 'remove' ? 'remove' : ''),
|
|
44
|
+
onClick: function onClick() {
|
|
45
|
+
return _onClick(item);
|
|
46
|
+
}
|
|
47
|
+
}, item.label);
|
|
48
|
+
})));
|
|
49
|
+
};
|
|
50
|
+
export default GuestOptionsModal;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.guest-options-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
.guest-options-wrap-item {
|
|
6
|
+
color: var(--Gray-900, #101828);
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
line-height: 24px;
|
|
10
|
+
display: flex;
|
|
11
|
+
padding: 9px 10px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex: 1 0 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.remove {
|
|
17
|
+
color: var(--Error-700, #b42318);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.guest-option-modal {
|
|
22
|
+
.pisell-lowcode-modal-header {
|
|
23
|
+
border: none;
|
|
24
|
+
}
|
|
25
|
+
.pisell-lowcode-modal-body {
|
|
26
|
+
height: max-content;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -8,6 +8,7 @@ import React, { useMemo, useState } from 'react';
|
|
|
8
8
|
import { Dropdown } from 'antd';
|
|
9
9
|
import { Button, Iconfont, PisellCard, PisellAvatar, PisellToast } from '@pisell/materials';
|
|
10
10
|
import { locales, isMobile, getUniqueId } from '@pisell/utils';
|
|
11
|
+
import InformationOptionsModal from "./components/InformationOptionsModal";
|
|
11
12
|
import { useAppointmentBookingContext } from "../../context";
|
|
12
13
|
import { useAppointmentBookingAccount } from "../../hooks";
|
|
13
14
|
import { formatGuest } from "../../utils";
|
|
@@ -17,6 +18,11 @@ var Guest = function Guest() {
|
|
|
17
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
19
|
openOption = _useState2[0],
|
|
19
20
|
setOpenOption = _useState2[1];
|
|
21
|
+
// 编辑哪个holder
|
|
22
|
+
var _useState3 = useState(null),
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
holderItem = _useState4[0],
|
|
25
|
+
setHolderItem = _useState4[1];
|
|
20
26
|
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
21
27
|
carts = _useAppointmentBookin.carts,
|
|
22
28
|
appointmentBooking = _useAppointmentBookin.appointmentBooking;
|
|
@@ -56,6 +62,7 @@ var Guest = function Guest() {
|
|
|
56
62
|
*/
|
|
57
63
|
var handleClick = function handleClick(_ref, item) {
|
|
58
64
|
var key = _ref.key;
|
|
65
|
+
console.log(key, item, 'wh978967');
|
|
59
66
|
// 编辑holder
|
|
60
67
|
if (key === 'edit') {
|
|
61
68
|
appointmentBooking.setActiveAccount(item.id);
|
|
@@ -87,6 +94,7 @@ var Guest = function Guest() {
|
|
|
87
94
|
return /*#__PURE__*/React.createElement(Button, {
|
|
88
95
|
size: "large",
|
|
89
96
|
onClick: function onClick() {
|
|
97
|
+
setHolderItem(item);
|
|
90
98
|
setOpenOption(true);
|
|
91
99
|
}
|
|
92
100
|
}, locales.getText('pisell2.event.option'));
|
|
@@ -95,11 +103,12 @@ var Guest = function Guest() {
|
|
|
95
103
|
menu: {
|
|
96
104
|
items: _options,
|
|
97
105
|
onClick: function onClick(e) {
|
|
106
|
+
setHolderItem(item);
|
|
98
107
|
handleClick(e, item);
|
|
99
108
|
}
|
|
100
109
|
},
|
|
101
110
|
placement: "bottomRight",
|
|
102
|
-
overlayClassName: "
|
|
111
|
+
overlayClassName: "appointment-guest-custom-dropdown-menu"
|
|
103
112
|
}, /*#__PURE__*/React.createElement(Button, null, locales.getText('pisell2.event.option')));
|
|
104
113
|
};
|
|
105
114
|
var handleAddGuest = function handleAddGuest() {
|
|
@@ -119,7 +128,7 @@ var Guest = function Guest() {
|
|
|
119
128
|
appointmentBooking.back();
|
|
120
129
|
};
|
|
121
130
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
122
|
-
className: "
|
|
131
|
+
className: "appointment-guest-wrap"
|
|
123
132
|
}, lists === null || lists === void 0 ? void 0 : lists.map(function (item) {
|
|
124
133
|
var _item$children;
|
|
125
134
|
return /*#__PURE__*/React.createElement(PisellCard, {
|
|
@@ -145,12 +154,23 @@ var Guest = function Guest() {
|
|
|
145
154
|
width: 'max-content'
|
|
146
155
|
},
|
|
147
156
|
onClick: handleAddGuest,
|
|
148
|
-
className: "
|
|
157
|
+
className: "appointment-guest-add-button"
|
|
149
158
|
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
150
159
|
type: "pisell2-plus",
|
|
151
160
|
style: {
|
|
152
161
|
fontSize: '20px'
|
|
153
162
|
}
|
|
154
|
-
}), locales.getText('pisell2.appointment.add.guest')))
|
|
163
|
+
}), locales.getText('pisell2.appointment.add.guest'))), openOption ? /*#__PURE__*/React.createElement(InformationOptionsModal, {
|
|
164
|
+
options: options,
|
|
165
|
+
open: openOption,
|
|
166
|
+
holderItem: holderItem,
|
|
167
|
+
onCancel: function onCancel() {
|
|
168
|
+
return setOpenOption(false);
|
|
169
|
+
},
|
|
170
|
+
onClick: function onClick(e) {
|
|
171
|
+
handleClick(e, holderItem);
|
|
172
|
+
setOpenOption(false);
|
|
173
|
+
}
|
|
174
|
+
}) : null);
|
|
155
175
|
};
|
|
156
176
|
export default Guest;
|