update
This commit is contained in:
@@ -130,10 +130,12 @@ class _ProfessionalServiceHistoryListScreenState
|
|||||||
customStatus(service),
|
customStatus(service),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
service.description.isEmpty
|
||||||
'"${service.description.trim()}"',
|
? const SizedBox()
|
||||||
overflow: TextOverflow.ellipsis,
|
: Text(
|
||||||
),
|
'"${service.description.trim()}"',
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -329,11 +329,10 @@ class _ProfessionalServiceScreenState extends State<ProfessionalServiceScreen> {
|
|||||||
service.range1Hour2.minute,
|
service.range1Hour2.minute,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (now.isAfter(serviceDateTime)) {
|
if (service.status == ServiceStatus.acepted || service.status == ServiceStatus.active) {
|
||||||
return const SizedBox();
|
if (now.isAfter(serviceDateTime)) {
|
||||||
} else {
|
return const SizedBox();
|
||||||
if (service.status == ServiceStatus.acepted ||
|
} else {
|
||||||
service.status == ServiceStatus.active) {
|
|
||||||
return Wrap(
|
return Wrap(
|
||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
spacing: 15,
|
spacing: 15,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class FirebaseServiceRepository {
|
|||||||
Stream<List<ServiceEntity>> getServicesForUser(String userId) {
|
Stream<List<ServiceEntity>> getServicesForUser(String userId) {
|
||||||
return serviceCollection
|
return serviceCollection
|
||||||
.where('user_id', isEqualTo: userId)
|
.where('user_id', isEqualTo: userId)
|
||||||
.where('status', whereIn: [0, 1, 2, 3])
|
.where('status', whereIn: [0, 1, 3])
|
||||||
.snapshots()
|
.snapshots()
|
||||||
.map((querySnapshot) => querySnapshot.docs
|
.map((querySnapshot) => querySnapshot.docs
|
||||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||||
@@ -41,7 +41,7 @@ class FirebaseServiceRepository {
|
|||||||
String professionalId) {
|
String professionalId) {
|
||||||
return serviceCollection
|
return serviceCollection
|
||||||
.where('professional_id', isEqualTo: professionalId)
|
.where('professional_id', isEqualTo: professionalId)
|
||||||
.where('status', whereIn: [1, 2, 3])
|
.where('status', whereIn: [1, 3])
|
||||||
.snapshots()
|
.snapshots()
|
||||||
.map((querySnapshot) => querySnapshot.docs
|
.map((querySnapshot) => querySnapshot.docs
|
||||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||||
@@ -62,7 +62,7 @@ class FirebaseServiceRepository {
|
|||||||
Stream<List<ServiceEntity>> getServicesHistoryForUser(String userId) {
|
Stream<List<ServiceEntity>> getServicesHistoryForUser(String userId) {
|
||||||
return serviceCollection
|
return serviceCollection
|
||||||
.where('user_id', isEqualTo: userId)
|
.where('user_id', isEqualTo: userId)
|
||||||
.where('status', whereIn: [4, 5])
|
.where('status', whereIn: [2, 4, 5])
|
||||||
.snapshots()
|
.snapshots()
|
||||||
.map((querySnapshot) => querySnapshot.docs
|
.map((querySnapshot) => querySnapshot.docs
|
||||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||||
@@ -73,7 +73,7 @@ class FirebaseServiceRepository {
|
|||||||
String professionalId) {
|
String professionalId) {
|
||||||
return serviceCollection
|
return serviceCollection
|
||||||
.where('professional_id', isEqualTo: professionalId)
|
.where('professional_id', isEqualTo: professionalId)
|
||||||
.where('status', whereIn: [4, 5])
|
.where('status', whereIn: [2, 4, 5])
|
||||||
.snapshots()
|
.snapshots()
|
||||||
.map((querySnapshot) => querySnapshot.docs
|
.map((querySnapshot) => querySnapshot.docs
|
||||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||||
|
|||||||
Reference in New Issue
Block a user