@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
- if (now < candidateRange.start) return null;
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
- if (now < candidateRange.start) return null;
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'],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.296",
4
+ "version": "2.2.297",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",