@ticketboothapp/booking 1.2.30 → 1.2.32
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/package.json
CHANGED
|
@@ -3071,12 +3071,12 @@ export function BookingFlow({
|
|
|
3071
3071
|
if (dates.length === 0) return;
|
|
3072
3072
|
if (hasAutoSelectedPartnerDateRef.current) return;
|
|
3073
3073
|
|
|
3074
|
-
// Match Calendar: a day is "sold out" only when every slot has 0 vacancies.
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3074
|
+
// Match Calendar: a day is "sold out" only when every slot has 0 vacancies.
|
|
3075
|
+
// Always auto-pick the first day with any inventory; only if the whole range is empty and user is admin, fall back to the first day.
|
|
3076
|
+
const firstWithInventory = dates.find((d) =>
|
|
3077
|
+
(availabilitiesByDate[d] ?? []).some((a) => (a.vacancies ?? 0) > 0),
|
|
3078
|
+
);
|
|
3079
|
+
const first = firstWithInventory ?? (isAdmin && dates[0] ? dates[0] : undefined);
|
|
3080
3080
|
if (!first) return;
|
|
3081
3081
|
|
|
3082
3082
|
hasAutoSelectedPartnerDateRef.current = true;
|
|
@@ -337,6 +337,19 @@
|
|
|
337
337
|
padding-bottom: 0; /* No bottom padding - eliminates gap below calendar cells */
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
+
/* Admin capacity view: enforce a wider minimum per day; scroll horizontally if the container is narrow */
|
|
341
|
+
@media (min-width: 640px) {
|
|
342
|
+
.calendarGridInnerAdminWide {
|
|
343
|
+
overflow-x: auto;
|
|
344
|
+
-webkit-overflow-scrolling: touch;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.calendarHeaderRowAdminWide,
|
|
348
|
+
.calendarDaysGridAdminWide {
|
|
349
|
+
grid-template-columns: repeat(7, minmax(6.75rem, 1fr));
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
340
353
|
.calendarHeaderRow {
|
|
341
354
|
display: grid;
|
|
342
355
|
grid-template-columns: repeat(7, 1fr);
|
|
@@ -867,6 +867,9 @@ export function Calendar({
|
|
|
867
867
|
};
|
|
868
868
|
}, [calendarDays, timezone, dateFnsLocale]);
|
|
869
869
|
|
|
870
|
+
/** Desktop: wider min column width when showing per-slot capacity (provider dashboard admin). */
|
|
871
|
+
const wideAdminCalendarColumns = showCapacity && displayMode === 'times';
|
|
872
|
+
|
|
870
873
|
// Navigation handlers - add/subtract weeks in company timezone
|
|
871
874
|
const handlePrevious = () => {
|
|
872
875
|
const prevSunday = addDays(currentStartDate, -WEEKS_TO_SHOW * 7);
|
|
@@ -1079,9 +1082,20 @@ export function Calendar({
|
|
|
1079
1082
|
|
|
1080
1083
|
{/* Calendar Grid */}
|
|
1081
1084
|
<div className={styles.calendarGrid}>
|
|
1082
|
-
<div
|
|
1085
|
+
<div
|
|
1086
|
+
className={cn(
|
|
1087
|
+
styles.calendarGridInner,
|
|
1088
|
+
wideAdminCalendarColumns && styles.calendarGridInnerAdminWide,
|
|
1089
|
+
)}
|
|
1090
|
+
>
|
|
1083
1091
|
{/* Day Headers */}
|
|
1084
|
-
<div
|
|
1092
|
+
<div
|
|
1093
|
+
className={cn(
|
|
1094
|
+
styles.calendarHeaderRow,
|
|
1095
|
+
wideAdminCalendarColumns && styles.calendarHeaderRowAdminWide,
|
|
1096
|
+
'calendar-header-grid',
|
|
1097
|
+
)}
|
|
1098
|
+
>
|
|
1085
1099
|
{DAYS_OF_WEEK_KEYS.map((dayKey) => (
|
|
1086
1100
|
<div
|
|
1087
1101
|
key={dayKey}
|
|
@@ -1093,7 +1107,13 @@ export function Calendar({
|
|
|
1093
1107
|
</div>
|
|
1094
1108
|
|
|
1095
1109
|
{/* Calendar Days Grid - row height = tallest cell in row; all cells stretch to that height */}
|
|
1096
|
-
<div
|
|
1110
|
+
<div
|
|
1111
|
+
className={cn(
|
|
1112
|
+
styles.calendarDaysGrid,
|
|
1113
|
+
wideAdminCalendarColumns && styles.calendarDaysGridAdminWide,
|
|
1114
|
+
'calendar-days-grid',
|
|
1115
|
+
)}
|
|
1116
|
+
>
|
|
1097
1117
|
{calendarDays.map((date) => {
|
|
1098
1118
|
const dateStr = formatInTimeZone(date, timezone, 'yyyy-MM-dd');
|
|
1099
1119
|
const availability = dateAvailabilityMap[dateStr] || null;
|
|
@@ -916,11 +916,10 @@ export function PrivateShuttleBookingFlow({
|
|
|
916
916
|
if (dates.length === 0) return;
|
|
917
917
|
if (hasAutoSelectedPartnerDateRef.current) return;
|
|
918
918
|
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
);
|
|
919
|
+
const firstWithInventory = dates.find((d) =>
|
|
920
|
+
(availabilitiesByDate[d] ?? []).some((a) => (a.vacancies ?? 0) > 0),
|
|
921
|
+
);
|
|
922
|
+
const first = firstWithInventory ?? (isAdmin && dates[0] ? dates[0] : undefined);
|
|
924
923
|
if (!first) return;
|
|
925
924
|
|
|
926
925
|
hasAutoSelectedPartnerDateRef.current = true;
|