@pisell/private-materials 3.3.81 → 3.3.83
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/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- 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 -43
- 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/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- 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 -26
- 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 +4 -4
- 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/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
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/booking/editBookingModal/index.tsx
|
|
30
|
-
var editBookingModal_exports = {};
|
|
31
|
-
__export(editBookingModal_exports, {
|
|
32
|
-
default: () => editBookingModal_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(editBookingModal_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_antd = require("antd");
|
|
37
|
-
var import_materials = require("@pisell/materials");
|
|
38
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
39
|
-
var import_utils = require("@pisell/utils");
|
|
40
|
-
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
41
|
-
var import_utils2 = require("../../../utils");
|
|
42
|
-
var import_ResourcesV2 = __toESM(require("../info2/service/editService/ResourcesV2"));
|
|
43
|
-
var import_utils3 = require("../info2/service/addService/utils");
|
|
44
|
-
var import_serve = require("./serve");
|
|
45
|
-
var import_serve2 = require("./serve");
|
|
46
|
-
var import_utils4 = require("../../booking/components/footer/utils");
|
|
47
|
-
var import_locales = __toESM(require("./locales"));
|
|
48
|
-
var import_index = require("./index.less");
|
|
49
|
-
var EditBookingModal = (props, ref) => {
|
|
50
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
51
|
-
const [params, setParams] = (0, import_react.useState)({});
|
|
52
|
-
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
53
|
-
const [updating, setUpdating] = (0, import_react.useState)(false);
|
|
54
|
-
const [data, setData] = (0, import_react.useState)(null);
|
|
55
|
-
const context = (0, import_useEngineContext.default)();
|
|
56
|
-
const [form] = import_antd.Form.useForm();
|
|
57
|
-
const useToDate = import_antd.Form.useWatch("toDate", form);
|
|
58
|
-
const useResource = import_antd.Form.useWatch("resource", form);
|
|
59
|
-
(0, import_react.useImperativeHandle)(ref, () => {
|
|
60
|
-
return {
|
|
61
|
-
open: (params2) => {
|
|
62
|
-
console.log("change", params2);
|
|
63
|
-
setParams(params2);
|
|
64
|
-
setOpen(true);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
const getInitData = async (params2) => {
|
|
69
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
70
|
-
let mockProps = params2;
|
|
71
|
-
const _data = await (0, import_serve2.init)(mockProps);
|
|
72
|
-
setData(_data);
|
|
73
|
-
let _initResourceVal = _data.childrenBooking._extend.resource;
|
|
74
|
-
const toResourceFormId = (_a = _data.toResource) == null ? void 0 : _a.form_id;
|
|
75
|
-
if (params2.fromResourceId !== params2.toResourceId && toResourceFormId) {
|
|
76
|
-
const { list, maps } = (0, import_utils3.formatResources)({
|
|
77
|
-
cacheItem: _data.childrenBooking,
|
|
78
|
-
resourcesOrigin: _data.resourcesOrigin
|
|
79
|
-
});
|
|
80
|
-
const currentForm = maps[toResourceFormId];
|
|
81
|
-
const relation_id = (_b = _data.toResource) == null ? void 0 : _b.id;
|
|
82
|
-
if (currentForm && relation_id) {
|
|
83
|
-
let _targetResource = {
|
|
84
|
-
relation_type: ((_d = (_c = currentForm.renderListMaps[relation_id]) == null ? void 0 : _c.usable) == null ? void 0 : _d.relation_type) || "form",
|
|
85
|
-
form_id: toResourceFormId,
|
|
86
|
-
relation_id,
|
|
87
|
-
like_status: "common",
|
|
88
|
-
children: (_f = (_e = currentForm.renderListMaps) == null ? void 0 : _e[relation_id]) == null ? void 0 : _f.children,
|
|
89
|
-
metadata: {
|
|
90
|
-
...(_h = (_g = currentForm.renderListMaps) == null ? void 0 : _g[relation_id]) == null ? void 0 : _h.metadata,
|
|
91
|
-
form_name: currentForm.title,
|
|
92
|
-
resource_name: (_i = currentForm.renderListMaps[relation_id]) == null ? void 0 : _i.main_field
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
if (Array.isArray(_initResourceVal[toResourceFormId])) {
|
|
96
|
-
const _cloned = [..._initResourceVal[toResourceFormId]];
|
|
97
|
-
const _idx = _cloned.findIndex(
|
|
98
|
-
(rs) => rs.relation_id == params2.fromResourceId
|
|
99
|
-
);
|
|
100
|
-
if (_idx !== -1) {
|
|
101
|
-
_cloned[_idx] = _targetResource;
|
|
102
|
-
} else {
|
|
103
|
-
_cloned.push(_targetResource);
|
|
104
|
-
}
|
|
105
|
-
_initResourceVal = {
|
|
106
|
-
..._initResourceVal,
|
|
107
|
-
[toResourceFormId]: _cloned
|
|
108
|
-
};
|
|
109
|
-
} else {
|
|
110
|
-
_initResourceVal = {
|
|
111
|
-
..._initResourceVal,
|
|
112
|
-
[toResourceFormId]: [_targetResource]
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
setTimeout(() => {
|
|
118
|
-
form.setFieldsValue({
|
|
119
|
-
resource: _initResourceVal,
|
|
120
|
-
fromDate: [
|
|
121
|
-
(0, import_dayjs.default)(`${mockProps.event.start_date} ${mockProps.event.start_time}`),
|
|
122
|
-
(0, import_dayjs.default)(`${mockProps.event.end_date} ${mockProps.event.end_time}`)
|
|
123
|
-
],
|
|
124
|
-
toDate: [(0, import_dayjs.default)(mockProps.toStartDate), (0, import_dayjs.default)(mockProps.toEndDate)]
|
|
125
|
-
});
|
|
126
|
-
}, 100);
|
|
127
|
-
};
|
|
128
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
129
|
-
var _a, _b;
|
|
130
|
-
import_utils.locales.init(
|
|
131
|
-
import_locales.default,
|
|
132
|
-
((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en"
|
|
133
|
-
);
|
|
134
|
-
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
135
|
-
}, []);
|
|
136
|
-
(0, import_react.useEffect)(() => {
|
|
137
|
-
if (!open) return;
|
|
138
|
-
getInitData(params);
|
|
139
|
-
}, [params, open]);
|
|
140
|
-
const resourceData = (0, import_react.useMemo)(() => {
|
|
141
|
-
if (!data) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
return (0, import_utils3.formatResources)({
|
|
145
|
-
cacheItem: data.childrenBooking,
|
|
146
|
-
resourcesOrigin: data.resourcesOrigin
|
|
147
|
-
});
|
|
148
|
-
}, [data]);
|
|
149
|
-
const updateResource = (resource) => {
|
|
150
|
-
form.setFieldsValue({
|
|
151
|
-
resource
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
const originCacheItem = (0, import_react.useMemo)(() => {
|
|
155
|
-
if (!data) {
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
const _cacheItem = (0, import_serve.createCacheItem)(data.childrenBooking, {
|
|
159
|
-
toDate: [
|
|
160
|
-
data.childrenBooking._extend.start_date,
|
|
161
|
-
data.childrenBooking._extend.end_date
|
|
162
|
-
],
|
|
163
|
-
resource: data.childrenBooking._extend.resource
|
|
164
|
-
});
|
|
165
|
-
console.log("_origin_cacheItem", _cacheItem);
|
|
166
|
-
const { list, maps } = (0, import_utils3.formatResources)({
|
|
167
|
-
cacheItem: _cacheItem,
|
|
168
|
-
resourcesOrigin: data.resourcesOrigin
|
|
169
|
-
});
|
|
170
|
-
return {
|
|
171
|
-
..._cacheItem,
|
|
172
|
-
_data: {
|
|
173
|
-
resources: list,
|
|
174
|
-
resourceMaps: maps
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
}, [data]);
|
|
178
|
-
const cacheItem = (0, import_react.useMemo)(() => {
|
|
179
|
-
if (!data) {
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
const _cacheItem = (0, import_serve.createCacheItem)(data.childrenBooking, {
|
|
183
|
-
toDate: useToDate,
|
|
184
|
-
resource: useResource
|
|
185
|
-
});
|
|
186
|
-
console.log("_cacheItem", _cacheItem);
|
|
187
|
-
const { list, maps } = (0, import_utils3.formatResources)({
|
|
188
|
-
cacheItem: _cacheItem,
|
|
189
|
-
resourcesOrigin: data.resourcesOrigin
|
|
190
|
-
});
|
|
191
|
-
const resource = (0, import_serve2.updateResourceErrors)(maps, _cacheItem);
|
|
192
|
-
updateResource(resource);
|
|
193
|
-
return {
|
|
194
|
-
..._cacheItem,
|
|
195
|
-
_data: {
|
|
196
|
-
resources: list,
|
|
197
|
-
resourceMaps: maps
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
}, [data, useToDate, useResource]);
|
|
201
|
-
const initState = () => {
|
|
202
|
-
form.resetFields();
|
|
203
|
-
setData(null);
|
|
204
|
-
setOpen(false);
|
|
205
|
-
};
|
|
206
|
-
const onCancel = () => {
|
|
207
|
-
initState();
|
|
208
|
-
props == null ? void 0 : props.onCancel();
|
|
209
|
-
};
|
|
210
|
-
const onOk = async () => {
|
|
211
|
-
const values = form.getFieldsValue();
|
|
212
|
-
setUpdating(true);
|
|
213
|
-
try {
|
|
214
|
-
const { _extend, order_id } = data.childrenBooking;
|
|
215
|
-
const start_date = values.toDate[0].format("YYYY-MM-DD");
|
|
216
|
-
const start_time = values.toDate[0].format("HH:mm");
|
|
217
|
-
const end_date = values.toDate[1].format("YYYY-MM-DD");
|
|
218
|
-
const end_time = values.toDate[1].format("HH:mm");
|
|
219
|
-
await (0, import_serve.updateChildBooking)(order_id, {
|
|
220
|
-
..._extend,
|
|
221
|
-
resources: Object.values(values.resource).reduce(
|
|
222
|
-
(pre, cur) => {
|
|
223
|
-
const newList = (0, import_utils4.checkResourcesFormat)(cur, cacheItem);
|
|
224
|
-
pre = pre.concat(newList);
|
|
225
|
-
return pre;
|
|
226
|
-
},
|
|
227
|
-
[]
|
|
228
|
-
),
|
|
229
|
-
start_date,
|
|
230
|
-
start_time,
|
|
231
|
-
end_date,
|
|
232
|
-
end_time,
|
|
233
|
-
duration: values.toDate[1].diff(values.toDate[0], "minutes")
|
|
234
|
-
});
|
|
235
|
-
setOpen(false);
|
|
236
|
-
props == null ? void 0 : props.onOk();
|
|
237
|
-
} catch (error) {
|
|
238
|
-
console.error(error);
|
|
239
|
-
}
|
|
240
|
-
setUpdating(false);
|
|
241
|
-
};
|
|
242
|
-
console.log("data", data);
|
|
243
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
244
|
-
import_materials.PisellContainer,
|
|
245
|
-
{
|
|
246
|
-
renderType: "modal",
|
|
247
|
-
props: {
|
|
248
|
-
title: import_utils.locales.getText("pisell2.text.booking.confirm-changes"),
|
|
249
|
-
open,
|
|
250
|
-
cancelVisible: false,
|
|
251
|
-
bodyStyle: {
|
|
252
|
-
padding: 24
|
|
253
|
-
},
|
|
254
|
-
width: 680,
|
|
255
|
-
onCancel,
|
|
256
|
-
okButtonProps: {},
|
|
257
|
-
onOk: () => {
|
|
258
|
-
},
|
|
259
|
-
footer: null,
|
|
260
|
-
className: "pisell-edit-booking-modal"
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
/* @__PURE__ */ import_react.default.createElement(import_materials.Spin, { spinning: !data }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical" }, /* @__PURE__ */ import_react.default.createElement(
|
|
264
|
-
"div",
|
|
265
|
-
{
|
|
266
|
-
style: {
|
|
267
|
-
display: "flex",
|
|
268
|
-
alignItems: "center",
|
|
269
|
-
gap: 8,
|
|
270
|
-
color: "#1b1b1b",
|
|
271
|
-
fontWeight: "500"
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-copy-03", style: { fontSize: 16 } }),
|
|
275
|
-
import_utils.locales.getText("pisell2.text.booking.time-change")
|
|
276
|
-
), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "fromDate", label: "From" }, /* @__PURE__ */ import_react.default.createElement(
|
|
277
|
-
import_antd.DatePicker.RangePicker,
|
|
278
|
-
{
|
|
279
|
-
format: "YYYY-MM-DD HH:mm",
|
|
280
|
-
showTime: true,
|
|
281
|
-
presets: [],
|
|
282
|
-
disabled: true,
|
|
283
|
-
style: { width: "100%" },
|
|
284
|
-
size: "large"
|
|
285
|
-
}
|
|
286
|
-
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "toDate", label: "To" }, /* @__PURE__ */ import_react.default.createElement(
|
|
287
|
-
import_antd.DatePicker.RangePicker,
|
|
288
|
-
{
|
|
289
|
-
format: "YYYY-MM-DD HH:mm",
|
|
290
|
-
showTime: true,
|
|
291
|
-
presets: [],
|
|
292
|
-
style: { width: "100%" },
|
|
293
|
-
size: "large"
|
|
294
|
-
}
|
|
295
|
-
)), /* @__PURE__ */ import_react.default.createElement(
|
|
296
|
-
"div",
|
|
297
|
-
{
|
|
298
|
-
style: {
|
|
299
|
-
display: "flex",
|
|
300
|
-
alignItems: "center",
|
|
301
|
-
gap: 8,
|
|
302
|
-
color: "#1b1b1b",
|
|
303
|
-
fontWeight: "500"
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-mark", style: { fontSize: 16 } }),
|
|
307
|
-
import_utils.locales.getText("pisell2.text.booking.resource-change.detail")
|
|
308
|
-
), data ? /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16 } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "resource" }, /* @__PURE__ */ import_react.default.createElement(
|
|
309
|
-
import_ResourcesV2.default,
|
|
310
|
-
{
|
|
311
|
-
state: {},
|
|
312
|
-
resourceData,
|
|
313
|
-
cacheItem,
|
|
314
|
-
getCurrentCacheItem: () => {
|
|
315
|
-
return cacheItem;
|
|
316
|
-
},
|
|
317
|
-
config: {
|
|
318
|
-
autoAllocation: false,
|
|
319
|
-
labelCol: { span: 24 },
|
|
320
|
-
resourceErrorIcon: true,
|
|
321
|
-
disabled: false
|
|
322
|
-
},
|
|
323
|
-
originCacheItem,
|
|
324
|
-
originValue: originCacheItem._extend.resource
|
|
325
|
-
}
|
|
326
|
-
))) : null)),
|
|
327
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
328
|
-
"div",
|
|
329
|
-
{
|
|
330
|
-
className: "",
|
|
331
|
-
style: {
|
|
332
|
-
display: "flex",
|
|
333
|
-
gap: 12
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
337
|
-
import_antd.Button,
|
|
338
|
-
{
|
|
339
|
-
onClick: onCancel,
|
|
340
|
-
block: true,
|
|
341
|
-
size: "large",
|
|
342
|
-
style: {
|
|
343
|
-
borderRadius: 20
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
import_utils.locales.getText("pisell2.text.cancel")
|
|
347
|
-
),
|
|
348
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
349
|
-
import_antd.Button,
|
|
350
|
-
{
|
|
351
|
-
type: "primary",
|
|
352
|
-
onClick: onOk,
|
|
353
|
-
block: true,
|
|
354
|
-
size: "large",
|
|
355
|
-
loading: updating,
|
|
356
|
-
style: { borderRadius: 20 }
|
|
357
|
-
},
|
|
358
|
-
import_utils.locales.getText("pisell2.text.confirm")
|
|
359
|
-
)
|
|
360
|
-
)
|
|
361
|
-
);
|
|
362
|
-
};
|
|
363
|
-
var editBookingModal_default = (0, import_react.forwardRef)(EditBookingModal);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.text.login': string;
|
|
4
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
5
|
-
'pisell2.text.booking.time-change': string;
|
|
6
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
7
|
-
};
|
|
8
|
-
'zh-CN': {
|
|
9
|
-
'pisell2.text.login': string;
|
|
10
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
11
|
-
'pisell2.text.booking.time-change': string;
|
|
12
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
13
|
-
};
|
|
14
|
-
'zh-HK': {
|
|
15
|
-
'pisell2.text.login': string;
|
|
16
|
-
'pisell2.text.booking.confirm-changes': string;
|
|
17
|
-
'pisell2.text.booking.time-change': string;
|
|
18
|
-
'pisell2.text.booking.resource-change.detail': string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/booking/editBookingModal/locales.ts
|
|
20
|
-
var locales_exports = {};
|
|
21
|
-
__export(locales_exports, {
|
|
22
|
-
default: () => locales_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(locales_exports);
|
|
25
|
-
var locales_default = {
|
|
26
|
-
en: {
|
|
27
|
-
"pisell2.text.login": "Login",
|
|
28
|
-
"pisell2.text.booking.confirm-changes": "Confirm Booking Changes",
|
|
29
|
-
"pisell2.text.booking.time-change": "Time Change",
|
|
30
|
-
"pisell2.text.booking.resource-change.detail": "Resource Change Details"
|
|
31
|
-
},
|
|
32
|
-
"zh-CN": {
|
|
33
|
-
"pisell2.text.login": "登录",
|
|
34
|
-
"pisell2.text.booking.confirm-changes": "确认预约变更",
|
|
35
|
-
"pisell2.text.booking.time-change": "时间变更",
|
|
36
|
-
"pisell2.text.booking.resource-change.detail": "资源变更详情"
|
|
37
|
-
},
|
|
38
|
-
"zh-HK": {
|
|
39
|
-
"pisell2.text.login": "登录",
|
|
40
|
-
"pisell2.text.booking.confirm-changes": "確認預約變更",
|
|
41
|
-
"pisell2.text.booking.time-change": "時間變更",
|
|
42
|
-
"pisell2.text.booking.resource-change.detail": "資源變更詳情"
|
|
43
|
-
}
|
|
44
|
-
};
|