@pisell/private-materials 3.0.127 → 3.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +2 -2
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.js +4 -4
- package/es/components/booking/components/TabProduct/index.js +63 -60
- package/es/components/booking/components/customSelect/index.d.ts +1 -1
- package/es/components/booking/forms/forms.d.ts +2 -2
- package/es/components/booking/forms/forms.js +61 -58
- package/es/components/booking/info/client/index.d.ts +4 -4
- package/es/components/booking/info/client/index.js +94 -90
- package/es/components/booking/info/clientVariant/vertical/index.js +5 -4
- package/es/components/booking/info/index.js +1 -1
- package/es/components/booking/info/pet/index.d.ts +3 -3
- package/es/components/booking/info/pet/index.js +135 -131
- package/es/components/booking/info/service/addService/index.js +47 -45
- package/es/components/booking/info/service/addTimeModal/index.d.ts +2 -2
- package/es/components/booking/info/service/addTimeModal/index.js +218 -225
- package/es/components/booking/info/service/editService/index.js +194 -192
- package/es/components/booking/info/service/index.d.ts +2 -2
- package/es/components/booking/info/service/index.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/booking/components/TabProduct/index.js +61 -58
- package/lib/components/booking/components/customSelect/index.d.ts +1 -1
- package/lib/components/booking/forms/forms.d.ts +2 -2
- package/lib/components/booking/forms/forms.js +90 -75
- package/lib/components/booking/info/client/index.d.ts +4 -4
- package/lib/components/booking/info/client/index.js +59 -48
- package/lib/components/booking/info/clientVariant/vertical/index.js +5 -4
- package/lib/components/booking/info/index.js +1 -1
- package/lib/components/booking/info/pet/index.d.ts +3 -3
- package/lib/components/booking/info/pet/index.js +113 -84
- package/lib/components/booking/info/service/addService/index.js +112 -99
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +2 -2
- package/lib/components/booking/info/service/addTimeModal/index.js +154 -127
- package/lib/components/booking/info/service/editService/index.js +196 -171
- package/lib/components/booking/info/service/index.d.ts +2 -2
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/package.json +4 -4
|
@@ -42,6 +42,7 @@ var import_forms = __toESM(require("../../forms/forms"));
|
|
|
42
42
|
var import_format = require("../../forms/format");
|
|
43
43
|
var import_utils2 = require("../../utils");
|
|
44
44
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
45
|
+
var import_ahooks = require("ahooks");
|
|
45
46
|
var defaultParams = {
|
|
46
47
|
skip: 1,
|
|
47
48
|
num: 20,
|
|
@@ -50,7 +51,13 @@ var defaultParams = {
|
|
|
50
51
|
};
|
|
51
52
|
var Pet = (props) => {
|
|
52
53
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
53
|
-
const {
|
|
54
|
+
const {
|
|
55
|
+
hideTitle,
|
|
56
|
+
addButtonProps,
|
|
57
|
+
handleOpenModal,
|
|
58
|
+
clientChangeNotSetPet,
|
|
59
|
+
previewItemTitleRender
|
|
60
|
+
} = props;
|
|
54
61
|
const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
|
|
55
62
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
56
63
|
let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
@@ -158,7 +165,10 @@ var Pet = (props) => {
|
|
|
158
165
|
with: ["customer"]
|
|
159
166
|
});
|
|
160
167
|
console.log("records", records);
|
|
161
|
-
values[boardParams == null ? void 0 : boardParams.form_id] = (0, import_format.sortFormValues)(
|
|
168
|
+
values[boardParams == null ? void 0 : boardParams.form_id] = (0, import_format.sortFormValues)(
|
|
169
|
+
records,
|
|
170
|
+
(_i2 = (_h2 = state.client) == null ? void 0 : _h2.value) == null ? void 0 : _i2.id
|
|
171
|
+
);
|
|
162
172
|
payload.value = values;
|
|
163
173
|
setValueLoading(false);
|
|
164
174
|
}
|
|
@@ -172,7 +182,7 @@ var Pet = (props) => {
|
|
|
172
182
|
console.log("form_error", err);
|
|
173
183
|
}
|
|
174
184
|
};
|
|
175
|
-
const handleViewItem = (item) => {
|
|
185
|
+
const handleViewItem = (0, import_ahooks.useMemoizedFn)((item) => {
|
|
176
186
|
var _a2, _b2, _c2, _d2;
|
|
177
187
|
let _data = {
|
|
178
188
|
formDataConfig: { ...petForm },
|
|
@@ -209,8 +219,8 @@ var Pet = (props) => {
|
|
|
209
219
|
addCallback();
|
|
210
220
|
}
|
|
211
221
|
});
|
|
212
|
-
};
|
|
213
|
-
const handleEditItem = (item) => {
|
|
222
|
+
});
|
|
223
|
+
const handleEditItem = (0, import_ahooks.useMemoizedFn)((item) => {
|
|
214
224
|
var _a2, _b2, _c2, _d2;
|
|
215
225
|
let _data = {
|
|
216
226
|
formDataConfig: { ...petForm },
|
|
@@ -226,8 +236,8 @@ var Pet = (props) => {
|
|
|
226
236
|
addCallback();
|
|
227
237
|
}
|
|
228
238
|
});
|
|
229
|
-
};
|
|
230
|
-
const onValueChange = ({ values, edit = true }) => {
|
|
239
|
+
});
|
|
240
|
+
const onValueChange = (0, import_ahooks.useMemoizedFn)(({ values, edit = true }) => {
|
|
231
241
|
dispatch({
|
|
232
242
|
type: "setPet",
|
|
233
243
|
payload: {
|
|
@@ -235,7 +245,7 @@ var Pet = (props) => {
|
|
|
235
245
|
value: values
|
|
236
246
|
}
|
|
237
247
|
});
|
|
238
|
-
};
|
|
248
|
+
});
|
|
239
249
|
(0, import_react.useEffect)(() => {
|
|
240
250
|
var _a2, _b2, _c2, _d2;
|
|
241
251
|
if (clientChangeNotSetPet)
|
|
@@ -275,19 +285,19 @@ var Pet = (props) => {
|
|
|
275
285
|
petForm,
|
|
276
286
|
clientChangeNotSetPet ? (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id : void 0
|
|
277
287
|
]);
|
|
278
|
-
const addCallback = (_params) => {
|
|
288
|
+
const addCallback = (0, import_ahooks.useMemoizedFn)((_params) => {
|
|
279
289
|
var _a2, _b2;
|
|
280
290
|
let _formData = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0];
|
|
281
291
|
getFormData({ formData: _formData }, _params);
|
|
282
|
-
};
|
|
283
|
-
const searchChange = (keyword) => {
|
|
292
|
+
});
|
|
293
|
+
const searchChange = (0, import_ahooks.useMemoizedFn)((keyword) => {
|
|
284
294
|
let _params = {
|
|
285
295
|
...params,
|
|
286
296
|
skip: 1,
|
|
287
297
|
keyword
|
|
288
298
|
};
|
|
289
299
|
addCallback(_params);
|
|
290
|
-
};
|
|
300
|
+
});
|
|
291
301
|
const loadMore = (0, import_react.useMemo)(() => {
|
|
292
302
|
var _a2, _b2, _c2, _d2;
|
|
293
303
|
const show = ((_d2 = (_c2 = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.options) == null ? void 0 : _d2.length) < params.total || 0;
|
|
@@ -306,82 +316,101 @@ var Pet = (props) => {
|
|
|
306
316
|
import_utils.locales.getText("pisell2.text.load-more")
|
|
307
317
|
)) : null;
|
|
308
318
|
}, [loadLoading, params, (_l = (_k = (_j = (_i = state.pet) == null ? void 0 : _i.formData) == null ? void 0 : _j[0]) == null ? void 0 : _k.options) == null ? void 0 : _l.length]);
|
|
309
|
-
return
|
|
310
|
-
|
|
311
|
-
{
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
forms: state.pet.formData,
|
|
319
|
-
action: state.action,
|
|
320
|
-
modalOpen: state.modalOpen,
|
|
321
|
-
value: state.pet.value,
|
|
322
|
-
onChange: onValueChange,
|
|
323
|
-
client: (_m = state.client) == null ? void 0 : _m.value,
|
|
324
|
-
customSelectProps: {
|
|
325
|
-
loading,
|
|
326
|
-
handleViewItem,
|
|
327
|
-
virtualListHeight: window.innerHeight - 213 - 57 - 16,
|
|
328
|
-
disabled: state.disabledEdit,
|
|
329
|
-
autoFocus: !state.isTerminal,
|
|
330
|
-
closeCallback: () => {
|
|
331
|
-
searchChange("");
|
|
332
|
-
},
|
|
333
|
-
showDropDown: !state.disableEventBookingEdit,
|
|
334
|
-
searchChange,
|
|
335
|
-
searchValue: params.search,
|
|
336
|
-
loadMore,
|
|
337
|
-
filterItem: () => {
|
|
338
|
-
return true;
|
|
319
|
+
return (0, import_react.useMemo)(() => {
|
|
320
|
+
var _a2;
|
|
321
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: valueLoading, active: true, round: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
322
|
+
import_forms.default,
|
|
323
|
+
{
|
|
324
|
+
hideTitle,
|
|
325
|
+
watch: { value: state.pet.value },
|
|
326
|
+
addCallback: () => {
|
|
327
|
+
addCallback();
|
|
339
328
|
},
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
{
|
|
354
|
-
|
|
355
|
-
onClick: (e) => {
|
|
356
|
-
e.preventDefault();
|
|
357
|
-
e.stopPropagation();
|
|
358
|
-
handleViewItem(item);
|
|
359
|
-
}
|
|
329
|
+
loading: valueLoading,
|
|
330
|
+
forms: state.pet.formData,
|
|
331
|
+
action: state.action,
|
|
332
|
+
modalOpen: state.modalOpen,
|
|
333
|
+
value: state.pet.value,
|
|
334
|
+
onChange: onValueChange,
|
|
335
|
+
client: (_a2 = state.client) == null ? void 0 : _a2.value,
|
|
336
|
+
customSelectProps: {
|
|
337
|
+
loading,
|
|
338
|
+
handleViewItem,
|
|
339
|
+
virtualListHeight: window.innerHeight - 213 - 57 - 16,
|
|
340
|
+
disabled: state.disabledEdit,
|
|
341
|
+
autoFocus: !state.isTerminal,
|
|
342
|
+
closeCallback: () => {
|
|
343
|
+
searchChange("");
|
|
360
344
|
},
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
e.preventDefault();
|
|
368
|
-
e.stopPropagation();
|
|
369
|
-
handleEditItem(item);
|
|
370
|
-
}
|
|
345
|
+
showDropDown: !state.disableEventBookingEdit,
|
|
346
|
+
searchChange,
|
|
347
|
+
searchValue: params.search,
|
|
348
|
+
loadMore,
|
|
349
|
+
filterItem: () => {
|
|
350
|
+
return true;
|
|
371
351
|
},
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
addButtonProps: {
|
|
376
|
-
style: { margin: 0 },
|
|
377
|
-
disabled: state.disableEventBookingEdit,
|
|
378
|
-
showDisabledMessage: !state.disableEventBookingEdit,
|
|
379
|
-
addCallback: async () => {
|
|
380
|
-
addCallback();
|
|
352
|
+
handleOpenModal,
|
|
353
|
+
previewItemTitleRender
|
|
381
354
|
},
|
|
382
|
-
|
|
355
|
+
optionRender: (item) => {
|
|
356
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
357
|
+
import_antd.Avatar,
|
|
358
|
+
{
|
|
359
|
+
className: "pisell-lowcode__booking-pet-list-item-avatar",
|
|
360
|
+
src: item.cover,
|
|
361
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-pet-list-item-avatar-icon" })
|
|
362
|
+
}
|
|
363
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info-name" }, item.main_field), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, item.key_age))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-actions" }, /* @__PURE__ */ import_react.default.createElement(
|
|
364
|
+
"div",
|
|
365
|
+
{
|
|
366
|
+
className: "pisell-lowcode__booking-pet-list-item-actions-view",
|
|
367
|
+
onClick: (e) => {
|
|
368
|
+
e.preventDefault();
|
|
369
|
+
e.stopPropagation();
|
|
370
|
+
handleViewItem(item);
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
import_utils.locales.getText("pisell2.text.view")
|
|
374
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
className: "pisell-lowcode__booking-pet-list-item-actions-edit",
|
|
378
|
+
onClick: (e) => {
|
|
379
|
+
e.preventDefault();
|
|
380
|
+
e.stopPropagation();
|
|
381
|
+
handleEditItem(item);
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
import_utils.locales.getText("pisell2.text.edit")
|
|
385
|
+
)));
|
|
386
|
+
},
|
|
387
|
+
addButtonProps: {
|
|
388
|
+
style: { margin: 0 },
|
|
389
|
+
disabled: state.disableEventBookingEdit,
|
|
390
|
+
showDisabledMessage: !state.disableEventBookingEdit,
|
|
391
|
+
addCallback: async () => {
|
|
392
|
+
addCallback();
|
|
393
|
+
},
|
|
394
|
+
...addButtonProps
|
|
395
|
+
}
|
|
383
396
|
}
|
|
384
|
-
|
|
385
|
-
|
|
397
|
+
)));
|
|
398
|
+
}, [
|
|
399
|
+
valueLoading,
|
|
400
|
+
hideTitle,
|
|
401
|
+
state.pet.value,
|
|
402
|
+
state.pet.formData,
|
|
403
|
+
state.action,
|
|
404
|
+
state.modalOpen,
|
|
405
|
+
state.pet.value,
|
|
406
|
+
(_m = state.client) == null ? void 0 : _m.value,
|
|
407
|
+
loading,
|
|
408
|
+
state.disabledEdit,
|
|
409
|
+
state.isTerminal,
|
|
410
|
+
state.disableEventBookingEdit,
|
|
411
|
+
params.search,
|
|
412
|
+
loadMore,
|
|
413
|
+
addButtonProps
|
|
414
|
+
]);
|
|
386
415
|
};
|
|
387
416
|
var pet_default = Pet;
|
|
@@ -162,72 +162,74 @@ var Info = ({ onEdit }) => {
|
|
|
162
162
|
}, 100);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
const handleSelectProduct = (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
is_eject: isEject ? 1 : 0
|
|
180
|
-
},
|
|
181
|
-
callback: (e) => {
|
|
182
|
-
var _a2, _b2;
|
|
183
|
-
if (lock) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
lock = true;
|
|
187
|
-
setTimeout(() => {
|
|
188
|
-
lock = false;
|
|
189
|
-
}, 2e3);
|
|
190
|
-
let cacheItem = {
|
|
191
|
-
...item,
|
|
192
|
-
product_id: item.id,
|
|
193
|
-
_id: (0, import_utils4.getUniqueId)(),
|
|
194
|
-
_key: e.key,
|
|
195
|
-
_extend: {
|
|
196
|
-
start_date: state.date.value,
|
|
197
|
-
quantity: 1,
|
|
198
|
-
price: item.price,
|
|
199
|
-
product_name: item.title,
|
|
200
|
-
other: JSON.parse(JSON.stringify(e))
|
|
165
|
+
const handleSelectProduct = (0, import_ahooks.useMemoizedFn)(
|
|
166
|
+
(item, type) => {
|
|
167
|
+
const isEject = type === "detail" || item.bundle_group_count > 0;
|
|
168
|
+
let lock = false;
|
|
169
|
+
state.action({
|
|
170
|
+
type: "pisell1.handleOpenProductModal",
|
|
171
|
+
data: {
|
|
172
|
+
id: item.id,
|
|
173
|
+
date: state.date.value.format("YYYY-MM-DD"),
|
|
174
|
+
showConfig: {
|
|
175
|
+
option: false,
|
|
176
|
+
session: false,
|
|
177
|
+
variant: false,
|
|
178
|
+
package: true
|
|
201
179
|
},
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (_isEdit) {
|
|
209
|
-
cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
210
|
-
cacheItem.new = 0;
|
|
211
|
-
}
|
|
212
|
-
cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
213
|
-
if (state.renderType === "eventBooking") {
|
|
214
|
-
cacheItem.autoClose = false;
|
|
215
|
-
} else {
|
|
216
|
-
cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_b2 = state.service) == null ? void 0 : _b2.resourcesOrigin) || []).length === 1);
|
|
217
|
-
}
|
|
218
|
-
dispatch({
|
|
219
|
-
type: "setService",
|
|
220
|
-
payload: {
|
|
221
|
-
editModal: true,
|
|
222
|
-
cacheItem,
|
|
223
|
-
addModal: !cacheItem.autoClose,
|
|
224
|
-
changeService: false
|
|
180
|
+
is_eject: isEject ? 1 : 0
|
|
181
|
+
},
|
|
182
|
+
callback: (e) => {
|
|
183
|
+
var _a2, _b2;
|
|
184
|
+
if (lock) {
|
|
185
|
+
return;
|
|
225
186
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
187
|
+
lock = true;
|
|
188
|
+
setTimeout(() => {
|
|
189
|
+
lock = false;
|
|
190
|
+
}, 2e3);
|
|
191
|
+
let cacheItem = {
|
|
192
|
+
...item,
|
|
193
|
+
product_id: item.id,
|
|
194
|
+
_id: (0, import_utils4.getUniqueId)(),
|
|
195
|
+
_key: e.key,
|
|
196
|
+
_extend: {
|
|
197
|
+
start_date: state.date.value,
|
|
198
|
+
quantity: 1,
|
|
199
|
+
price: item.price,
|
|
200
|
+
product_name: item.title,
|
|
201
|
+
other: JSON.parse(JSON.stringify(e))
|
|
202
|
+
},
|
|
203
|
+
new: 1
|
|
204
|
+
};
|
|
205
|
+
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
206
|
+
cacheItem._extend.total = _total;
|
|
207
|
+
cacheItem._extend.origin_total = _total;
|
|
208
|
+
const _isEdit = !!state.service.cacheItem;
|
|
209
|
+
if (_isEdit) {
|
|
210
|
+
cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
|
|
211
|
+
cacheItem.new = 0;
|
|
212
|
+
}
|
|
213
|
+
cacheItem._extend = (0, import_utils2.getProductExtend)({ cacheItem, state });
|
|
214
|
+
if (state.renderType === "eventBooking") {
|
|
215
|
+
cacheItem.autoClose = false;
|
|
216
|
+
} else {
|
|
217
|
+
cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_b2 = state.service) == null ? void 0 : _b2.resourcesOrigin) || []).length === 1);
|
|
218
|
+
}
|
|
219
|
+
dispatch({
|
|
220
|
+
type: "setService",
|
|
221
|
+
payload: {
|
|
222
|
+
editModal: true,
|
|
223
|
+
cacheItem,
|
|
224
|
+
addModal: !cacheItem.autoClose,
|
|
225
|
+
changeService: false
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
onEdit == null ? void 0 : onEdit(cacheItem);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
);
|
|
231
233
|
const renderList = (0, import_react.useMemo)(() => {
|
|
232
234
|
var _a2;
|
|
233
235
|
let _list = ((_a2 = state.service) == null ? void 0 : _a2.services) || [];
|
|
@@ -299,45 +301,56 @@ var Info = ({ onEdit }) => {
|
|
|
299
301
|
state.service.value,
|
|
300
302
|
loading
|
|
301
303
|
]);
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
304
|
+
return (0, import_react.useMemo)(() => {
|
|
305
|
+
var _a2, _b2;
|
|
306
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
|
|
307
|
+
import_drawer.default,
|
|
308
|
+
{
|
|
309
|
+
open: state.service.addModal,
|
|
310
|
+
title: import_utils4.locales.getText("pisell2.text.select-service"),
|
|
311
|
+
rootClassName: "booking-server-wrap",
|
|
312
|
+
onClose: () => {
|
|
313
|
+
dispatch({
|
|
314
|
+
type: "setService",
|
|
315
|
+
payload: {
|
|
316
|
+
addModal: false,
|
|
317
|
+
changeService: false
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
header: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-header" }, /* @__PURE__ */ import_react.default.createElement(
|
|
322
|
+
import_antd.Input,
|
|
323
|
+
{
|
|
324
|
+
ref: searchRef,
|
|
325
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
|
|
326
|
+
style: { marginTop: 16, height: 44 },
|
|
327
|
+
placeholder: import_utils4.locales.getText("pisell2.text.search"),
|
|
328
|
+
allowClear: true,
|
|
329
|
+
value: search,
|
|
330
|
+
onChange: (e) => {
|
|
331
|
+
setSearch(e.target.value);
|
|
332
|
+
}
|
|
314
333
|
}
|
|
315
|
-
|
|
334
|
+
))
|
|
316
335
|
},
|
|
317
|
-
|
|
318
|
-
|
|
336
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
337
|
+
import_TabProduct.default,
|
|
319
338
|
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
allowClear: true,
|
|
325
|
-
value: search,
|
|
326
|
-
onChange: (e) => {
|
|
327
|
-
setSearch(e.target.value);
|
|
328
|
-
}
|
|
339
|
+
list: renderList,
|
|
340
|
+
amountSymbol: state.amountSymbol,
|
|
341
|
+
onChange: handleSelectProduct,
|
|
342
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
329
343
|
}
|
|
330
344
|
))
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
));
|
|
345
|
+
));
|
|
346
|
+
}, [
|
|
347
|
+
(_d = (_c = state.service) == null ? void 0 : _c.cacheItem) == null ? void 0 : _d.autoClose,
|
|
348
|
+
addButton,
|
|
349
|
+
state.service.addModal,
|
|
350
|
+
import_utils4.locales,
|
|
351
|
+
search,
|
|
352
|
+
renderList,
|
|
353
|
+
state.amountSymbol
|
|
354
|
+
]);
|
|
342
355
|
};
|
|
343
356
|
var addService_default = Info;
|