historial y pendientes

This commit is contained in:
Felipe
2024-04-06 20:50:37 -05:00
parent d9c5e97dbc
commit bfe782e47e
13 changed files with 803 additions and 293 deletions
@@ -37,4 +37,14 @@ class FirebaseServiceRepository {
.map((doc) => ServiceEntity.fromDocument(doc.data()))
.toList());
}
Stream<List<ServiceEntity>> getServicesHistoryForUser(String userId) {
return serviceCollection
.where('user_id', isEqualTo: userId)
.where('status', whereIn: [3, 4])
.snapshots()
.map((querySnapshot) => querySnapshot.docs
.map((doc) => ServiceEntity.fromDocument(doc.data()))
.toList());
}
}