@pisell/pisellos 2.2.298 → 2.2.299
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/ResourcePlanner/planner.js +9 -3
- package/dist/modules/ResourcePlanner/types.d.ts +2 -0
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +1 -46
- package/lib/modules/ResourcePlanner/planner.js +4 -0
- package/lib/modules/ResourcePlanner/types.d.ts +2 -0
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1060,6 +1060,9 @@ export function getProductTimeRanges(projection) {
|
|
|
1060
1060
|
return group.required !== false;
|
|
1061
1061
|
});
|
|
1062
1062
|
var operatingRanges = buildOperatingRanges(projection, dateRange);
|
|
1063
|
+
var operatingEndAt = dateRange.startDate === dateRange.endDate && operatingRanges.length > 0 ? formatDateTime(Math.max.apply(Math, _toConsumableArray(operatingRanges.map(function (range) {
|
|
1064
|
+
return range.end;
|
|
1065
|
+
}))), projection.meta.timezone, fixedOffsetMinutes) : undefined;
|
|
1063
1066
|
var resourceRanges = requiredGroups.length ? requiredGroups.map(function (group) {
|
|
1064
1067
|
return buildGroupWorkingRanges({
|
|
1065
1068
|
projection: projection,
|
|
@@ -1127,13 +1130,16 @@ export function getProductTimeRanges(projection) {
|
|
|
1127
1130
|
ranges.push(createDurationTimeRange(product, start, durationMinutes, projection, fixedOffsetMinutes));
|
|
1128
1131
|
});
|
|
1129
1132
|
}
|
|
1130
|
-
return {
|
|
1133
|
+
return _objectSpread(_objectSpread({
|
|
1131
1134
|
productId: product.id,
|
|
1132
1135
|
title: product.title,
|
|
1133
1136
|
kind: product.kind,
|
|
1134
|
-
slotStepMinutes: slotStepMinutes
|
|
1137
|
+
slotStepMinutes: slotStepMinutes
|
|
1138
|
+
}, operatingEndAt ? {
|
|
1139
|
+
operatingEndAt: operatingEndAt
|
|
1140
|
+
} : {}), {}, {
|
|
1135
1141
|
ranges: dedupeProductRanges(ranges)
|
|
1136
|
-
};
|
|
1142
|
+
});
|
|
1137
1143
|
});
|
|
1138
1144
|
}
|
|
1139
1145
|
function aggregateMatchedCells(productId, requirementGroupId, resourceId, candidateRange, indexedCells) {
|
|
@@ -213,6 +213,8 @@ export interface ProductTimeRangeGroup {
|
|
|
213
213
|
title?: string;
|
|
214
214
|
kind: AvailabilityProductKind;
|
|
215
215
|
slotStepMinutes?: number;
|
|
216
|
+
/** 单日查询对应营业窗口的最终结束时刻,不受资源排班是否为空影响。 */
|
|
217
|
+
operatingEndAt?: string;
|
|
216
218
|
ranges: ProductTimeRange[];
|
|
217
219
|
}
|
|
218
220
|
export interface AvailabilityAssignment extends AvailabilityAbsoluteRange {
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 2 |
|
|
329
|
+
weekNum: 0 | 2 | 3 | 1 | 5 | 6 | 4;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BUY_X_GET_Y_FREE_STRATEGY", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _examples.BUY_X_GET_Y_FREE_STRATEGY;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ITEM_REWARD_STRATEGY", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _examples.ITEM_REWARD_STRATEGY;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "PromotionAdapter", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _adapter.PromotionAdapter;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "PromotionEvaluator", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _evaluator.PromotionEvaluator;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "X_ITEMS_FOR_Y_PRICE_STRATEGY", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _examples.X_ITEMS_FOR_Y_PRICE_STRATEGY;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "default", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _adapter.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
var _evaluator = require("./evaluator");
|
|
43
|
-
var _adapter = _interopRequireWildcard(require("./adapter"));
|
|
44
|
-
var _examples = require("./examples");
|
|
45
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
46
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
1
|
+
"use strict";
|
|
@@ -950,6 +950,7 @@ function getProductTimeRanges(projection, request = {}, runtimeOptions = {}) {
|
|
|
950
950
|
}
|
|
951
951
|
const requiredGroups = (product.requirementGroups || []).filter(group => group.required !== false);
|
|
952
952
|
const operatingRanges = buildOperatingRanges(projection, dateRange);
|
|
953
|
+
const operatingEndAt = dateRange.startDate === dateRange.endDate && operatingRanges.length > 0 ? formatDateTime(Math.max(...operatingRanges.map(range => range.end)), projection.meta.timezone, fixedOffsetMinutes) : undefined;
|
|
953
954
|
const resourceRanges = requiredGroups.length ? requiredGroups.map(group => buildGroupWorkingRanges({
|
|
954
955
|
projection,
|
|
955
956
|
product,
|
|
@@ -1016,6 +1017,9 @@ function getProductTimeRanges(projection, request = {}, runtimeOptions = {}) {
|
|
|
1016
1017
|
title: product.title,
|
|
1017
1018
|
kind: product.kind,
|
|
1018
1019
|
slotStepMinutes,
|
|
1020
|
+
...(operatingEndAt ? {
|
|
1021
|
+
operatingEndAt
|
|
1022
|
+
} : {}),
|
|
1019
1023
|
ranges: dedupeProductRanges(ranges)
|
|
1020
1024
|
};
|
|
1021
1025
|
});
|
|
@@ -213,6 +213,8 @@ export interface ProductTimeRangeGroup {
|
|
|
213
213
|
title?: string;
|
|
214
214
|
kind: AvailabilityProductKind;
|
|
215
215
|
slotStepMinutes?: number;
|
|
216
|
+
/** 单日查询对应营业窗口的最终结束时刻,不受资源排班是否为空影响。 */
|
|
217
|
+
operatingEndAt?: string;
|
|
216
218
|
ranges: ProductTimeRange[];
|
|
217
219
|
}
|
|
218
220
|
export interface AvailabilityAssignment extends AvailabilityAbsoluteRange {
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 2 |
|
|
329
|
+
weekNum: 0 | 2 | 3 | 1 | 5 | 6 | 4;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|