@pisell/pisellos 0.0.277 → 0.0.279
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.
|
@@ -267,6 +267,10 @@ export var DateModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
267
267
|
if (!resource.times || !Array.isArray(resource.times) || !resource.start_time) {
|
|
268
268
|
return resource;
|
|
269
269
|
}
|
|
270
|
+
// 如果resource.advanced 为 null 或者 resource.advanced.unit 为 0,则不进行修正
|
|
271
|
+
if (!resource.advanced || resource.advanced.unit === 0) {
|
|
272
|
+
return resource;
|
|
273
|
+
}
|
|
270
274
|
var resourceStartTime = dayjs(resource.start_time);
|
|
271
275
|
|
|
272
276
|
// 过滤和修正时间段
|
|
@@ -2593,7 +2593,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2593
2593
|
return acc;
|
|
2594
2594
|
}, 0);
|
|
2595
2595
|
// 如果已使用容量超过了当前类型资源的容量,则不可用
|
|
2596
|
-
if (
|
|
2596
|
+
if (otherCartNeedCapacity + usedCapacity >= currentTypeResourcesCapacity) {
|
|
2597
2597
|
bookingLeft = 0;
|
|
2598
2598
|
count = 0;
|
|
2599
2599
|
}
|
|
@@ -178,6 +178,9 @@ var DateModule = class extends import_BaseModule.BaseModule {
|
|
|
178
178
|
if (!resource.times || !Array.isArray(resource.times) || !resource.start_time) {
|
|
179
179
|
return resource;
|
|
180
180
|
}
|
|
181
|
+
if (!resource.advanced || resource.advanced.unit === 0) {
|
|
182
|
+
return resource;
|
|
183
|
+
}
|
|
181
184
|
const resourceStartTime = (0, import_dayjs.default)(resource.start_time);
|
|
182
185
|
const correctedTimes = resource.times.map((timeSlot) => {
|
|
183
186
|
if (!timeSlot.start_at || !timeSlot.end_at) {
|
|
@@ -1819,7 +1819,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1819
1819
|
acc += Array.from(mSet.values()).reduce((acc2, curr2) => acc2 + curr2, 0);
|
|
1820
1820
|
return acc;
|
|
1821
1821
|
}, 0);
|
|
1822
|
-
if (
|
|
1822
|
+
if (otherCartNeedCapacity + usedCapacity >= currentTypeResourcesCapacity) {
|
|
1823
1823
|
bookingLeft = 0;
|
|
1824
1824
|
count = 0;
|
|
1825
1825
|
}
|