showing better name to shifts in shows orders
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
# Basic Usage
|
# Basic Usage
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
ExampleConnector.instance.listAccounts().execute();
|
ExampleConnector.instance.listRoles().execute();
|
||||||
ExampleConnector.instance.getAccountById(getAccountByIdVariables).execute();
|
ExampleConnector.instance.getRoleById(getRoleByIdVariables).execute();
|
||||||
ExampleConnector.instance.getAccountsByOwnerId(getAccountsByOwnerIdVariables).execute();
|
ExampleConnector.instance.listRolesByVendorId(listRolesByVendorIdVariables).execute();
|
||||||
ExampleConnector.instance.filterAccounts(filterAccountsVariables).execute();
|
ExampleConnector.instance.listRolesByroleCategoryId(listRolesByroleCategoryIdVariables).execute();
|
||||||
ExampleConnector.instance.createApplication(createApplicationVariables).execute();
|
ExampleConnector.instance.CreateUser(createUserVariables).execute();
|
||||||
ExampleConnector.instance.updateApplicationStatus(updateApplicationStatusVariables).execute();
|
ExampleConnector.instance.UpdateUser(updateUserVariables).execute();
|
||||||
ExampleConnector.instance.deleteApplication(deleteApplicationVariables).execute();
|
ExampleConnector.instance.DeleteUser(deleteUserVariables).execute();
|
||||||
ExampleConnector.instance.CreateAssignment(createAssignmentVariables).execute();
|
ExampleConnector.instance.createVendor(createVendorVariables).execute();
|
||||||
ExampleConnector.instance.UpdateAssignment(updateAssignmentVariables).execute();
|
ExampleConnector.instance.updateVendor(updateVendorVariables).execute();
|
||||||
ExampleConnector.instance.DeleteAssignment(deleteAssignmentVariables).execute();
|
ExampleConnector.instance.deleteVendor(deleteVendorVariables).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.filterStaffAvailabilityStats({ ... })
|
await ExampleConnector.instance.listClientFeedbackRatingsByVendorId({ ... })
|
||||||
.needWorkIndexMin(...)
|
.dateFrom(...)
|
||||||
.execute();
|
.execute();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -239,9 +239,11 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
|
|||||||
@immutable
|
@immutable
|
||||||
class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
|
class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
|
||||||
final String id;
|
final String id;
|
||||||
|
final String? eventName;
|
||||||
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(dynamic json):
|
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(dynamic json):
|
||||||
|
|
||||||
id = nativeFromJson<String>(json['id']);
|
id = nativeFromJson<String>(json['id']),
|
||||||
|
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
if(identical(this, other)) {
|
if(identical(this, other)) {
|
||||||
@@ -252,21 +254,26 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder;
|
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder;
|
||||||
return id == otherTyped.id;
|
return id == otherTyped.id &&
|
||||||
|
eventName == otherTyped.eventName;
|
||||||
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
int get hashCode => id.hashCode;
|
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]);
|
||||||
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
Map<String, dynamic> json = {};
|
Map<String, dynamic> json = {};
|
||||||
json['id'] = nativeToJson<String>(id);
|
json['id'] = nativeToJson<String>(id);
|
||||||
|
if (eventName != null) {
|
||||||
|
json['eventName'] = nativeToJson<String?>(eventName);
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder({
|
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder({
|
||||||
required this.id,
|
required this.id,
|
||||||
|
this.eventName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,13 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
|
|||||||
'end=${shiftRole.endTime?.toJson()} hours=$hours totalValue=$totalValue',
|
'end=${shiftRole.endTime?.toJson()} hours=$hours totalValue=$totalValue',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final String eventName =
|
||||||
|
shiftRole.shift.order.eventName ?? shiftRole.shift.title;
|
||||||
|
|
||||||
return domain.OrderItem(
|
return domain.OrderItem(
|
||||||
id: _shiftRoleKey(shiftRole.shiftId, shiftRole.roleId),
|
id: _shiftRoleKey(shiftRole.shiftId, shiftRole.roleId),
|
||||||
orderId: shiftRole.shift.order.id,
|
orderId: shiftRole.shift.order.id,
|
||||||
title: '${shiftRole.role.name} - ${shiftRole.shift.title}',
|
title: '${shiftRole.role.name} - $eventName',
|
||||||
clientName: businessName,
|
clientName: businessName,
|
||||||
status: status,
|
status: status,
|
||||||
date: dateStr,
|
date: dateStr,
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ query listShiftRolesByBusinessAndDateRange(
|
|||||||
locationAddress
|
locationAddress
|
||||||
title
|
title
|
||||||
status
|
status
|
||||||
order { id }
|
order { id eventName }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user