citas con dia
This commit is contained in:
@@ -30,18 +30,19 @@ class EventoService {
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<Event>> getByProId() async {
|
||||
Future<List<Event>> getByProId(String day) async {
|
||||
try {
|
||||
var snapshot = await FirebaseFirestore.instance
|
||||
.collection('services')
|
||||
.where('profesional_id', isEqualTo: uid)
|
||||
.where('day', isEqualTo: day.toString())
|
||||
.get();
|
||||
|
||||
List<Event> eventos = [];
|
||||
for (var element in snapshot.docs) {
|
||||
eventos.add(Event.fromJson(element.data()));
|
||||
}
|
||||
print('Error getByProId $eventos');
|
||||
print('Error getByProId 1 $eventos');
|
||||
return eventos;
|
||||
} catch (e) {
|
||||
print('Error getByProId $e');
|
||||
|
||||
Reference in New Issue
Block a user