feat: Update assets and improve code comments across multiple components

- Updated favicon and various image assets.
- Enhanced comments.
- Adjusted styles and functionality in several components for improved user experience.
- Updated package-lock.json to reflect dependency updates.
This commit is contained in:
2026-02-06 12:56:34 +01:00
parent 7a6a7f5d35
commit 7c8ef45e5a
36 changed files with 325 additions and 317 deletions

View File

@@ -12,7 +12,7 @@ interface CalendarWidgetProps {
export default function CalendarWidget({ events, types, onMonthChange }: CalendarWidgetProps) {
const [currentDate, setCurrentDate] = useState(new Date());
// Helpers per il calendario
// Calendar helpers
const daysInMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).getDate();
const firstDayOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).getDay(); // 0 = Sun
const adjustedFirstDay = firstDayOfMonth === 0 ? 6 : firstDayOfMonth - 1; // 0 = Mon
@@ -40,8 +40,8 @@ export default function CalendarWidget({ events, types, onMonthChange }: Calenda
const dateStr = `${year}-${month}-${dayStr}`;
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
// Simple logic: check if the date falls within the range
// Note: for perfect logic on long ranges, a more thorough check would be needed
if (!event.start_date) return false;
if (event.timeOffRequestType.name === 'Permesso') return event.start_date === dateStr;
const end = event.end_date || event.start_date;
@@ -51,7 +51,7 @@ export default function CalendarWidget({ events, types, onMonthChange }: Calenda
return (
<View className="bg-white rounded-[2rem] p-6 shadow-sm border border-gray-100">
{/* Header Mese */}
{/* Month Header */}
<View className="flex-row justify-between items-center mb-6">
<TouchableOpacity
onPress={() => changeMonth(-1)}
@@ -106,7 +106,7 @@ export default function CalendarWidget({ events, types, onMonthChange }: Calenda
})}
</View>
{/* Legenda */}
{/* Legend */}
<View className="flex-row flex-wrap justify-center gap-4 mt-8 pt-4 border-t border-gray-100">
{types.map((type) => (
<View key={type.id} className="flex-row items-center" >