@pisell/pisellos 0.0.398 → 0.0.400
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.
|
@@ -188,7 +188,7 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
188
188
|
tags: ['good_pass', 'product_discount_card'],
|
|
189
189
|
available: 1,
|
|
190
190
|
relation_product: 1,
|
|
191
|
-
with: ['extensionData', 'holder.detail'],
|
|
191
|
+
with: ['extensionData', 'customScheduleSnapshot', 'holder.detail'],
|
|
192
192
|
order_behavior_count: 1,
|
|
193
193
|
order_behavior_count_customer_id: customerId || 1
|
|
194
194
|
});
|
|
@@ -2729,6 +2729,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2729
2729
|
allProductResources === null || allProductResources === void 0 || allProductResources.forEach(function (m) {
|
|
2730
2730
|
// 遍历所有资源的上工时间片
|
|
2731
2731
|
var currentResourcesCount = 0;
|
|
2732
|
+
var currentResourcesSummaryCount = 0;
|
|
2732
2733
|
var currentResourcesTimeSlotCanUsedArr = [];
|
|
2733
2734
|
// m.times 需要做个过滤,假设 timeSlice.start_at 是 09:30 timeSlice.end_at 是 11:30
|
|
2734
2735
|
// time 是 time.start_at = 2025-05-26 10:30, time.end_at = 2025-05-26 12:30
|
|
@@ -2766,6 +2767,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2766
2767
|
if (res.usable && res.remainingCapacity >= count && !m.onlyComputed) {
|
|
2767
2768
|
currentResourcesCount = res.remainingCapacity;
|
|
2768
2769
|
}
|
|
2770
|
+
if (res.usable && !m.onlyComputed && res.remainingCapacity >= currentResourcesSummaryCount) {
|
|
2771
|
+
currentResourcesSummaryCount = res.remainingCapacity;
|
|
2772
|
+
}
|
|
2769
2773
|
currentResourcesTimeSlotCanUsedArr.push(res.usable);
|
|
2770
2774
|
});
|
|
2771
2775
|
// 在已经选定时间的情况下,只要canUseTime如果有一个 false 那就不可用
|
|
@@ -2779,7 +2783,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2779
2783
|
}
|
|
2780
2784
|
if (!m.onlyComputed) {
|
|
2781
2785
|
bookingLeft += 1;
|
|
2782
|
-
summaryCount +=
|
|
2786
|
+
summaryCount += currentResourcesSummaryCount;
|
|
2783
2787
|
}
|
|
2784
2788
|
}
|
|
2785
2789
|
});
|
|
@@ -109,7 +109,7 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
|
|
|
109
109
|
tags: ["good_pass", "product_discount_card"],
|
|
110
110
|
available: 1,
|
|
111
111
|
relation_product: 1,
|
|
112
|
-
with: ["extensionData", "holder.detail"],
|
|
112
|
+
with: ["extensionData", "customScheduleSnapshot", "holder.detail"],
|
|
113
113
|
order_behavior_count: 1,
|
|
114
114
|
order_behavior_count_customer_id: customerId || 1
|
|
115
115
|
});
|
|
@@ -1918,6 +1918,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1918
1918
|
let summaryCount = 0;
|
|
1919
1919
|
allProductResources == null ? void 0 : allProductResources.forEach((m) => {
|
|
1920
1920
|
let currentResourcesCount = 0;
|
|
1921
|
+
let currentResourcesSummaryCount = 0;
|
|
1921
1922
|
const currentResourcesTimeSlotCanUsedArr = [];
|
|
1922
1923
|
const mTimes = m.times.filter((n) => {
|
|
1923
1924
|
return !(0, import_dayjs.default)(n.start_at).isAfter((0, import_dayjs.default)(item.start), "minute") && !(0, import_dayjs.default)(n.end_at).isBefore((0, import_dayjs.default)(item.end), "minute") || (0, import_dayjs.default)(n.start_at).isBefore((0, import_dayjs.default)(item.end), "minute") && (0, import_dayjs.default)(n.end_at).isAfter((0, import_dayjs.default)(item.start), "minute");
|
|
@@ -1945,6 +1946,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1945
1946
|
if (res.usable && res.remainingCapacity >= count && !m.onlyComputed) {
|
|
1946
1947
|
currentResourcesCount = res.remainingCapacity;
|
|
1947
1948
|
}
|
|
1949
|
+
if (res.usable && !m.onlyComputed && res.remainingCapacity >= currentResourcesSummaryCount) {
|
|
1950
|
+
currentResourcesSummaryCount = res.remainingCapacity;
|
|
1951
|
+
}
|
|
1948
1952
|
currentResourcesTimeSlotCanUsedArr.push(res.usable);
|
|
1949
1953
|
});
|
|
1950
1954
|
if (!currentResourcesTimeSlotCanUsedArr.some(
|
|
@@ -1956,7 +1960,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1956
1960
|
}
|
|
1957
1961
|
if (!m.onlyComputed) {
|
|
1958
1962
|
bookingLeft += 1;
|
|
1959
|
-
summaryCount +=
|
|
1963
|
+
summaryCount += currentResourcesSummaryCount;
|
|
1960
1964
|
}
|
|
1961
1965
|
}
|
|
1962
1966
|
});
|