@pisell/pisellos 0.0.179 → 0.0.180
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.
|
@@ -1295,7 +1295,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1295
1295
|
var originResource = allOriginResources.find(function (n) {
|
|
1296
1296
|
return n.id === targetRes.id;
|
|
1297
1297
|
});
|
|
1298
|
-
var canUse = checkResourceCanUseByCapacity(currentResourcesCapacityMap[m.id], currentCapacity, originResource === null || originResource === void 0 ? void 0 : originResource.capacity);
|
|
1298
|
+
var canUse = checkResourceCanUseByCapacity(currentResourcesCapacityMap[m.id] || 0, currentCapacity, originResource === null || originResource === void 0 ? void 0 : originResource.capacity);
|
|
1299
1299
|
if (canUse) currentResourcesCapacityMap[m.id] += currentCapacity;
|
|
1300
1300
|
return !canUse;
|
|
1301
1301
|
}
|
|
@@ -1425,7 +1425,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1425
1425
|
var resources = [];
|
|
1426
1426
|
if (dateRange !== null && dateRange !== void 0 && dateRange.length) {
|
|
1427
1427
|
dateRange.forEach(function (n) {
|
|
1428
|
-
resources.push.apply(resources, _toConsumableArray(
|
|
1428
|
+
if (n.resource) resources.push.apply(resources, _toConsumableArray(n.resource));
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
1431
|
var cartItems = this.store.cart.getItems().filter(function (n) {
|
|
@@ -719,7 +719,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
719
719
|
(n) => n.id === targetRes.id
|
|
720
720
|
);
|
|
721
721
|
const canUse = (0, import_capacity.checkResourceCanUseByCapacity)(
|
|
722
|
-
currentResourcesCapacityMap[m.id],
|
|
722
|
+
currentResourcesCapacityMap[m.id] || 0,
|
|
723
723
|
currentCapacity,
|
|
724
724
|
originResource == null ? void 0 : originResource.capacity
|
|
725
725
|
);
|
|
@@ -825,7 +825,8 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
825
825
|
const resources = [];
|
|
826
826
|
if (dateRange == null ? void 0 : dateRange.length) {
|
|
827
827
|
dateRange.forEach((n) => {
|
|
828
|
-
|
|
828
|
+
if (n.resource)
|
|
829
|
+
resources.push(...n.resource);
|
|
829
830
|
});
|
|
830
831
|
}
|
|
831
832
|
const cartItems = this.store.cart.getItems().filter((n) => !(0, import_utils4.isNormalProduct)(n._productOrigin));
|