@pisell/private-materials 6.2.11 → 6.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/utils.js +17 -1
- package/es/components/Sales/Event/Detail.d.ts +1 -0
- package/es/components/Sales/Event/Detail.js +45 -11
- package/es/components/Sales/Event/serve.d.ts +10 -0
- package/es/components/Sales/Event/serve.js +25 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.js +8 -11
- package/es/components/booking/info/client/index.js +2 -3
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
- package/es/components/booking/info/service/Lists.js +26 -36
- package/es/components/booking/info/service/addService/utils.d.ts +1 -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/service2/utils.js +21 -20
- package/es/components/booking/info2/index.js +0 -1
- package/es/components/booking/info2/service/addService/utils.js +3 -6
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
- package/es/components/booking/info2/service/editService/index.js +165 -258
- package/es/components/booking/info2/service/index.js +15 -19
- package/es/components/booking/materiels/duration/index.js +2 -9
- package/es/components/booking/materiels/holder/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/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.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/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- 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 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.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/eventBooking/components/bookingDetailModal/index.js +3 -2
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.js +14 -0
- package/es/components/eventBooking/index.less +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/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/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.js +41 -48
- package/es/components/shoppingCart/components/Cart/index.js +18 -21
- 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/ticketBooking/components/addServiceVariant/addService.js +157 -175
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +71 -78
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/utils.js +10 -1
- package/lib/components/Sales/Event/Detail.d.ts +1 -0
- package/lib/components/Sales/Event/Detail.js +37 -12
- package/lib/components/Sales/Event/serve.d.ts +10 -0
- package/lib/components/Sales/Event/serve.js +7 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.js +13 -16
- package/lib/components/booking/info/client/index.js +4 -5
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
- package/lib/components/booking/info/service/Lists.js +23 -35
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -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/service2/utils.js +17 -17
- package/lib/components/booking/info2/service/addService/utils.js +2 -4
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
- package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
- package/lib/components/booking/info2/service/editService/index.js +70 -132
- package/lib/components/booking/info2/service/index.js +9 -13
- package/lib/components/booking/materiels/duration/index.js +2 -7
- package/lib/components/booking/materiels/holder/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/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.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/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- 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 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.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/eventBooking/components/bookingDetailModal/index.js +3 -2
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.js +11 -0
- package/lib/components/eventBooking/index.less +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/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/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
- package/lib/components/shoppingCart/components/Cart/index.js +15 -18
- 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/ticketBooking/components/addServiceVariant/addService.js +127 -143
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/package.json +3 -3
- package/es/components/Sales/Checkout/utils.d.ts +0 -40
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
- package/es/components/appointmentBooking/hooks.d.ts +0 -106
- package/es/components/appointmentBooking/index.d.ts +0 -3
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
- package/es/components/booking/info/index.d.ts +0 -3
- package/es/components/booking/info/utils.d.ts +0 -50
- package/es/components/booking/info2/index.d.ts +0 -12
- package/es/components/booking/info2/service/addService/index.d.ts +0 -11
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
- package/es/components/booking/locales.d.ts +0 -828
- package/es/components/booking/model.d.ts +0 -108
- package/es/components/eftposPay/const.d.ts +0 -184
- package/es/components/eftposPay/hooks.d.ts +0 -35
- package/es/components/eftposPay/index.d.ts +0 -4
- package/es/components/eftposPay/linkly/const.d.ts +0 -23
- package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/es/components/eftposPay/linkly/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/service.d.ts +0 -32
- package/es/components/eftposPay/manufacturer.d.ts +0 -7
- package/es/components/eftposPay/pay.d.ts +0 -20
- package/es/components/eftposPay/store/index.d.ts +0 -355
- package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
- package/es/components/productSelect/index.d.ts +0 -26
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
- package/es/components/ticketBooking/index.d.ts +0 -7
- package/es/components/walletList/index.d.ts +0 -28
- package/es/utils/index.d.ts +0 -23
- package/lib/components/Sales/Checkout/utils.d.ts +0 -40
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
- package/lib/components/appointmentBooking/hooks.d.ts +0 -106
- package/lib/components/appointmentBooking/index.d.ts +0 -3
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
- package/lib/components/booking/info/index.d.ts +0 -3
- package/lib/components/booking/info/utils.d.ts +0 -50
- package/lib/components/booking/info2/index.d.ts +0 -12
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
- package/lib/components/booking/locales.d.ts +0 -828
- package/lib/components/booking/model.d.ts +0 -108
- package/lib/components/eftposPay/const.d.ts +0 -184
- package/lib/components/eftposPay/hooks.d.ts +0 -35
- package/lib/components/eftposPay/index.d.ts +0 -4
- package/lib/components/eftposPay/linkly/const.d.ts +0 -23
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/lib/components/eftposPay/linkly/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/service.d.ts +0 -32
- package/lib/components/eftposPay/manufacturer.d.ts +0 -7
- package/lib/components/eftposPay/pay.d.ts +0 -20
- package/lib/components/eftposPay/store/index.d.ts +0 -355
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
- package/lib/components/productSelect/index.d.ts +0 -26
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
- package/lib/components/ticketBooking/index.d.ts +0 -7
- package/lib/components/walletList/index.d.ts +0 -28
- package/lib/utils/index.d.ts +0 -23
@@ -55,7 +55,8 @@ var BookingDetailModal = (props) => {
|
|
55
55
|
onCloseEventDetail,
|
56
56
|
onSelectEventDetail,
|
57
57
|
selectEventDetailProductDetail,
|
58
|
-
checkBeforeSelectEventDetail
|
58
|
+
checkBeforeSelectEventDetail,
|
59
|
+
getProductDetailRequest
|
59
60
|
} = (0, import_Sales.useEventDetail)();
|
60
61
|
const { addToCart, checkBeforeAddToCart, checkBeforeAddToCartResquest } = (0, import_Sales.useCart)();
|
61
62
|
const { initData } = (0, import_Sales.useInit)();
|
@@ -294,7 +295,7 @@ var BookingDetailModal = (props) => {
|
|
294
295
|
onOk: handleOk,
|
295
296
|
width: (0, import_utils.isMobile)() ? "100%" : 600,
|
296
297
|
okButtonProps: {
|
297
|
-
loading: checkBeforeAddToCartResquest == null ? void 0 : checkBeforeAddToCartResquest.loading
|
298
|
+
loading: (getProductDetailRequest == null ? void 0 : getProductDetailRequest.loading) || (checkBeforeAddToCartResquest == null ? void 0 : checkBeforeAddToCartResquest.loading)
|
298
299
|
}
|
299
300
|
},
|
300
301
|
content()
|
@@ -66,6 +66,17 @@ var Content = () => {
|
|
66
66
|
}
|
67
67
|
getResourceList.run(params);
|
68
68
|
}, []);
|
69
|
+
(0, import_react.useEffect)(() => {
|
70
|
+
const setRealVH = () => {
|
71
|
+
const vh = window.innerHeight * 0.01;
|
72
|
+
document.documentElement.style.setProperty("--vh", `${vh}px`);
|
73
|
+
};
|
74
|
+
setRealVH();
|
75
|
+
window.addEventListener("resize", setRealVH);
|
76
|
+
return () => {
|
77
|
+
window.removeEventListener("resize", setRealVH);
|
78
|
+
};
|
79
|
+
}, []);
|
69
80
|
return /* @__PURE__ */ import_react.default.createElement(
|
70
81
|
"div",
|
71
82
|
{
|
@@ -37,7 +37,6 @@ var import_materials = require("@pisell/materials");
|
|
37
37
|
var import_useClearCart = __toESM(require("../../hooks/useClearCart"));
|
38
38
|
var import_useContext = require("../../hooks/useContext");
|
39
39
|
var import_useAddService = __toESM(require("../../hooks/useAddService"));
|
40
|
-
var import_ahooks = require("ahooks");
|
41
40
|
var Product = (props) => {
|
42
41
|
const { id, lists, isAdd = true } = props;
|
43
42
|
const { state, onAction, onChange } = (0, import_useContext.useContext)();
|
@@ -55,10 +54,10 @@ var Product = (props) => {
|
|
55
54
|
isShowEditProduct
|
56
55
|
} = state;
|
57
56
|
const clearCart = (0, import_useClearCart.default)(id);
|
58
|
-
const handleChange = (
|
57
|
+
const handleChange = (item, type, other) => {
|
59
58
|
if (disabledEdit && !(other == null ? void 0 : other.disabled)) return;
|
60
59
|
onChange(item, type, other);
|
61
|
-
}
|
60
|
+
};
|
62
61
|
const productParams = (0, import_react.useMemo)(() => {
|
63
62
|
return {
|
64
63
|
isShowNote,
|
@@ -82,33 +81,24 @@ var Product = (props) => {
|
|
82
81
|
isShowChangeHolder,
|
83
82
|
isShowEditProduct
|
84
83
|
]);
|
85
|
-
(
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
|
105
|
-
onChangeResource: (e) => handleChange(item, "change_resource", e),
|
106
|
-
onChangeHolder: (e) => handleChange(item, "change_holder", e),
|
107
|
-
onAddHolder: (e) => handleChange(item, "add_holder", e),
|
108
|
-
...productParams
|
109
|
-
}
|
110
|
-
);
|
111
|
-
}), !hideAddBtn && platform !== "h5" && isAdd ? (0, import_useAddService.default)(id, "more") : null);
|
112
|
-
}, [clearCart, lists, productParams, hideAddBtn, isAdd, platform]);
|
84
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
|
85
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
86
|
+
import_materials.ProductCard,
|
87
|
+
{
|
88
|
+
key: item._id,
|
89
|
+
dataSource: item,
|
90
|
+
onAction: (e) => onAction == null ? void 0 : onAction(e),
|
91
|
+
onDelete: (e) => handleChange(e, "delete", item),
|
92
|
+
onNote: (e) => handleChange(e, "note", { note: e.note }),
|
93
|
+
onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
|
94
|
+
onEditProduct: (e) => handleChange == null ? void 0 : handleChange(e, "edit_product"),
|
95
|
+
onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
|
96
|
+
onChangeResource: (e) => handleChange(item, "change_resource", e),
|
97
|
+
onChangeHolder: (e) => handleChange(item, "change_holder", e),
|
98
|
+
onAddHolder: (e) => handleChange(item, "add_holder", e),
|
99
|
+
...productParams
|
100
|
+
}
|
101
|
+
);
|
102
|
+
}), !hideAddBtn && platform !== "h5" && isAdd ? (0, import_useAddService.default)(id, "more") : null);
|
113
103
|
};
|
114
104
|
var Product_default = Product;
|
@@ -66,23 +66,20 @@ var Cart = () => {
|
|
66
66
|
};
|
67
67
|
});
|
68
68
|
}, [carts, platform]);
|
69
|
-
return (0,
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
85
|
-
));
|
86
|
-
}, [isProductList, cartsMap, platform, collapseParams, state == null ? void 0 : state.products]);
|
69
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__shopping-cart") }, isProductList ? /* @__PURE__ */ import_react.default.createElement(import_Product.default, { id: void 0, lists: state == null ? void 0 : state.products }) : /* @__PURE__ */ import_react.default.createElement(
|
70
|
+
import_materials.Collapse,
|
71
|
+
{
|
72
|
+
items: cartsMap,
|
73
|
+
showHeader: true,
|
74
|
+
panelBackground: "#ffffff",
|
75
|
+
collapsible: platform !== "shop" ? "disabled" : "-",
|
76
|
+
accordion: platform === "shop",
|
77
|
+
onChange: (key) => {
|
78
|
+
updateState({ activeKey: key });
|
79
|
+
onActiveKey(key);
|
80
|
+
},
|
81
|
+
...collapseParams
|
82
|
+
}
|
83
|
+
));
|
87
84
|
};
|
88
85
|
var Cart_default = Cart;
|
@@ -48,7 +48,7 @@ var import_utils6 = require("../../utils");
|
|
48
48
|
var import_notAvailable = __toESM(require("../notAvailable"));
|
49
49
|
var import_dayjs = __toESM(require("dayjs"));
|
50
50
|
var AddSerivce = (props) => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
52
52
|
const { onEdit, state, dispatch, renderMode = "current" } = props;
|
53
53
|
const [loading, setLoading] = (0, import_react.useState)(true);
|
54
54
|
const context = (0, import_useEngineContext.default)();
|
@@ -221,151 +221,10 @@ var AddSerivce = (props) => {
|
|
221
221
|
const isEject = (0, import_utils2.getIsEject)(item, type);
|
222
222
|
const isOnlySession = (0, import_utils2.getIsOnlySession)(item);
|
223
223
|
let lock = false;
|
224
|
-
let cacheValues = null;
|
225
224
|
if (isEject) {
|
226
225
|
setCurrentProduct(item);
|
227
226
|
} else {
|
228
227
|
setCurrentProduct(null);
|
229
|
-
cacheValues = {
|
230
|
-
bundle: [],
|
231
|
-
key: item.id,
|
232
|
-
option: [],
|
233
|
-
product_id: item.id,
|
234
|
-
product_variant_id: 0,
|
235
|
-
quantity: 1,
|
236
|
-
rowKey: item.id,
|
237
|
-
session: null,
|
238
|
-
unique: "08974625397"
|
239
|
-
};
|
240
|
-
}
|
241
|
-
const callback = async (e, extension_type, detail) => {
|
242
|
-
var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
|
243
|
-
setCurrentProduct(null);
|
244
|
-
if (lock) {
|
245
|
-
return;
|
246
|
-
}
|
247
|
-
lock = true;
|
248
|
-
setTimeout(() => {
|
249
|
-
lock = false;
|
250
|
-
}, 2e3);
|
251
|
-
if (!isBooking4) {
|
252
|
-
const data = await createBookingData({
|
253
|
-
product: { ...detail || item, _params: e }
|
254
|
-
});
|
255
|
-
createBooking({ booking: data });
|
256
|
-
return;
|
257
|
-
}
|
258
|
-
const _detail = detail || item;
|
259
|
-
const other = JSON.parse(JSON.stringify(e));
|
260
|
-
other.session = e.session;
|
261
|
-
let cacheItem = {
|
262
|
-
..._detail,
|
263
|
-
product_id: item.id,
|
264
|
-
_id: (0, import_utils.getUniqueId)(),
|
265
|
-
_key: e.key,
|
266
|
-
_extend: {
|
267
|
-
start_date: state.date.value,
|
268
|
-
quantity: (e == null ? void 0 : e.quantity) || 1,
|
269
|
-
price: _detail.price,
|
270
|
-
product_name: item.title,
|
271
|
-
other
|
272
|
-
},
|
273
|
-
new: 1
|
274
|
-
};
|
275
|
-
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
276
|
-
cacheItem._extend.total = _total;
|
277
|
-
cacheItem._extend.origin_total = _total;
|
278
|
-
const _isEdit = !!state.service.cacheItem;
|
279
|
-
if (_isEdit) {
|
280
|
-
cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
|
281
|
-
cacheItem.new = 0;
|
282
|
-
}
|
283
|
-
if (renderMode === "current") {
|
284
|
-
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
285
|
-
}
|
286
|
-
cacheItem = (0, import_utils3.getProductExtend)({
|
287
|
-
cacheItem,
|
288
|
-
state,
|
289
|
-
isDisabledTime: true
|
290
|
-
});
|
291
|
-
if (state.renderType === "eventBooking") {
|
292
|
-
cacheItem.autoClose = false;
|
293
|
-
}
|
294
|
-
if (cacheItem.autoClose) {
|
295
|
-
cacheItem.autoClose = false;
|
296
|
-
cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
|
297
|
-
let { list: _list, quantity } = (0, import_utils6.addService)(
|
298
|
-
[...state.service.value],
|
299
|
-
cacheItem,
|
300
|
-
state
|
301
|
-
);
|
302
|
-
(_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
|
303
|
-
Toast,
|
304
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
|
305
|
-
quantity || 1
|
306
|
-
)))
|
307
|
-
);
|
308
|
-
(0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
|
309
|
-
try {
|
310
|
-
if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
|
311
|
-
const val = _list == null ? void 0 : _list.map((s) => {
|
312
|
-
return {
|
313
|
-
product_id: s == null ? void 0 : s.product_id,
|
314
|
-
detailId: s == null ? void 0 : s.id,
|
315
|
-
detailProductId: s == null ? void 0 : s.product_id,
|
316
|
-
product_name: s == null ? void 0 : s.title,
|
317
|
-
price: s == null ? void 0 : s.price,
|
318
|
-
_id: s == null ? void 0 : s._id,
|
319
|
-
_key: s == null ? void 0 : s._key,
|
320
|
-
_serviceKey: s == null ? void 0 : s._serviceKey
|
321
|
-
};
|
322
|
-
});
|
323
|
-
const sendData = {
|
324
|
-
product_id: item == null ? void 0 : item.id,
|
325
|
-
detailId: _detail == null ? void 0 : _detail.id,
|
326
|
-
detailProductId: _detail == null ? void 0 : _detail.product_id,
|
327
|
-
product_name: item == null ? void 0 : item.title,
|
328
|
-
price: _detail == null ? void 0 : _detail.price,
|
329
|
-
serviceVal: val
|
330
|
-
};
|
331
|
-
(0, import_utils.sendWarningLog)({
|
332
|
-
title: "addService",
|
333
|
-
content: [
|
334
|
-
{ key: "添加数据", value: JSON.stringify(sendData) },
|
335
|
-
{
|
336
|
-
key: "日期",
|
337
|
-
value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
338
|
-
}
|
339
|
-
]
|
340
|
-
});
|
341
|
-
}
|
342
|
-
} catch (error) {
|
343
|
-
}
|
344
|
-
dispatch({
|
345
|
-
type: "setService",
|
346
|
-
payload: {
|
347
|
-
addModal: false,
|
348
|
-
value: _list,
|
349
|
-
edit: true,
|
350
|
-
changeService: false
|
351
|
-
}
|
352
|
-
});
|
353
|
-
} else {
|
354
|
-
dispatch({
|
355
|
-
type: "setService",
|
356
|
-
payload: {
|
357
|
-
editModal: true,
|
358
|
-
cacheItem,
|
359
|
-
addModal: !cacheItem.autoClose,
|
360
|
-
changeService: false
|
361
|
-
}
|
362
|
-
});
|
363
|
-
onEdit == null ? void 0 : onEdit(cacheItem);
|
364
|
-
}
|
365
|
-
};
|
366
|
-
if (cacheValues) {
|
367
|
-
callback(cacheValues, "", item);
|
368
|
-
return;
|
369
228
|
}
|
370
229
|
state.action({
|
371
230
|
type: "pisell1.handleOpenProductModal",
|
@@ -387,7 +246,131 @@ var AddSerivce = (props) => {
|
|
387
246
|
onCancel: () => {
|
388
247
|
setCurrentProduct(null);
|
389
248
|
},
|
390
|
-
callback
|
249
|
+
callback: async (e, extension_type, detail) => {
|
250
|
+
var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
|
251
|
+
setCurrentProduct(null);
|
252
|
+
if (lock) {
|
253
|
+
return;
|
254
|
+
}
|
255
|
+
lock = true;
|
256
|
+
setTimeout(() => {
|
257
|
+
lock = false;
|
258
|
+
}, 2e3);
|
259
|
+
if (!isBooking4) {
|
260
|
+
const data = await createBookingData({
|
261
|
+
product: { ...detail || item, _params: e }
|
262
|
+
});
|
263
|
+
createBooking({ booking: data });
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
const _detail = detail || item;
|
267
|
+
const other = JSON.parse(JSON.stringify(e));
|
268
|
+
other.session = e.session;
|
269
|
+
let cacheItem = {
|
270
|
+
..._detail,
|
271
|
+
product_id: item.id,
|
272
|
+
_id: (0, import_utils.getUniqueId)(),
|
273
|
+
_key: e.key,
|
274
|
+
_extend: {
|
275
|
+
start_date: state.date.value,
|
276
|
+
quantity: (e == null ? void 0 : e.quantity) || 1,
|
277
|
+
price: _detail.price,
|
278
|
+
product_name: item.title,
|
279
|
+
other
|
280
|
+
},
|
281
|
+
new: 1
|
282
|
+
};
|
283
|
+
let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
|
284
|
+
cacheItem._extend.total = _total;
|
285
|
+
cacheItem._extend.origin_total = _total;
|
286
|
+
const _isEdit = !!state.service.cacheItem;
|
287
|
+
if (_isEdit) {
|
288
|
+
cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
|
289
|
+
cacheItem.new = 0;
|
290
|
+
}
|
291
|
+
if (renderMode === "current") {
|
292
|
+
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
293
|
+
}
|
294
|
+
cacheItem = (0, import_utils3.getProductExtend)({
|
295
|
+
cacheItem,
|
296
|
+
state,
|
297
|
+
isDisabledTime: true
|
298
|
+
});
|
299
|
+
if (state.renderType === "eventBooking") {
|
300
|
+
cacheItem.autoClose = false;
|
301
|
+
}
|
302
|
+
if (cacheItem.autoClose) {
|
303
|
+
cacheItem.autoClose = false;
|
304
|
+
cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
|
305
|
+
let { list: _list, quantity } = (0, import_utils6.addService)(
|
306
|
+
[...state.service.value],
|
307
|
+
cacheItem,
|
308
|
+
state
|
309
|
+
);
|
310
|
+
(_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
|
311
|
+
Toast,
|
312
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
|
313
|
+
quantity || 1
|
314
|
+
)))
|
315
|
+
);
|
316
|
+
(0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
|
317
|
+
try {
|
318
|
+
if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
|
319
|
+
const val = _list == null ? void 0 : _list.map((s) => {
|
320
|
+
return {
|
321
|
+
product_id: s == null ? void 0 : s.product_id,
|
322
|
+
detailId: s == null ? void 0 : s.id,
|
323
|
+
detailProductId: s == null ? void 0 : s.product_id,
|
324
|
+
product_name: s == null ? void 0 : s.title,
|
325
|
+
price: s == null ? void 0 : s.price,
|
326
|
+
_id: s == null ? void 0 : s._id,
|
327
|
+
_key: s == null ? void 0 : s._key,
|
328
|
+
_serviceKey: s == null ? void 0 : s._serviceKey
|
329
|
+
};
|
330
|
+
});
|
331
|
+
const sendData = {
|
332
|
+
product_id: item == null ? void 0 : item.id,
|
333
|
+
detailId: _detail == null ? void 0 : _detail.id,
|
334
|
+
detailProductId: _detail == null ? void 0 : _detail.product_id,
|
335
|
+
product_name: item == null ? void 0 : item.title,
|
336
|
+
price: _detail == null ? void 0 : _detail.price,
|
337
|
+
serviceVal: val
|
338
|
+
};
|
339
|
+
(0, import_utils.sendWarningLog)({
|
340
|
+
title: "addService",
|
341
|
+
content: [
|
342
|
+
{ key: "添加数据", value: JSON.stringify(sendData) },
|
343
|
+
{
|
344
|
+
key: "日期",
|
345
|
+
value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
346
|
+
}
|
347
|
+
]
|
348
|
+
});
|
349
|
+
}
|
350
|
+
} catch (error) {
|
351
|
+
}
|
352
|
+
dispatch({
|
353
|
+
type: "setService",
|
354
|
+
payload: {
|
355
|
+
addModal: false,
|
356
|
+
value: _list,
|
357
|
+
edit: true,
|
358
|
+
changeService: false
|
359
|
+
}
|
360
|
+
});
|
361
|
+
} else {
|
362
|
+
dispatch({
|
363
|
+
type: "setService",
|
364
|
+
payload: {
|
365
|
+
editModal: true,
|
366
|
+
cacheItem,
|
367
|
+
addModal: !cacheItem.autoClose,
|
368
|
+
changeService: false
|
369
|
+
}
|
370
|
+
});
|
371
|
+
onEdit == null ? void 0 : onEdit(cacheItem);
|
372
|
+
}
|
373
|
+
}
|
391
374
|
});
|
392
375
|
}
|
393
376
|
);
|
@@ -445,6 +428,7 @@ var AddSerivce = (props) => {
|
|
445
428
|
}
|
446
429
|
return null;
|
447
430
|
}, [
|
431
|
+
(_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n.autoClose,
|
448
432
|
state.service.addModal,
|
449
433
|
import_utils.locales,
|
450
434
|
renderList,
|