This commit is contained in:
2026-05-21 14:43:47 +02:00
parent b9c3eb7091
commit 5b2702daed
16 changed files with 1266 additions and 44 deletions

View File

@@ -20,6 +20,19 @@ class StaffRepository {
return (response as List).map((s) => StaffMemberModel.fromMap(s)).toList();
}
Future<StaffMemberModel?> getStaffMemberById(String staffId) async {
try {
final response = await _supabase
.from(Tables.staffMembers)
.select()
.eq('id', staffId)
.single();
return StaffMemberModel.fromMap(response);
} on Exception catch (e) {
throw ('Errore nel recupero del membro staff con ID $staffId: $e');
}
}
Future<StaffMemberModel> saveStaffMember(StaffMemberModel member) async {
final response = await _supabase
.from(Tables.staffMembers)