feat: add and enhance PermitsScreen and RequestPermitModal
- add LoadingScreen component - update utilities
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user