@pisell/pisellos 2.1.92 → 2.1.94
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/dist/modules/Product/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.js +5 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.js +3 -1
- package/package.json +1 -1
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -357,7 +357,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
357
357
|
};
|
|
358
358
|
setOtherData(key: string, value: any): void;
|
|
359
359
|
getOtherData(key: string): any;
|
|
360
|
-
getProductTypeById(id: number): Promise<"
|
|
360
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
361
361
|
/**
|
|
362
362
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
363
363
|
*
|
|
@@ -2566,8 +2566,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2566
2566
|
_step3;
|
|
2567
2567
|
try {
|
|
2568
2568
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
2569
|
+
var _time$event_list;
|
|
2569
2570
|
var time = _step3.value;
|
|
2570
|
-
var
|
|
2571
|
+
var blockedTimes = (_time$event_list = time.event_list) === null || _time$event_list === void 0 ? void 0 : _time$event_list.filter(function (event) {
|
|
2572
|
+
return event.type !== 'schedule_event';
|
|
2573
|
+
});
|
|
2574
|
+
var _iterator4 = _createForOfIteratorHelper(blockedTimes || []),
|
|
2571
2575
|
_step4;
|
|
2572
2576
|
try {
|
|
2573
2577
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -357,7 +357,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
357
357
|
};
|
|
358
358
|
setOtherData(key: string, value: any): void;
|
|
359
359
|
getOtherData(key: string): any;
|
|
360
|
-
getProductTypeById(id: number): Promise<"
|
|
360
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
361
361
|
/**
|
|
362
362
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
363
363
|
*
|
|
@@ -1774,10 +1774,12 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1774
1774
|
currentStartTime: currentStartTime2,
|
|
1775
1775
|
times
|
|
1776
1776
|
}) {
|
|
1777
|
+
var _a4;
|
|
1777
1778
|
const currentStart = (0, import_dayjs.default)(currentStartTime2);
|
|
1778
1779
|
let earliestBlockStart;
|
|
1779
1780
|
for (const time of times || []) {
|
|
1780
|
-
|
|
1781
|
+
const blockedTimes = (_a4 = time.event_list) == null ? void 0 : _a4.filter((event) => event.type !== "schedule_event");
|
|
1782
|
+
for (const event of blockedTimes || []) {
|
|
1781
1783
|
const eventStart = (0, import_dayjs.default)(event.start_at);
|
|
1782
1784
|
const eventEnd = (0, import_dayjs.default)(event.end_at);
|
|
1783
1785
|
if (eventStart.isBefore(currentStart) && eventEnd.isAfter(currentStart)) {
|