@pisell/private-materials 3.0.93 → 3.0.95
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 +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +4 -4
- package/es/components/booking/forms/format.js +1 -1
- package/es/components/booking/forms/index.js +1 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -2
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +19 -9
- package/es/components/booking/info/clientVariant/vertical/index.js +150 -39
- package/es/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +11 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/lib/components/booking/forms/format.js +1 -1
- package/lib/components/booking/forms/index.js +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -2
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +6 -1
- package/lib/components/booking/info/clientVariant/vertical/index.js +147 -40
- package/lib/components/booking/info/clientVariant/vertical/index.less +18 -0
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +11 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/package.json +2 -2
|
@@ -71,13 +71,15 @@ var useClientFn = (_params) => {
|
|
|
71
71
|
}, [(_h = state.client.value) == null ? void 0 : _h.id]);
|
|
72
72
|
const getClients = async ({
|
|
73
73
|
customer_id,
|
|
74
|
+
customer_ids,
|
|
74
75
|
...resetParams
|
|
75
|
-
}) => {
|
|
76
|
+
}, returnResult) => {
|
|
76
77
|
let _setLoading = resetParams.skip === 1 ? setLoading : setLoadLoading;
|
|
77
78
|
_setLoading(true);
|
|
78
79
|
const api = state.isFranchisee ? import_serve.getFranchiseeCustomerList : state.apis.getClients;
|
|
79
80
|
const data = await api({
|
|
80
81
|
...resetParams,
|
|
82
|
+
...state.isFranchisee ? { franchisee_customer_ids: customer_ids } : { customer_ids },
|
|
81
83
|
...!state.isFranchisee ? { _config: { abort: true } } : {}
|
|
82
84
|
});
|
|
83
85
|
const list = ((data == null ? void 0 : data.list) || []).map((d) => {
|
|
@@ -93,6 +95,9 @@ var useClientFn = (_params) => {
|
|
|
93
95
|
}))) || []
|
|
94
96
|
};
|
|
95
97
|
});
|
|
98
|
+
if (returnResult) {
|
|
99
|
+
return list;
|
|
100
|
+
}
|
|
96
101
|
let _payload = {
|
|
97
102
|
clients: list
|
|
98
103
|
};
|
|
@@ -34,6 +34,7 @@ __export(vertical_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(vertical_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_User01 = __toESM(require("@pisell/icon/es/User01"));
|
|
37
|
+
var import_PlusCircle = __toESM(require("@pisell/icon/es/PlusCircle"));
|
|
37
38
|
var import_antd = require("antd");
|
|
38
39
|
var import_utils = require("@pisell/utils");
|
|
39
40
|
var import_useClientFn = __toESM(require("../hooks/useClientFn"));
|
|
@@ -41,14 +42,17 @@ var import_SelectDrawer = __toESM(require("./SelectDrawer"));
|
|
|
41
42
|
var import_pet = __toESM(require("../../pet"));
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
45
|
+
var import_format = require("../../../forms/format");
|
|
46
|
+
var import_utils2 = require("../../utils");
|
|
44
47
|
var VerticalClient = (props) => {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H;
|
|
46
49
|
const { globalState, setGlobalState } = props;
|
|
47
50
|
const modalRef = (0, import_react.useRef)();
|
|
48
51
|
const state = globalState;
|
|
49
52
|
const stateRef = (0, import_react.useRef)(state);
|
|
50
53
|
const prevCustomerId = (0, import_react.useRef)(null);
|
|
51
54
|
const context = (0, import_useEngineContext.default)();
|
|
55
|
+
const [isHasFormRecord, setIsHasFormRecord] = (0, import_react.useState)(true);
|
|
52
56
|
const isFranchisee = (_d = (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.businessUtils) == null ? void 0 : _c.getAppByModal) == null ? void 0 : _d.call(_c, "franchisee");
|
|
53
57
|
state.isFranchisee = isFranchisee;
|
|
54
58
|
stateRef.current = state;
|
|
@@ -82,8 +86,8 @@ var VerticalClient = (props) => {
|
|
|
82
86
|
});
|
|
83
87
|
const renderList = (0, import_react.useMemo)(() => {
|
|
84
88
|
let _list = [...state.client.clients];
|
|
85
|
-
return _list;
|
|
86
|
-
}, [state.client.clients]);
|
|
89
|
+
return (0, import_utils2.moveItemToFront)(_list, state.client.value.id);
|
|
90
|
+
}, [state.client.clients, state.client.value.id]);
|
|
87
91
|
const handleClose = () => {
|
|
88
92
|
setTimeout(() => {
|
|
89
93
|
setClient({
|
|
@@ -131,7 +135,7 @@ var VerticalClient = (props) => {
|
|
|
131
135
|
const handleOpenModal = () => {
|
|
132
136
|
handleOpenClientModal();
|
|
133
137
|
};
|
|
134
|
-
const handleAddPet = (_client) => {
|
|
138
|
+
const handleAddPet = (_client, cb) => {
|
|
135
139
|
var _a2;
|
|
136
140
|
let _data = {
|
|
137
141
|
formDataConfig: { ...((_a2 = state.pet.formData) == null ? void 0 : _a2[0]) || {} }
|
|
@@ -141,14 +145,14 @@ var VerticalClient = (props) => {
|
|
|
141
145
|
type: "pisell1.goCustomFormAddData",
|
|
142
146
|
data: _data,
|
|
143
147
|
callback: (res) => {
|
|
148
|
+
const newFormRecordObj = res.reduce((p, c) => {
|
|
149
|
+
return {
|
|
150
|
+
...p,
|
|
151
|
+
[c.key]: c.value
|
|
152
|
+
};
|
|
153
|
+
}, {});
|
|
144
154
|
const newClients = stateRef.current.client.clients.map((item) => {
|
|
145
155
|
if (item.id === _client.id) {
|
|
146
|
-
const newFormRecordObj = res.reduce((p, c) => {
|
|
147
|
-
return {
|
|
148
|
-
...p,
|
|
149
|
-
[c.key]: c.value
|
|
150
|
-
};
|
|
151
|
-
}, {});
|
|
152
156
|
return {
|
|
153
157
|
...item,
|
|
154
158
|
form_record: [
|
|
@@ -166,6 +170,7 @@ var VerticalClient = (props) => {
|
|
|
166
170
|
setClient({
|
|
167
171
|
clients: newClients
|
|
168
172
|
});
|
|
173
|
+
cb == null ? void 0 : cb(newFormRecordObj);
|
|
169
174
|
}
|
|
170
175
|
});
|
|
171
176
|
};
|
|
@@ -186,8 +191,8 @@ var VerticalClient = (props) => {
|
|
|
186
191
|
};
|
|
187
192
|
const isShowAddBtn = (0, import_react.useMemo)(() => {
|
|
188
193
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
189
|
-
const
|
|
190
|
-
if ((!isWalkIn || ((_f2 = (_e2 = (_d2 = state.pet) == null ? void 0 : _d2.value) == null ? void 0 : _e2[
|
|
194
|
+
const formId2 = (_c2 = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.form_id;
|
|
195
|
+
if ((!isWalkIn || ((_f2 = (_e2 = (_d2 = state.pet) == null ? void 0 : _d2.value) == null ? void 0 : _e2[formId2]) == null ? void 0 : _f2.length)) && !(state == null ? void 0 : state.disabledEdit) && boardConfig.type === "form") {
|
|
191
196
|
return true;
|
|
192
197
|
}
|
|
193
198
|
return false;
|
|
@@ -198,7 +203,127 @@ var VerticalClient = (props) => {
|
|
|
198
203
|
(_l = state.pet) == null ? void 0 : _l.formData,
|
|
199
204
|
boardConfig.type
|
|
200
205
|
]);
|
|
201
|
-
|
|
206
|
+
const formId = (0, import_react.useMemo)(() => {
|
|
207
|
+
var _a2, _b2, _c2;
|
|
208
|
+
return (_c2 = (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.formData) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.form_id;
|
|
209
|
+
}, [(_o = (_n = (_m = state.pet) == null ? void 0 : _m.formData) == null ? void 0 : _n[0]) == null ? void 0 : _o.form_id]);
|
|
210
|
+
const currentPetValue = (0, import_react.useMemo)(() => {
|
|
211
|
+
var _a2, _b2;
|
|
212
|
+
return (_b2 = (_a2 = state.pet) == null ? void 0 : _a2.value) == null ? void 0 : _b2[formId];
|
|
213
|
+
}, [(_p = state.pet) == null ? void 0 : _p.value, formId]);
|
|
214
|
+
const getCurrentClientSearchValue = (0, import_react.useCallback)(() => {
|
|
215
|
+
var _a2, _b2;
|
|
216
|
+
let searchVal = getNickname(state.client.value) || ((_a2 = state.client.value) == null ? void 0 : _a2.email) || ((_b2 = state.client.value) == null ? void 0 : _b2.phone) || "";
|
|
217
|
+
if (isWalkIn) {
|
|
218
|
+
searchVal = "";
|
|
219
|
+
}
|
|
220
|
+
return searchVal;
|
|
221
|
+
}, [state.client.value, isWalkIn]);
|
|
222
|
+
(0, import_react.useEffect)(() => {
|
|
223
|
+
if (!isWalkIn && formId && !(currentPetValue == null ? void 0 : currentPetValue.length) && boardConfig.type === "form") {
|
|
224
|
+
const getData = async () => {
|
|
225
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
226
|
+
const findCurrentClient = (list) => {
|
|
227
|
+
return list.find((item) => {
|
|
228
|
+
var _a3, _b3;
|
|
229
|
+
return item.id === ((_b3 = (_a3 = state.client) == null ? void 0 : _a3.value) == null ? void 0 : _b3.id);
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
const clients = (_b2 = (_a2 = stateRef.current) == null ? void 0 : _a2.client) == null ? void 0 : _b2.clients;
|
|
233
|
+
const currentClient = findCurrentClient(clients);
|
|
234
|
+
if (currentClient) {
|
|
235
|
+
setIsHasFormRecord(!!((_c2 = currentClient == null ? void 0 : currentClient.form_record) == null ? void 0 : _c2.length));
|
|
236
|
+
} else {
|
|
237
|
+
const val = await getClients(
|
|
238
|
+
{
|
|
239
|
+
with: ["formRecord"],
|
|
240
|
+
relation_form_id: boardConfig == null ? void 0 : boardConfig.form_id,
|
|
241
|
+
skip: 1,
|
|
242
|
+
num: 20,
|
|
243
|
+
customer_ids: [(_e2 = (_d2 = state.client) == null ? void 0 : _d2.value) == null ? void 0 : _e2.id]
|
|
244
|
+
},
|
|
245
|
+
true
|
|
246
|
+
);
|
|
247
|
+
const currentClient2 = findCurrentClient(val);
|
|
248
|
+
setIsHasFormRecord(!!((_f2 = currentClient2 == null ? void 0 : currentClient2.form_record) == null ? void 0 : _f2.length));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
getData();
|
|
252
|
+
}
|
|
253
|
+
}, [
|
|
254
|
+
isWalkIn,
|
|
255
|
+
formId,
|
|
256
|
+
(_q = state.client.value) == null ? void 0 : _q.id,
|
|
257
|
+
currentPetValue,
|
|
258
|
+
boardConfig
|
|
259
|
+
]);
|
|
260
|
+
const petRender = (0, import_react.useMemo)(() => {
|
|
261
|
+
var _a2, _b2, _c2;
|
|
262
|
+
if ((state == null ? void 0 : state.disabledEdit) || boardConfig.type !== "form") {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !(currentPetValue == null ? void 0 : currentPetValue.length) && !isHasFormRecord && !isWalkIn && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
266
|
+
import_antd.Empty,
|
|
267
|
+
{
|
|
268
|
+
style: { marginBottom: 0 },
|
|
269
|
+
image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
270
|
+
description: import_utils.locales.getText(
|
|
271
|
+
"pisell2.text.variant-client-no-data"
|
|
272
|
+
)
|
|
273
|
+
}
|
|
274
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
275
|
+
"div",
|
|
276
|
+
{
|
|
277
|
+
className: "pisell-lowcode__create-form-wrap",
|
|
278
|
+
onClick: () => {
|
|
279
|
+
var _a3;
|
|
280
|
+
handleAddPet == null ? void 0 : handleAddPet((_a3 = state == null ? void 0 : state.client) == null ? void 0 : _a3.value, (addRecord = {}) => {
|
|
281
|
+
setTimeout(() => {
|
|
282
|
+
var _a4, _b3, _c3, _d2, _e2;
|
|
283
|
+
handleSelectPet({
|
|
284
|
+
[formId]: (0, import_format.formatAddFormValues)({
|
|
285
|
+
clientId: (_b3 = (_a4 = state == null ? void 0 : state.client) == null ? void 0 : _a4.value) == null ? void 0 : _b3.id,
|
|
286
|
+
value: [{ ...addRecord, customer: (_c3 = state == null ? void 0 : state.client) == null ? void 0 : _c3.value }],
|
|
287
|
+
data_range: (_e2 = (_d2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _d2.holder) == null ? void 0 : _e2.data_range
|
|
288
|
+
})
|
|
289
|
+
});
|
|
290
|
+
}, 200);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__create-form-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__create-form-txt" }, `${import_utils.locales.getText("pisell2.text.create-new")} ${((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) == null ? void 0 : _b2.form) == null ? void 0 : _c2.title) || "-"}`))
|
|
295
|
+
)), /* @__PURE__ */ import_react.default.createElement(
|
|
296
|
+
import_pet.default,
|
|
297
|
+
{
|
|
298
|
+
clientChangeNotSetPet: true,
|
|
299
|
+
state,
|
|
300
|
+
dispatch: petDispatch,
|
|
301
|
+
hideTitle: true,
|
|
302
|
+
handleOpenModal,
|
|
303
|
+
addButtonProps: {
|
|
304
|
+
onClick: handleOpenClientModal,
|
|
305
|
+
style: { display: "none" }
|
|
306
|
+
},
|
|
307
|
+
previewItemTitleRender
|
|
308
|
+
}
|
|
309
|
+
));
|
|
310
|
+
}, [
|
|
311
|
+
isWalkIn,
|
|
312
|
+
isHasFormRecord,
|
|
313
|
+
state == null ? void 0 : state.disabledEdit,
|
|
314
|
+
boardConfig.type,
|
|
315
|
+
(_t = (_s = (_r = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _r.holder) == null ? void 0 : _s.form) == null ? void 0 : _t.title,
|
|
316
|
+
(_v = (_u = state.pet) == null ? void 0 : _u.formData) == null ? void 0 : _v[0],
|
|
317
|
+
state,
|
|
318
|
+
petDispatch,
|
|
319
|
+
handleOpenModal,
|
|
320
|
+
handleOpenClientModal,
|
|
321
|
+
previewItemTitleRender,
|
|
322
|
+
handleAddPet,
|
|
323
|
+
currentPetValue,
|
|
324
|
+
formId,
|
|
325
|
+
(_x = (_w = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _w.holder) == null ? void 0 : _x.data_range
|
|
326
|
+
]);
|
|
202
327
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-client-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
203
328
|
"div",
|
|
204
329
|
{
|
|
@@ -214,11 +339,11 @@ var VerticalClient = (props) => {
|
|
|
214
339
|
import_antd.Avatar,
|
|
215
340
|
{
|
|
216
341
|
className: "pisell-lowcode__booking-client-avatar",
|
|
217
|
-
src: import_utils.image.ali((
|
|
342
|
+
src: import_utils.image.ali((_y = state.client.value) == null ? void 0 : _y.cover, 100),
|
|
218
343
|
size: 64,
|
|
219
344
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
220
345
|
}
|
|
221
|
-
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((
|
|
346
|
+
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_z = state.client.value) == null ? void 0 : _z.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_A = state.client.value) == null ? void 0 : _A.email) : null, ((_B = state.client.value) == null ? void 0 : _B.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.phone) : null), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
222
347
|
import_antd.Dropdown.Button,
|
|
223
348
|
{
|
|
224
349
|
menu: {
|
|
@@ -239,31 +364,13 @@ var VerticalClient = (props) => {
|
|
|
239
364
|
},
|
|
240
365
|
import_utils.locales.getText("pisell2.text.view-profile")
|
|
241
366
|
)))
|
|
242
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-pet" },
|
|
243
|
-
import_pet.default,
|
|
244
|
-
{
|
|
245
|
-
clientChangeNotSetPet: true,
|
|
246
|
-
state,
|
|
247
|
-
dispatch: petDispatch,
|
|
248
|
-
hideTitle: true,
|
|
249
|
-
handleOpenModal,
|
|
250
|
-
addButtonProps: {
|
|
251
|
-
onClick: handleOpenClientModal,
|
|
252
|
-
style: { display: "none" }
|
|
253
|
-
},
|
|
254
|
-
previewItemTitleRender
|
|
255
|
-
}
|
|
256
|
-
) : null) : null), isShowAddBtn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
367
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-pet" }, petRender), isShowAddBtn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-vertical-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
257
368
|
import_antd.Button,
|
|
258
369
|
{
|
|
259
370
|
onClick: () => {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
searchVal = "";
|
|
264
|
-
}
|
|
265
|
-
modalRef.current.setSearch(searchVal);
|
|
266
|
-
handleOpenClientModal(searchVal);
|
|
371
|
+
const currentClientSearchValue = getCurrentClientSearchValue();
|
|
372
|
+
modalRef.current.setSearch(currentClientSearchValue);
|
|
373
|
+
handleOpenClientModal(currentClientSearchValue);
|
|
267
374
|
},
|
|
268
375
|
block: true,
|
|
269
376
|
size: "large"
|
|
@@ -274,7 +381,7 @@ var VerticalClient = (props) => {
|
|
|
274
381
|
{
|
|
275
382
|
modalOpen: state.modalOpen,
|
|
276
383
|
loading,
|
|
277
|
-
autoFocus: !((
|
|
384
|
+
autoFocus: !((_F = (_E = (_D = context == null ? void 0 : context.appHelper) == null ? void 0 : _D.utils) == null ? void 0 : _E.isTerminal) == null ? void 0 : _F.call(_E)),
|
|
278
385
|
ref: modalRef,
|
|
279
386
|
onClose: handleClose,
|
|
280
387
|
handleSelectClient,
|
|
@@ -284,8 +391,8 @@ var VerticalClient = (props) => {
|
|
|
284
391
|
formData: state.pet.formData,
|
|
285
392
|
searchChange,
|
|
286
393
|
options: renderList,
|
|
287
|
-
holder: (
|
|
288
|
-
client: (
|
|
394
|
+
holder: (_G = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _G.holder,
|
|
395
|
+
client: (_H = state == null ? void 0 : state.client) == null ? void 0 : _H.value,
|
|
289
396
|
loadMore,
|
|
290
397
|
showPet: (boardConfig == null ? void 0 : boardConfig.type) === "form",
|
|
291
398
|
handleAddPet,
|
|
@@ -80,4 +80,22 @@
|
|
|
80
80
|
border-top: 1px solid var(--Gray-200, #EAECF0);
|
|
81
81
|
background: var(--Base-White, #FFF);
|
|
82
82
|
box-shadow: 0px -4px 8px -2px rgba(16, 24, 40, 0.10), 0px -2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
83
|
+
}
|
|
84
|
+
.pisell-lowcode__create-form-wrap {
|
|
85
|
+
display: flex;
|
|
86
|
+
gap: 8px;
|
|
87
|
+
align-items: center;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
padding: 16px;
|
|
90
|
+
.pisell-lowcode__create-form-icon {
|
|
91
|
+
font-size: 20px;
|
|
92
|
+
color: rgb(127, 86, 217);
|
|
93
|
+
}
|
|
94
|
+
.pisell-lowcode__create-form-txt {
|
|
95
|
+
color: #7f56d9;
|
|
96
|
+
font-size: 16px;
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-weight: 400;
|
|
99
|
+
line-height: 24px;
|
|
100
|
+
}
|
|
83
101
|
}
|
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
getIsBundleOrCombination: () => getIsBundleOrCombination,
|
|
23
|
+
moveItemToFront: () => moveItemToFront,
|
|
23
24
|
uniqueByField: () => uniqueByField
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -42,8 +43,18 @@ var uniqueByField = (arr, field) => {
|
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
};
|
|
46
|
+
var moveItemToFront = (arr, targetId) => {
|
|
47
|
+
const index = arr.findIndex((item) => item.id === targetId);
|
|
48
|
+
if (index !== -1) {
|
|
49
|
+
const targetItem = arr[index];
|
|
50
|
+
arr.splice(index, 1);
|
|
51
|
+
arr.unshift(targetItem);
|
|
52
|
+
}
|
|
53
|
+
return arr;
|
|
54
|
+
};
|
|
45
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
56
|
0 && (module.exports = {
|
|
47
57
|
getIsBundleOrCombination,
|
|
58
|
+
moveItemToFront,
|
|
48
59
|
uniqueByField
|
|
49
60
|
});
|
|
@@ -160,6 +160,7 @@ declare const _default: {
|
|
|
160
160
|
"pisell2.text.actions": string;
|
|
161
161
|
"pisell2.text.add-client": string;
|
|
162
162
|
'pisell2.text.variant-client-change': string;
|
|
163
|
+
'pisell2.text.variant-client-no-data': string;
|
|
163
164
|
};
|
|
164
165
|
'zh-CN': {
|
|
165
166
|
'pisell2.text.refunded-amount': string;
|
|
@@ -322,6 +323,7 @@ declare const _default: {
|
|
|
322
323
|
"pisell2.text.actions": string;
|
|
323
324
|
"pisell2.text.add-client": string;
|
|
324
325
|
'pisell2.text.variant-client-change': string;
|
|
326
|
+
'pisell2.text.variant-client-no-data': string;
|
|
325
327
|
};
|
|
326
328
|
'zh-HK': {
|
|
327
329
|
'pisell2.text.refunded-amount': string;
|
|
@@ -484,6 +486,7 @@ declare const _default: {
|
|
|
484
486
|
"pisell2.text.actions": string;
|
|
485
487
|
"pisell2.text.add-client": string;
|
|
486
488
|
'pisell2.text.variant-client-change': string;
|
|
489
|
+
'pisell2.text.variant-client-no-data': string;
|
|
487
490
|
};
|
|
488
491
|
};
|
|
489
492
|
export default _default;
|
|
@@ -192,7 +192,8 @@ var locales_default = {
|
|
|
192
192
|
"pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
|
|
193
193
|
"pisell2.text.actions": "Actions",
|
|
194
194
|
"pisell2.text.add-client": "Add customer",
|
|
195
|
-
"pisell2.text.variant-client-change": "Change"
|
|
195
|
+
"pisell2.text.variant-client-change": "Change",
|
|
196
|
+
"pisell2.text.variant-client-no-data": "No record"
|
|
196
197
|
},
|
|
197
198
|
"zh-CN": {
|
|
198
199
|
"pisell2.text.refunded-amount": "已退金额",
|
|
@@ -368,7 +369,8 @@ var locales_default = {
|
|
|
368
369
|
"page.booking.text.unlimited": "无限制",
|
|
369
370
|
"pisell2.text.actions": "操作选项",
|
|
370
371
|
"pisell2.text.add-client": "添加客户",
|
|
371
|
-
"pisell2.text.variant-client-change": "更改客户"
|
|
372
|
+
"pisell2.text.variant-client-change": "更改客户",
|
|
373
|
+
"pisell2.text.variant-client-no-data": "暂无数据"
|
|
372
374
|
},
|
|
373
375
|
"zh-HK": {
|
|
374
376
|
"pisell2.text.refunded-amount": "已退金額",
|
|
@@ -544,6 +546,7 @@ var locales_default = {
|
|
|
544
546
|
"page.booking.text.unlimited": "無限制",
|
|
545
547
|
"pisell2.text.actions": "操作選項",
|
|
546
548
|
"pisell2.text.add-client": "添加客戶",
|
|
547
|
-
"pisell2.text.variant-client-change": "更改客戶"
|
|
549
|
+
"pisell2.text.variant-client-change": "更改客戶",
|
|
550
|
+
"pisell2.text.variant-client-no-data": "暫無數據"
|
|
548
551
|
}
|
|
549
552
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.95",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"ahooks": "^3.7.6",
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
|
-
"@pisell/utils": "1.0.25",
|
|
62
61
|
"@pisell/icon": "0.0.11",
|
|
62
|
+
"@pisell/utils": "1.0.27",
|
|
63
63
|
"@pisell/date-picker": "1.0.88"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|