@pisell/private-materials 6.2.11 → 6.2.12
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/render/default/view.js +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.d.ts +1 -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/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- 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/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.d.ts +1 -1
- 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/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- 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/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 +4 -4
@@ -196,20 +196,44 @@ var EventDetailProvider = ({
|
|
196
196
|
}
|
197
197
|
}
|
198
198
|
);
|
199
|
+
const getProductDetailRequest = (0, import_ahooks.useRequest)(import_serve.getProductDetailApi, {
|
200
|
+
manual: true,
|
201
|
+
loadingDelay: 200
|
202
|
+
});
|
199
203
|
const selectEventDetailBookingOptions = (id) => {
|
200
|
-
var _a;
|
204
|
+
var _a, _b, _c;
|
201
205
|
const { introduction, bookingOptions } = detailRef.current || {};
|
202
206
|
const option = (_a = bookingOptions == null ? void 0 : bookingOptions.filter((v) => v.value === id)) == null ? void 0 : _a[0];
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
207
|
+
const setSelectedData = (data) => {
|
208
|
+
_setDetail({
|
209
|
+
introduction: {
|
210
|
+
...introduction,
|
211
|
+
price: data == null ? void 0 : data.price,
|
212
|
+
origin_price: data == null ? void 0 : data.original_price
|
213
|
+
},
|
214
|
+
selectedProduct: data
|
215
|
+
// 选中的活动关联的商品
|
216
|
+
});
|
217
|
+
_setCurrentBookingOption(id);
|
218
|
+
};
|
219
|
+
if (((_b = option == null ? void 0 : option._originData) == null ? void 0 : _b.is_eject) === 0) {
|
220
|
+
getProductDetailRequest.runAsync(id, {
|
221
|
+
open_deposit: 1,
|
222
|
+
front_end_cache_id: ((_c = introduction == null ? void 0 : introduction._originData) == null ? void 0 : _c.id) + "_" + id
|
223
|
+
}).then((res) => {
|
224
|
+
var _a2;
|
225
|
+
const custom_deposit_data = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.custom_deposit_data;
|
226
|
+
const newOption = { ...option };
|
227
|
+
if (custom_deposit_data && newOption._originData) {
|
228
|
+
newOption._originData.custom_deposit_data = custom_deposit_data;
|
229
|
+
}
|
230
|
+
setSelectedData(newOption);
|
231
|
+
}).catch(() => {
|
232
|
+
setSelectedData(option);
|
233
|
+
});
|
234
|
+
} else {
|
235
|
+
setSelectedData(option);
|
236
|
+
}
|
213
237
|
};
|
214
238
|
const selectEventDetailProductDetail = (productDetail) => {
|
215
239
|
_setDetail({ productDetail });
|
@@ -233,7 +257,8 @@ var EventDetailProvider = ({
|
|
233
257
|
getEventDetailSelectDate,
|
234
258
|
currentBookingOption,
|
235
259
|
selectEventDetailProductDetail,
|
236
|
-
checkBeforeSelectEventDetail
|
260
|
+
checkBeforeSelectEventDetail,
|
261
|
+
getProductDetailRequest
|
237
262
|
};
|
238
263
|
return /* @__PURE__ */ import_react.default.createElement(EventDetailContext.Provider, { value: contextValue }, children);
|
239
264
|
};
|
@@ -37,3 +37,13 @@ export declare const getProductPrice: (params: {
|
|
37
37
|
customer_id: number;
|
38
38
|
schedule_date?: string;
|
39
39
|
}) => Promise<any>;
|
40
|
+
/**
|
41
|
+
* 获取商品详情
|
42
|
+
* @param id 商品id
|
43
|
+
* @param params 参数
|
44
|
+
* @returns
|
45
|
+
*/
|
46
|
+
export declare const getProductDetailApi: (id: number, params: {
|
47
|
+
open_deposit?: string | number;
|
48
|
+
front_end_cache_id?: string;
|
49
|
+
}) => Promise<any>;
|
@@ -24,6 +24,7 @@ __export(serve_exports, {
|
|
24
24
|
getEventDetailSelectDateApi: () => getEventDetailSelectDateApi,
|
25
25
|
getEventDetailTeacherApi: () => getEventDetailTeacherApi,
|
26
26
|
getEventListApi: () => getEventListApi,
|
27
|
+
getProductDetailApi: () => getProductDetailApi,
|
27
28
|
getProductPrice: () => getProductPrice
|
28
29
|
});
|
29
30
|
module.exports = __toCommonJS(serve_exports);
|
@@ -46,6 +47,11 @@ var getEventDetailSelectDateApi = (id, params) => {
|
|
46
47
|
});
|
47
48
|
};
|
48
49
|
var getProductPrice = async (params) => import_utils.request.getRequest().post(`/h5/product/query/price`, params);
|
50
|
+
var getProductDetailApi = async (id, params) => {
|
51
|
+
return import_utils.request.getRequest().get(`/h5/product/standard/show/${id}`, params, {
|
52
|
+
useCache: true
|
53
|
+
});
|
54
|
+
};
|
49
55
|
// Annotate the CommonJS export names for ESM import in node:
|
50
56
|
0 && (module.exports = {
|
51
57
|
getEventDetailBookingOptionsApi,
|
@@ -53,5 +59,6 @@ var getProductPrice = async (params) => import_utils.request.getRequest().post(`
|
|
53
59
|
getEventDetailSelectDateApi,
|
54
60
|
getEventDetailTeacherApi,
|
55
61
|
getEventListApi,
|
62
|
+
getProductDetailApi,
|
56
63
|
getProductPrice
|
57
64
|
});
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
30
30
|
* @return {*}
|
31
31
|
* @Author: xiangfeng.xue
|
32
32
|
*/
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
34
34
|
/**
|
35
35
|
* 计算所有价格明细
|
36
36
|
* @param items - 购物车商品数组
|
@@ -78,7 +78,6 @@ var CustomSelect = (props, ref) => {
|
|
78
78
|
handleOpenModal: propsHandleOpenModal,
|
79
79
|
handleDayChange
|
80
80
|
} = props;
|
81
|
-
console.log("custom select");
|
82
81
|
const searchRef = (0, import_react.useRef)();
|
83
82
|
const [_value, set_value] = (0, import_react.useState)([]);
|
84
83
|
const [search, setSearch] = (0, import_react.useState)("");
|
@@ -37,7 +37,7 @@ var import_classnames = __toESM(require("classnames"));
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
38
38
|
var import_utils = require("@pisell/utils");
|
39
39
|
var useClearCart = (state, dispatch) => {
|
40
|
-
var _a, _b;
|
40
|
+
var _a, _b, _c, _d;
|
41
41
|
const handleClear = () => {
|
42
42
|
dispatch({
|
43
43
|
type: "setService",
|
@@ -46,20 +46,17 @@ var useClearCart = (state, dispatch) => {
|
|
46
46
|
}
|
47
47
|
});
|
48
48
|
};
|
49
|
-
return (0
|
50
|
-
|
51
|
-
|
52
|
-
"
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
|
62
|
-
);
|
63
|
-
}, [(_b = (_a = state.service) == null ? void 0 : _a.value) == null ? void 0 : _b.length, state.channelDisabledEdit]);
|
49
|
+
return !!((_b = (_a = state.service) == null ? void 0 : _a.value) == null ? void 0 : _b.length) && !state.channelDisabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
50
|
+
"span",
|
51
|
+
{
|
52
|
+
className: (0, import_classnames.default)("pisell-lowcode__booking-service-clear-btn", {
|
53
|
+
["pisell-lowcode__booking-service-clear-btn-disabled"]: !((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length)
|
54
|
+
}),
|
55
|
+
onClick: handleClear
|
56
|
+
},
|
57
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
|
58
|
+
" ",
|
59
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
|
60
|
+
);
|
64
61
|
};
|
65
62
|
var useClearCart_default = useClearCart;
|
@@ -48,7 +48,7 @@ var import_utils3 = require("../clientVariant/utils");
|
|
48
48
|
var import_useGetHolderList = __toESM(require("../hooks/useGetHolderList"));
|
49
49
|
var isLoadClient = false;
|
50
50
|
var Client = () => {
|
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;
|
52
52
|
const modalRef = (0, import_react.useRef)();
|
53
53
|
const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
|
54
54
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
@@ -298,7 +298,6 @@ var Client = () => {
|
|
298
298
|
)) : null;
|
299
299
|
}, [loadLoading, params, state.client.clients.length]);
|
300
300
|
const customSelect = (0, import_react.useMemo)(() => {
|
301
|
-
console.log("render customSelect");
|
302
301
|
return /* @__PURE__ */ import_react.default.createElement(
|
303
302
|
import_customSelect.default,
|
304
303
|
{
|
@@ -341,7 +340,7 @@ var Client = () => {
|
|
341
340
|
}
|
342
341
|
}
|
343
342
|
);
|
344
|
-
}, [state
|
343
|
+
}, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
|
345
344
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
346
345
|
"div",
|
347
346
|
{
|
@@ -358,11 +357,11 @@ var Client = () => {
|
|
358
357
|
import_antd.Avatar,
|
359
358
|
{
|
360
359
|
className: "pisell-lowcode__booking-client-list-item-avatar",
|
361
|
-
src: import_utils.image.ali((
|
360
|
+
src: import_utils.image.ali((_b = state.client.value) == null ? void 0 : _b.cover, 100),
|
362
361
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
363
362
|
}
|
364
363
|
),
|
365
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((
|
364
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = state.client.value) == null ? void 0 : _c.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_d = state.client.value) == null ? void 0 : _d.email) : null, ((_e = state.client.value) == null ? void 0 : _e.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_f = state.client.value) == null ? void 0 : _f.phone) : null, !!((_h = (_g = state.client.value) == null ? void 0 : _g.waiver_form) == null ? void 0 : _h.length) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-waiver", title: (0, import_utils3.getWaiverTitle)((_i = state.client.value) == null ? void 0 : _i.waiver_form) }, (_l = (_k = (_j = state.client.value) == null ? void 0 : _j.waiver_form) == null ? void 0 : _k.map) == null ? void 0 : _l.call(_k, (item) => {
|
366
365
|
return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-client-waiver-colon" }, ":"), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
|
367
366
|
"span",
|
368
367
|
{
|
@@ -32,7 +32,6 @@ __export(useInfoHolder_exports, {
|
|
32
32
|
default: () => useInfoHolder_default
|
33
33
|
});
|
34
34
|
module.exports = __toCommonJS(useInfoHolder_exports);
|
35
|
-
var import_ahooks = require("ahooks");
|
36
35
|
var import_react = require("react");
|
37
36
|
var import_useHolderConfig = __toESM(require("./useHolderConfig"));
|
38
37
|
var import_utils = require("../utils");
|
@@ -55,21 +54,21 @@ var useInfoHolder = (state, dispatch) => {
|
|
55
54
|
};
|
56
55
|
}, [(_d = (_c = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.information_tab]);
|
57
56
|
const showAddTimeModal = (0, import_react.useMemo)(() => {
|
58
|
-
return (0, import_utils.isOpenAddTime)(state)
|
57
|
+
return (0, import_utils.isOpenAddTime)(state);
|
59
58
|
}, [state, appointment_card.quick_time]);
|
60
|
-
const handleEdit = (
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
}
|
59
|
+
const handleEdit = (cacheItem, type) => {
|
60
|
+
setTimeout(() => {
|
61
|
+
var _a2, _b2;
|
62
|
+
(_b2 = (_a2 = detailRef.current) == null ? void 0 : _a2.init) == null ? void 0 : _b2.call(_a2, cacheItem, false, type === "edit_product");
|
63
|
+
}, 100);
|
64
|
+
};
|
66
65
|
const dispatchService = (type, payload) => {
|
67
66
|
dispatch({
|
68
67
|
type,
|
69
68
|
payload: { ...payload }
|
70
69
|
});
|
71
70
|
};
|
72
|
-
const handleAction = (
|
71
|
+
const handleAction = (dataSource) => {
|
73
72
|
const cacheItem = (0, import_utils2.getProductExtend)({
|
74
73
|
cacheItem: { ...dataSource._origin, new: 0 },
|
75
74
|
state
|
@@ -81,7 +80,7 @@ var useInfoHolder = (state, dispatch) => {
|
|
81
80
|
cacheItem
|
82
81
|
}
|
83
82
|
});
|
84
|
-
}
|
83
|
+
};
|
85
84
|
return {
|
86
85
|
detailRef,
|
87
86
|
handleEdit,
|
@@ -48,12 +48,10 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
48
48
|
const { handleAddHolder } = (0, import_useAddHolder.default)(state, dispatch);
|
49
49
|
const handleChange = (0, import_ahooks.useMemoizedFn)(
|
50
50
|
(currentItem, type, other) => {
|
51
|
-
console.time("handleChange");
|
52
|
-
console.log(window.pp1 = performance.now(), "打开商品");
|
53
51
|
if (state.disabledEdit || state.disableEventBookingEdit) {
|
54
52
|
return;
|
55
53
|
}
|
56
|
-
let
|
54
|
+
let products = (0, import_utils.updateServices)(state, currentItem, type, other, {
|
57
55
|
handleAddHolder
|
58
56
|
});
|
59
57
|
if (type === "view" || type === "edit_product") {
|
@@ -66,11 +64,11 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
66
64
|
});
|
67
65
|
}
|
68
66
|
onChange({ editModal: true, cacheItem });
|
69
|
-
return onEdit == null ? void 0 : onEdit(
|
67
|
+
return onEdit == null ? void 0 : onEdit({ ...product, new: 0 }, type);
|
70
68
|
}
|
71
69
|
const params = {
|
72
70
|
editModal: false,
|
73
|
-
value:
|
71
|
+
value: products,
|
74
72
|
edit: true,
|
75
73
|
cacheItem: null
|
76
74
|
};
|
@@ -97,36 +95,26 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
97
95
|
isShowChangeHolder,
|
98
96
|
state.isBookingCreatePage
|
99
97
|
]);
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
false,
|
107
|
-
true,
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
isParallelResource,
|
119
|
-
onAction,
|
120
|
-
onChange: handleChange,
|
121
|
-
isOpenGroup: false,
|
122
|
-
isHideClearCart: true,
|
123
|
-
onAddProduct: () => onChange({ addModal: true }),
|
124
|
-
productParams: {
|
125
|
-
...productParams,
|
126
|
-
products
|
127
|
-
}
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
|
99
|
+
import_shoppingCart.default,
|
100
|
+
{
|
101
|
+
isParallelResource,
|
102
|
+
onAction,
|
103
|
+
onChange: handleChange,
|
104
|
+
isOpenGroup: false,
|
105
|
+
isHideClearCart: true,
|
106
|
+
onAddProduct: () => onChange({ addModal: true }),
|
107
|
+
productParams: {
|
108
|
+
...productParams,
|
109
|
+
products: (0, import_utils.formatProducts)(
|
110
|
+
((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || [],
|
111
|
+
state,
|
112
|
+
false,
|
113
|
+
true,
|
114
|
+
isParallelResource
|
115
|
+
)
|
128
116
|
}
|
129
|
-
|
130
|
-
|
117
|
+
}
|
118
|
+
));
|
131
119
|
};
|
132
120
|
var Lists_default = Lists;
|
@@ -579,25 +579,25 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
579
579
|
_origin: item
|
580
580
|
};
|
581
581
|
};
|
582
|
+
lists.forEach((item) => {
|
583
|
+
var _a;
|
584
|
+
if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
|
585
|
+
normalList.push(formItem(item));
|
586
|
+
} else {
|
587
|
+
groupList.push(item);
|
588
|
+
}
|
589
|
+
});
|
590
|
+
let groups = groupList.reduce((prev, item) => {
|
591
|
+
var _a;
|
592
|
+
const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
|
593
|
+
if (!prev[groupId]) {
|
594
|
+
prev[groupId] = [];
|
595
|
+
}
|
596
|
+
prev[groupId].push(item);
|
597
|
+
return prev;
|
598
|
+
}, {});
|
582
599
|
console.log(normalList, "normalList");
|
583
600
|
if (isRenderGroup) {
|
584
|
-
lists.forEach((item) => {
|
585
|
-
var _a;
|
586
|
-
if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
|
587
|
-
normalList.push(formItem(item));
|
588
|
-
} else {
|
589
|
-
groupList.push(item);
|
590
|
-
}
|
591
|
-
});
|
592
|
-
let groups = groupList.reduce((prev, item) => {
|
593
|
-
var _a;
|
594
|
-
const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
|
595
|
-
if (!prev[groupId]) {
|
596
|
-
prev[groupId] = [];
|
597
|
-
}
|
598
|
-
prev[groupId].push(item);
|
599
|
-
return prev;
|
600
|
-
}, {});
|
601
601
|
return Object.values(groups).map((d) => formItem((0, import_utils3.concatBookings)(d))).concat(normalList);
|
602
602
|
} else {
|
603
603
|
return lists == null ? void 0 : lists.map((item) => formItem(item));
|
@@ -142,8 +142,7 @@ var getTimeObj = ({
|
|
142
142
|
cacheItem,
|
143
143
|
useStartTime,
|
144
144
|
currentResource,
|
145
|
-
|
146
|
-
// state,
|
145
|
+
state,
|
147
146
|
durationProps
|
148
147
|
});
|
149
148
|
let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
|
@@ -243,8 +242,7 @@ var setDefaultResource = ({ cacheItem, resources }) => {
|
|
243
242
|
}
|
244
243
|
const defaultResource = defaultOriginalResource.map((d) => {
|
245
244
|
return {
|
246
|
-
|
247
|
-
children: d.children,
|
245
|
+
...d,
|
248
246
|
relation_type: d.relation_type,
|
249
247
|
form_id: item.form_id,
|
250
248
|
relation_id: d.id,
|
@@ -65,7 +65,6 @@ var AddTimeModal = () => {
|
|
65
65
|
const [number, setNumber] = (0, import_react.useState)(1);
|
66
66
|
const originServices = (0, import_react.useRef)([]);
|
67
67
|
const [renderList, setRenderList] = (0, import_react.useState)([]);
|
68
|
-
console.log(renderList, "renderListrenderList");
|
69
68
|
const context = (0, import_useEngineContext.default)();
|
70
69
|
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
71
70
|
const statusMap = {
|
@@ -127,7 +126,6 @@ var AddTimeModal = () => {
|
|
127
126
|
}
|
128
127
|
return arr.filter(Boolean);
|
129
128
|
}, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
|
130
|
-
console.log(currentResource, "currentResource");
|
131
129
|
const getTimeUsableStatus = (time) => {
|
132
130
|
var _a2, _b2;
|
133
131
|
if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
|
@@ -208,7 +206,6 @@ var AddTimeModal = () => {
|
|
208
206
|
setLoading("list");
|
209
207
|
const newList = await _getAddTimeProducts();
|
210
208
|
let list = newList.map((d) => {
|
211
|
-
debugger;
|
212
209
|
let isUsable = (0, import_utils2.isUsableProduct)(d.add_time, state.service.cacheItem);
|
213
210
|
return {
|
214
211
|
...d,
|
@@ -168,11 +168,9 @@ var Resources = ({
|
|
168
168
|
const getIsAutoAllocation = (id) => {
|
169
169
|
return (0, import_utils2.getAutoAllocationStorage)(id);
|
170
170
|
};
|
171
|
-
console.log("resourcesss");
|
172
171
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
|
173
172
|
var _a2;
|
174
173
|
const cur = _value[item.form_id];
|
175
|
-
console.log(cur, "curcur");
|
176
174
|
const errors = (cur || []).reduce((pre, d) => {
|
177
175
|
return pre.concat((d == null ? void 0 : d.errors) || []);
|
178
176
|
}, []);
|