@pisell/pisellos 1.0.3 → 1.0.4
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.
|
@@ -1909,6 +1909,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1909
1909
|
var hasOverlap = !dayjs(item.time.start_at).isAfter(dayjs(timeSlots.start_at)) && !dayjs(item.time.end_at).isBefore(dayjs(timeSlots.end_at));
|
|
1910
1910
|
return hasOverlap ? sum + item.pax : sum;
|
|
1911
1911
|
}, 0);
|
|
1912
|
+
|
|
1913
|
+
// 如果资源是单个预约,并且有 totalCapacity,则认为在当前 timeSlots 资源已经被选择过,就不可用了
|
|
1914
|
+
if (n.resourceType === 'single' && totalCapacity > 0) {
|
|
1915
|
+
return 0; // continue
|
|
1916
|
+
}
|
|
1912
1917
|
var canUseTime = mTimes.find(function (item) {
|
|
1913
1918
|
var _cartItem$_productOri12;
|
|
1914
1919
|
var res = getIsUsableByTimeItem({
|
|
@@ -1227,6 +1227,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1227
1227
|
},
|
|
1228
1228
|
0
|
|
1229
1229
|
);
|
|
1230
|
+
if (n.resourceType === "single" && totalCapacity > 0) {
|
|
1231
|
+
continue;
|
|
1232
|
+
}
|
|
1230
1233
|
const canUseTime = mTimes.find((item) => {
|
|
1231
1234
|
var _a2;
|
|
1232
1235
|
const res = (0, import_resources.getIsUsableByTimeItem)({
|