@ordinatio/scheduling 0.5.0 → 0.5.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1 (2026-10-29)
4
+
5
+ - **Fix: a weekday with no opening hours is now closed once the calendar has any hours.** Before, a calendar with hours set only for some
6
+ weekdays still offered slots all day on the other weekdays. A calendar with no availability rules at all is still open around the
7
+ clock (nothing is configured yet), and a date override still opens a day. If you relied on an empty weekday being open, add hours for it.
8
+
3
9
  ## 0.5.0 (2026-10-29)
4
10
 
5
11
  - **Security fix: booking analytics and group-class lists no longer rely on the database handle being limited to one business.**
package/dist/index.js CHANGED
@@ -1591,7 +1591,8 @@ function computeAvailableSlots(ctx, query) {
1591
1591
  );
1592
1592
  let activeRules = dateOverride ? [dateOverride] : [...weeklyRules];
1593
1593
  if (activeRules.length === 0) {
1594
- if (partialBlockConflicts.length > 0) {
1594
+ const hasConfiguredHours = rules.some((r) => !r.isBlocked);
1595
+ if (hasConfiguredHours || partialBlockConflicts.length > 0) {
1595
1596
  return { date: dateStr, calendarId, slots: [], timezone: tz };
1596
1597
  }
1597
1598
  activeRules.push({
package/dist/index.mjs CHANGED
@@ -1416,7 +1416,8 @@ function computeAvailableSlots(ctx, query) {
1416
1416
  );
1417
1417
  let activeRules = dateOverride ? [dateOverride] : [...weeklyRules];
1418
1418
  if (activeRules.length === 0) {
1419
- if (partialBlockConflicts.length > 0) {
1419
+ const hasConfiguredHours = rules.some((r) => !r.isBlocked);
1420
+ if (hasConfiguredHours || partialBlockConflicts.length > 0) {
1420
1421
  return { date: dateStr, calendarId, slots: [], timezone: tz };
1421
1422
  }
1422
1423
  activeRules.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordinatio/scheduling",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "license": "MIT",
5
5
  "description": "Scheduling engine for appointment-based businesses. API-first, no iframes.",
6
6
  "main": "./dist/index.js",