hidding collapse and showing start rate of staff

This commit is contained in:
José Salazar
2026-01-30 00:00:44 -05:00
parent bc44153458
commit 1e505c806a
7 changed files with 19704 additions and 19694 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.getWorkforceById(getWorkforceByIdVariables).execute();
ExampleConnector.instance.getWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVariables).execute();
ExampleConnector.instance.listWorkforceByVendorId(listWorkforceByVendorIdVariables).execute();
ExampleConnector.instance.listWorkforceByStaffId(listWorkforceByStaffIdVariables).execute();
ExampleConnector.instance.getWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVariables).execute();
ExampleConnector.instance.createEmergencyContact(createEmergencyContactVariables).execute();
ExampleConnector.instance.updateEmergencyContact(updateEmergencyContactVariables).execute();
ExampleConnector.instance.deleteEmergencyContact(deleteEmergencyContactVariables).execute();
ExampleConnector.instance.listStaffAvailabilities(listStaffAvailabilitiesVariables).execute();
ExampleConnector.instance.listStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVariables).execute();
ExampleConnector.instance.createRecentPayment(createRecentPaymentVariables).execute();
ExampleConnector.instance.updateRecentPayment(updateRecentPaymentVariables).execute();
ExampleConnector.instance.deleteRecentPayment(deleteRecentPaymentVariables).execute();
ExampleConnector.instance.CreateStaff(createStaffVariables).execute();
ExampleConnector.instance.UpdateStaff(updateStaffVariables).execute();
ExampleConnector.instance.DeleteStaff(deleteStaffVariables).execute();
ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVariables).execute();
ExampleConnector.instance.listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStatus(listStaffDocumentsByStatusVariables).execute();
```
@@ -23,8 +23,8 @@ Optional fields can be discovered based on classes that have `Optional` object t
This is an example of a mutation with an optional field:
```dart
await ExampleConnector.instance.listStaffCoursesByCourseId({ ... })
.offset(...)
await ExampleConnector.instance.updateAttireOption({ ... })
.itemId(...)
.execute();
```

View File

@@ -106,13 +106,15 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
final String? email;
final String? phone;
final String? photoUrl;
final double? averageRating;
ListAcceptedApplicationsByBusinessForDayApplicationsStaff.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
fullName = nativeFromJson<String>(json['fullName']),
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']);
photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']),
averageRating = json['averageRating'] == null ? null : nativeFromJson<double>(json['averageRating']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -127,11 +129,12 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
fullName == otherTyped.fullName &&
email == otherTyped.email &&
phone == otherTyped.phone &&
photoUrl == otherTyped.photoUrl;
photoUrl == otherTyped.photoUrl &&
averageRating == otherTyped.averageRating;
}
@override
int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, averageRating.hashCode]);
Map<String, dynamic> toJson() {
@@ -147,6 +150,9 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
if (photoUrl != null) {
json['photoUrl'] = nativeToJson<String?>(photoUrl);
}
if (averageRating != null) {
json['averageRating'] = nativeToJson<double?>(averageRating);
}
return json;
}
@@ -156,6 +162,7 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
this.email,
this.phone,
this.photoUrl,
this.averageRating,
});
}

View File

@@ -121,6 +121,7 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
'status': 'confirmed',
'photo_url': application.staff.photoUrl,
'phone': application.staff.phone,
'rating': application.staff.averageRating,
});
}
return grouped;

View File

@@ -235,13 +235,15 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
onTap: () => _openEditSheet(order: order),
),
const SizedBox(width: UiConstants.space2),
if (order.confirmedApps.isNotEmpty)
_buildHeaderIconButton(
icon: _expanded
? UiIcons.chevronUp
: UiIcons.chevronDown,
color: UiColors.iconSecondary,
bgColor: UiColors.bgSecondary,
onTap: () => setState(() => _expanded = !_expanded),
onTap: () =>
setState(() => _expanded = !_expanded),
),
],
),

View File

@@ -389,7 +389,7 @@ query listAcceptedApplicationsByBusinessForDay(
checkInTime
checkOutTime
appliedAt
staff { id fullName email phone photoUrl }
staff { id fullName email phone photoUrl averageRating }
}
}