calendario profesional
This commit is contained in:
@@ -121,23 +121,6 @@ class ServiceEntity extends Equatable {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '''ServiceEntity{{
|
||||
professionalId: $professionalId,
|
||||
professionalScored: $professionalScored,
|
||||
userId: $userId,
|
||||
userScored: $userScored,
|
||||
address: $address,
|
||||
aditionalAddress: $aditionalAddress,
|
||||
latitude: $latitude,
|
||||
longitude: $longitude,
|
||||
day: $day,
|
||||
createdAt: $createdAt,
|
||||
description: $description,
|
||||
range1Hour1: $range1Hour1,
|
||||
range1Hour2: $range1Hour2,
|
||||
rate: $rate,
|
||||
status: $status,
|
||||
location: $location
|
||||
}}''';
|
||||
return '''ServiceEntity{{ professionalId: $professionalId, professionalScored: $professionalScored, userId: $userId, userScored: $userScored, address: $address, aditionalAddress: $aditionalAddress, latitude: $latitude, longitude: $longitude, day: $day, createdAt: $createdAt, description: $description, range1Hour1: $range1Hour1, range1Hour2: $range1Hour2, rate: $rate, status: $status, location: $location }}''';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
export 'service_status.dart';
|
||||
|
||||
enum ServiceStatus {
|
||||
pending, // 0
|
||||
acepted, // 1
|
||||
denied, // 2
|
||||
active, // 3
|
||||
cancelled, // 4
|
||||
completed, // 5
|
||||
pending, // 0
|
||||
acepted, // 1
|
||||
denied, // 2
|
||||
active, // 3
|
||||
cancelled, // 4
|
||||
completed, // 5
|
||||
selfBooked // 6
|
||||
}
|
||||
|
||||
int enumToIntService(ServiceStatus state) {
|
||||
|
||||
@@ -41,7 +41,7 @@ class FirebaseServiceRepository {
|
||||
String professionalId) {
|
||||
return serviceCollection
|
||||
.where('professional_id', isEqualTo: professionalId)
|
||||
.where('status', whereIn: [0, 1, 2, 3])
|
||||
.where('status', whereIn: [1, 2, 3])
|
||||
.snapshots()
|
||||
.map((querySnapshot) => querySnapshot.docs
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||
@@ -52,7 +52,7 @@ class FirebaseServiceRepository {
|
||||
String professionalId) async {
|
||||
QuerySnapshot<Map<String, dynamic>> query = await serviceCollection
|
||||
.where('professional_id', isEqualTo: professionalId)
|
||||
.where('status', whereIn: [0, 1, 2, 3]).get();
|
||||
.where('status', whereIn: [0, 1, 2, 3, 6]).get();
|
||||
|
||||
return query.docs
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||
|
||||
Reference in New Issue
Block a user