@pisell/pisellos 2.2.296 → 2.2.297
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.
|
@@ -212,7 +212,11 @@ function evaluateCandidateTimeGate(params) {
|
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
if (policy.type === 'before_start') {
|
|
215
|
-
|
|
215
|
+
// Flexible-duration candidates start at minute precision. Keep the current
|
|
216
|
+
// minute selectable instead of treating the freshly generated candidate as
|
|
217
|
+
// already started because the query clock still contains seconds.
|
|
218
|
+
var hasNotReachedStart = product.isFlexibleDuration ? floorToMinute(now) <= candidateRange.start : now < candidateRange.start;
|
|
219
|
+
if (hasNotReachedStart) return null;
|
|
216
220
|
return {
|
|
217
221
|
status: 'unavailable',
|
|
218
222
|
reasonCodes: ['booking_cutoff_before_start'],
|
|
@@ -207,7 +207,11 @@ function evaluateCandidateTimeGate(params) {
|
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
if (policy.type === 'before_start') {
|
|
210
|
-
|
|
210
|
+
// Flexible-duration candidates start at minute precision. Keep the current
|
|
211
|
+
// minute selectable instead of treating the freshly generated candidate as
|
|
212
|
+
// already started because the query clock still contains seconds.
|
|
213
|
+
const hasNotReachedStart = product.isFlexibleDuration ? floorToMinute(now) <= candidateRange.start : now < candidateRange.start;
|
|
214
|
+
if (hasNotReachedStart) return null;
|
|
211
215
|
return {
|
|
212
216
|
status: 'unavailable',
|
|
213
217
|
reasonCodes: ['booking_cutoff_before_start'],
|