@pisell/private-materials 3.0.151 → 3.0.152
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/booking/components/footer/index.js +48 -33
- package/es/components/booking/components/footer/utils.js +35 -4
- package/es/components/booking/index.js +1 -1
- package/es/components/booking/info/index.d.ts +4 -12
- package/es/components/booking/info/index.js +12 -122
- package/es/components/booking/info/main.d.ts +12 -0
- package/es/components/booking/info/main.js +124 -0
- package/es/components/booking/info/model.js +0 -1
- package/es/components/booking/info/service/addTimeModal/index.js +4 -4
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +7 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/index.js +216 -0
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/serve.js +79 -0
- package/es/components/booking/info2/service/actions/index.d.ts +6 -0
- package/es/components/booking/info2/service/actions/index.js +86 -0
- package/es/components/booking/info2/service/addService/index.d.ts +6 -0
- package/es/components/booking/info2/service/addService/index.js +404 -0
- package/es/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/es/components/booking/info2/service/addService/mock.js +332 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/es/components/booking/info2/service/addService/utils.js +510 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +681 -0
- package/es/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/es/components/booking/info2/service/addTimeModal/serve.js +73 -0
- package/es/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/es/components/booking/info2/service/addTimeModal/utils.js +176 -0
- package/es/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Capacity/index.js +121 -0
- package/es/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +28 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +233 -0
- package/es/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/index.js +617 -0
- package/es/components/booking/info2/service/editService/index.less +99 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/es/components/booking/info2/service/editService/utils.js +37 -0
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +55 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/es/components/booking/info2/service/serviceItem/index.js +176 -0
- package/es/components/booking/info2/service/serviceItem/index.less +125 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/es/components/booking/info2/service/serviceList/index.js +106 -0
- package/es/components/booking/info2/service/serviceList/index.less +0 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.js +349 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +12 -3
- package/es/components/booking/materiels/resources/index.d.ts +2 -2
- package/es/components/booking/materiels/resources/index.js +11 -11
- package/es/components/booking/mock.d.ts +1 -0
- package/es/components/booking/mock.js +66 -0
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +28 -5
- package/lib/components/booking/components/footer/utils.js +29 -4
- package/lib/components/booking/index.js +2 -2
- package/lib/components/booking/info/index.d.ts +4 -12
- package/lib/components/booking/info/index.js +14 -115
- package/lib/components/booking/info/main.d.ts +12 -0
- package/lib/components/booking/info/main.js +152 -0
- package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +9 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/index.js +202 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/info2/serve.js +53 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +6 -0
- package/lib/components/booking/info2/service/actions/index.js +102 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/index.js +356 -0
- package/lib/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/lib/components/booking/info2/service/addService/mock.js +398 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/lib/components/booking/info2/service/addService/utils.js +377 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +558 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.js +45 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.js +157 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.js +97 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +54 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +212 -0
- package/lib/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/index.js +483 -0
- package/lib/components/booking/info2/service/editService/index.less +99 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/lib/components/booking/info2/service/editService/utils.js +0 -0
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +75 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/lib/components/booking/info2/service/serviceItem/index.js +184 -0
- package/lib/components/booking/info2/service/serviceItem/index.less +125 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/lib/components/booking/info2/service/serviceList/index.js +130 -0
- package/lib/components/booking/info2/service/serviceList/index.less +0 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.js +257 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/resources/index.d.ts +2 -2
- package/lib/components/booking/mock.d.ts +1 -0
- package/lib/components/booking/mock.js +67 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/index.js +3 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
|
@@ -31,7 +31,8 @@ import "./index.less";
|
|
|
31
31
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
32
32
|
import { DownOutlined } from '@ant-design/icons';
|
|
33
33
|
import { eventBookingCheck } from "./serve";
|
|
34
|
-
|
|
34
|
+
import { createBookings, editBookings } from "../../info2/serve";
|
|
35
|
+
import { isBooking4Shop } from "../../info/utils";
|
|
35
36
|
/**
|
|
36
37
|
* @title: 底部
|
|
37
38
|
* @description:
|
|
@@ -238,7 +239,7 @@ var Footer = function Footer(props) {
|
|
|
238
239
|
key: 'booking_checkout',
|
|
239
240
|
data: {
|
|
240
241
|
order_id: order_id,
|
|
241
|
-
callbackType:
|
|
242
|
+
callbackType: 'pisell2'
|
|
242
243
|
}
|
|
243
244
|
}));
|
|
244
245
|
case 2:
|
|
@@ -339,6 +340,19 @@ var Footer = function Footer(props) {
|
|
|
339
340
|
return _ref3.apply(this, arguments);
|
|
340
341
|
};
|
|
341
342
|
}();
|
|
343
|
+
var getApis = function getApis() {
|
|
344
|
+
var _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6;
|
|
345
|
+
if (isBooking4Shop((_context$appHelper$ut2 = context.appHelper.utils.store) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getState) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.call(_context$appHelper$ut2)) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.global) === null || _context$appHelper$ut5 === void 0 ? void 0 : (_context$appHelper$ut6 = _context$appHelper$ut5.globalConfig) === null || _context$appHelper$ut6 === void 0 ? void 0 : _context$appHelper$ut6.id, state.renderType)) {
|
|
346
|
+
return {
|
|
347
|
+
editBooking: editBookings,
|
|
348
|
+
createBooking: createBookings
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
return {
|
|
352
|
+
editBooking: state.apis.editBooking,
|
|
353
|
+
createBooking: state.apis.createBooking
|
|
354
|
+
};
|
|
355
|
+
};
|
|
342
356
|
|
|
343
357
|
/**
|
|
344
358
|
* @title: 保存info
|
|
@@ -350,7 +364,7 @@ var Footer = function Footer(props) {
|
|
|
350
364
|
*/
|
|
351
365
|
var handleSave = /*#__PURE__*/function () {
|
|
352
366
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref4) {
|
|
353
|
-
var type, _ref4$messageShow, messageShow, _setLoading, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api, _yield$eventBookingCh, data, confirmed;
|
|
367
|
+
var type, _ref4$messageShow, messageShow, _setLoading, _getApis, createBooking, editBooking, editApi, createApi, saveOtherValue, _state$onSave, callbackData, values, api, _yield$eventBookingCh, data, confirmed;
|
|
354
368
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
355
369
|
while (1) switch (_context4.prev = _context4.next) {
|
|
356
370
|
case 0:
|
|
@@ -358,43 +372,44 @@ var Footer = function Footer(props) {
|
|
|
358
372
|
// 区分loading, 是点击的checkout 还是save
|
|
359
373
|
_setLoading = type === 'checkout' ? setCheckoutLoading : setLoading;
|
|
360
374
|
_setLoading(true);
|
|
361
|
-
|
|
362
|
-
|
|
375
|
+
_getApis = getApis(), createBooking = _getApis.createBooking, editBooking = _getApis.editBooking;
|
|
376
|
+
editApi = state.renderType === 'eventBooking' ? state.apis.editEventBooking : editBooking;
|
|
377
|
+
createApi = state.renderType === 'eventBooking' ? state.apis.createEventBooking : createBooking;
|
|
363
378
|
saveOtherValue = {};
|
|
364
379
|
if (!(type === 'save')) {
|
|
365
|
-
_context4.next =
|
|
380
|
+
_context4.next = 14;
|
|
366
381
|
break;
|
|
367
382
|
}
|
|
368
|
-
_context4.next =
|
|
383
|
+
_context4.next = 10;
|
|
369
384
|
return state === null || state === void 0 ? void 0 : (_state$onSave = state.onSave) === null || _state$onSave === void 0 ? void 0 : _state$onSave.call(state, state.client);
|
|
370
|
-
case
|
|
385
|
+
case 10:
|
|
371
386
|
_context4.t0 = _context4.sent;
|
|
372
387
|
if (_context4.t0) {
|
|
373
|
-
_context4.next =
|
|
388
|
+
_context4.next = 13;
|
|
374
389
|
break;
|
|
375
390
|
}
|
|
376
391
|
_context4.t0 = {};
|
|
377
|
-
case 12:
|
|
378
|
-
saveOtherValue = _context4.t0;
|
|
379
392
|
case 13:
|
|
380
|
-
|
|
393
|
+
saveOtherValue = _context4.t0;
|
|
394
|
+
case 14:
|
|
395
|
+
_context4.prev = 14;
|
|
381
396
|
callbackData = null; // 格式化提交的参数
|
|
382
397
|
values = formatValues(_objectSpread(_objectSpread({}, state), saveOtherValue)); // 区分是新增还是编辑
|
|
383
398
|
api = state.bookingId ? editApi : createApi; // 活动预约新建时校验重复
|
|
384
399
|
if (!(!state.bookingId && state.renderType === 'eventBooking')) {
|
|
385
|
-
_context4.next =
|
|
400
|
+
_context4.next = 30;
|
|
386
401
|
break;
|
|
387
402
|
}
|
|
388
|
-
_context4.next =
|
|
403
|
+
_context4.next = 21;
|
|
389
404
|
return eventBookingCheck(values);
|
|
390
|
-
case
|
|
405
|
+
case 21:
|
|
391
406
|
_yield$eventBookingCh = _context4.sent;
|
|
392
407
|
data = _yield$eventBookingCh.data;
|
|
393
408
|
if (!data.list.length) {
|
|
394
|
-
_context4.next =
|
|
409
|
+
_context4.next = 30;
|
|
395
410
|
break;
|
|
396
411
|
}
|
|
397
|
-
_context4.next =
|
|
412
|
+
_context4.next = 26;
|
|
398
413
|
return modal.confirm({
|
|
399
414
|
icon: null,
|
|
400
415
|
title: locales.getText('page.event.booking.text.duplicate-enrollment'),
|
|
@@ -406,53 +421,53 @@ var Footer = function Footer(props) {
|
|
|
406
421
|
width: 480,
|
|
407
422
|
okText: locales.getText('page.event.booking.text.duplicate-enrollment-confirm')
|
|
408
423
|
});
|
|
409
|
-
case
|
|
424
|
+
case 26:
|
|
410
425
|
confirmed = _context4.sent;
|
|
411
426
|
if (confirmed) {
|
|
412
|
-
_context4.next =
|
|
427
|
+
_context4.next = 30;
|
|
413
428
|
break;
|
|
414
429
|
}
|
|
415
430
|
_setLoading(false);
|
|
416
431
|
return _context4.abrupt("return");
|
|
417
|
-
case
|
|
432
|
+
case 30:
|
|
418
433
|
if (!addonsEdit) {
|
|
419
|
-
_context4.next =
|
|
434
|
+
_context4.next = 33;
|
|
420
435
|
break;
|
|
421
436
|
}
|
|
422
|
-
_context4.next =
|
|
437
|
+
_context4.next = 33;
|
|
423
438
|
return handleSaveAddons();
|
|
424
|
-
case
|
|
439
|
+
case 33:
|
|
425
440
|
if (!infoEdit) {
|
|
426
|
-
_context4.next =
|
|
441
|
+
_context4.next = 38;
|
|
427
442
|
break;
|
|
428
443
|
}
|
|
429
|
-
_context4.next =
|
|
430
|
-
return api(values);
|
|
431
|
-
case
|
|
444
|
+
_context4.next = 36;
|
|
445
|
+
return api(values, state.bookingId);
|
|
446
|
+
case 36:
|
|
432
447
|
callbackData = _context4.sent;
|
|
433
448
|
if (messageShow) {
|
|
434
449
|
message.success(locales.getText(state.bookingId ? 'pisell2.text.appointment-updated' : 'pisell2.text.created-successfully'));
|
|
435
450
|
}
|
|
436
|
-
case
|
|
451
|
+
case 38:
|
|
437
452
|
// 回调关闭弹窗
|
|
438
453
|
state === null || state === void 0 ? void 0 : state.callback(callbackData);
|
|
439
454
|
_setLoading(false);
|
|
440
455
|
|
|
441
456
|
// return数据 checkout时需要
|
|
442
457
|
return _context4.abrupt("return", callbackData || values);
|
|
443
|
-
case
|
|
444
|
-
_context4.prev =
|
|
445
|
-
_context4.t1 = _context4["catch"](
|
|
458
|
+
case 43:
|
|
459
|
+
_context4.prev = 43;
|
|
460
|
+
_context4.t1 = _context4["catch"](14);
|
|
446
461
|
console.log(_context4.t1);
|
|
447
462
|
if ((_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.code) === 70101) {
|
|
448
463
|
message.error(_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.message);
|
|
449
464
|
}
|
|
450
465
|
_setLoading(false);
|
|
451
|
-
case
|
|
466
|
+
case 48:
|
|
452
467
|
case "end":
|
|
453
468
|
return _context4.stop();
|
|
454
469
|
}
|
|
455
|
-
}, _callee4, null, [[
|
|
470
|
+
}, _callee4, null, [[14, 43]]);
|
|
456
471
|
}));
|
|
457
472
|
return function handleSave(_x3) {
|
|
458
473
|
return _ref5.apply(this, arguments);
|
|
@@ -6,6 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import { flexibleObj, isNowTime, getNowTime } from "../../utils";
|
|
8
8
|
import { isWalkIn } from "../../utils";
|
|
9
|
+
import { getSumCapacity } from "../../info2/utilsByBooking";
|
|
9
10
|
var formatNote = function formatNote(data) {
|
|
10
11
|
var _data$notes;
|
|
11
12
|
return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
|
|
@@ -91,6 +92,30 @@ var formatRelationDetails = function formatRelationDetails(list) {
|
|
|
91
92
|
};
|
|
92
93
|
});
|
|
93
94
|
};
|
|
95
|
+
var formatResource = function formatResource(service) {
|
|
96
|
+
if (!service._extend.resource) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
try {
|
|
100
|
+
return Object.values(service._extend.resource).reduce(function (pre, cur) {
|
|
101
|
+
pre = pre.concat(cur.map(function (d) {
|
|
102
|
+
return {
|
|
103
|
+
form_id: d.form_id,
|
|
104
|
+
relation_type: d.relation_type || 'form',
|
|
105
|
+
relation_id: d.relation_id || 0,
|
|
106
|
+
capacity: getSumCapacity({
|
|
107
|
+
cacheItem: service
|
|
108
|
+
}),
|
|
109
|
+
like_status: d.like_status,
|
|
110
|
+
metadata: d.metadata
|
|
111
|
+
};
|
|
112
|
+
}));
|
|
113
|
+
return pre;
|
|
114
|
+
}, []);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
94
119
|
|
|
95
120
|
/**
|
|
96
121
|
* @title: 预约商品信息
|
|
@@ -135,11 +160,11 @@ var formatBookings = function formatBookings(data) {
|
|
|
135
160
|
},
|
|
136
161
|
"relation_products": formatRelationDetails(item._extend.relation_details),
|
|
137
162
|
'id': item.booking_id || 0,
|
|
138
|
-
"relation_id": item._extend.relation_id,
|
|
163
|
+
"relation_id": item._extend.relation_id || 0,
|
|
139
164
|
"like_status": item._extend.like_status || 'common',
|
|
140
|
-
"relation_type": item._extend.relation_type,
|
|
165
|
+
"relation_type": item._extend.relation_type || '',
|
|
141
166
|
"is_all": false,
|
|
142
|
-
"schedule_id": item._extend.schedule_id,
|
|
167
|
+
"schedule_id": item._extend.schedule_id || 0,
|
|
143
168
|
"end_time": end_time,
|
|
144
169
|
"sub_type": getSubType(item),
|
|
145
170
|
"select_date": start_date,
|
|
@@ -147,7 +172,13 @@ var formatBookings = function formatBookings(data) {
|
|
|
147
172
|
"end_date": end_date,
|
|
148
173
|
"start_date": start_date,
|
|
149
174
|
"duration": flexibleObj.getValue(item._extend.duration),
|
|
150
|
-
"number": item._extend.
|
|
175
|
+
"number": item._extend.capacity ? getSumCapacity({
|
|
176
|
+
cacheItem: item
|
|
177
|
+
}) : 1,
|
|
178
|
+
"resources": formatResource(item),
|
|
179
|
+
"metadata": item._extend.capacity ? {
|
|
180
|
+
capacity: item._extend.capacity
|
|
181
|
+
} : undefined
|
|
151
182
|
}, eventOtherParams || {});
|
|
152
183
|
});
|
|
153
184
|
return bookings;
|
|
@@ -6,7 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import React, { useEffect, useContext } from 'react';
|
|
8
8
|
import { Provider, Context } from "./model";
|
|
9
|
-
import Info from "./info";
|
|
9
|
+
import Info from "./info/main";
|
|
10
10
|
import Notes from "./notes";
|
|
11
11
|
import Addons from "./addons";
|
|
12
12
|
import Forms from "./forms";
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
callback: any;
|
|
6
|
-
setGlobalState: any;
|
|
7
|
-
modules: any;
|
|
8
|
-
slot: any;
|
|
9
|
-
setState: any;
|
|
10
|
-
}
|
|
11
|
-
declare const Info: any;
|
|
12
|
-
export default Info;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InfoProps } from './main';
|
|
3
|
+
declare const APP: (props: InfoProps) => React.JSX.Element;
|
|
4
|
+
export default APP;
|
|
@@ -1,124 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React, { useContext, useEffect, useMemo } from "react";
|
|
8
|
-
import { Provider, Context } from "./model";
|
|
9
|
-
import Client from "./client";
|
|
10
|
-
import Service from "./service";
|
|
11
|
-
import Pet from "./pet";
|
|
12
|
-
import DateCom from "./date";
|
|
13
|
-
import Footer from "../components/footer";
|
|
14
|
-
import TabPane from "../components/tabPane";
|
|
15
|
-
import AddNote from "../notes/addNote";
|
|
16
|
-
import Header from "./header";
|
|
17
|
-
import localeTexts from "../locales";
|
|
18
|
-
import { locales } from "@pisell/utils";
|
|
19
|
-
import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes, request } from "../utils";
|
|
20
|
-
import { updateServiceDate } from "./date";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Info2 from "../info2";
|
|
3
|
+
import Info1 from "./main";
|
|
21
4
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
22
|
-
import
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
client: 1,
|
|
26
|
-
date: 1,
|
|
27
|
-
service: 1,
|
|
28
|
-
holder: 1,
|
|
29
|
-
note: 1
|
|
30
|
-
};
|
|
31
|
-
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
32
|
-
var Info = Provider(function (props) {
|
|
33
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
|
|
34
|
-
// return <Payments {...props} />;
|
|
35
|
-
var style = props.style,
|
|
36
|
-
globalState = props.globalState,
|
|
37
|
-
_props$modules = props.modules,
|
|
38
|
-
modules = _props$modules === void 0 ? defaultModules : _props$modules,
|
|
39
|
-
slot = props.slot;
|
|
40
|
-
var modal = useContext(Context);
|
|
5
|
+
import { isBooking4Shop } from "./utils";
|
|
6
|
+
var APP = function APP(props) {
|
|
7
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _props$globalState;
|
|
41
8
|
var context = useEngineContext();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
document.body.id = "body";
|
|
49
|
-
// 注入函数到页面的state内
|
|
50
|
-
if (props.setState) {
|
|
51
|
-
props.setState({
|
|
52
|
-
bookingFunctions: {
|
|
53
|
-
formatResource: formatResource,
|
|
54
|
-
getErrorList: getErrorList,
|
|
55
|
-
sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
|
|
56
|
-
findNextDuration: findNextDuration,
|
|
57
|
-
flexibleObj: flexibleObj,
|
|
58
|
-
updateServiceDate: updateServiceDate
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}, []);
|
|
63
|
-
useEffect(function () {
|
|
64
|
-
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
65
|
-
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
|
|
66
|
-
modal.dispatch({
|
|
67
|
-
type: "setState",
|
|
68
|
-
payload: _objectSpread(_objectSpread({
|
|
69
|
-
setGlobalState: props.setGlobalState
|
|
70
|
-
}, globalState), {}, {
|
|
71
|
-
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
72
|
-
isFranchisee: isFranchisee,
|
|
73
|
-
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
}, [JSON.stringify(globalState)]);
|
|
77
|
-
var addNote = function addNote(e) {
|
|
78
|
-
modal.dispatch({
|
|
79
|
-
type: "setNotes",
|
|
80
|
-
payload: {
|
|
81
|
-
orderNote: e,
|
|
82
|
-
edit: true
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
var header = useMemo(function () {
|
|
87
|
-
if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === "eventBooking") {
|
|
88
|
-
return locales.getText("pisell2.text.enroll.detail");
|
|
89
|
-
}
|
|
90
|
-
return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
|
|
91
|
-
state: modal.state,
|
|
92
|
-
dispatch: modal.dispatch
|
|
93
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
className: "",
|
|
95
|
-
style: {
|
|
96
|
-
height: 0
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
|
|
100
|
-
var notes = useMemo(function () {
|
|
101
|
-
var _modal$state3, _modal$state3$notes;
|
|
102
|
-
if (!modules.note) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === "eventBooking" ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
|
|
106
|
-
value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
|
|
107
|
-
onChange: addNote
|
|
108
|
-
});
|
|
109
|
-
}, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
|
|
110
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
|
|
111
|
-
style: style,
|
|
112
|
-
header: header,
|
|
113
|
-
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
114
|
-
state: modal.state,
|
|
115
|
-
dispatch: modal.dispatch,
|
|
116
|
-
source: "info"
|
|
117
|
-
})
|
|
118
|
-
}, _defineProperty(_React$createElement, "style", {
|
|
119
|
-
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? "100%" : "100vh"
|
|
120
|
-
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className: "booking-info"
|
|
122
|
-
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === "form" ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
123
|
-
});
|
|
124
|
-
export default Info;
|
|
9
|
+
if (isBooking4Shop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id, props === null || props === void 0 ? void 0 : (_props$globalState = props.globalState) === null || _props$globalState === void 0 ? void 0 : _props$globalState.renderType)) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Info2, props);
|
|
11
|
+
}
|
|
12
|
+
return /*#__PURE__*/React.createElement(Info1, props);
|
|
13
|
+
};
|
|
14
|
+
export default APP;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React, { useContext, useEffect, useMemo } from 'react';
|
|
8
|
+
import { Provider, Context } from "./model";
|
|
9
|
+
import Client from "./client";
|
|
10
|
+
import Service from "./service";
|
|
11
|
+
import Pet from "./pet";
|
|
12
|
+
import DateCom from "./date";
|
|
13
|
+
import Footer from "../components/footer";
|
|
14
|
+
import TabPane from "../components/tabPane";
|
|
15
|
+
import AddNote from "../notes/addNote";
|
|
16
|
+
import Header from "./header";
|
|
17
|
+
import localeTexts from "../locales";
|
|
18
|
+
import { locales } from '@pisell/utils';
|
|
19
|
+
import { findNextDuration, flexibleObj, formatResource, getErrorList, sliceDayIntoFiveMinutes, request } from "../utils";
|
|
20
|
+
import { updateServiceDate } from "./date";
|
|
21
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
22
|
+
import Notes from "./notes";
|
|
23
|
+
import "./index.less";
|
|
24
|
+
var defaultModules = {
|
|
25
|
+
client: 1,
|
|
26
|
+
date: 1,
|
|
27
|
+
service: 1,
|
|
28
|
+
holder: 1,
|
|
29
|
+
note: 1
|
|
30
|
+
};
|
|
31
|
+
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
32
|
+
var Info = Provider(function (props) {
|
|
33
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
|
|
34
|
+
// return <Payments {...props} />;
|
|
35
|
+
var style = props.style,
|
|
36
|
+
globalState = props.globalState,
|
|
37
|
+
_props$modules = props.modules,
|
|
38
|
+
modules = _props$modules === void 0 ? defaultModules : _props$modules,
|
|
39
|
+
slot = props.slot;
|
|
40
|
+
var modal = useContext(Context);
|
|
41
|
+
var context = useEngineContext();
|
|
42
|
+
request.setRequest(context.appHelper.utils.request);
|
|
43
|
+
var params = useMemo(function () {
|
|
44
|
+
var _modal$state, _modal$state$bookingC, _modal$state$bookingC2, _modal$state$bookingC3;
|
|
45
|
+
return ((_modal$state = modal.state) === null || _modal$state === void 0 ? void 0 : (_modal$state$bookingC = _modal$state.bookingConfig) === null || _modal$state$bookingC === void 0 ? void 0 : (_modal$state$bookingC2 = _modal$state$bookingC.config) === null || _modal$state$bookingC2 === void 0 ? void 0 : (_modal$state$bookingC3 = _modal$state$bookingC2.basic) === null || _modal$state$bookingC3 === void 0 ? void 0 : _modal$state$bookingC3.appointment_subject) || {};
|
|
46
|
+
}, [(_modal$state2 = modal.state) === null || _modal$state2 === void 0 ? void 0 : (_modal$state2$booking = _modal$state2.bookingConfig) === null || _modal$state2$booking === void 0 ? void 0 : (_modal$state2$booking2 = _modal$state2$booking.config) === null || _modal$state2$booking2 === void 0 ? void 0 : (_modal$state2$booking3 = _modal$state2$booking2.basic) === null || _modal$state2$booking3 === void 0 ? void 0 : _modal$state2$booking3.appointment_subject]);
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
document.body.id = 'body';
|
|
49
|
+
// 注入函数到页面的state内
|
|
50
|
+
if (props.setState) {
|
|
51
|
+
props.setState({
|
|
52
|
+
bookingFunctions: {
|
|
53
|
+
formatResource: formatResource,
|
|
54
|
+
getErrorList: getErrorList,
|
|
55
|
+
sliceDayIntoFiveMinutes: sliceDayIntoFiveMinutes,
|
|
56
|
+
findNextDuration: findNextDuration,
|
|
57
|
+
flexibleObj: flexibleObj,
|
|
58
|
+
updateServiceDate: updateServiceDate
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}, []);
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
65
|
+
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, 'franchisee');
|
|
66
|
+
modal.dispatch({
|
|
67
|
+
type: 'setState',
|
|
68
|
+
payload: _objectSpread(_objectSpread({
|
|
69
|
+
setGlobalState: props.setGlobalState
|
|
70
|
+
}, globalState), {}, {
|
|
71
|
+
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
72
|
+
isFranchisee: isFranchisee,
|
|
73
|
+
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
}, [JSON.stringify(globalState)]);
|
|
77
|
+
var addNote = function addNote(e) {
|
|
78
|
+
modal.dispatch({
|
|
79
|
+
type: 'setNotes',
|
|
80
|
+
payload: {
|
|
81
|
+
orderNote: e,
|
|
82
|
+
edit: true
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var header = useMemo(function () {
|
|
87
|
+
if ((globalState === null || globalState === void 0 ? void 0 : globalState.renderType) === 'eventBooking') {
|
|
88
|
+
return locales.getText('pisell2.text.enroll.detail');
|
|
89
|
+
}
|
|
90
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? /*#__PURE__*/React.createElement(Header, {
|
|
91
|
+
state: modal.state,
|
|
92
|
+
dispatch: modal.dispatch
|
|
93
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "",
|
|
95
|
+
style: {
|
|
96
|
+
height: 0
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
|
|
100
|
+
var notes = useMemo(function () {
|
|
101
|
+
var _modal$state3, _modal$state3$notes;
|
|
102
|
+
if (!modules.note) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return globalState !== null && globalState !== void 0 && globalState.bookingId ? globalState.renderType === 'eventBooking' ? /*#__PURE__*/React.createElement(Notes, null) : null : /*#__PURE__*/React.createElement(AddNote, {
|
|
106
|
+
value: (_modal$state3 = modal.state) === null || _modal$state3 === void 0 ? void 0 : (_modal$state3$notes = _modal$state3.notes) === null || _modal$state3$notes === void 0 ? void 0 : _modal$state3$notes.orderNote,
|
|
107
|
+
onChange: addNote
|
|
108
|
+
});
|
|
109
|
+
}, [modules.note, globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, globalState.render, (_modal$state4 = modal.state) === null || _modal$state4 === void 0 ? void 0 : (_modal$state4$notes = _modal$state4.notes) === null || _modal$state4$notes === void 0 ? void 0 : _modal$state4$notes.orderNote]);
|
|
110
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !!modal.state.setGlobalState ? /*#__PURE__*/React.createElement(TabPane, (_React$createElement = {
|
|
111
|
+
style: style,
|
|
112
|
+
header: header,
|
|
113
|
+
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
114
|
+
state: modal.state,
|
|
115
|
+
dispatch: modal.dispatch,
|
|
116
|
+
source: "info"
|
|
117
|
+
})
|
|
118
|
+
}, _defineProperty(_React$createElement, "style", {
|
|
119
|
+
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? '100%' : '100vh'
|
|
120
|
+
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: "booking-info"
|
|
122
|
+
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
123
|
+
});
|
|
124
|
+
export default Info;
|
|
@@ -248,15 +248,15 @@ var AddTimeModal = function AddTimeModal() {
|
|
|
248
248
|
while (1) switch (_context.prev = _context.next) {
|
|
249
249
|
case 0:
|
|
250
250
|
_context.next = 2;
|
|
251
|
-
return getAddTimeProducts({
|
|
251
|
+
return getAddTimeProducts(_defineProperty({
|
|
252
252
|
skip: 1,
|
|
253
253
|
num: 500,
|
|
254
254
|
open_quotation: 1,
|
|
255
|
+
status: 'published',
|
|
255
256
|
schedule_date: state.date.value.format('YYYY-MM-DD'),
|
|
256
257
|
customer_id: isWalkIn((_state$client = state.client) === null || _state$client === void 0 ? void 0 : (_state$client$value = _state$client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id) ? undefined : (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : (_state$client2$value = _state$client2.value) === null || _state$client2$value === void 0 ? void 0 : _state$client2$value.id,
|
|
257
|
-
extension_type: ['product_add_time']
|
|
258
|
-
|
|
259
|
-
}, {
|
|
258
|
+
extension_type: ['product_add_time']
|
|
259
|
+
}, "status", 'published'), {
|
|
260
260
|
useCache: true
|
|
261
261
|
});
|
|
262
262
|
case 2:
|
|
@@ -21,3 +21,4 @@ export declare const isInterval: (time1: number, time2: number, interval?: numbe
|
|
|
21
21
|
* @Date: 2024-08-13 19:36
|
|
22
22
|
*/
|
|
23
23
|
export declare const formatServiceListByTime: (list: any[]) => any[];
|
|
24
|
+
export declare const isBooking4Shop: (shopId: number, renderType?: string) => boolean;
|
|
@@ -83,4 +83,11 @@ export var formatServiceListByTime = function formatServiceListByTime(list) {
|
|
|
83
83
|
} catch (err) {
|
|
84
84
|
return list;
|
|
85
85
|
}
|
|
86
|
+
};
|
|
87
|
+
export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
88
|
+
if (renderType === 'eventBooking') {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
var booking4Shops = [1350, 1401, 3013, 7154];
|
|
92
|
+
return booking4Shops.includes(shopId);
|
|
86
93
|
};
|