fcm
This commit is contained in:
@@ -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)
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user