feat: add and enhance PermitsScreen and RequestPermitModal

- add LoadingScreen component
- update utilities
This commit is contained in:
2025-12-15 17:20:57 +01:00
parent b9807f6cc2
commit ef88c518d1
9 changed files with 166 additions and 122 deletions

View File

@ -32,6 +32,7 @@ export default function CalendarWidget({ events, types }: CalendarWidgetProps) {
return events.find(event => {
// Logica semplice: controlla se la data cade nel range
// Nota: per una logica perfetta sui range lunghi, servirebbe un controllo più approfondito
if (!event.start_date) return false;
if (event.timeOffRequestType.name === 'Permesso') return event.start_date === dateStr;
const end = event.end_date || event.start_date;
return dateStr >= event.start_date && dateStr <= end;