Close dialog on status change

This commit is contained in:
Jose Selesan
2026-05-06 17:03:42 -03:00
parent 41a217e8a9
commit 7be776f189
22 changed files with 408 additions and 428 deletions

View File

@@ -227,8 +227,7 @@ function BookingSlotBlock({ segment, schedule, rangeStart, totalMinutes }: Booki
segment.status === 'maintenance' &&
'border-maintenance/80 bg-maintenance/75 text-maintenance-foreground',
segment.booking?.status === 'COMPLETED' &&
'border-reserved/70 bg-reserved/25 dark:text-reserved-foreground text-gray-600 line-through',
'border-reserved/70 bg-reserved/25 dark:text-reserved-foreground text-gray-600 line-through'
)}
style={{
left: `calc(${left}% + 4px)`,
@@ -242,10 +241,10 @@ function BookingSlotBlock({ segment, schedule, rangeStart, totalMinutes }: Booki
sportId: schedule.court.sportId,
});
} else {
if(event.shiftKey && segment.booking?.status === 'CONFIRMED') {
if (event.shiftKey && segment.booking?.status === 'CONFIRMED') {
updateBookingStatus(segment.booking.id, 'COMPLETED');
} else {
openBookingTools(segment);
openBookingTools(segment);
}
}
}}
@@ -269,7 +268,6 @@ function BookingSlotBlock({ segment, schedule, rangeStart, totalMinutes }: Booki
<Users className="size-3" />
{segment.booking?.customerName ?? 'Mantenimiento'}
</span>
</>
)}
</button>