update
This commit is contained in:
@@ -219,6 +219,24 @@ class Event {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<List<Event>> getEventsAllByIdAndStatus(String uid) async {
|
||||
try {
|
||||
var snapshot = await FirebaseFirestore.instance
|
||||
.collection('services')
|
||||
.where('professional_id', isEqualTo: uid)
|
||||
.where('status', whereIn: ['aprobado', 'pendiente']).get();
|
||||
|
||||
List<Event> eventos = [];
|
||||
for (var element in snapshot.docs) {
|
||||
eventos.add(Event.fromJson(element.data()));
|
||||
}
|
||||
return eventos;
|
||||
} catch (e) {
|
||||
print('Error getByProId $e');
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
static Future<List<Event>> getEventsAllByIdStatus(
|
||||
String uid, String state) async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user