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

@@ -9,6 +9,7 @@ import api from '@/utils/api';
import { formatDate, formatTime, parseSecondsToTime } from '@/utils/dateTime';
import { AttendanceRecord } from '@/types/types';
import NfcManager from 'react-native-nfc-manager';
import { SafeAreaView } from 'react-native-safe-area-context';
export default function AttendanceScreen() {
const [scannerType, setScannerType] = useState<'qr' | 'nfc'>('qr');
@@ -20,6 +21,7 @@ export default function AttendanceScreen() {
const [refreshing, setRefreshing] = useState(false);
const checkNfcAvailability = async () => {
// TODO: add env variable to disable NFC checks in development or if not needed
// if (!ENABLE_NFC) return;
try {
const isSupported = await NfcManager.isSupported();
@@ -58,13 +60,13 @@ export default function AttendanceScreen() {
};
const handleStartScan = async () => {
// Modalità QR Code
// Qr Code mode
if (scannerType === 'qr') {
setShowScanner(true);
return;
}
// Modalità NFC
// NFC mode
if (scannerType === 'nfc') {
try {
const supported = await NfcManager.isSupported();
@@ -117,9 +119,11 @@ export default function AttendanceScreen() {
return (
<View className="flex-1 bg-gray-50">
{/* Header */}
<View className="bg-white p-6 pt-16 shadow-sm border-b border-gray-100">
<Text className="text-3xl font-bold text-gray-800 mb-1">Gestione Presenze</Text>
<Text className="text-base text-gray-500">Registra i tuoi movimenti</Text>
<View className="bg-white px-6 pb-6 shadow-sm border-b border-gray-100">
<SafeAreaView edges={['top']} className='pt-4'>
<Text className="text-3xl font-bold text-gray-800 mb-1">Gestione Presenze</Text>
<Text className="text-base text-gray-500">Registra i tuoi movimenti</Text>
</SafeAreaView>
</View>
<ScrollView
@@ -215,7 +219,7 @@ export default function AttendanceScreen() {
</View>
</View>
{/* TODO: item.time può essere null -> calcolare tempo da in e out? */}
{/* TODO: item.time can be null - calculate time from in and out? */}
{item.time && (
<View className="bg-gray-50 px-3 py-1.5 rounded-xl border border-gray-100 flex-shrink-0">
<Text className="text-base font-mono text-gray-600 font-bold">