This commit is contained in:
2026-05-30 12:12:14 +02:00
parent 9bace01b93
commit bd81173559
30 changed files with 1020 additions and 51 deletions

View File

@@ -39,6 +39,7 @@ class TasksRepository {
)
.toList();
} catch (e) {
debugPrint('Errore fetch personal reminders: $e');
throw Exception('Errore fetch personal reminders: $e');
}
}
@@ -98,6 +99,26 @@ class TasksRepository {
}
}
Future<TaskModel?> fetchTaskById(String taskId) async {
try {
final response = await _supabase
.from(Tables.tasks)
.select('''
*,
task_assignments:${Tables.taskAssignments} (
${Tables.staffMembers} (*)
)
''')
.eq('id', taskId)
.single();
return TaskModel.fromMap(response);
} catch (e) {
debugPrint('Errore fetch task by id: $e');
throw Exception('Errore fetch task by id: $e');
}
}
// =========================================================================
// REALTIME STREAM (La sentinella per la bacheca)
// =========================================================================