@pisell/private-materials 3.0.157-gray → 3.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/index.js +3 -3
- package/es/components/booking/forms/forms.d.ts +0 -1
- package/es/components/booking/forms/forms.js +2 -4
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +3 -4
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/es/components/booking/info/clientVariant/vertical/index.js +5 -6
- package/es/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/es/components/booking/info/index.less +0 -9
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +2 -8
- package/es/components/booking/info/service/addService/index.js +36 -82
- package/es/components/booking/info/service/addService/index.less +1 -27
- package/es/components/booking/info/service/editService/index.js +13 -11
- package/es/components/booking/info2/utilsByBooking.js +4 -11
- package/es/components/booking/locales.d.ts +0 -48
- package/es/components/booking/locales.js +3 -51
- package/es/components/booking/model.d.ts +0 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +51 -54
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/components/schedules/resources/add/index.js +9 -9
- package/es/components/schedules/resources/edit/index.d.ts +4 -0
- package/es/components/schedules/resources/edit/index.js +116 -0
- package/es/components/schedules/resources/edit/index.less +19 -0
- package/es/components/schedules/resources/index.d.ts +2 -2
- package/es/components/schedules/resources/index.js +24 -16
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/index.js +3 -3
- package/lib/components/booking/forms/forms.d.ts +0 -1
- package/lib/components/booking/forms/forms.js +2 -5
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +2 -4
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +76 -88
- package/lib/components/booking/info/clientVariant/vertical/index.less +0 -8
- package/lib/components/booking/info/index.less +0 -9
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +2 -8
- package/lib/components/booking/info/service/addService/index.js +29 -66
- package/lib/components/booking/info/service/addService/index.less +1 -27
- package/lib/components/booking/info/service/editService/index.js +6 -9
- package/lib/components/booking/info2/utilsByBooking.js +4 -11
- package/lib/components/booking/locales.d.ts +0 -48
- package/lib/components/booking/locales.js +3 -51
- package/lib/components/booking/model.d.ts +0 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +22 -57
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/components/schedules/resources/add/index.js +7 -7
- package/lib/components/schedules/resources/edit/index.d.ts +4 -0
- package/lib/components/schedules/resources/edit/index.js +132 -0
- package/lib/components/schedules/resources/edit/index.less +19 -0
- package/lib/components/schedules/resources/index.d.ts +2 -2
- package/lib/components/schedules/resources/index.js +7 -4
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +3 -3
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/dashboard/index.js +0 -253
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/dashboard/serve.js +0 -27
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/es/components/booking/info/addServiceVariant/index.js +0 -33
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/dashboard/index.js +0 -251
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.js +0 -33
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
- package/lib/components/booking/info/addServiceVariant/index.js +0 -58
- package/lowcode/booking-dashboard/meta.ts +0 -137
- package/lowcode/booking-vertical-add-service/meta.ts +0 -124
- package/lowcode/vertical-add-service/meta.ts +0 -71
|
@@ -195,22 +195,6 @@ declare const _default: {
|
|
|
195
195
|
'page.booking.text.please-choose-an-option-1': string;
|
|
196
196
|
'page.booking.text.please-choose-an-option-2': string;
|
|
197
197
|
'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
|
|
198
|
-
'pisell2.booking.dashboard.groups-on-site-now': string;
|
|
199
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': string;
|
|
200
|
-
'pisell2.booking.dashboard.people-on-site-now': string;
|
|
201
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': string;
|
|
202
|
-
'pisell2.booking.dashboard.total-visitors-today': string;
|
|
203
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': string;
|
|
204
|
-
'pisell2.booking.dashboard.ongoing-visitors': string;
|
|
205
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': string;
|
|
206
|
-
'pisell2.booking.dashboard.upcoming-visitors': string;
|
|
207
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': string;
|
|
208
|
-
'pisell2.booking.dashboard.overdue-visitors': string;
|
|
209
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': string;
|
|
210
|
-
'pisell2.booking.dashboard.completed-visitors': string;
|
|
211
|
-
'pisell2.booking.dashboard.completed-visitors-tip': string;
|
|
212
|
-
'pisell2.booking.dashboard.departed-visitors': string;
|
|
213
|
-
'pisell2.booking.dashboard.departed-visitors-tip': string;
|
|
214
198
|
};
|
|
215
199
|
'zh-CN': {
|
|
216
200
|
'pisell2.text.refunded-amount': string;
|
|
@@ -408,22 +392,6 @@ declare const _default: {
|
|
|
408
392
|
'page.booking.text.please-choose-an-option-1': string;
|
|
409
393
|
'page.booking.text.please-choose-an-option-2': string;
|
|
410
394
|
'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
|
|
411
|
-
'pisell2.booking.dashboard.groups-on-site-now': string;
|
|
412
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': string;
|
|
413
|
-
'pisell2.booking.dashboard.people-on-site-now': string;
|
|
414
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': string;
|
|
415
|
-
'pisell2.booking.dashboard.total-visitors-today': string;
|
|
416
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': string;
|
|
417
|
-
'pisell2.booking.dashboard.ongoing-visitors': string;
|
|
418
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': string;
|
|
419
|
-
'pisell2.booking.dashboard.upcoming-visitors': string;
|
|
420
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': string;
|
|
421
|
-
'pisell2.booking.dashboard.overdue-visitors': string;
|
|
422
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': string;
|
|
423
|
-
'pisell2.booking.dashboard.completed-visitors': string;
|
|
424
|
-
'pisell2.booking.dashboard.completed-visitors-tip': string;
|
|
425
|
-
'pisell2.booking.dashboard.departed-visitors': string;
|
|
426
|
-
'pisell2.booking.dashboard.departed-visitors-tip': string;
|
|
427
395
|
};
|
|
428
396
|
'zh-HK': {
|
|
429
397
|
'pisell2.text.refunded-amount': string;
|
|
@@ -621,22 +589,6 @@ declare const _default: {
|
|
|
621
589
|
'page.booking.text.please-choose-an-option-1': string;
|
|
622
590
|
'page.booking.text.please-choose-an-option-2': string;
|
|
623
591
|
'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
|
|
624
|
-
'pisell2.booking.dashboard.groups-on-site-now': string;
|
|
625
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': string;
|
|
626
|
-
'pisell2.booking.dashboard.people-on-site-now': string;
|
|
627
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': string;
|
|
628
|
-
'pisell2.booking.dashboard.total-visitors-today': string;
|
|
629
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': string;
|
|
630
|
-
'pisell2.booking.dashboard.ongoing-visitors': string;
|
|
631
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': string;
|
|
632
|
-
'pisell2.booking.dashboard.upcoming-visitors': string;
|
|
633
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': string;
|
|
634
|
-
'pisell2.booking.dashboard.overdue-visitors': string;
|
|
635
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': string;
|
|
636
|
-
'pisell2.booking.dashboard.completed-visitors': string;
|
|
637
|
-
'pisell2.booking.dashboard.completed-visitors-tip': string;
|
|
638
|
-
'pisell2.booking.dashboard.departed-visitors': string;
|
|
639
|
-
'pisell2.booking.dashboard.departed-visitors-tip': string;
|
|
640
592
|
};
|
|
641
593
|
};
|
|
642
594
|
export default _default;
|
|
@@ -225,23 +225,7 @@ export default {
|
|
|
225
225
|
'page.booking.text.please-choose-an-option-2': "Cancel only: Cancel the appointment without processing a refund. (You can still process a refund after cancellation if needed)",
|
|
226
226
|
'page.booking.text.resource.min-length-error': function pageBookingTextResourceMinLengthError(x, y) {
|
|
227
227
|
return "Select at least ".concat(x, " ").concat(y);
|
|
228
|
-
}
|
|
229
|
-
'pisell2.booking.dashboard.groups-on-site-now': "Groups on-site now",
|
|
230
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': "Tip: Total number of groups who have checked in and are currently on-site",
|
|
231
|
-
'pisell2.booking.dashboard.people-on-site-now': "People on-site now",
|
|
232
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': "Tip: Total number of people who have checked in and are currently on-site",
|
|
233
|
-
'pisell2.booking.dashboard.total-visitors-today': "Total visitors today",
|
|
234
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': "Tip: Total number of visitors today, regardless of check-in status",
|
|
235
|
-
'pisell2.booking.dashboard.ongoing-visitors': "Ongoing visitors",
|
|
236
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': "Tip: Total number of visitors who have passed the start time, regardless of check-in status",
|
|
237
|
-
'pisell2.booking.dashboard.upcoming-visitors': "Upcoming visitors",
|
|
238
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': "Tip: Total number of visitors expected to arrive in the near future",
|
|
239
|
-
'pisell2.booking.dashboard.overdue-visitors': "Overdue visitors",
|
|
240
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': "Tip: Total number of visitors whose playtime has expired but have not yet left the venue",
|
|
241
|
-
'pisell2.booking.dashboard.completed-visitors': "Completed visitors",
|
|
242
|
-
'pisell2.booking.dashboard.completed-visitors-tip': "Tip: Total number of visitors whose playtime has ended, regardless of whether they have left the venue",
|
|
243
|
-
'pisell2.booking.dashboard.departed-visitors': "Departed visitors",
|
|
244
|
-
'pisell2.booking.dashboard.departed-visitors-tip': "Tip: Total number of visitors who checked in and have left the venue today"
|
|
228
|
+
}
|
|
245
229
|
},
|
|
246
230
|
'zh-CN': {
|
|
247
231
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -473,23 +457,7 @@ export default {
|
|
|
473
457
|
'page.booking.text.please-choose-an-option-2': "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)",
|
|
474
458
|
'page.booking.text.resource.min-length-error': function pageBookingTextResourceMinLengthError(x, y) {
|
|
475
459
|
return "\u81F3\u5C11\u9009\u62E9".concat(x, "\u9879").concat(y);
|
|
476
|
-
}
|
|
477
|
-
'pisell2.booking.dashboard.groups-on-site-now': "当前在场团体",
|
|
478
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': "提示:已检票并在场内的团体总数",
|
|
479
|
-
'pisell2.booking.dashboard.people-on-site-now': "当前在场人数",
|
|
480
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': "提示:已检票并在场内的总人数",
|
|
481
|
-
'pisell2.booking.dashboard.total-visitors-today': "今日游客总数",
|
|
482
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': "提示:今日的游客总人数,无论是否检票入场",
|
|
483
|
-
'pisell2.booking.dashboard.ongoing-visitors': "进行中的游客",
|
|
484
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': "提示:已过开始时间的游客总数,无论是否检票",
|
|
485
|
-
'pisell2.booking.dashboard.upcoming-visitors': "即将到达的游客",
|
|
486
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': "提示:预计将在未来到场的游客总人数",
|
|
487
|
-
'pisell2.booking.dashboard.overdue-visitors': "超时的游客",
|
|
488
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': "提示:游玩时间已过,但尚未离场的游客总人数",
|
|
489
|
-
'pisell2.booking.dashboard.completed-visitors': "已完成的游客",
|
|
490
|
-
'pisell2.booking.dashboard.completed-visitors-tip': "提示:游玩时长已结束的游客总人数,无论是否离场",
|
|
491
|
-
'pisell2.booking.dashboard.departed-visitors': "已离场的游客",
|
|
492
|
-
'pisell2.booking.dashboard.departed-visitors-tip': "提示:今日已检票并离场的游客总人数"
|
|
460
|
+
}
|
|
493
461
|
},
|
|
494
462
|
'zh-HK': {
|
|
495
463
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -721,22 +689,6 @@ export default {
|
|
|
721
689
|
'page.booking.text.please-choose-an-option-2': '僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)',
|
|
722
690
|
'page.booking.text.resource.min-length-error': function pageBookingTextResourceMinLengthError(x, y) {
|
|
723
691
|
return "\u81F3\u5C11\u9078\u64C7".concat(x, "\u9805").concat(y);
|
|
724
|
-
}
|
|
725
|
-
'pisell2.booking.dashboard.groups-on-site-now': "當前在場團體",
|
|
726
|
-
'pisell2.booking.dashboard.groups-on-site-now-tip': "提示:已檢票並在場內的團體總數",
|
|
727
|
-
'pisell2.booking.dashboard.people-on-site-now': "當前在場人數",
|
|
728
|
-
'pisell2.booking.dashboard.people-on-site-now-tip': "提示:已檢票並在場內的總人數",
|
|
729
|
-
'pisell2.booking.dashboard.total-visitors-today': "今日遊客總數",
|
|
730
|
-
'pisell2.booking.dashboard.total-visitors-today-tip': "提示:今日的遊客總人數,無論是否檢票入場",
|
|
731
|
-
'pisell2.booking.dashboard.ongoing-visitors': "進行中的遊客",
|
|
732
|
-
'pisell2.booking.dashboard.ongoing-visitors-tip': "提示:已過開始時間的遊客總數,無論是否檢票",
|
|
733
|
-
'pisell2.booking.dashboard.upcoming-visitors': "即將到達的遊客",
|
|
734
|
-
'pisell2.booking.dashboard.upcoming-visitors-tip': "提示:預計將在未來到場的遊客總人數",
|
|
735
|
-
'pisell2.booking.dashboard.overdue-visitors': "超時的遊客",
|
|
736
|
-
'pisell2.booking.dashboard.overdue-visitors-tip': "提示:遊玩時間已過,但尚未離場的遊客總人數",
|
|
737
|
-
'pisell2.booking.dashboard.completed-visitors': "已完成的遊客",
|
|
738
|
-
'pisell2.booking.dashboard.completed-visitors-tip': "提示:遊玩時長已結束的遊客總人數,無論是否離場",
|
|
739
|
-
'pisell2.booking.dashboard.departed-visitors': "已離場的遊客",
|
|
740
|
-
'pisell2.booking.dashboard.departed-visitors-tip': "提示:今日已檢票並離場的遊客總人數"
|
|
692
|
+
}
|
|
741
693
|
}
|
|
742
694
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -62,7 +62,7 @@ export declare const getServeStartTime: (start_time: string) => string;
|
|
|
62
62
|
* @Date: 2024-04-26 14:04
|
|
63
63
|
*/
|
|
64
64
|
export declare const getServiceTime: (item: any, currentDate: any) => string;
|
|
65
|
-
export declare const findNextSlice: ({ timeSlices, index, date
|
|
65
|
+
export declare const findNextSlice: ({ timeSlices, index, date }: {
|
|
66
66
|
timeSlices: any[];
|
|
67
67
|
index?: number | undefined;
|
|
68
68
|
date?: string | undefined;
|
|
@@ -14,7 +14,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
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); }
|
|
16
16
|
import dayjs from 'dayjs';
|
|
17
|
-
import { locales } from
|
|
17
|
+
import { locales } from "@pisell/utils";
|
|
18
18
|
import { intersectionBy } from 'lodash';
|
|
19
19
|
var Request = /*#__PURE__*/function () {
|
|
20
20
|
function Request() {
|
|
@@ -38,7 +38,7 @@ export var request = new Request();
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* @title: 格式化持续时长用于展示
|
|
41
|
-
* @description:
|
|
41
|
+
* @description:
|
|
42
42
|
* @param {number} service_times
|
|
43
43
|
* @return {*}
|
|
44
44
|
* @Author: zhiwei.Wang
|
|
@@ -46,12 +46,12 @@ export var request = new Request();
|
|
|
46
46
|
*/
|
|
47
47
|
export var getDiscountTime = function getDiscountTime(service_times) {
|
|
48
48
|
if (!service_times) {
|
|
49
|
-
return
|
|
49
|
+
return "";
|
|
50
50
|
}
|
|
51
51
|
if (service_times < 60) {
|
|
52
52
|
return "".concat(service_times, " ").concat(locales.getText('pisell2.text.min'));
|
|
53
53
|
} else {
|
|
54
|
-
var str =
|
|
54
|
+
var str = "";
|
|
55
55
|
var hours = Math.floor(service_times / 60);
|
|
56
56
|
var minutes = service_times % 60;
|
|
57
57
|
str += "".concat(hours).concat(locales.getText('pisell2.text.h'));
|
|
@@ -64,7 +64,7 @@ export var getDiscountTime = function getDiscountTime(service_times) {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* @title: 时间切片
|
|
67
|
-
* @description:
|
|
67
|
+
* @description:
|
|
68
68
|
* @param {any} config
|
|
69
69
|
* @param {string} locale
|
|
70
70
|
* @return {*}
|
|
@@ -75,22 +75,22 @@ export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, lo
|
|
|
75
75
|
var _locale = locale;
|
|
76
76
|
var dayjsLocale = _locale === 'en-US' || _locale === 'en' ? 'en' : 'zh-cn';
|
|
77
77
|
dayjs.locale(dayjsLocale);
|
|
78
|
-
var startTime = dayjs().startOf(
|
|
79
|
-
var endTime = dayjs().endOf(
|
|
78
|
+
var startTime = dayjs().startOf("day");
|
|
79
|
+
var endTime = dayjs().endOf("day");
|
|
80
80
|
var timeSlice = (config === null || config === void 0 ? void 0 : config.value) || 5; // 切片时间间隔(分钟)
|
|
81
81
|
|
|
82
82
|
var timeSlices = [];
|
|
83
83
|
var durationSlicesBasedOnTime = [];
|
|
84
84
|
var currentTime = startTime;
|
|
85
85
|
while (currentTime.isBefore(endTime)) {
|
|
86
|
-
var timeLabel = currentTime.format(
|
|
87
|
-
var timeValue = currentTime.format(
|
|
86
|
+
var timeLabel = currentTime.format("hh:mm A");
|
|
87
|
+
var timeValue = currentTime.format("HH:mm");
|
|
88
88
|
timeSlices.push({
|
|
89
89
|
label: timeLabel,
|
|
90
90
|
value: timeValue
|
|
91
91
|
});
|
|
92
|
-
var nextTime = currentTime.add(timeSlice,
|
|
93
|
-
var durationValue = nextTime.diff(startTime,
|
|
92
|
+
var nextTime = currentTime.add(timeSlice, "minute");
|
|
93
|
+
var durationValue = nextTime.diff(startTime, "minute");
|
|
94
94
|
if (durationValue > 60) {
|
|
95
95
|
var durationLabel = getDiscountTime(durationValue);
|
|
96
96
|
durationSlicesBasedOnTime.push({
|
|
@@ -114,7 +114,7 @@ export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, lo
|
|
|
114
114
|
|
|
115
115
|
// 获取当前时间
|
|
116
116
|
export var getNowTime = function getNowTime() {
|
|
117
|
-
return dayjs().format(
|
|
117
|
+
return dayjs().format("HH:mm");
|
|
118
118
|
};
|
|
119
119
|
export var isNowTime = function isNowTime(time) {
|
|
120
120
|
return time === 'now';
|
|
@@ -122,7 +122,7 @@ export var isNowTime = function isNowTime(time) {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* @title: 获取服务的开始时间, 如果是now 转换为当前的时间
|
|
125
|
-
* @description:
|
|
125
|
+
* @description:
|
|
126
126
|
* @param {string} start_time
|
|
127
127
|
* @return {*}
|
|
128
128
|
* @Author: zhiwei.Wang
|
|
@@ -137,7 +137,7 @@ export var getServeStartTime = function getServeStartTime(start_time) {
|
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
140
|
-
* @description:
|
|
140
|
+
* @description:
|
|
141
141
|
* @param {any} item
|
|
142
142
|
* @param {any} currentDate
|
|
143
143
|
* @return {*}
|
|
@@ -146,8 +146,8 @@ export var getServeStartTime = function getServeStartTime(start_time) {
|
|
|
146
146
|
*/
|
|
147
147
|
export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
148
148
|
var startDate = dayjs(currentDate.format('YYYY-MM-DD') + ' ' + getServeStartTime(item._extend.start_time));
|
|
149
|
-
var startTime = startDate.format(
|
|
150
|
-
var endTime = startDate.add(flexibleObj.getValue(item._extend.duration),
|
|
149
|
+
var startTime = startDate.format("HH:mm");
|
|
150
|
+
var endTime = startDate.add(flexibleObj.getValue(item._extend.duration), "minute").format("HH:mm");
|
|
151
151
|
var duration = getDiscountTime(flexibleObj.getValue(item._extend.duration));
|
|
152
152
|
return "".concat(startTime, " - ").concat(endTime, " ( ").concat(duration, " )");
|
|
153
153
|
};
|
|
@@ -203,17 +203,17 @@ export var formatProductListByCategory = function formatProductListByCategory(li
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
} else {
|
|
206
|
-
if (!categoryObject[
|
|
207
|
-
categoryObject[
|
|
206
|
+
if (!categoryObject["other"]) {
|
|
207
|
+
categoryObject["other"] = {
|
|
208
208
|
id: 0,
|
|
209
209
|
title: locales.getText('pisell2.text.other'),
|
|
210
210
|
name: locales.getText('pisell2.text.other'),
|
|
211
|
-
cover:
|
|
211
|
+
cover: "",
|
|
212
212
|
products: []
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
categoryObject[
|
|
216
|
-
products: [].concat(_toConsumableArray(categoryObject[
|
|
215
|
+
categoryObject["other"] = _objectSpread(_objectSpread({}, categoryObject["other"]), {}, {
|
|
216
|
+
products: [].concat(_toConsumableArray(categoryObject["other"].products), [productItem])
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -222,7 +222,7 @@ export var formatProductListByCategory = function formatProductListByCategory(li
|
|
|
222
222
|
});
|
|
223
223
|
};
|
|
224
224
|
export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cacheItem) {
|
|
225
|
-
var startDate = dayjs(cacheItem._extend.start_date.format(
|
|
225
|
+
var startDate = dayjs(cacheItem._extend.start_date.format("YYYY-MM-DD") + ' ' + getServeStartTime(cacheItem._extend.start_time));
|
|
226
226
|
var isFlexible = flexibleObj.isFlexible(cacheItem._extend.duration);
|
|
227
227
|
|
|
228
228
|
// 是否在最大预约数量的区间内
|
|
@@ -236,10 +236,10 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
236
236
|
isMaxLimitRange = true;
|
|
237
237
|
} else {
|
|
238
238
|
// unknown 为 未知的, 需要掉接口确认是否可用
|
|
239
|
-
isMaxLimitRange =
|
|
239
|
+
isMaxLimitRange = "unknown";
|
|
240
240
|
}
|
|
241
|
-
var timeStartDate = dayjs(time.start_date +
|
|
242
|
-
var timeEndDate = dayjs(time.end_date +
|
|
241
|
+
var timeStartDate = dayjs(time.start_date + " " + time.start_time).subtract(1, "second");
|
|
242
|
+
var timeEndDate = dayjs(time.end_date + " " + time.end_time).add(1, "second");
|
|
243
243
|
var bol;
|
|
244
244
|
|
|
245
245
|
// 灵活时长的 只判断开始时间是否在范围内
|
|
@@ -247,7 +247,7 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
247
247
|
bol = startDate.isAfter(timeStartDate) && startDate.isBefore(timeEndDate);
|
|
248
248
|
} else {
|
|
249
249
|
// 其余判断 开始时间 和 结束时间 是否都在范围内
|
|
250
|
-
var endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration),
|
|
250
|
+
var endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration), "minute");
|
|
251
251
|
bol = startDate.isAfter(timeStartDate) && endDate.isBefore(timeEndDate);
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -291,8 +291,8 @@ export var formatTimes = function formatTimes(resourceItem, cacheItem) {
|
|
|
291
291
|
|
|
292
292
|
// 获取第一个最佳的time
|
|
293
293
|
var _time = (usableTimes || []).sort(function (a, b) {
|
|
294
|
-
var aEndDate = dayjs(a.end_date +
|
|
295
|
-
var bEndDate = dayjs(b.end_date +
|
|
294
|
+
var aEndDate = dayjs(a.end_date + " " + a.end_time).valueOf();
|
|
295
|
+
var bEndDate = dayjs(b.end_date + " " + b.end_time).valueOf();
|
|
296
296
|
return aEndDate - bEndDate;
|
|
297
297
|
})[0];
|
|
298
298
|
resourceItem._extend = _objectSpread(_objectSpread({}, resourceItem._extend), {}, {
|
|
@@ -317,21 +317,21 @@ var formatResourceProducts = function formatResourceProducts(resourceItem, curre
|
|
|
317
317
|
var type = _resourceItem.partyroom_package.type;
|
|
318
318
|
|
|
319
319
|
// 全部商品
|
|
320
|
-
if (type ===
|
|
320
|
+
if (type === "product_all") {
|
|
321
321
|
usableProduct = true;
|
|
322
322
|
} else {
|
|
323
|
-
if (type ===
|
|
323
|
+
if (type === "product_collection") {
|
|
324
324
|
var _resourceItem$partyro;
|
|
325
325
|
// 取交集 intersectionBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); // => [{ 'x': 2 }]
|
|
326
326
|
usableProduct = !!intersectionBy(((_resourceItem$partyro = _resourceItem.partyroom_package) === null || _resourceItem$partyro === void 0 ? void 0 : _resourceItem$partyro.products.map(function (item) {
|
|
327
327
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
328
328
|
id: item.product_collection_id
|
|
329
329
|
});
|
|
330
|
-
})) || [], currentItem.collection || [],
|
|
330
|
+
})) || [], currentItem.collection || [], "id").length;
|
|
331
331
|
} else {
|
|
332
332
|
usableProduct = _resourceItem.partyroom_package.products.some(function (item) {
|
|
333
333
|
// 判断商品
|
|
334
|
-
if (type ===
|
|
334
|
+
if (type === "products") {
|
|
335
335
|
if (item.product_id == currentItem.product_id) {
|
|
336
336
|
return true;
|
|
337
337
|
}
|
|
@@ -348,7 +348,7 @@ var formatResourceProducts = function formatResourceProducts(resourceItem, curre
|
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
350
|
* @title: 获取店铺的营业结束时间
|
|
351
|
-
* @description:
|
|
351
|
+
* @description:
|
|
352
352
|
* @return {*}
|
|
353
353
|
* @Author: zhiwei.Wang
|
|
354
354
|
* @Date: 2024-02-23 10:00
|
|
@@ -359,7 +359,7 @@ export var getShopOpeningHours = function getShopOpeningHours() {
|
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* @title: 对灵活时长进行处理
|
|
362
|
-
* @description:
|
|
362
|
+
* @description:
|
|
363
363
|
* @return {*}
|
|
364
364
|
* @Author: zhiwei.Wang
|
|
365
365
|
* @Date: 2024-02-23 10:00
|
|
@@ -405,7 +405,7 @@ export var flexibleObj = {
|
|
|
405
405
|
export var getEndDate = function getEndDate(startDate, duration, endDate) {
|
|
406
406
|
if (duration === 'flexible') {
|
|
407
407
|
// 店铺营业结束时间
|
|
408
|
-
var openingDate = dayjs(startDate.format(
|
|
408
|
+
var openingDate = dayjs(startDate.format("YYYY-MM-DD") + ' ' + getShopOpeningHours());
|
|
409
409
|
|
|
410
410
|
// 如果选择的开始时间 > 店铺的营业时间, 店铺营业时间向后推一天
|
|
411
411
|
if (dayjs(startDate).isAfter(openingDate)) {
|
|
@@ -421,14 +421,14 @@ export var getEndDate = function getEndDate(startDate, duration, endDate) {
|
|
|
421
421
|
}
|
|
422
422
|
return endDate;
|
|
423
423
|
}
|
|
424
|
-
return startDate.add(duration,
|
|
424
|
+
return startDate.add(duration, "minute");
|
|
425
425
|
};
|
|
426
426
|
|
|
427
427
|
// export const get
|
|
428
428
|
|
|
429
429
|
export var getServiceTimes = function getServiceTimes(service) {
|
|
430
|
-
var startDate = dayjs(dayjs(service._extend.start_date).format(
|
|
431
|
-
var endDate = startDate.add(flexibleObj.getValue(service._extend.duration),
|
|
430
|
+
var startDate = dayjs(dayjs(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time));
|
|
431
|
+
var endDate = startDate.add(flexibleObj.getValue(service._extend.duration), "minute");
|
|
432
432
|
return {
|
|
433
433
|
startDate: startDate,
|
|
434
434
|
endDate: endDate
|
|
@@ -438,7 +438,7 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
|
|
|
438
438
|
if (!(cacheItem !== null && cacheItem !== void 0 && cacheItem.id)) {
|
|
439
439
|
return [{
|
|
440
440
|
label: locales.getText('pisell2.text.no-product-added'),
|
|
441
|
-
type:
|
|
441
|
+
type: "products"
|
|
442
442
|
}];
|
|
443
443
|
}
|
|
444
444
|
if (!resource || !resource._extend || !cacheItem) {
|
|
@@ -452,29 +452,29 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
|
|
|
452
452
|
if (!(resource !== null && resource !== void 0 && (_resource$_extend = resource._extend) !== null && _resource$_extend !== void 0 && _resource$_extend.usableProduct)) {
|
|
453
453
|
list.push({
|
|
454
454
|
label: locales.getText('pisell1.text.resource-error-message-1')(resource.labelText, cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.title),
|
|
455
|
-
type:
|
|
455
|
+
type: "product"
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
var _getServiceTimes = getServiceTimes(cacheItem),
|
|
459
459
|
startDate = _getServiceTimes.startDate,
|
|
460
460
|
endDate = _getServiceTimes.endDate;
|
|
461
461
|
// 如果跨天 结束时间前面加一个明天
|
|
462
|
-
var startText = startDate.format(
|
|
463
|
-
var endText = endDate.format(
|
|
464
|
-
if (dayjs(endDate).isAfter(startDate,
|
|
462
|
+
var startText = startDate.format("hh:mm A");
|
|
463
|
+
var endText = endDate.format("hh:mm A");
|
|
464
|
+
if (dayjs(endDate).isAfter(startDate, "day")) {
|
|
465
465
|
endText = locales.getText('pisell1.text.tomorrow') + endText;
|
|
466
466
|
}
|
|
467
467
|
if (!((_resource$_extend2 = resource._extend) !== null && _resource$_extend2 !== void 0 && _resource$_extend2.usableTime)) {
|
|
468
468
|
list.push({
|
|
469
469
|
label: locales.getText('pisell1.text.resource-error-message-2')(resource.labelText, startText, endText),
|
|
470
|
-
type:
|
|
470
|
+
type: "time"
|
|
471
471
|
});
|
|
472
472
|
} else {
|
|
473
473
|
var _resource$_extend3;
|
|
474
474
|
if (!((_resource$_extend3 = resource._extend) !== null && _resource$_extend3 !== void 0 && _resource$_extend3.usableTime._extend.isMaxLimitRange)) {
|
|
475
475
|
list.push({
|
|
476
476
|
label: locales.getText('pisell1.text.resource-error-message-3')(resource.labelText, startText, endText),
|
|
477
|
-
type:
|
|
477
|
+
type: "limit"
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}
|
|
@@ -526,7 +526,7 @@ export var deleteCacheParams = function deleteCacheParams() {
|
|
|
526
526
|
|
|
527
527
|
/**
|
|
528
528
|
* @title: 创建一个服务商品
|
|
529
|
-
* @description:
|
|
529
|
+
* @description:
|
|
530
530
|
* @param {any} state
|
|
531
531
|
* @param {any} item
|
|
532
532
|
* @return {*}
|
|
@@ -555,10 +555,10 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
555
555
|
var lastServerStartDate = lastServer._extend.startDate;
|
|
556
556
|
var lastServerEndDate = lastServer._extend.endDate;
|
|
557
557
|
// 如果上个服务商品的结束时间跨天, 那么设置为最后一个时间段, 不跨天则取上一个的结束时间
|
|
558
|
-
if (dayjs(lastServerEndDate).isAfter(lastServerStartDate,
|
|
558
|
+
if (dayjs(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
|
559
559
|
_extend.start_time = timeObj.timeSlices[timeObj.timeSlices.length - 1].value;
|
|
560
560
|
} else {
|
|
561
|
-
_extend.start_time = lastServerEndDate.format(
|
|
561
|
+
_extend.start_time = lastServerEndDate.format("HH:mm");
|
|
562
562
|
}
|
|
563
563
|
} else {
|
|
564
564
|
// 没有上一个商品 资源为 0
|
|
@@ -584,17 +584,14 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
584
584
|
_extend.resource = resourceId;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
+
console.log("_extend", findNextSliceProps);
|
|
587
588
|
|
|
588
589
|
// 只有选择了带 HH:mm的日期才选中, 否则使用当前日期
|
|
589
590
|
if (findNextSliceProps.date && findNextSliceProps.date !== '00:00') {
|
|
590
591
|
_extend.start_time = findNextSlice(findNextSliceProps);
|
|
591
592
|
} else {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
} else {
|
|
595
|
-
// 没有预设日期, 则使用当前 https://www.yuque.com/feg4xm/manual/tzvrnt05ifihkndg
|
|
596
|
-
_extend.start_time = dayjs().format('HH:mm');
|
|
597
|
-
}
|
|
593
|
+
// 没有预设日期, 则使用当前 https://www.yuque.com/feg4xm/manual/tzvrnt05ifihkndg
|
|
594
|
+
_extend.start_time = dayjs().format('HH:mm');
|
|
598
595
|
}
|
|
599
596
|
}
|
|
600
597
|
_extend = _objectSpread(_objectSpread({}, _extend), cacheItem._extend);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,7 +68,7 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
73
72
|
state: FormState;
|
|
74
73
|
} & {
|
|
75
74
|
dispatch: (params: {
|
|
@@ -4,17 +4,17 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { Modal } from
|
|
8
|
-
import { forwardRef, useImperativeHandle, useRef, useState } from
|
|
7
|
+
import { Modal } from 'antd';
|
|
8
|
+
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
9
9
|
import useComponents from "../../../../hooks/useComponents";
|
|
10
10
|
var ResourcesAdd = function ResourcesAdd(_ref, refs) {
|
|
11
11
|
var onSuccess = _ref.onSuccess;
|
|
12
|
-
var
|
|
12
|
+
var formDataNewRef = useRef();
|
|
13
13
|
var _useComponents = useComponents({
|
|
14
|
-
components: [
|
|
14
|
+
components: ['FormDataNew']
|
|
15
15
|
}),
|
|
16
16
|
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
17
|
-
|
|
17
|
+
FormDataNew = _useComponents2[0];
|
|
18
18
|
var _useState = useState(false),
|
|
19
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
20
|
open = _useState2[0],
|
|
@@ -38,8 +38,8 @@ var ResourcesAdd = function ResourcesAdd(_ref, refs) {
|
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
40
|
var onSubmit = function onSubmit() {
|
|
41
|
-
var
|
|
42
|
-
(
|
|
41
|
+
var _formDataNewRef$curre;
|
|
42
|
+
(_formDataNewRef$curre = formDataNewRef.current) === null || _formDataNewRef$curre === void 0 ? void 0 : _formDataNewRef$curre.submit();
|
|
43
43
|
};
|
|
44
44
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
45
45
|
open: open,
|
|
@@ -47,9 +47,9 @@ var ResourcesAdd = function ResourcesAdd(_ref, refs) {
|
|
|
47
47
|
onCancel: onClose,
|
|
48
48
|
onOk: onSubmit,
|
|
49
49
|
destroyOnClose: true
|
|
50
|
-
},
|
|
50
|
+
}, FormDataNew && /*#__PURE__*/React.createElement(FormDataNew, {
|
|
51
51
|
formId: formId,
|
|
52
|
-
ref:
|
|
52
|
+
ref: formDataNewRef,
|
|
53
53
|
formChange: function formChange(isSuccess, params) {
|
|
54
54
|
if (isSuccess) {
|
|
55
55
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(params);
|