This commit is contained in:
Felipe
2024-05-25 14:04:02 -05:00
parent 50f0c04f59
commit bec1aaef21
3 changed files with 14 additions and 13 deletions
@@ -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,
),
],
),
),
@@ -329,11 +329,10 @@ class _ProfessionalServiceScreenState extends State<ProfessionalServiceScreen> {
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,
@@ -30,7 +30,7 @@ class FirebaseServiceRepository {
Stream<List<ServiceEntity>> 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<List<ServiceEntity>> 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))