@pisell/private-materials 3.4.42 → 3.4.44
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 +9 -1
- package/build/lowcode/preview.js +150 -155
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/components/Services/index.js +22 -8
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +75 -73
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -3
- package/es/components/booking/model.d.ts +13 -1
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/es/plus/productSelect/ProductCard/index.js +14 -5
- package/es/plus/productSelect/index.d.ts +3 -2
- package/es/plus/productSelect/index.js +33 -8
- package/es/plus/productSelect/index.less +4 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/components/Services/index.js +8 -3
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -68
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +5 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +12 -3
- package/lib/components/booking/model.d.ts +13 -1
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/lib/plus/productSelect/ProductCard/index.js +18 -4
- package/lib/plus/productSelect/index.d.ts +3 -2
- package/lib/plus/productSelect/index.js +20 -6
- package/lib/plus/productSelect/index.less +4 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/package.json +6 -4
|
@@ -66,7 +66,16 @@ var contextUtils = () => {
|
|
|
66
66
|
var useAppointmentBookingStep = () => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const pisellOS = (0, import_useEngineContext.usePisellOS)();
|
|
69
|
-
const {
|
|
69
|
+
const {
|
|
70
|
+
appointmentBooking,
|
|
71
|
+
setCurrentStep,
|
|
72
|
+
carts,
|
|
73
|
+
openPolicy,
|
|
74
|
+
setLoading,
|
|
75
|
+
setCurrentSelectedResources,
|
|
76
|
+
currentStepParams,
|
|
77
|
+
setIsErrorHolder
|
|
78
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
70
79
|
const { isRetailTemplate } = useAppointmentBookingSetting();
|
|
71
80
|
const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
|
|
72
81
|
const { isLogin, openLoginModal } = useAppointmentBookingLogin();
|
|
@@ -79,14 +88,11 @@ var useAppointmentBookingStep = () => {
|
|
|
79
88
|
};
|
|
80
89
|
(0, import_react.useEffect)(() => {
|
|
81
90
|
getCurrentAndLastStep();
|
|
82
|
-
pisellOS.effects.on(
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
if (res.path === "currentStep") {
|
|
86
|
-
getCurrentAndLastStep();
|
|
87
|
-
}
|
|
91
|
+
pisellOS.effects.on("appointmentBooking_step:changed", async (res) => {
|
|
92
|
+
if (res.path === "currentStep") {
|
|
93
|
+
getCurrentAndLastStep();
|
|
88
94
|
}
|
|
89
|
-
);
|
|
95
|
+
});
|
|
90
96
|
}, []);
|
|
91
97
|
const getStepIndex = (type, skipNumber = 0) => {
|
|
92
98
|
const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
|
|
@@ -105,11 +111,14 @@ var useAppointmentBookingStep = () => {
|
|
|
105
111
|
};
|
|
106
112
|
const addStep = (props, stepKey) => {
|
|
107
113
|
const { index, key, description } = props;
|
|
108
|
-
return appointmentBooking.addStep(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
return appointmentBooking.addStep(
|
|
115
|
+
{
|
|
116
|
+
index,
|
|
117
|
+
key,
|
|
118
|
+
description
|
|
119
|
+
},
|
|
120
|
+
stepKey
|
|
121
|
+
);
|
|
113
122
|
};
|
|
114
123
|
const updateStep = (key, step) => {
|
|
115
124
|
appointmentBooking.updateStep(key, {
|
|
@@ -159,7 +168,9 @@ var useAppointmentBookingStep = () => {
|
|
|
159
168
|
appointmentBooking.addStep(
|
|
160
169
|
{
|
|
161
170
|
key: "select-resource",
|
|
162
|
-
description: import_utils.locales.getText(
|
|
171
|
+
description: import_utils.locales.getText(
|
|
172
|
+
"pisell2.appointment.select.resource"
|
|
173
|
+
)
|
|
163
174
|
},
|
|
164
175
|
targetKey
|
|
165
176
|
);
|
|
@@ -175,7 +186,9 @@ var useAppointmentBookingStep = () => {
|
|
|
175
186
|
appointmentBooking.addStep(
|
|
176
187
|
{
|
|
177
188
|
key: "select-resource",
|
|
178
|
-
description: import_utils.locales.getText(
|
|
189
|
+
description: import_utils.locales.getText(
|
|
190
|
+
"pisell2.appointment.select.resource"
|
|
191
|
+
)
|
|
179
192
|
},
|
|
180
193
|
targetKey
|
|
181
194
|
);
|
|
@@ -191,13 +204,19 @@ var useAppointmentBookingStep = () => {
|
|
|
191
204
|
}
|
|
192
205
|
const capacityResult = appointmentBooking.checkMaxDurationCapacity();
|
|
193
206
|
if (!capacityResult.success) {
|
|
194
|
-
const getMessage = import_utils.locales.getText(
|
|
207
|
+
const getMessage = import_utils.locales.getText(
|
|
208
|
+
"pisell2.appointment.unuse.capacity"
|
|
209
|
+
);
|
|
195
210
|
const message = typeof getMessage === "function" ? getMessage(capacityResult.minAvailableCount) : getMessage;
|
|
196
211
|
return (0, import_utils2.Toast)(message);
|
|
197
212
|
}
|
|
198
213
|
}
|
|
199
214
|
if (!isRetailTemplate && (currentKey == null ? void 0 : currentKey.startsWith("select-resource"))) {
|
|
200
|
-
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(
|
|
215
|
+
const { hasError, updatedCartList } = (0, import_utils2.checkAndMarkCartRenderError)(
|
|
216
|
+
currentSelectedResources,
|
|
217
|
+
appointmentBooking,
|
|
218
|
+
utils
|
|
219
|
+
);
|
|
201
220
|
if (hasError) {
|
|
202
221
|
setCurrentSelectedResources(updatedCartList);
|
|
203
222
|
(0, import_utils3.scrollToFirstErrorCard)();
|
|
@@ -214,7 +233,10 @@ var useAppointmentBookingStep = () => {
|
|
|
214
233
|
if (formId) {
|
|
215
234
|
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
216
235
|
const beforeKey = (0, import_utils2.getFormInsertBeforeKey)(currentKey, stepList2);
|
|
217
|
-
appointmentBooking.addStep(
|
|
236
|
+
appointmentBooking.addStep(
|
|
237
|
+
{ key: formKey, description },
|
|
238
|
+
preKey || beforeKey
|
|
239
|
+
);
|
|
218
240
|
preKey = formKey;
|
|
219
241
|
} else {
|
|
220
242
|
appointmentBooking.removeStep(formKey);
|
|
@@ -224,15 +246,20 @@ var useAppointmentBookingStep = () => {
|
|
|
224
246
|
const selectedResource = (_c2 = currentSelectedResources == null ? void 0 : currentSelectedResources[0]) == null ? void 0 : _c2.currentSelectedResource;
|
|
225
247
|
if (selectedResource) {
|
|
226
248
|
const originRenderLists = ((_d = selectedResource == null ? void 0 : selectedResource.resourceItem) == null ? void 0 : _d.originRenderLists) || [];
|
|
227
|
-
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
249
|
+
const currentResourceIndex = originRenderLists == null ? void 0 : originRenderLists.findIndex(
|
|
250
|
+
(item) => {
|
|
251
|
+
var _a3;
|
|
252
|
+
return item.id === ((_a3 = selectedResource == null ? void 0 : selectedResource.renderItem) == null ? void 0 : _a3.form_id);
|
|
253
|
+
}
|
|
254
|
+
);
|
|
231
255
|
const nextResource = originRenderLists == null ? void 0 : originRenderLists[currentResourceIndex + 1];
|
|
232
256
|
const resourceKey = `select-resource_@${nextResource == null ? void 0 : nextResource.form_id}-${nextResource == null ? void 0 : nextResource.code}`;
|
|
233
257
|
if (nextResource) {
|
|
234
258
|
const beforeKey = (_e = stepList2[stepList2.length - 2]) == null ? void 0 : _e.key;
|
|
235
|
-
appointmentBooking.addStep(
|
|
259
|
+
appointmentBooking.addStep(
|
|
260
|
+
{ key: resourceKey, description: "" },
|
|
261
|
+
beforeKey
|
|
262
|
+
);
|
|
236
263
|
} else {
|
|
237
264
|
appointmentBooking.removeStep(resourceKey);
|
|
238
265
|
}
|
|
@@ -255,8 +282,14 @@ var useAppointmentBookingStep = () => {
|
|
|
255
282
|
} else {
|
|
256
283
|
cartLists = carts || [];
|
|
257
284
|
}
|
|
258
|
-
const appoimentCarts = cartLists.filter(
|
|
259
|
-
|
|
285
|
+
const appoimentCarts = cartLists.filter(
|
|
286
|
+
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
287
|
+
);
|
|
288
|
+
const { hasError } = (0, import_utils2.checkAndGoNext)(
|
|
289
|
+
isFormSubject,
|
|
290
|
+
checkAccount,
|
|
291
|
+
appoimentCarts
|
|
292
|
+
);
|
|
260
293
|
setIsErrorHolder(hasError);
|
|
261
294
|
if (hasError) {
|
|
262
295
|
return;
|
|
@@ -370,12 +403,9 @@ var useAppointmentBookingCart = () => {
|
|
|
370
403
|
};
|
|
371
404
|
(0, import_react.useEffect)(() => {
|
|
372
405
|
getCartAndSummary();
|
|
373
|
-
pisellOS.effects.on(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
getCartAndSummary();
|
|
377
|
-
}
|
|
378
|
-
);
|
|
406
|
+
pisellOS.effects.on("appointmentBooking_cart:changed", async () => {
|
|
407
|
+
getCartAndSummary();
|
|
408
|
+
});
|
|
379
409
|
}, []);
|
|
380
410
|
};
|
|
381
411
|
var useAppointmentBookingLogin = () => {
|
|
@@ -441,7 +471,10 @@ var useAppointmentBookingAccount = () => {
|
|
|
441
471
|
};
|
|
442
472
|
const addAccount = async (val, type) => {
|
|
443
473
|
const customer = (0, import_utils2.getCustomer)(utils);
|
|
444
|
-
const result = await appointmentBooking.addAccount(val, {
|
|
474
|
+
const result = await appointmentBooking.addAccount(val, {
|
|
475
|
+
type,
|
|
476
|
+
customerId: customer == null ? void 0 : customer.id
|
|
477
|
+
});
|
|
445
478
|
return result;
|
|
446
479
|
};
|
|
447
480
|
const checkAccount = (type) => {
|
|
@@ -484,7 +517,11 @@ var useIsSkipResourceStep = () => {
|
|
|
484
517
|
try {
|
|
485
518
|
const { resources } = getResourceList();
|
|
486
519
|
const accountLists = await appointmentBooking.getAccounts();
|
|
487
|
-
const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(
|
|
520
|
+
const { isSystem, isSkip, form_code } = (0, import_utils2.currentAppointmentBoard)(
|
|
521
|
+
currentStepParams.key,
|
|
522
|
+
resources,
|
|
523
|
+
appointmentBooking
|
|
524
|
+
);
|
|
488
525
|
if (isSystem) {
|
|
489
526
|
nextStep();
|
|
490
527
|
return true;
|
|
@@ -512,7 +549,7 @@ var useIsSkipResourceStep = () => {
|
|
|
512
549
|
return { checkSkipResourceStep };
|
|
513
550
|
};
|
|
514
551
|
var useAppointmentBookingSetting = () => {
|
|
515
|
-
var _a, _b;
|
|
552
|
+
var _a, _b, _c;
|
|
516
553
|
const utils = contextUtils();
|
|
517
554
|
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
518
555
|
const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
|
|
@@ -537,7 +574,8 @@ var useAppointmentBookingSetting = () => {
|
|
|
537
574
|
bookingSubject,
|
|
538
575
|
setOtherData,
|
|
539
576
|
getOtherData,
|
|
540
|
-
formName
|
|
577
|
+
formName,
|
|
578
|
+
bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
|
|
541
579
|
};
|
|
542
580
|
};
|
|
543
581
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -117,6 +117,7 @@ declare const _default: {
|
|
|
117
117
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
118
118
|
'pisell2.text.goodpass.login': string;
|
|
119
119
|
'pisell2.text.goodpass.login-tip': string;
|
|
120
|
+
'pisell2.text.contact-info.title': string;
|
|
120
121
|
};
|
|
121
122
|
'zh-CN': {
|
|
122
123
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -236,6 +237,7 @@ declare const _default: {
|
|
|
236
237
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
237
238
|
'pisell2.text.goodpass.login': string;
|
|
238
239
|
'pisell2.text.goodpass.login-tip': string;
|
|
240
|
+
'pisell2.text.contact-info.title': string;
|
|
239
241
|
};
|
|
240
242
|
'zh-HK': {
|
|
241
243
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -355,6 +357,7 @@ declare const _default: {
|
|
|
355
357
|
'pisell2.text.goodpass.code-invalid-cart': string;
|
|
356
358
|
'pisell2.text.goodpass.login': string;
|
|
357
359
|
'pisell2.text.goodpass.login-tip': string;
|
|
360
|
+
'pisell2.text.contact-info.title': string;
|
|
358
361
|
};
|
|
359
362
|
};
|
|
360
363
|
export default _default;
|
|
@@ -140,7 +140,8 @@ var locales_default = {
|
|
|
140
140
|
"pisell2.text.goodpass.code-invalid": "Current code is invalid",
|
|
141
141
|
"pisell2.text.goodpass.code-invalid-cart": "No eligible items in the cart",
|
|
142
142
|
"pisell2.text.goodpass.login": "Login",
|
|
143
|
-
"pisell2.text.goodpass.login-tip": " for member benefit Or use account credit"
|
|
143
|
+
"pisell2.text.goodpass.login-tip": " for member benefit Or use account credit",
|
|
144
|
+
"pisell2.text.contact-info.title": "Contact info"
|
|
144
145
|
},
|
|
145
146
|
"zh-CN": {
|
|
146
147
|
"pisell2.event.calendar.limit.unavailable": "不可预约",
|
|
@@ -259,7 +260,8 @@ var locales_default = {
|
|
|
259
260
|
"pisell2.text.goodpass.code-invalid": "当前券码不可用",
|
|
260
261
|
"pisell2.text.goodpass.code-invalid-cart": "当前购物车中无可用商品",
|
|
261
262
|
"pisell2.text.goodpass.login": "登录",
|
|
262
|
-
"pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分"
|
|
263
|
+
"pisell2.text.goodpass.login-tip": "以获取会员福利或使用账户积分",
|
|
264
|
+
"pisell2.text.contact-info.title": "联系信息"
|
|
263
265
|
},
|
|
264
266
|
"zh-HK": {
|
|
265
267
|
"pisell2.event.calendar.limit.unavailable": "不可預約",
|
|
@@ -378,6 +380,7 @@ var locales_default = {
|
|
|
378
380
|
"pisell2.text.goodpass.code-invalid": "當前券碼不可用",
|
|
379
381
|
"pisell2.text.goodpass.code-invalid-cart": "當前購物車中無可用商品",
|
|
380
382
|
"pisell2.text.goodpass.login": "登錄",
|
|
381
|
-
"pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分"
|
|
383
|
+
"pisell2.text.goodpass.login-tip": "以獲取會員福利或使用賬戶積分",
|
|
384
|
+
"pisell2.text.contact-info.title": "聯繫信息"
|
|
382
385
|
}
|
|
383
386
|
};
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -274,7 +274,7 @@ var CustomSelect = (props, ref) => {
|
|
|
274
274
|
ref: searchRef,
|
|
275
275
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
|
|
276
276
|
style: { marginTop: 16, height: 44 },
|
|
277
|
-
placeholder: import_utils2.locales.getText("pisell2.text.search"),
|
|
277
|
+
placeholder: import_utils2.locales.getText("pisell2.booking.text.search-placeholder"),
|
|
278
278
|
value: search,
|
|
279
279
|
allowClear: true,
|
|
280
280
|
onChange: (e) => {
|
|
@@ -147,7 +147,7 @@ var Footer = (props) => {
|
|
|
147
147
|
return false;
|
|
148
148
|
}, [(_g = state.addons) == null ? void 0 : _g.edit]);
|
|
149
149
|
const infoEdit = (0, import_react.useMemo)(() => {
|
|
150
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
150
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
151
151
|
if (!state.bookingId) {
|
|
152
152
|
return true;
|
|
153
153
|
}
|
|
@@ -169,6 +169,9 @@ var Footer = (props) => {
|
|
|
169
169
|
if ((_f2 = state.contacts) == null ? void 0 : _f2.edit) {
|
|
170
170
|
return true;
|
|
171
171
|
}
|
|
172
|
+
if ((_g2 = state.contacts_info) == null ? void 0 : _g2.edit) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
172
175
|
return false;
|
|
173
176
|
}, [state]);
|
|
174
177
|
const isEdit = (0, import_react.useMemo)(() => {
|
|
@@ -71,9 +71,9 @@ var formatProductOption = (option) => {
|
|
|
71
71
|
}
|
|
72
72
|
return option.map((d) => {
|
|
73
73
|
return {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
num: d.num,
|
|
75
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
76
|
+
option_group_id: d.option_group_id
|
|
77
77
|
// "add_price": Number(d?.add_price),
|
|
78
78
|
};
|
|
79
79
|
});
|
|
@@ -92,7 +92,9 @@ var formatProductBundle = (bundle) => {
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
try {
|
|
95
|
-
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
95
|
+
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
96
|
+
(d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id)
|
|
97
|
+
);
|
|
96
98
|
if ((errorBundles == null ? void 0 : errorBundles.length) > 0) {
|
|
97
99
|
log(errorBundles);
|
|
98
100
|
}
|
|
@@ -100,16 +102,16 @@ var formatProductBundle = (bundle) => {
|
|
|
100
102
|
}
|
|
101
103
|
return bundle.map((d) => {
|
|
102
104
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
bundle_group_id: d.group_id,
|
|
106
|
+
bundle_id: d.id,
|
|
107
|
+
bundle_product_id: (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
108
|
+
bundle_variant_id: d.bundle_variant_id,
|
|
109
|
+
num: d.num,
|
|
110
|
+
extension_id: d.extension_id,
|
|
111
|
+
extension_type: d.extension_type,
|
|
110
112
|
// "price": Number(d?.price),
|
|
111
113
|
// "price_type": d?.price_type,
|
|
112
|
-
|
|
114
|
+
option: formatProductOption(d.option)
|
|
113
115
|
};
|
|
114
116
|
});
|
|
115
117
|
};
|
|
@@ -168,11 +170,14 @@ var formatResource = (service) => {
|
|
|
168
170
|
return void 0;
|
|
169
171
|
}
|
|
170
172
|
try {
|
|
171
|
-
return Object.values(service._extend.resource).reduce(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
return Object.values(service._extend.resource).reduce(
|
|
174
|
+
(pre, cur) => {
|
|
175
|
+
const newList = checkResourcesFormat(cur, service);
|
|
176
|
+
pre = pre.concat(newList);
|
|
177
|
+
return pre;
|
|
178
|
+
},
|
|
179
|
+
[]
|
|
180
|
+
);
|
|
176
181
|
} catch (err) {
|
|
177
182
|
return void 0;
|
|
178
183
|
}
|
|
@@ -199,7 +204,9 @@ var formatProductPrice = (item) => {
|
|
|
199
204
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
200
205
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
201
206
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
202
|
-
const variant = item.variant.find(
|
|
207
|
+
const variant = item.variant.find(
|
|
208
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
209
|
+
);
|
|
203
210
|
if (variant) {
|
|
204
211
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
205
212
|
}
|
|
@@ -233,7 +240,9 @@ var getSourceProductPrice = (item) => {
|
|
|
233
240
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
234
241
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
235
242
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
236
|
-
const variant = item.variant.find(
|
|
243
|
+
const variant = item.variant.find(
|
|
244
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
245
|
+
);
|
|
237
246
|
if (variant) {
|
|
238
247
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
239
248
|
}
|
|
@@ -247,25 +256,27 @@ var formatProducts = (item, quantity) => {
|
|
|
247
256
|
const discount_amount = origin_total - total;
|
|
248
257
|
const discount_list = (item == null ? void 0 : item.discount_list) || [];
|
|
249
258
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
250
|
-
const notManualDiscount = discount_list.filter(
|
|
259
|
+
const notManualDiscount = discount_list.filter(
|
|
260
|
+
(item2) => item2.type !== "product"
|
|
261
|
+
);
|
|
251
262
|
return {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
263
|
+
num: quantity || item._extend.quantity,
|
|
264
|
+
price: formatProductPrice(item),
|
|
265
|
+
source_product_price: getSourceProductPrice(item),
|
|
266
|
+
product_id: (item == null ? void 0 : item.product_id) || item.id,
|
|
267
|
+
discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
268
|
+
product_discount_reason: item._extend.discount_reason || "",
|
|
269
|
+
is_charge_tax: item.is_charge_tax,
|
|
270
|
+
note: (item == null ? void 0 : item.note) || "",
|
|
271
|
+
discountway: item._extend.discountway || "num",
|
|
272
|
+
discount_per: item._extend.discount_per,
|
|
273
|
+
discount_type: item._extend.discount_type || discount_type,
|
|
274
|
+
order_detail_id: item._extend.order_detail_id || 0,
|
|
275
|
+
product_bundle: formatProductBundle((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle),
|
|
276
|
+
bundle_edit: item._extend.bundle_edit,
|
|
277
|
+
product_option_item: formatProductOption((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.option),
|
|
278
|
+
product_variant_id: ((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.product_variant_id) || 0,
|
|
279
|
+
discount_list: notManualDiscount,
|
|
269
280
|
metadata: formatMetaData(item, false)
|
|
270
281
|
};
|
|
271
282
|
};
|
|
@@ -273,10 +284,12 @@ var formatAppointmentProductLists = (data) => {
|
|
|
273
284
|
var _a;
|
|
274
285
|
try {
|
|
275
286
|
let list = data.service.value;
|
|
276
|
-
list = list.filter(
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
list = list.filter(
|
|
288
|
+
(item) => {
|
|
289
|
+
var _a2;
|
|
290
|
+
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
|
|
291
|
+
}
|
|
292
|
+
);
|
|
280
293
|
const groupMap = /* @__PURE__ */ new Map();
|
|
281
294
|
list.forEach((item) => {
|
|
282
295
|
var _a2;
|
|
@@ -286,7 +299,10 @@ var formatAppointmentProductLists = (data) => {
|
|
|
286
299
|
}
|
|
287
300
|
groupMap.get(key).push(item);
|
|
288
301
|
});
|
|
289
|
-
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
302
|
+
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
303
|
+
(acc, group) => acc.concat(group),
|
|
304
|
+
[]
|
|
305
|
+
);
|
|
290
306
|
return list || [];
|
|
291
307
|
} catch (error) {
|
|
292
308
|
}
|
|
@@ -318,7 +334,7 @@ var formatBookings = (data, values) => {
|
|
|
318
334
|
const eventOtherParams = data.eventOtherParams;
|
|
319
335
|
let bookings = [];
|
|
320
336
|
let obj = {};
|
|
321
|
-
list.forEach((item
|
|
337
|
+
list.forEach((item) => {
|
|
322
338
|
var _a, _b, _c, _d, _e;
|
|
323
339
|
let start_date = item._extend.startDate.format("YYYY-MM-DD");
|
|
324
340
|
let end_date = item._extend.endDate.format("YYYY-MM-DD");
|
|
@@ -331,35 +347,40 @@ var formatBookings = (data, values) => {
|
|
|
331
347
|
if (isDay) {
|
|
332
348
|
const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
|
|
333
349
|
const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
|
|
334
|
-
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
350
|
+
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
351
|
+
startDate,
|
|
352
|
+
endDate
|
|
353
|
+
});
|
|
335
354
|
start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
|
|
336
355
|
start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
|
|
337
356
|
end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
|
|
338
357
|
end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
|
|
339
358
|
dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
|
|
340
359
|
dayParams.holder = formatHolders(data, item, values);
|
|
341
|
-
dayParams.duration = (0, import_utils3.getDays)(
|
|
360
|
+
dayParams.duration = (0, import_utils3.getDays)(
|
|
361
|
+
{ _extend: { start_date: startDateTime, end_date: endDateTime } },
|
|
362
|
+
"minutes"
|
|
363
|
+
);
|
|
342
364
|
}
|
|
343
365
|
const isSetGroupId = obj[(_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.groupId];
|
|
344
366
|
const booking = {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
// 当groupId第一次出现时,需要设置metadata.multiDayPrices, 否则不用
|
|
367
|
+
product: formatProducts(item),
|
|
368
|
+
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
369
|
+
id: item.booking_id || 0,
|
|
370
|
+
relation_id: item._extend.relation_id || 0,
|
|
371
|
+
like_status: item._extend.like_status || "common",
|
|
372
|
+
relation_type: item._extend.relation_type || "",
|
|
373
|
+
is_all: false,
|
|
374
|
+
schedule_id: item._extend.schedule_id || 0,
|
|
375
|
+
end_time,
|
|
376
|
+
sub_type: isDay ? "days" : getSubType(item),
|
|
377
|
+
select_date: start_date,
|
|
378
|
+
start_time,
|
|
379
|
+
end_date,
|
|
380
|
+
start_date,
|
|
381
|
+
duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
382
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
383
|
+
resources: formatResource(item),
|
|
363
384
|
"metadata": formatMetaData(item, !isSetGroupId),
|
|
364
385
|
...eventOtherParams || {},
|
|
365
386
|
...dayParams
|
|
@@ -374,9 +395,9 @@ var formatBookings = (data, values) => {
|
|
|
374
395
|
for (let i = 0; i < (item._extend.quantity || 1); i++) {
|
|
375
396
|
bookings.push({
|
|
376
397
|
...booking,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
398
|
+
product: formatProducts(item, 1),
|
|
399
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }, false) : item._extend.number || 1,
|
|
400
|
+
holder: getHolderByIndex(booking.holder, i)
|
|
380
401
|
});
|
|
381
402
|
}
|
|
382
403
|
});
|
|
@@ -428,7 +449,7 @@ var formatHolder = (state, values) => {
|
|
|
428
449
|
return obj;
|
|
429
450
|
};
|
|
430
451
|
var formatValues = (state) => {
|
|
431
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
452
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
432
453
|
let values = {
|
|
433
454
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
434
455
|
platform: state.isBookingTicket2 ? "pos" : "shop",
|
|
@@ -460,7 +481,10 @@ var formatValues = (state) => {
|
|
|
460
481
|
};
|
|
461
482
|
values.holder = formatHolder(state, values);
|
|
462
483
|
if (isDay || isEvent) {
|
|
463
|
-
values.relation_products = formatRelationProducts(
|
|
484
|
+
values.relation_products = formatRelationProducts(
|
|
485
|
+
state,
|
|
486
|
+
isDay ? "day" : "event"
|
|
487
|
+
);
|
|
464
488
|
} else {
|
|
465
489
|
values.relation_products = formatNormalProducts(state);
|
|
466
490
|
if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
|
|
@@ -479,6 +503,7 @@ var formatValues = (state) => {
|
|
|
479
503
|
if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
|
|
480
504
|
values.type = "virtual";
|
|
481
505
|
}
|
|
506
|
+
values.contacts_info = ((_h = state.contacts_info) == null ? void 0 : _h.value) || null;
|
|
482
507
|
return values;
|
|
483
508
|
};
|
|
484
509
|
var checkHolderIsError = (state) => {
|
|
@@ -39,31 +39,49 @@ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
|
|
|
39
39
|
var import_sendModal = __toESM(require("./sendModal"));
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var Footer = ({ state, reload }) => {
|
|
42
|
-
var _a, _b, _c, _d;
|
|
42
|
+
var _a, _b, _c, _d, _e;
|
|
43
43
|
const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
|
|
44
44
|
const handleReload = async () => {
|
|
45
45
|
await reload();
|
|
46
46
|
import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
|
|
47
47
|
};
|
|
48
48
|
const defaultValues = (0, import_react.useMemo)(() => {
|
|
49
|
-
var _a2, _b2
|
|
49
|
+
var _a2, _b2;
|
|
50
|
+
const { email: contactsEmail, phone: contactsPhone } = ((_a2 = state.contacts_info) == null ? void 0 : _a2.value) || {};
|
|
51
|
+
const {
|
|
52
|
+
email: clientEmail,
|
|
53
|
+
phone: clientPhone,
|
|
54
|
+
country_calling_code: clientCode
|
|
55
|
+
} = ((_b2 = state.client) == null ? void 0 : _b2.value) || {};
|
|
56
|
+
let email = contactsEmail || clientEmail;
|
|
57
|
+
let phone = (contactsPhone == null ? void 0 : contactsPhone.phone) || clientPhone;
|
|
58
|
+
let code = (contactsPhone == null ? void 0 : contactsPhone.country_calling_code) || clientCode || "+61";
|
|
59
|
+
if (!code.startsWith("+")) {
|
|
60
|
+
code = `+${code}`;
|
|
61
|
+
}
|
|
50
62
|
return {
|
|
51
|
-
sendSms: !!
|
|
52
|
-
sendEmail: !!
|
|
53
|
-
email
|
|
63
|
+
sendSms: !!phone,
|
|
64
|
+
sendEmail: !!email,
|
|
65
|
+
email,
|
|
54
66
|
phone: {
|
|
55
|
-
code
|
|
56
|
-
phone
|
|
67
|
+
code,
|
|
68
|
+
phone
|
|
57
69
|
}
|
|
58
70
|
};
|
|
59
|
-
}, [(_a = state.client) == null ? void 0 : _a.value]);
|
|
60
|
-
if (!state.bookingId || !((
|
|
71
|
+
}, [(_a = state.client) == null ? void 0 : _a.value, (_b = state.contacts_info) == null ? void 0 : _b.value]);
|
|
72
|
+
if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
|
|
61
73
|
return null;
|
|
62
74
|
}
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
import_materials.Tooltip,
|
|
77
|
+
{
|
|
78
|
+
title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip")
|
|
79
|
+
},
|
|
80
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })
|
|
81
|
+
), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), open && /* @__PURE__ */ import_react.default.createElement(
|
|
64
82
|
import_sendModal.default,
|
|
65
83
|
{
|
|
66
|
-
refreshKey: (
|
|
84
|
+
refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
|
|
67
85
|
open,
|
|
68
86
|
onCancel: () => setOpen(false),
|
|
69
87
|
onOk: handleOk,
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|