diff --git a/lib/screens/lists/professional_service_history_list_screen.dart b/lib/screens/lists/professional_service_history_list_screen.dart index 4bf56f8..b635832 100644 --- a/lib/screens/lists/professional_service_history_list_screen.dart +++ b/lib/screens/lists/professional_service_history_list_screen.dart @@ -130,10 +130,12 @@ class _ProfessionalServiceHistoryListScreenState customStatus(service), ], ), - Text( - '"${service.description.trim()}"', - overflow: TextOverflow.ellipsis, - ), + service.description.isEmpty + ? const SizedBox() + : Text( + '"${service.description.trim()}"', + overflow: TextOverflow.ellipsis, + ), ], ), ), diff --git a/lib/screens/service/professional_service_screen.dart b/lib/screens/service/professional_service_screen.dart index 4067653..cbe6443 100644 --- a/lib/screens/service/professional_service_screen.dart +++ b/lib/screens/service/professional_service_screen.dart @@ -329,11 +329,10 @@ class _ProfessionalServiceScreenState extends State { service.range1Hour2.minute, ); - if (now.isAfter(serviceDateTime)) { - return const SizedBox(); - } else { - if (service.status == ServiceStatus.acepted || - service.status == ServiceStatus.active) { + if (service.status == ServiceStatus.acepted || service.status == ServiceStatus.active) { + if (now.isAfter(serviceDateTime)) { + return const SizedBox(); + } else { return Wrap( alignment: WrapAlignment.center, spacing: 15, diff --git a/packages/service_repository/lib/src/repositories/firebase_service_repository.dart b/packages/service_repository/lib/src/repositories/firebase_service_repository.dart index a07d916..d21947a 100644 --- a/packages/service_repository/lib/src/repositories/firebase_service_repository.dart +++ b/packages/service_repository/lib/src/repositories/firebase_service_repository.dart @@ -30,7 +30,7 @@ class FirebaseServiceRepository { Stream> getServicesForUser(String userId) { return serviceCollection .where('user_id', isEqualTo: userId) - .where('status', whereIn: [0, 1, 2, 3]) + .where('status', whereIn: [0, 1, 3]) .snapshots() .map((querySnapshot) => querySnapshot.docs .map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id)) @@ -41,7 +41,7 @@ class FirebaseServiceRepository { String professionalId) { return serviceCollection .where('professional_id', isEqualTo: professionalId) - .where('status', whereIn: [1, 2, 3]) + .where('status', whereIn: [1, 3]) .snapshots() .map((querySnapshot) => querySnapshot.docs .map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id)) @@ -62,7 +62,7 @@ class FirebaseServiceRepository { Stream> getServicesHistoryForUser(String userId) { return serviceCollection .where('user_id', isEqualTo: userId) - .where('status', whereIn: [4, 5]) + .where('status', whereIn: [2, 4, 5]) .snapshots() .map((querySnapshot) => querySnapshot.docs .map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id)) @@ -73,7 +73,7 @@ class FirebaseServiceRepository { String professionalId) { return serviceCollection .where('professional_id', isEqualTo: professionalId) - .where('status', whereIn: [4, 5]) + .where('status', whereIn: [2, 4, 5]) .snapshots() .map((querySnapshot) => querySnapshot.docs .map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))