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