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 # Basic Usage
```dart ```dart
ExampleConnector.instance.getWorkforceById(getWorkforceByIdVariables).execute(); ExampleConnector.instance.createRecentPayment(createRecentPaymentVariables).execute();
ExampleConnector.instance.getWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVariables).execute(); ExampleConnector.instance.updateRecentPayment(updateRecentPaymentVariables).execute();
ExampleConnector.instance.listWorkforceByVendorId(listWorkforceByVendorIdVariables).execute(); ExampleConnector.instance.deleteRecentPayment(deleteRecentPaymentVariables).execute();
ExampleConnector.instance.listWorkforceByStaffId(listWorkforceByStaffIdVariables).execute(); ExampleConnector.instance.CreateStaff(createStaffVariables).execute();
ExampleConnector.instance.getWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVariables).execute(); ExampleConnector.instance.UpdateStaff(updateStaffVariables).execute();
ExampleConnector.instance.createEmergencyContact(createEmergencyContactVariables).execute(); ExampleConnector.instance.DeleteStaff(deleteStaffVariables).execute();
ExampleConnector.instance.updateEmergencyContact(updateEmergencyContactVariables).execute(); ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute();
ExampleConnector.instance.deleteEmergencyContact(deleteEmergencyContactVariables).execute(); ExampleConnector.instance.listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVariables).execute();
ExampleConnector.instance.listStaffAvailabilities(listStaffAvailabilitiesVariables).execute(); ExampleConnector.instance.listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVariables).execute();
ExampleConnector.instance.listStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVariables).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: This is an example of a mutation with an optional field:
```dart ```dart
await ExampleConnector.instance.listStaffCoursesByCourseId({ ... }) await ExampleConnector.instance.updateAttireOption({ ... })
.offset(...) .itemId(...)
.execute(); .execute();
``` ```

View File

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

View File

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

View File

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

View File

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