getting last getApplicationsbyStaffId
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# Basic Usage
|
||||
|
||||
```dart
|
||||
ExampleConnector.instance.createBusiness(createBusinessVariables).execute();
|
||||
ExampleConnector.instance.updateBusiness(updateBusinessVariables).execute();
|
||||
ExampleConnector.instance.deleteBusiness(deleteBusinessVariables).execute();
|
||||
ExampleConnector.instance.createRecentPayment(createRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.updateRecentPayment(updateRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.deleteRecentPayment(deleteRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.createStaffAvailability(createStaffAvailabilityVariables).execute();
|
||||
ExampleConnector.instance.updateStaffAvailability(updateStaffAvailabilityVariables).execute();
|
||||
ExampleConnector.instance.deleteStaffAvailability(deleteStaffAvailabilityVariables).execute();
|
||||
ExampleConnector.instance.listTeamHudDepartments(listTeamHudDepartmentsVariables).execute();
|
||||
ExampleConnector.instance.createCategory(createCategoryVariables).execute();
|
||||
ExampleConnector.instance.updateCategory(updateCategoryVariables).execute();
|
||||
ExampleConnector.instance.deleteCategory(deleteCategoryVariables).execute();
|
||||
ExampleConnector.instance.listInvoices(listInvoicesVariables).execute();
|
||||
ExampleConnector.instance.getInvoiceById(getInvoiceByIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByVendorId(listInvoicesByVendorIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByBusinessId(listInvoicesByBusinessIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByOrderId(listInvoicesByOrderIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByStatus(listInvoicesByStatusVariables).execute();
|
||||
ExampleConnector.instance.filterInvoices(filterInvoicesVariables).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.updateApplicationStatus({ ... })
|
||||
.shiftId(...)
|
||||
await ExampleConnector.instance.updateAttireOption({ ... })
|
||||
.itemId(...)
|
||||
.execute();
|
||||
```
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,8 @@ class GetApplicationsByStaffIdVariablesBuilder {
|
||||
String staffId;
|
||||
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<Timestamp> _dayStart = Optional.optional((json) => json['dayStart'] = Timestamp.fromJson(json['dayStart']), defaultSerializer);
|
||||
Optional<Timestamp> _dayEnd = Optional.optional((json) => json['dayEnd'] = Timestamp.fromJson(json['dayEnd']), defaultSerializer);
|
||||
|
||||
final FirebaseDataConnect _dataConnect; GetApplicationsByStaffIdVariablesBuilder offset(int? t) {
|
||||
_offset.value = t;
|
||||
@@ -13,6 +15,14 @@ class GetApplicationsByStaffIdVariablesBuilder {
|
||||
_limit.value = t;
|
||||
return this;
|
||||
}
|
||||
GetApplicationsByStaffIdVariablesBuilder dayStart(Timestamp? t) {
|
||||
_dayStart.value = t;
|
||||
return this;
|
||||
}
|
||||
GetApplicationsByStaffIdVariablesBuilder dayEnd(Timestamp? t) {
|
||||
_dayEnd.value = t;
|
||||
return this;
|
||||
}
|
||||
|
||||
GetApplicationsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,});
|
||||
Deserializer<GetApplicationsByStaffIdData> dataDeserializer = (dynamic json) => GetApplicationsByStaffIdData.fromJson(jsonDecode(json));
|
||||
@@ -22,7 +32,7 @@ class GetApplicationsByStaffIdVariablesBuilder {
|
||||
}
|
||||
|
||||
QueryRef<GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables> ref() {
|
||||
GetApplicationsByStaffIdVariables vars= GetApplicationsByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,);
|
||||
GetApplicationsByStaffIdVariables vars= GetApplicationsByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,dayStart: _dayStart,dayEnd: _dayEnd,);
|
||||
return _dataConnect.query("getApplicationsByStaffId", dataDeserializer, varsSerializer, vars);
|
||||
}
|
||||
}
|
||||
@@ -314,12 +324,14 @@ class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
|
||||
final String businessName;
|
||||
final String? email;
|
||||
final String? contactName;
|
||||
final String? companyLogoUrl;
|
||||
GetApplicationsByStaffIdApplicationsShiftOrderBusiness.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
businessName = nativeFromJson<String>(json['businessName']),
|
||||
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
|
||||
contactName = json['contactName'] == null ? null : nativeFromJson<String>(json['contactName']);
|
||||
contactName = json['contactName'] == null ? null : nativeFromJson<String>(json['contactName']),
|
||||
companyLogoUrl = json['companyLogoUrl'] == null ? null : nativeFromJson<String>(json['companyLogoUrl']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -333,11 +345,12 @@ class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
|
||||
return id == otherTyped.id &&
|
||||
businessName == otherTyped.businessName &&
|
||||
email == otherTyped.email &&
|
||||
contactName == otherTyped.contactName;
|
||||
contactName == otherTyped.contactName &&
|
||||
companyLogoUrl == otherTyped.companyLogoUrl;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]);
|
||||
int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode, companyLogoUrl.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -350,6 +363,9 @@ class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
|
||||
if (contactName != null) {
|
||||
json['contactName'] = nativeToJson<String?>(contactName);
|
||||
}
|
||||
if (companyLogoUrl != null) {
|
||||
json['companyLogoUrl'] = nativeToJson<String?>(companyLogoUrl);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -358,6 +374,7 @@ class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
|
||||
required this.businessName,
|
||||
this.email,
|
||||
this.contactName,
|
||||
this.companyLogoUrl,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -569,6 +586,8 @@ class GetApplicationsByStaffIdVariables {
|
||||
final String staffId;
|
||||
late final Optional<int>offset;
|
||||
late final Optional<int>limit;
|
||||
late final Optional<Timestamp>dayStart;
|
||||
late final Optional<Timestamp>dayEnd;
|
||||
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
|
||||
GetApplicationsByStaffIdVariables.fromJson(Map<String, dynamic> json):
|
||||
|
||||
@@ -583,6 +602,14 @@ class GetApplicationsByStaffIdVariables {
|
||||
limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
|
||||
|
||||
|
||||
dayStart = Optional.optional((json) => json['dayStart'] = Timestamp.fromJson(json['dayStart']), defaultSerializer);
|
||||
dayStart.value = json['dayStart'] == null ? null : Timestamp.fromJson(json['dayStart']);
|
||||
|
||||
|
||||
dayEnd = Optional.optional((json) => json['dayEnd'] = Timestamp.fromJson(json['dayEnd']), defaultSerializer);
|
||||
dayEnd.value = json['dayEnd'] == null ? null : Timestamp.fromJson(json['dayEnd']);
|
||||
|
||||
}
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@@ -596,11 +623,13 @@ class GetApplicationsByStaffIdVariables {
|
||||
final GetApplicationsByStaffIdVariables otherTyped = other as GetApplicationsByStaffIdVariables;
|
||||
return staffId == otherTyped.staffId &&
|
||||
offset == otherTyped.offset &&
|
||||
limit == otherTyped.limit;
|
||||
limit == otherTyped.limit &&
|
||||
dayStart == otherTyped.dayStart &&
|
||||
dayEnd == otherTyped.dayEnd;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]);
|
||||
int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode, dayStart.hashCode, dayEnd.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -612,6 +641,12 @@ class GetApplicationsByStaffIdVariables {
|
||||
if(limit.state == OptionalState.set) {
|
||||
json['limit'] = limit.toJson();
|
||||
}
|
||||
if(dayStart.state == OptionalState.set) {
|
||||
json['dayStart'] = dayStart.toJson();
|
||||
}
|
||||
if(dayEnd.state == OptionalState.set) {
|
||||
json['dayEnd'] = dayEnd.toJson();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -619,6 +654,8 @@ class GetApplicationsByStaffIdVariables {
|
||||
required this.staffId,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
required this.dayStart,
|
||||
required this.dayEnd,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -269,9 +269,18 @@ query getApplicationsByStaffId(
|
||||
$staffId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$dayStart: Timestamp
|
||||
$dayEnd: Timestamp
|
||||
) @auth(level: USER) {
|
||||
applications(
|
||||
where: { staffId: { eq: $staffId } }
|
||||
where: {
|
||||
staffId: { eq: $staffId }
|
||||
status: { in: [ACCEPTED, CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE] }
|
||||
shift: {
|
||||
date: { ge: $dayStart, le: $dayEnd }
|
||||
}
|
||||
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
) {
|
||||
@@ -310,6 +319,7 @@ query getApplicationsByStaffId(
|
||||
businessName
|
||||
email
|
||||
contactName
|
||||
companyLogoUrl
|
||||
}
|
||||
vendor {
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user