@pisell/private-materials 3.3.84 → 3.3.85
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 +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +3 -0
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +23 -11
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -11,7 +11,6 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { createContext, useRef, useState } from 'react';
|
|
14
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
15
14
|
var defaultData = {};
|
|
16
15
|
var SALES_MODEL_SESSION_STORAGE_KEY = 'shop_h5_sales_model_data';
|
|
17
16
|
export var SalesContext = /*#__PURE__*/createContext({});
|
|
@@ -27,55 +26,23 @@ export var SalesProvider = function SalesProvider(props) {
|
|
|
27
26
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
27
|
hooks = _useState4[0],
|
|
29
28
|
setHooks = _useState4[1];
|
|
30
|
-
var context = useEngineContext();
|
|
31
|
-
var utils = context.appHelper.utils || {};
|
|
32
29
|
var _setData = function _setData(newData) {
|
|
33
30
|
dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), newData);
|
|
34
31
|
console.log('sales_model_newData', dataRef.current);
|
|
35
32
|
if (config !== null && config !== void 0 && config.useSessionStorage) {
|
|
36
|
-
|
|
33
|
+
sessionStorage.setItem(SALES_MODEL_SESSION_STORAGE_KEY, JSON.stringify(dataRef.current || {}));
|
|
37
34
|
}
|
|
38
35
|
setData(_objectSpread({}, dataRef.current));
|
|
39
36
|
};
|
|
40
37
|
var getCurrentData = function getCurrentData() {
|
|
41
38
|
return dataRef.current;
|
|
42
39
|
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @title 设置sessionStorage
|
|
46
|
-
* @description 获取路由参数中的cacheId,并设置到sessionStorage中
|
|
47
|
-
*/
|
|
48
40
|
var setSessionStorage = function setSessionStorage() {
|
|
49
|
-
|
|
50
|
-
var history = (utils === null || utils === void 0 || (_utils$getHistory = utils.getHistory) === null || _utils$getHistory === void 0 ? void 0 : _utils$getHistory.call(utils)) || {};
|
|
51
|
-
var cacheId = (history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 || (_history$location = _history$location.query) === null || _history$location === void 0 ? void 0 : _history$location.cacheId) || '';
|
|
52
|
-
var sessionData = _objectSpread(_objectSpread({}, dataRef.current || {}), {}, {
|
|
53
|
-
cacheId: cacheId
|
|
54
|
-
});
|
|
55
|
-
sessionStorage.setItem("".concat(SALES_MODEL_SESSION_STORAGE_KEY), JSON.stringify(sessionData || {}));
|
|
41
|
+
sessionStorage.setItem(SALES_MODEL_SESSION_STORAGE_KEY, JSON.stringify(dataRef.current || {}));
|
|
56
42
|
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @title 获取sessionStorage
|
|
60
|
-
* @description 获取路由参数中的cacheId并与sessionStorage中的cacheId进行匹配,如果匹配成功,则返回sessionStorage中的数据
|
|
61
|
-
*/
|
|
62
43
|
var getSessionStorage = function getSessionStorage() {
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
var strResult = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
66
|
-
var result = strResult ? JSON.parse(strResult || '{}') : {};
|
|
67
|
-
var cacheId = (history === null || history === void 0 || (_history$location2 = history.location) === null || _history$location2 === void 0 || (_history$location2 = _history$location2.query) === null || _history$location2 === void 0 ? void 0 : _history$location2.cacheId) || '';
|
|
68
|
-
|
|
69
|
-
// cacheId 为空,且sessionStorage中cacheId也为空,则返回sessionStorage中的数据
|
|
70
|
-
if (!cacheId && !(result !== null && result !== void 0 && result.cacheId)) {
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// cacheId 不为空,需要比对sessionStorage中的cacheId与路由参数中的cacheId是否一致
|
|
75
|
-
if (cacheId && (result === null || result === void 0 ? void 0 : result.cacheId) === cacheId) {
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
78
|
-
return {};
|
|
44
|
+
var result = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
45
|
+
return JSON.parse(result || '{}');
|
|
79
46
|
};
|
|
80
47
|
var removeSessionStorage = function removeSessionStorage() {
|
|
81
48
|
sessionStorage.removeItem(SALES_MODEL_SESSION_STORAGE_KEY);
|
|
@@ -6,7 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
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); }
|
|
7
7
|
import React, { createContext } from 'react';
|
|
8
8
|
import { useSales } from "../../../businessModel/SalesModel";
|
|
9
|
-
import {
|
|
9
|
+
import { getResourceListApi } from "./serve";
|
|
10
10
|
import { useRequest } from 'ahooks';
|
|
11
11
|
import { useCart } from "../Cart";
|
|
12
12
|
import { getIamgeFromMedia } from "../utils";
|
|
@@ -73,7 +73,7 @@ export var ResourceProvider = function ResourceProvider(_ref) {
|
|
|
73
73
|
});
|
|
74
74
|
return renderData;
|
|
75
75
|
};
|
|
76
|
-
var getResourceList = useRequest(
|
|
76
|
+
var getResourceList = useRequest(getResourceListApi, {
|
|
77
77
|
manual: true,
|
|
78
78
|
onSuccess: function onSuccess(res) {
|
|
79
79
|
var formatData = formatResourceList(res);
|
|
@@ -3,10 +3,3 @@ export declare const getResourceListApi: (params: {
|
|
|
3
3
|
shop_id: string;
|
|
4
4
|
form_data_status: string;
|
|
5
5
|
}) => Promise<any>;
|
|
6
|
-
/**
|
|
7
|
-
* @title: 获取特殊资源列表
|
|
8
|
-
* @Author: xiangfeng.xue
|
|
9
|
-
*/
|
|
10
|
-
export declare const getSpecialResourceListApi: (params: {
|
|
11
|
-
event_item_ids?: string | number[];
|
|
12
|
-
}) => Promise<any>;
|
|
@@ -5,14 +5,4 @@ export var getResourceListApi = function getResourceListApi(params) {
|
|
|
5
5
|
return request.getRequest().get('/h5/form/data/v1', params, {
|
|
6
6
|
useCache: true
|
|
7
7
|
});
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @title: 获取特殊资源列表
|
|
12
|
-
* @Author: xiangfeng.xue
|
|
13
|
-
*/
|
|
14
|
-
export var getSpecialResourceListApi = function getSpecialResourceListApi(params) {
|
|
15
|
-
return request.getRequest().get('/h5/eventbookingv2/item/specify-resources', params, {
|
|
16
|
-
useCache: true
|
|
17
|
-
});
|
|
18
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.appointment-cart-item-wrap {
|
|
2
|
-
height: calc(
|
|
2
|
+
height: calc(100vh - 100px);
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
align-items: start;
|
|
41
41
|
|
|
42
|
-
>
|
|
42
|
+
>div {
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
flex: none;
|
|
106
106
|
z-index: 10;
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
@@ -85,7 +85,9 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
85
|
return checkProductType(item === null || item === void 0 ? void 0 : item.id);
|
|
86
86
|
case 4:
|
|
87
87
|
type = _context2.sent;
|
|
88
|
-
|
|
88
|
+
if (type === 'session') {
|
|
89
|
+
appointmentBooking.openProductDetail(item.id);
|
|
90
|
+
}
|
|
89
91
|
case 6:
|
|
90
92
|
utils === null || utils === void 0 || utils.action({
|
|
91
93
|
type: 'pisell1.productDetail',
|
|
@@ -103,13 +105,6 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
103
105
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
104
106
|
while (1) switch (_context.prev = _context.next) {
|
|
105
107
|
case 0:
|
|
106
|
-
if (!data.isCancel) {
|
|
107
|
-
_context.next = 3;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
appointmentBooking.closeProductDetail();
|
|
111
|
-
return _context.abrupt("return");
|
|
112
|
-
case 3:
|
|
113
108
|
product = _objectSpread(_objectSpread({}, data), {}, {
|
|
114
109
|
options: (data === null || data === void 0 ? void 0 : data.option) || []
|
|
115
110
|
});
|
|
@@ -117,21 +112,31 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
117
112
|
|
|
118
113
|
// 零售模版,直接加入购物车
|
|
119
114
|
if (!isRetailTemplate) {
|
|
120
|
-
_context.next =
|
|
115
|
+
_context.next = 7;
|
|
121
116
|
break;
|
|
122
117
|
}
|
|
123
118
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
124
|
-
_context.next =
|
|
119
|
+
_context.next = 5;
|
|
125
120
|
break;
|
|
126
121
|
}
|
|
127
122
|
return _context.abrupt("return");
|
|
128
|
-
case
|
|
123
|
+
case 5:
|
|
129
124
|
appointmentBooking.storeProduct(product);
|
|
130
125
|
return _context.abrupt("return");
|
|
126
|
+
case 7:
|
|
127
|
+
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
128
|
+
_context.next = 10;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
if (type === 'session') {
|
|
132
|
+
appointmentBooking.closeProductDetail();
|
|
133
|
+
appointmentBooking.getAvailableDate();
|
|
134
|
+
}
|
|
135
|
+
return _context.abrupt("return");
|
|
131
136
|
case 10:
|
|
132
137
|
session = data === null || data === void 0 ? void 0 : data.session;
|
|
133
138
|
if (!session) {
|
|
134
|
-
_context.next =
|
|
139
|
+
_context.next = 20;
|
|
135
140
|
break;
|
|
136
141
|
}
|
|
137
142
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
@@ -143,36 +148,35 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
143
148
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
|
144
149
|
}
|
|
145
150
|
});
|
|
146
|
-
|
|
151
|
+
appointmentBooking.closeProductDetail();
|
|
152
|
+
_context.next = 18;
|
|
147
153
|
return appointmentBooking.getAvailableDate({
|
|
148
154
|
startDate: startDate,
|
|
149
155
|
endDate: endDate
|
|
150
156
|
});
|
|
151
|
-
case
|
|
152
|
-
_context.next =
|
|
157
|
+
case 18:
|
|
158
|
+
_context.next = 28;
|
|
153
159
|
break;
|
|
154
|
-
case
|
|
160
|
+
case 20:
|
|
155
161
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
|
156
162
|
activeStatus = resources.find(function (item) {
|
|
157
163
|
return item.status === 1;
|
|
158
164
|
});
|
|
159
165
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
|
160
|
-
_context.next =
|
|
166
|
+
_context.next = 24;
|
|
161
167
|
break;
|
|
162
168
|
}
|
|
163
169
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
164
|
-
case
|
|
170
|
+
case 24:
|
|
165
171
|
appointmentBooking.storeProduct(product);
|
|
166
172
|
// duration 类型的商品,要获取一下资源,在先选日期的 duration 步骤里目前只能通过这个动作拉取
|
|
167
173
|
if (!(type === 'duration')) {
|
|
168
|
-
_context.next =
|
|
174
|
+
_context.next = 28;
|
|
169
175
|
break;
|
|
170
176
|
}
|
|
171
|
-
_context.next =
|
|
177
|
+
_context.next = 28;
|
|
172
178
|
return appointmentBooking.getAvailableDate();
|
|
173
|
-
case
|
|
174
|
-
appointmentBooking.closeProductDetail();
|
|
175
|
-
|
|
179
|
+
case 28:
|
|
176
180
|
// 先选择日期流程
|
|
177
181
|
if (isDateSelectedFirst) {
|
|
178
182
|
index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
|
|
@@ -150,7 +150,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
150
150
|
setCode('');
|
|
151
151
|
} else {
|
|
152
152
|
PisellToast({
|
|
153
|
-
content: locales.getText('pisell2.text.goodpass.code-invalid')
|
|
153
|
+
content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
case 4:
|
|
@@ -27,20 +27,6 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}, []);
|
|
30
|
-
useEffect(function () {
|
|
31
|
-
var setRealVH = function setRealVH() {
|
|
32
|
-
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
33
|
-
var vh = window.innerHeight * 0.01;
|
|
34
|
-
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// 页面加载和窗口大小变化时都重新计算
|
|
38
|
-
setRealVH();
|
|
39
|
-
window.addEventListener('resize', setRealVH);
|
|
40
|
-
return function () {
|
|
41
|
-
window.removeEventListener('resize', setRealVH);
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
31
|
className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
|
|
46
32
|
}, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
|
|
@@ -114,6 +114,7 @@ declare const _default: {
|
|
|
114
114
|
'pisell2.text.goodpass.code': string;
|
|
115
115
|
'pisell2.text.goodpass.enter-code': string;
|
|
116
116
|
'pisell2.text.goodpass.code-invalid': string;
|
|
117
|
+
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
117
118
|
'pisell2.text.goodpass.login': string;
|
|
118
119
|
'pisell2.text.goodpass.login-tip': string;
|
|
119
120
|
};
|
|
@@ -232,6 +233,7 @@ declare const _default: {
|
|
|
232
233
|
'pisell2.text.goodpass.code': string;
|
|
233
234
|
'pisell2.text.goodpass.enter-code': string;
|
|
234
235
|
'pisell2.text.goodpass.code-invalid': string;
|
|
236
|
+
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
235
237
|
'pisell2.text.goodpass.login': string;
|
|
236
238
|
'pisell2.text.goodpass.login-tip': string;
|
|
237
239
|
};
|
|
@@ -350,6 +352,7 @@ declare const _default: {
|
|
|
350
352
|
'pisell2.text.goodpass.code': string;
|
|
351
353
|
'pisell2.text.goodpass.enter-code': string;
|
|
352
354
|
'pisell2.text.goodpass.code-invalid': string;
|
|
355
|
+
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
353
356
|
'pisell2.text.goodpass.login': string;
|
|
354
357
|
'pisell2.text.goodpass.login-tip': string;
|
|
355
358
|
};
|
|
@@ -132,6 +132,7 @@ export default {
|
|
|
132
132
|
'pisell2.text.goodpass.code': 'Code',
|
|
133
133
|
'pisell2.text.goodpass.enter-code': 'Enter Code',
|
|
134
134
|
'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
|
|
135
|
+
'pisell2.text.goodpass.code-invalid-cart': "No eligible items in the cart",
|
|
135
136
|
'pisell2.text.goodpass.login': 'Login',
|
|
136
137
|
'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit'
|
|
137
138
|
},
|
|
@@ -268,6 +269,7 @@ export default {
|
|
|
268
269
|
'pisell2.text.goodpass.code': '券码',
|
|
269
270
|
'pisell2.text.goodpass.enter-code': '请输入券码',
|
|
270
271
|
'pisell2.text.goodpass.code-invalid': '当前券码不可用',
|
|
272
|
+
'pisell2.text.goodpass.code-invalid-cart': "当前购物车中无可用商品",
|
|
271
273
|
'pisell2.text.goodpass.login': '登录',
|
|
272
274
|
'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分'
|
|
273
275
|
},
|
|
@@ -404,6 +406,7 @@ export default {
|
|
|
404
406
|
'pisell2.text.goodpass.code': '券碼',
|
|
405
407
|
'pisell2.text.goodpass.enter-code': '請輸入券碼',
|
|
406
408
|
'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
|
|
409
|
+
'pisell2.text.goodpass.code-invalid-cart': "當前購物車中無可用商品",
|
|
407
410
|
'pisell2.text.goodpass.login': '登錄',
|
|
408
411
|
'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分'
|
|
409
412
|
}
|
|
@@ -27,7 +27,6 @@ export interface ResourceItem {
|
|
|
27
27
|
* @Author: jinglin.tan
|
|
28
28
|
*/
|
|
29
29
|
export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
|
|
30
|
-
export declare const checkResourcesFormat: (resources: any[], service: any, isChild?: boolean) => any[];
|
|
31
30
|
/**
|
|
32
31
|
* @title: 格式化商品单价
|
|
33
32
|
* @description:
|
|
@@ -152,7 +152,7 @@ export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resour
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
var checkResourcesFormat = function checkResourcesFormat(resources, service, isChild) {
|
|
156
156
|
return resources.map(function (resource) {
|
|
157
157
|
var _resource$children;
|
|
158
158
|
if (!isChild) {
|
|
@@ -26,8 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
26
26
|
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
27
27
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
28
28
|
import "./index.less";
|
|
29
|
-
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
30
29
|
import { getServiceAddons } from "./utils";
|
|
30
|
+
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
31
31
|
var ShopDiscountHooks = {
|
|
32
32
|
onInited: 'shopDiscount:onInited',
|
|
33
33
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -275,8 +275,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
275
275
|
style: {
|
|
276
276
|
width: '100%'
|
|
277
277
|
},
|
|
278
|
-
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
279
278
|
mixedSort: mixedSort,
|
|
279
|
+
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
280
280
|
onChange: function onChange(val) {
|
|
281
281
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
282
282
|
var detail = shopDiscount.setDiscountSelected({
|
|
@@ -495,8 +495,7 @@ var getAllErrorList = function getAllErrorList(item) {
|
|
|
495
495
|
var _ref4 = item._data || {},
|
|
496
496
|
resourceMaps = _ref4.resourceMaps;
|
|
497
497
|
var _ref5 = item._extend || {},
|
|
498
|
-
|
|
499
|
-
resource = _ref5$resource === void 0 ? {} : _ref5$resource;
|
|
498
|
+
resource = _ref5.resource;
|
|
500
499
|
var errorList = [];
|
|
501
500
|
Object.entries(resource).forEach(function (_ref6) {
|
|
502
501
|
var _ref7 = _slicedToArray(_ref6, 2),
|
|
@@ -516,7 +515,7 @@ var mapListItems = function mapListItems(items) {
|
|
|
516
515
|
return {
|
|
517
516
|
id: item.id || item.form_record_id,
|
|
518
517
|
label: item.labelText,
|
|
519
|
-
isError: !item.usable
|
|
518
|
+
isError: !item.usable
|
|
520
519
|
};
|
|
521
520
|
});
|
|
522
521
|
};
|
|
@@ -69,16 +69,6 @@ export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
|
|
|
69
69
|
* @Date: 2024-09-19 20:26
|
|
70
70
|
*/
|
|
71
71
|
export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
|
|
72
|
-
/**
|
|
73
|
-
* @title: 将商品内关联的资源id还原成数据
|
|
74
|
-
* @description:
|
|
75
|
-
* @param {any} resourcesOriginMap
|
|
76
|
-
* @param {any} cacheItem
|
|
77
|
-
* @return {*}
|
|
78
|
-
* @Author: zhiwei.Wang
|
|
79
|
-
* @Date: 2024-09-19 20:23
|
|
80
|
-
*/
|
|
81
|
-
export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
|
|
82
72
|
/**
|
|
83
73
|
* @title: 预生成服务的 extend
|
|
84
74
|
* @description:
|
|
@@ -179,23 +179,14 @@ export var formatResources = function formatResources(_ref5) {
|
|
|
179
179
|
var _item = cloneDeep(item);
|
|
180
180
|
_item.renderList = _item.renderList.map(function (d) {
|
|
181
181
|
var res = formatResource(d, _cacheItem, function (newData) {
|
|
182
|
-
var unbound = !item.optional_resource.includes(newData.id) && !item.default_resource.includes(newData.id) && newData.id !== 0;
|
|
183
182
|
return /*#__PURE__*/React.createElement("div", {
|
|
184
183
|
className: "resource-option"
|
|
185
184
|
}, /*#__PURE__*/React.createElement("div", {
|
|
186
185
|
className: "like-wrap"
|
|
187
|
-
}), /*#__PURE__*/React.createElement(
|
|
188
|
-
className: "resource-option-label-text"
|
|
189
|
-
}, newData.labelText), (!newData.usable || unbound) && /*#__PURE__*/React.createElement(AlertTriangle, {
|
|
186
|
+
}), newData.labelText, !newData.usable && /*#__PURE__*/React.createElement(AlertTriangle, {
|
|
190
187
|
className: "resource-option-alert-icon"
|
|
191
188
|
}));
|
|
192
189
|
});
|
|
193
|
-
// 平行资源日历拖拽需求
|
|
194
|
-
// 当拖入为绑定的资源中时,为了展示,会临时创建目标资源对应的resourceItem
|
|
195
|
-
// 但是在 item.optional_resource 中并不包含目标资源id
|
|
196
|
-
if (!item.optional_resource.includes(d.id) && !item.default_resource.includes(d.id) && d.id !== 0) {
|
|
197
|
-
res.unbound = true;
|
|
198
|
-
}
|
|
199
190
|
renderListMaps[res.id] = res;
|
|
200
191
|
return res;
|
|
201
192
|
}).sort(function (a, b) {
|
|
@@ -365,12 +356,10 @@ export var setDefaultCapacitys = function setDefaultCapacitys(_ref7) {
|
|
|
365
356
|
* @Author: zhiwei.Wang
|
|
366
357
|
* @Date: 2024-09-19 20:23
|
|
367
358
|
*/
|
|
368
|
-
|
|
359
|
+
var getResourceByIds = function getResourceByIds(resourcesOriginMap, cacheItem) {
|
|
369
360
|
var _cacheItem$product_re;
|
|
370
361
|
var _resources = _toConsumableArray((cacheItem === null || cacheItem === void 0 || (_cacheItem$product_re = cacheItem.product_resource) === null || _cacheItem$product_re === void 0 ? void 0 : _cacheItem$product_re.resources) || []);
|
|
371
|
-
|
|
372
|
-
_ref8$extraResources = _ref8.extraResources,
|
|
373
|
-
extraResources = _ref8$extraResources === void 0 ? [] : _ref8$extraResources;
|
|
362
|
+
|
|
374
363
|
// 过滤出开启的资源
|
|
375
364
|
_resources = _resources.filter(function (d) {
|
|
376
365
|
return d.status == 1;
|
|
@@ -382,14 +371,6 @@ export var getResourceByIds = function getResourceByIds(resourcesOriginMap, cach
|
|
|
382
371
|
var item = _step2.value;
|
|
383
372
|
var form_id = item.id;
|
|
384
373
|
|
|
385
|
-
// 将未绑定的资源,也放入 SelectOption 列表,避免出现仅展示id的情况
|
|
386
|
-
var extraResourceIds = extraResources.filter(function (_extraItem) {
|
|
387
|
-
return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
|
|
388
|
-
}).map(function (_extraItem) {
|
|
389
|
-
return _extraItem.id;
|
|
390
|
-
});
|
|
391
|
-
extraResourceIds = Array.from(new Set(extraResourceIds));
|
|
392
|
-
|
|
393
374
|
// 去重
|
|
394
375
|
item.optional_resource = (item.optional_resource || []).filter(function (d) {
|
|
395
376
|
return item.default_resource.indexOf(d) == -1;
|
|
@@ -412,7 +393,7 @@ export var getResourceByIds = function getResourceByIds(resourcesOriginMap, cach
|
|
|
412
393
|
};
|
|
413
394
|
|
|
414
395
|
// 可选项
|
|
415
|
-
var optional_resource =
|
|
396
|
+
var optional_resource = item.optional_resource.map(function (d) {
|
|
416
397
|
if (!resourcesOriginMap[d]) {
|
|
417
398
|
return null;
|
|
418
399
|
}
|
|
@@ -473,10 +454,10 @@ var getIsAutoClose = function getIsAutoClose(cacheItem) {
|
|
|
473
454
|
}
|
|
474
455
|
}
|
|
475
456
|
}
|
|
476
|
-
return Object.entries(cacheItem._extend.resource).every(function (
|
|
477
|
-
var
|
|
478
|
-
key =
|
|
479
|
-
value =
|
|
457
|
+
return Object.entries(cacheItem._extend.resource).every(function (_ref8) {
|
|
458
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
|
459
|
+
key = _ref9[0],
|
|
460
|
+
value = _ref9[1];
|
|
480
461
|
return getAutoAllocationStorage(key) && (value === null || value === void 0 ? void 0 : value.length);
|
|
481
462
|
});
|
|
482
463
|
};
|
|
@@ -489,10 +470,10 @@ var getIsAutoClose = function getIsAutoClose(cacheItem) {
|
|
|
489
470
|
* @Author: zhiwei.Wang
|
|
490
471
|
* @Date: 2024-06-01 13:25
|
|
491
472
|
*/
|
|
492
|
-
export var getProductExtend = function getProductExtend(
|
|
493
|
-
var cacheItem =
|
|
494
|
-
state =
|
|
495
|
-
isDisabledTime =
|
|
473
|
+
export var getProductExtend = function getProductExtend(_ref10) {
|
|
474
|
+
var cacheItem = _ref10.cacheItem,
|
|
475
|
+
state = _ref10.state,
|
|
476
|
+
isDisabledTime = _ref10.isDisabledTime;
|
|
496
477
|
// 有endDate 说明是在编辑已经保存过的商品, 没有则是编辑还没保存过的商品
|
|
497
478
|
var isNew = cacheItem.new || !cacheItem._extend.endDate;
|
|
498
479
|
var _cacheItem = _objectSpread({}, cacheItem);
|
|
@@ -589,19 +570,7 @@ export var getProductExtend = function getProductExtend(_ref11) {
|
|
|
589
570
|
_cacheItem._data.capacitys = cacheItem.capacity;
|
|
590
571
|
}
|
|
591
572
|
if (!_cacheItem._data.resourcesOrigin) {
|
|
592
|
-
|
|
593
|
-
// 日历中可以将预约拖入未绑定的资源中,需要兼容未绑定资源的 selectOption展示
|
|
594
|
-
if (Array.isArray(_cacheItem._extend.event_resources)) {
|
|
595
|
-
_cacheItem._extend.event_resources.forEach(function (_item) {
|
|
596
|
-
extraResources.push({
|
|
597
|
-
form_id: _item.form_id,
|
|
598
|
-
id: _item.relation_id
|
|
599
|
-
});
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
_cacheItem._data.resourcesOrigin = getResourceByIds(resourcesOriginMap, cacheItem, {
|
|
603
|
-
extraResources: extraResources
|
|
604
|
-
});
|
|
573
|
+
_cacheItem._data.resourcesOrigin = getResourceByIds(resourcesOriginMap, cacheItem);
|
|
605
574
|
}
|
|
606
575
|
if (!_cacheItem._data.resources) {
|
|
607
576
|
// 资源
|
|
@@ -22,22 +22,14 @@ import { getErrorList } from "../../../utilsByBooking";
|
|
|
22
22
|
import { isArray } from 'lodash';
|
|
23
23
|
import { getAutoAllocationStorage, setAutoAllocationStorage } from "../utils";
|
|
24
24
|
import { useUpdate } from 'ahooks';
|
|
25
|
-
import { QuestionCircleOutlined } from
|
|
25
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
26
26
|
var Resources = function Resources(_ref, ref) {
|
|
27
27
|
var _cacheItem$_data2, _cacheItem$_data4;
|
|
28
28
|
var state = _ref.state,
|
|
29
29
|
cacheItem = _ref.cacheItem,
|
|
30
30
|
getCurrentCacheItem = _ref.getCurrentCacheItem,
|
|
31
31
|
onChange = _ref.onChange,
|
|
32
|
-
value = _ref.value
|
|
33
|
-
_ref$config = _ref.config,
|
|
34
|
-
config = _ref$config === void 0 ? {
|
|
35
|
-
// 是否显示自动分配
|
|
36
|
-
autoAllocation: true,
|
|
37
|
-
// 是否显示资源错误图标
|
|
38
|
-
resourceErrorIcon: true,
|
|
39
|
-
disabled: false
|
|
40
|
-
} : _ref$config;
|
|
32
|
+
value = _ref.value;
|
|
41
33
|
var _useState = useState(false),
|
|
42
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
35
|
showError = _useState2[0],
|
|
@@ -152,7 +144,7 @@ var Resources = function Resources(_ref, ref) {
|
|
|
152
144
|
relation_type: d.relation_type
|
|
153
145
|
}), d[label]);
|
|
154
146
|
});
|
|
155
|
-
}, [
|
|
147
|
+
}, []);
|
|
156
148
|
|
|
157
149
|
/**
|
|
158
150
|
* @title: 检查当前资源最小选择数量
|
|
@@ -201,7 +193,6 @@ var Resources = function Resources(_ref, ref) {
|
|
|
201
193
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
202
194
|
label: item.title,
|
|
203
195
|
required: true,
|
|
204
|
-
labelCol: config === null || config === void 0 ? void 0 : config.labelCol,
|
|
205
196
|
extra: showError && item.select_type.min > (cur === null || cur === void 0 ? void 0 : cur.length) ? /*#__PURE__*/React.createElement("span", {
|
|
206
197
|
style: {
|
|
207
198
|
color: '#ff4d4f'
|
|
@@ -210,17 +201,13 @@ var Resources = function Resources(_ref, ref) {
|
|
|
210
201
|
}, /*#__PURE__*/React.createElement("div", {
|
|
211
202
|
className: "resource-col"
|
|
212
203
|
}, item.select_type.type === 'multiple' ? null : /*#__PURE__*/React.createElement(Button, {
|
|
213
|
-
className: "resource-col-like-wrap
|
|
204
|
+
className: "resource-col-like-wrap",
|
|
214
205
|
onClick: function onClick() {
|
|
215
206
|
var _cur$;
|
|
216
|
-
if (config !== null && config !== void 0 && config.disabled) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
207
|
setLikeStatus((cur === null || cur === void 0 || (_cur$ = cur[0]) === null || _cur$ === void 0 ? void 0 : _cur$.like_status) === 'like' ? 'common' : 'like', item.form_id, 'like_status');
|
|
220
208
|
}
|
|
221
209
|
}, /*#__PURE__*/React.createElement(Like, {
|
|
222
|
-
status: cur === null || cur === void 0 || (_cur$2 = cur[0]) === null || _cur$2 === void 0 ? void 0 : _cur$2.like_status
|
|
223
|
-
className: "".concat(config !== null && config !== void 0 && config.disabled ? 'like-icon-disabled' : '')
|
|
210
|
+
status: cur === null || cur === void 0 || (_cur$2 = cur[0]) === null || _cur$2 === void 0 ? void 0 : _cur$2.like_status
|
|
224
211
|
})), /*#__PURE__*/React.createElement(MaxLengthSelect, {
|
|
225
212
|
className: "resource-col-select",
|
|
226
213
|
size: "large",
|
|
@@ -241,16 +228,15 @@ var Resources = function Resources(_ref, ref) {
|
|
|
241
228
|
showSearch: true,
|
|
242
229
|
filterOption: function filterOption(str, option) {
|
|
243
230
|
return ((option === null || option === void 0 ? void 0 : option.labelText) || '').toLowerCase().includes((str || '').toLowerCase());
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
}, renderOptions(item.renderList, 'id', config !== null && config !== void 0 && config.resourceErrorIcon ? 'label' : 'labelText', 'resource')), config !== null && config !== void 0 && config.autoAllocation ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
231
|
+
}
|
|
232
|
+
}, renderOptions(item.renderList, 'id', 'label', 'resource')), /*#__PURE__*/React.createElement(Checkbox, {
|
|
247
233
|
checked: getIsAutoAllocation(item.form_id),
|
|
248
234
|
onChange: function onChange(e) {
|
|
249
235
|
handleCheckAutoAllocation(item.form_id, e.target.checked);
|
|
250
236
|
}
|
|
251
237
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
252
238
|
title: locales.getText('page.booking.text.resource.check-auto-allocation-tip')
|
|
253
|
-
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)))
|
|
239
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)))), state.renderType !== 'eventBooking' && (errors || []).map(function (d) {
|
|
254
240
|
return /*#__PURE__*/React.createElement(Alert, {
|
|
255
241
|
key: d.type,
|
|
256
242
|
message: d.label,
|
|
@@ -260,15 +260,6 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
// 平行资源日历拖动优化需求
|
|
265
|
-
// 拖入到未绑定的资源中
|
|
266
|
-
if (resource.unbound) {
|
|
267
|
-
list.push({
|
|
268
|
-
label: locales.getText('pisell1.text.resource-error-message-unbound'),
|
|
269
|
-
type: "time"
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
263
|
return list;
|
|
273
264
|
};
|
|
274
265
|
|