Merge pull request #331 from Oloodi/312-feature-integrate-google-maps-places-autocomplete-for-hub-address-validation

Continuation of the mobile apps development
This commit is contained in:
Achintha Isuru
2026-01-30 00:31:52 -05:00
committed by GitHub
135 changed files with 26116 additions and 22111 deletions

1
.gitignore vendored
View File

@@ -18,7 +18,6 @@ $RECYCLE.BIN/
# IDE & Editors # IDE & Editors
.idea/ .idea/
.vscode/
*.iml *.iml
*.iws *.iws
*.swp *.swp

41
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,41 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Client (Dev) - Android",
"request": "launch",
"type": "dart",
"program": "apps/mobile/apps/client/lib/main.dart",
"args": [
"--dart-define-from-file=${workspaceFolder}/apps/mobile/config.dev.json"
]
},
{
"name": "Client (Dev) - iOS",
"request": "launch",
"type": "dart",
"program": "apps/mobile/apps/client/lib/main.dart",
"args": [
"--dart-define-from-file=${workspaceFolder}/apps/mobile/config.dev.json"
]
},
{
"name": "Staff (Dev) - Android",
"request": "launch",
"type": "dart",
"program": "apps/mobile/apps/staff/lib/main.dart",
"args": [
"--dart-define-from-file=${workspaceFolder}/apps/mobile/config.dev.json"
]
},
{
"name": "Staff (Dev) - iOS",
"request": "launch",
"type": "dart",
"program": "apps/mobile/apps/staff/lib/main.dart",
"args": [
"--dart-define-from-file=${workspaceFolder}/apps/mobile/config.dev.json"
]
}
]
}

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1 version: 0.0.1
resolution: workspace resolution: workspace
environment: environment:

View File

@@ -0,0 +1,3 @@
{
"GOOGLE_PLACES_API_KEY": "AIzaSyAS9yTf4q51_CNSZ7mbmeS9V3l_LZR80lU"
}

View File

@@ -6,7 +6,7 @@
/// Locales: 2 /// Locales: 2
/// Strings: 1038 (519 per locale) /// Strings: 1038 (519 per locale)
/// ///
/// Built on 2026-01-29 at 04:15 UTC /// Built on 2026-01-29 at 15:50 UTC
// coverage:ignore-file // coverage:ignore-file
// ignore_for_file: type=lint, unused_import // ignore_for_file: type=lint, unused_import

View File

@@ -1,16 +1,16 @@
# Basic Usage # Basic Usage
```dart ```dart
ExampleConnector.instance.CreateAssignment(createAssignmentVariables).execute(); ExampleConnector.instance.createRecentPayment(createRecentPaymentVariables).execute();
ExampleConnector.instance.UpdateAssignment(updateAssignmentVariables).execute(); ExampleConnector.instance.updateRecentPayment(updateRecentPaymentVariables).execute();
ExampleConnector.instance.DeleteAssignment(deleteAssignmentVariables).execute(); ExampleConnector.instance.deleteRecentPayment(deleteRecentPaymentVariables).execute();
ExampleConnector.instance.listBenefitsData(listBenefitsDataVariables).execute(); ExampleConnector.instance.CreateStaff(createStaffVariables).execute();
ExampleConnector.instance.getBenefitsDataByKey(getBenefitsDataByKeyVariables).execute(); ExampleConnector.instance.UpdateStaff(updateStaffVariables).execute();
ExampleConnector.instance.listBenefitsDataByStaffId(listBenefitsDataByStaffIdVariables).execute(); ExampleConnector.instance.DeleteStaff(deleteStaffVariables).execute();
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVariables).execute();
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVariables).execute();
ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute(); ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVariables).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: This is an example of a mutation with an optional field:
```dart ```dart
await ExampleConnector.instance.filterStaffAvailabilityStats({ ... }) await ExampleConnector.instance.updateAttireOption({ ... })
.needWorkIndexMin(...) .itemId(...)
.execute(); .execute();
``` ```

View File

@@ -4,7 +4,6 @@ class CreateOrderVariablesBuilder {
Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);
String businessId; String businessId;
OrderType orderType; OrderType orderType;
Optional<String> _location = Optional.optional(nativeFromJson, nativeToJson);
Optional<OrderStatus> _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); Optional<OrderStatus> _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer);
Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
Optional<Timestamp> _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); Optional<Timestamp> _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer);
@@ -16,7 +15,7 @@ class CreateOrderVariablesBuilder {
Optional<AnyValue> _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<int> _requested = Optional.optional(nativeFromJson, nativeToJson); Optional<int> _requested = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _hub = Optional.optional(nativeFromJson, nativeToJson); String teamHubId;
Optional<AnyValue> _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<Timestamp> _permanentStartDate = Optional.optional((json) => json['permanentStartDate'] = Timestamp.fromJson(json['permanentStartDate']), defaultSerializer); Optional<Timestamp> _permanentStartDate = Optional.optional((json) => json['permanentStartDate'] = Timestamp.fromJson(json['permanentStartDate']), defaultSerializer);
Optional<AnyValue> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
@@ -29,10 +28,6 @@ class CreateOrderVariablesBuilder {
_vendorId.value = t; _vendorId.value = t;
return this; return this;
} }
CreateOrderVariablesBuilder location(String? t) {
_location.value = t;
return this;
}
CreateOrderVariablesBuilder status(OrderStatus? t) { CreateOrderVariablesBuilder status(OrderStatus? t) {
_status.value = t; _status.value = t;
return this; return this;
@@ -77,10 +72,6 @@ class CreateOrderVariablesBuilder {
_requested.value = t; _requested.value = t;
return this; return this;
} }
CreateOrderVariablesBuilder hub(String? t) {
_hub.value = t;
return this;
}
CreateOrderVariablesBuilder recurringDays(AnyValue? t) { CreateOrderVariablesBuilder recurringDays(AnyValue? t) {
_recurringDays.value = t; _recurringDays.value = t;
return this; return this;
@@ -106,7 +97,7 @@ class CreateOrderVariablesBuilder {
return this; return this;
} }
CreateOrderVariablesBuilder(this._dataConnect, {required this.businessId,required this.orderType,}); CreateOrderVariablesBuilder(this._dataConnect, {required this.businessId,required this.orderType,required this.teamHubId,});
Deserializer<CreateOrderData> dataDeserializer = (dynamic json) => CreateOrderData.fromJson(jsonDecode(json)); Deserializer<CreateOrderData> dataDeserializer = (dynamic json) => CreateOrderData.fromJson(jsonDecode(json));
Serializer<CreateOrderVariables> varsSerializer = (CreateOrderVariables vars) => jsonEncode(vars.toJson()); Serializer<CreateOrderVariables> varsSerializer = (CreateOrderVariables vars) => jsonEncode(vars.toJson());
Future<OperationResult<CreateOrderData, CreateOrderVariables>> execute() { Future<OperationResult<CreateOrderData, CreateOrderVariables>> execute() {
@@ -114,7 +105,7 @@ class CreateOrderVariablesBuilder {
} }
MutationRef<CreateOrderData, CreateOrderVariables> ref() { MutationRef<CreateOrderData, CreateOrderVariables> ref() {
CreateOrderVariables vars= CreateOrderVariables(vendorId: _vendorId,businessId: businessId,orderType: orderType,location: _location,status: _status,date: _date,startDate: _startDate,endDate: _endDate,duration: _duration,lunchBreak: _lunchBreak,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentStartDate: _permanentStartDate,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,); CreateOrderVariables vars= CreateOrderVariables(vendorId: _vendorId,businessId: businessId,orderType: orderType,status: _status,date: _date,startDate: _startDate,endDate: _endDate,duration: _duration,lunchBreak: _lunchBreak,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,teamHubId: teamHubId,recurringDays: _recurringDays,permanentStartDate: _permanentStartDate,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,);
return _dataConnect.mutation("createOrder", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("createOrder", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -192,7 +183,6 @@ class CreateOrderVariables {
late final Optional<String>vendorId; late final Optional<String>vendorId;
final String businessId; final String businessId;
final OrderType orderType; final OrderType orderType;
late final Optional<String>location;
late final Optional<OrderStatus>status; late final Optional<OrderStatus>status;
late final Optional<Timestamp>date; late final Optional<Timestamp>date;
late final Optional<Timestamp>startDate; late final Optional<Timestamp>startDate;
@@ -204,7 +194,7 @@ class CreateOrderVariables {
late final Optional<AnyValue>assignedStaff; late final Optional<AnyValue>assignedStaff;
late final Optional<AnyValue>shifts; late final Optional<AnyValue>shifts;
late final Optional<int>requested; late final Optional<int>requested;
late final Optional<String>hub; final String teamHubId;
late final Optional<AnyValue>recurringDays; late final Optional<AnyValue>recurringDays;
late final Optional<Timestamp>permanentStartDate; late final Optional<Timestamp>permanentStartDate;
late final Optional<AnyValue>permanentDays; late final Optional<AnyValue>permanentDays;
@@ -215,7 +205,8 @@ class CreateOrderVariables {
CreateOrderVariables.fromJson(Map<String, dynamic> json): CreateOrderVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = OrderType.values.byName(json['orderType']) { orderType = OrderType.values.byName(json['orderType']),
teamHubId = nativeFromJson<String>(json['teamHubId']) {
vendorId = Optional.optional(nativeFromJson, nativeToJson); vendorId = Optional.optional(nativeFromJson, nativeToJson);
@@ -224,10 +215,6 @@ class CreateOrderVariables {
location = Optional.optional(nativeFromJson, nativeToJson);
location.value = json['location'] == null ? null : nativeFromJson<String>(json['location']);
status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer);
status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']); status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']);
@@ -272,9 +259,6 @@ class CreateOrderVariables {
requested.value = json['requested'] == null ? null : nativeFromJson<int>(json['requested']); requested.value = json['requested'] == null ? null : nativeFromJson<int>(json['requested']);
hub = Optional.optional(nativeFromJson, nativeToJson);
hub.value = json['hub'] == null ? null : nativeFromJson<String>(json['hub']);
recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']); recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']);
@@ -313,7 +297,6 @@ class CreateOrderVariables {
return vendorId == otherTyped.vendorId && return vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -325,7 +308,7 @@ class CreateOrderVariables {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub && teamHubId == otherTyped.teamHubId &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentStartDate == otherTyped.permanentStartDate && permanentStartDate == otherTyped.permanentStartDate &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
@@ -335,7 +318,7 @@ class CreateOrderVariables {
} }
@override @override
int get hashCode => Object.hashAll([vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentStartDate.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, teamHubId.hashCode, recurringDays.hashCode, permanentStartDate.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -347,9 +330,6 @@ class CreateOrderVariables {
json['orderType'] = json['orderType'] =
orderType.name orderType.name
; ;
if(location.state == OptionalState.set) {
json['location'] = location.toJson();
}
if(status.state == OptionalState.set) { if(status.state == OptionalState.set) {
json['status'] = status.toJson(); json['status'] = status.toJson();
} }
@@ -383,9 +363,7 @@ class CreateOrderVariables {
if(requested.state == OptionalState.set) { if(requested.state == OptionalState.set) {
json['requested'] = requested.toJson(); json['requested'] = requested.toJson();
} }
if(hub.state == OptionalState.set) { json['teamHubId'] = nativeToJson<String>(teamHubId);
json['hub'] = hub.toJson();
}
if(recurringDays.state == OptionalState.set) { if(recurringDays.state == OptionalState.set) {
json['recurringDays'] = recurringDays.toJson(); json['recurringDays'] = recurringDays.toJson();
} }
@@ -411,7 +389,6 @@ class CreateOrderVariables {
required this.vendorId, required this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
required this.location,
required this.status, required this.status,
required this.date, required this.date,
required this.startDate, required this.startDate,
@@ -423,7 +400,7 @@ class CreateOrderVariables {
required this.assignedStaff, required this.assignedStaff,
required this.shifts, required this.shifts,
required this.requested, required this.requested,
required this.hub, required this.teamHubId,
required this.recurringDays, required this.recurringDays,
required this.permanentStartDate, required this.permanentStartDate,
required this.permanentDays, required this.permanentDays,

View File

@@ -12,6 +12,11 @@ class CreateShiftVariablesBuilder {
Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson); Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson); Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson);
Optional<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); Optional<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer);
Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson); Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson);
@@ -57,6 +62,26 @@ class CreateShiftVariablesBuilder {
_longitude.value = t; _longitude.value = t;
return this; return this;
} }
CreateShiftVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
CreateShiftVariablesBuilder city(String? t) {
_city.value = t;
return this;
}
CreateShiftVariablesBuilder state(String? t) {
_state.value = t;
return this;
}
CreateShiftVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
CreateShiftVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
CreateShiftVariablesBuilder description(String? t) { CreateShiftVariablesBuilder description(String? t) {
_description.value = t; _description.value = t;
return this; return this;
@@ -98,7 +123,7 @@ class CreateShiftVariablesBuilder {
} }
MutationRef<CreateShiftData, CreateShiftVariables> ref() { MutationRef<CreateShiftData, CreateShiftVariables> ref() {
CreateShiftVariables vars= CreateShiftVariables(title: title,orderId: orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,createdBy: _createdBy,); CreateShiftVariables vars= CreateShiftVariables(title: title,orderId: orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,placeId: _placeId,city: _city,state: _state,street: _street,country: _country,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,createdBy: _createdBy,);
return _dataConnect.mutation("createShift", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("createShift", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -184,6 +209,11 @@ class CreateShiftVariables {
late final Optional<String>locationAddress; late final Optional<String>locationAddress;
late final Optional<double>latitude; late final Optional<double>latitude;
late final Optional<double>longitude; late final Optional<double>longitude;
late final Optional<String>placeId;
late final Optional<String>city;
late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>description; late final Optional<String>description;
late final Optional<ShiftStatus>status; late final Optional<ShiftStatus>status;
late final Optional<int>workersNeeded; late final Optional<int>workersNeeded;
@@ -237,6 +267,26 @@ class CreateShiftVariables {
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']); longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
state = Optional.optional(nativeFromJson, nativeToJson);
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
description = Optional.optional(nativeFromJson, nativeToJson); description = Optional.optional(nativeFromJson, nativeToJson);
description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']); description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
@@ -292,6 +342,11 @@ class CreateShiftVariables {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -303,7 +358,7 @@ class CreateShiftVariables {
} }
@override @override
int get hashCode => Object.hashAll([title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdBy.hashCode]); int get hashCode => Object.hashAll([title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdBy.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -337,6 +392,21 @@ class CreateShiftVariables {
if(longitude.state == OptionalState.set) { if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson(); json['longitude'] = longitude.toJson();
} }
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(city.state == OptionalState.set) {
json['city'] = city.toJson();
}
if(state.state == OptionalState.set) {
json['state'] = state.toJson();
}
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(description.state == OptionalState.set) { if(description.state == OptionalState.set) {
json['description'] = description.toJson(); json['description'] = description.toJson();
} }
@@ -376,6 +446,11 @@ class CreateShiftVariables {
required this.locationAddress, required this.locationAddress,
required this.latitude, required this.latitude,
required this.longitude, required this.longitude,
required this.placeId,
required this.city,
required this.state,
required this.street,
required this.country,
required this.description, required this.description,
required this.status, required this.status,
required this.workersNeeded, required this.workersNeeded,

View File

@@ -4,14 +4,31 @@ class CreateTeamHubVariablesBuilder {
String teamId; String teamId;
String hubName; String hubName;
String address; String address;
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson);
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson); Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
final FirebaseDataConnect _dataConnect; CreateTeamHubVariablesBuilder city(String? t) { final FirebaseDataConnect _dataConnect; CreateTeamHubVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
CreateTeamHubVariablesBuilder latitude(double? t) {
_latitude.value = t;
return this;
}
CreateTeamHubVariablesBuilder longitude(double? t) {
_longitude.value = t;
return this;
}
CreateTeamHubVariablesBuilder city(String? t) {
_city.value = t; _city.value = t;
return this; return this;
} }
@@ -19,6 +36,14 @@ class CreateTeamHubVariablesBuilder {
_state.value = t; _state.value = t;
return this; return this;
} }
CreateTeamHubVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
CreateTeamHubVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
CreateTeamHubVariablesBuilder zipCode(String? t) { CreateTeamHubVariablesBuilder zipCode(String? t) {
_zipCode.value = t; _zipCode.value = t;
return this; return this;
@@ -44,7 +69,7 @@ class CreateTeamHubVariablesBuilder {
} }
MutationRef<CreateTeamHubData, CreateTeamHubVariables> ref() { MutationRef<CreateTeamHubData, CreateTeamHubVariables> ref() {
CreateTeamHubVariables vars= CreateTeamHubVariables(teamId: teamId,hubName: hubName,address: address,city: _city,state: _state,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,); CreateTeamHubVariables vars= CreateTeamHubVariables(teamId: teamId,hubName: hubName,address: address,placeId: _placeId,latitude: _latitude,longitude: _longitude,city: _city,state: _state,street: _street,country: _country,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
return _dataConnect.mutation("createTeamHub", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("createTeamHub", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -122,8 +147,13 @@ class CreateTeamHubVariables {
final String teamId; final String teamId;
final String hubName; final String hubName;
final String address; final String address;
late final Optional<String>placeId;
late final Optional<double>latitude;
late final Optional<double>longitude;
late final Optional<String>city; late final Optional<String>city;
late final Optional<String>state; late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>zipCode; late final Optional<String>zipCode;
late final Optional<String>managerName; late final Optional<String>managerName;
late final Optional<bool>isActive; late final Optional<bool>isActive;
@@ -139,6 +169,18 @@ class CreateTeamHubVariables {
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
latitude = Optional.optional(nativeFromJson, nativeToJson);
latitude.value = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']);
longitude = Optional.optional(nativeFromJson, nativeToJson);
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
city = Optional.optional(nativeFromJson, nativeToJson); city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']); city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
@@ -147,6 +189,14 @@ class CreateTeamHubVariables {
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']); state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
zipCode = Optional.optional(nativeFromJson, nativeToJson); zipCode = Optional.optional(nativeFromJson, nativeToJson);
zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']); zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
@@ -176,8 +226,13 @@ class CreateTeamHubVariables {
return teamId == otherTyped.teamId && return teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
@@ -185,7 +240,7 @@ class CreateTeamHubVariables {
} }
@override @override
int get hashCode => Object.hashAll([teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]); int get hashCode => Object.hashAll([teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -193,12 +248,27 @@ class CreateTeamHubVariables {
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName); json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address); json['address'] = nativeToJson<String>(address);
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(latitude.state == OptionalState.set) {
json['latitude'] = latitude.toJson();
}
if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson();
}
if(city.state == OptionalState.set) { if(city.state == OptionalState.set) {
json['city'] = city.toJson(); json['city'] = city.toJson();
} }
if(state.state == OptionalState.set) { if(state.state == OptionalState.set) {
json['state'] = state.toJson(); json['state'] = state.toJson();
} }
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(zipCode.state == OptionalState.set) { if(zipCode.state == OptionalState.set) {
json['zipCode'] = zipCode.toJson(); json['zipCode'] = zipCode.toJson();
} }
@@ -218,8 +288,13 @@ class CreateTeamHubVariables {
required this.teamId, required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
required this.placeId,
required this.latitude,
required this.longitude,
required this.city, required this.city,
required this.state, required this.state,
required this.street,
required this.country,
required this.zipCode, required this.zipCode,
required this.managerName, required this.managerName,
required this.isActive, required this.isActive,

View File

@@ -371,15 +371,15 @@ class FilterInvoicesInvoicesBusiness {
@immutable @immutable
class FilterInvoicesInvoicesOrder { class FilterInvoicesInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final FilterInvoicesInvoicesOrderTeamHub teamHub;
FilterInvoicesInvoicesOrder.fromJson(dynamic json): FilterInvoicesInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = FilterInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -391,13 +391,13 @@ class FilterInvoicesInvoicesOrder {
final FilterInvoicesInvoicesOrder otherTyped = other as FilterInvoicesInvoicesOrder; final FilterInvoicesInvoicesOrder otherTyped = other as FilterInvoicesInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -405,23 +405,67 @@ class FilterInvoicesInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
FilterInvoicesInvoicesOrder({ FilterInvoicesInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class FilterInvoicesInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
FilterInvoicesInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final FilterInvoicesInvoicesOrderTeamHub otherTyped = other as FilterInvoicesInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
FilterInvoicesInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -61,6 +61,11 @@ class FilterShiftsShifts {
final String? locationAddress; final String? locationAddress;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final String? placeId;
final String? city;
final String? state;
final String? street;
final String? country;
final String? description; final String? description;
final EnumValue<ShiftStatus>? status; final EnumValue<ShiftStatus>? status;
final int? workersNeeded; final int? workersNeeded;
@@ -86,6 +91,11 @@ class FilterShiftsShifts {
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']), locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']), latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']), longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
description = json['description'] == null ? null : nativeFromJson<String>(json['description']), description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']), workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
@@ -121,6 +131,11 @@ class FilterShiftsShifts {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -135,7 +150,7 @@ class FilterShiftsShifts {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -170,6 +185,21 @@ class FilterShiftsShifts {
if (longitude != null) { if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude); json['longitude'] = nativeToJson<double?>(longitude);
} }
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (description != null) { if (description != null) {
json['description'] = nativeToJson<String?>(description); json['description'] = nativeToJson<String?>(description);
} }
@@ -219,6 +249,11 @@ class FilterShiftsShifts {
this.locationAddress, this.locationAddress,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.placeId,
this.city,
this.state,
this.street,
this.country,
this.description, this.description,
this.status, this.status,
this.workersNeeded, this.workersNeeded,

View File

@@ -198,14 +198,14 @@ class GetApplicationByIdApplicationShift {
class GetApplicationByIdApplicationShiftOrder { class GetApplicationByIdApplicationShiftOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final GetApplicationByIdApplicationShiftOrderTeamHub teamHub;
final GetApplicationByIdApplicationShiftOrderBusiness business; final GetApplicationByIdApplicationShiftOrderBusiness business;
final GetApplicationByIdApplicationShiftOrderVendor? vendor; final GetApplicationByIdApplicationShiftOrderVendor? vendor;
GetApplicationByIdApplicationShiftOrder.fromJson(dynamic json): GetApplicationByIdApplicationShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']), teamHub = GetApplicationByIdApplicationShiftOrderTeamHub.fromJson(json['teamHub']),
business = GetApplicationByIdApplicationShiftOrderBusiness.fromJson(json['business']), business = GetApplicationByIdApplicationShiftOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetApplicationByIdApplicationShiftOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetApplicationByIdApplicationShiftOrderVendor.fromJson(json['vendor']);
@override @override
@@ -220,13 +220,13 @@ class GetApplicationByIdApplicationShiftOrder {
final GetApplicationByIdApplicationShiftOrder otherTyped = other as GetApplicationByIdApplicationShiftOrder; final GetApplicationByIdApplicationShiftOrder otherTyped = other as GetApplicationByIdApplicationShiftOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location && teamHub == otherTyped.teamHub &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -235,9 +235,7 @@ class GetApplicationByIdApplicationShiftOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
json['business'] = business.toJson(); json['business'] = business.toJson();
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
@@ -248,12 +246,58 @@ class GetApplicationByIdApplicationShiftOrder {
GetApplicationByIdApplicationShiftOrder({ GetApplicationByIdApplicationShiftOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
required this.business, required this.business,
this.vendor, this.vendor,
}); });
} }
@immutable
class GetApplicationByIdApplicationShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetApplicationByIdApplicationShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetApplicationByIdApplicationShiftOrderTeamHub otherTyped = other as GetApplicationByIdApplicationShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetApplicationByIdApplicationShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetApplicationByIdApplicationShiftOrderBusiness { class GetApplicationByIdApplicationShiftOrderBusiness {
final String id; final String id;

View File

@@ -198,14 +198,14 @@ class GetApplicationsByShiftIdApplicationsShift {
class GetApplicationsByShiftIdApplicationsShiftOrder { class GetApplicationsByShiftIdApplicationsShiftOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final GetApplicationsByShiftIdApplicationsShiftOrderTeamHub teamHub;
final GetApplicationsByShiftIdApplicationsShiftOrderBusiness business; final GetApplicationsByShiftIdApplicationsShiftOrderBusiness business;
final GetApplicationsByShiftIdApplicationsShiftOrderVendor? vendor; final GetApplicationsByShiftIdApplicationsShiftOrderVendor? vendor;
GetApplicationsByShiftIdApplicationsShiftOrder.fromJson(dynamic json): GetApplicationsByShiftIdApplicationsShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']), teamHub = GetApplicationsByShiftIdApplicationsShiftOrderTeamHub.fromJson(json['teamHub']),
business = GetApplicationsByShiftIdApplicationsShiftOrderBusiness.fromJson(json['business']), business = GetApplicationsByShiftIdApplicationsShiftOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdApplicationsShiftOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdApplicationsShiftOrderVendor.fromJson(json['vendor']);
@override @override
@@ -220,13 +220,13 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
final GetApplicationsByShiftIdApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrder; final GetApplicationsByShiftIdApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location && teamHub == otherTyped.teamHub &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -235,9 +235,7 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
json['business'] = business.toJson(); json['business'] = business.toJson();
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
@@ -248,12 +246,58 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
GetApplicationsByShiftIdApplicationsShiftOrder({ GetApplicationsByShiftIdApplicationsShiftOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
required this.business, required this.business,
this.vendor, this.vendor,
}); });
} }
@immutable
class GetApplicationsByShiftIdApplicationsShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetApplicationsByShiftIdApplicationsShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetApplicationsByShiftIdApplicationsShiftOrderTeamHub otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetApplicationsByShiftIdApplicationsShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetApplicationsByShiftIdApplicationsShiftOrderBusiness { class GetApplicationsByShiftIdApplicationsShiftOrderBusiness {
final String id; final String id;

View File

@@ -209,14 +209,14 @@ class GetApplicationsByShiftIdAndStatusApplicationsShift {
class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder { class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub teamHub;
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness business; final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness business;
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor? vendor; final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor? vendor;
GetApplicationsByShiftIdAndStatusApplicationsShiftOrder.fromJson(dynamic json): GetApplicationsByShiftIdAndStatusApplicationsShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']), teamHub = GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub.fromJson(json['teamHub']),
business = GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness.fromJson(json['business']), business = GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor.fromJson(json['vendor']);
@override @override
@@ -231,13 +231,13 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrder; final GetApplicationsByShiftIdAndStatusApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location && teamHub == otherTyped.teamHub &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -246,9 +246,7 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
json['business'] = business.toJson(); json['business'] = business.toJson();
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
@@ -259,12 +257,58 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
GetApplicationsByShiftIdAndStatusApplicationsShiftOrder({ GetApplicationsByShiftIdAndStatusApplicationsShiftOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
required this.business, required this.business,
this.vendor, this.vendor,
}); });
} }
@immutable
class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness { class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness {
final String id; final String id;

View File

@@ -208,14 +208,14 @@ class GetApplicationsByStaffIdApplicationsShift {
class GetApplicationsByStaffIdApplicationsShiftOrder { class GetApplicationsByStaffIdApplicationsShiftOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final GetApplicationsByStaffIdApplicationsShiftOrderTeamHub teamHub;
final GetApplicationsByStaffIdApplicationsShiftOrderBusiness business; final GetApplicationsByStaffIdApplicationsShiftOrderBusiness business;
final GetApplicationsByStaffIdApplicationsShiftOrderVendor? vendor; final GetApplicationsByStaffIdApplicationsShiftOrderVendor? vendor;
GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(dynamic json): GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']), teamHub = GetApplicationsByStaffIdApplicationsShiftOrderTeamHub.fromJson(json['teamHub']),
business = GetApplicationsByStaffIdApplicationsShiftOrderBusiness.fromJson(json['business']), business = GetApplicationsByStaffIdApplicationsShiftOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetApplicationsByStaffIdApplicationsShiftOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetApplicationsByStaffIdApplicationsShiftOrderVendor.fromJson(json['vendor']);
@override @override
@@ -230,13 +230,13 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
final GetApplicationsByStaffIdApplicationsShiftOrder otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrder; final GetApplicationsByStaffIdApplicationsShiftOrder otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location && teamHub == otherTyped.teamHub &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -245,9 +245,7 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
json['business'] = business.toJson(); json['business'] = business.toJson();
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
@@ -258,12 +256,58 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
GetApplicationsByStaffIdApplicationsShiftOrder({ GetApplicationsByStaffIdApplicationsShiftOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
required this.business, required this.business,
this.vendor, this.vendor,
}); });
} }
@immutable
class GetApplicationsByStaffIdApplicationsShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetApplicationsByStaffIdApplicationsShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetApplicationsByStaffIdApplicationsShiftOrderTeamHub otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetApplicationsByStaffIdApplicationsShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetApplicationsByStaffIdApplicationsShiftOrderBusiness { class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
final String id; final String id;

View File

@@ -321,15 +321,15 @@ class GetInvoiceByIdInvoiceBusiness {
@immutable @immutable
class GetInvoiceByIdInvoiceOrder { class GetInvoiceByIdInvoiceOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final GetInvoiceByIdInvoiceOrderTeamHub teamHub;
GetInvoiceByIdInvoiceOrder.fromJson(dynamic json): GetInvoiceByIdInvoiceOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = GetInvoiceByIdInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -341,13 +341,13 @@ class GetInvoiceByIdInvoiceOrder {
final GetInvoiceByIdInvoiceOrder otherTyped = other as GetInvoiceByIdInvoiceOrder; final GetInvoiceByIdInvoiceOrder otherTyped = other as GetInvoiceByIdInvoiceOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -355,23 +355,67 @@ class GetInvoiceByIdInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
GetInvoiceByIdInvoiceOrder({ GetInvoiceByIdInvoiceOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class GetInvoiceByIdInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetInvoiceByIdInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetInvoiceByIdInvoiceOrderTeamHub otherTyped = other as GetInvoiceByIdInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetInvoiceByIdInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -24,7 +24,6 @@ class GetOrderByIdOrder {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -35,7 +34,6 @@ class GetOrderByIdOrder {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -44,6 +42,7 @@ class GetOrderByIdOrder {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetOrderByIdOrderBusiness business; final GetOrderByIdOrderBusiness business;
final GetOrderByIdOrderVendor? vendor; final GetOrderByIdOrderVendor? vendor;
final GetOrderByIdOrderTeamHub teamHub;
GetOrderByIdOrder.fromJson(dynamic json): GetOrderByIdOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -51,7 +50,6 @@ class GetOrderByIdOrder {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -62,7 +60,6 @@ class GetOrderByIdOrder {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -70,7 +67,8 @@ class GetOrderByIdOrder {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetOrderByIdOrderBusiness.fromJson(json['business']), business = GetOrderByIdOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetOrderByIdOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetOrderByIdOrderVendor.fromJson(json['vendor']),
teamHub = GetOrderByIdOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -86,7 +84,6 @@ class GetOrderByIdOrder {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -97,7 +94,6 @@ class GetOrderByIdOrder {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -105,11 +101,12 @@ class GetOrderByIdOrder {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -125,9 +122,6 @@ class GetOrderByIdOrder {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -160,9 +154,6 @@ class GetOrderByIdOrder {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -185,6 +176,7 @@ class GetOrderByIdOrder {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -194,7 +186,6 @@ class GetOrderByIdOrder {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -205,7 +196,6 @@ class GetOrderByIdOrder {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -214,6 +204,7 @@ class GetOrderByIdOrder {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -309,6 +300,52 @@ class GetOrderByIdOrderVendor {
}); });
} }
@immutable
class GetOrderByIdOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
GetOrderByIdOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetOrderByIdOrderTeamHub otherTyped = other as GetOrderByIdOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetOrderByIdOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetOrderByIdData { class GetOrderByIdData {
final GetOrderByIdOrder? order; final GetOrderByIdOrder? order;

View File

@@ -34,7 +34,6 @@ class GetOrdersByBusinessIdOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -45,7 +44,6 @@ class GetOrdersByBusinessIdOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -54,6 +52,7 @@ class GetOrdersByBusinessIdOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetOrdersByBusinessIdOrdersBusiness business; final GetOrdersByBusinessIdOrdersBusiness business;
final GetOrdersByBusinessIdOrdersVendor? vendor; final GetOrdersByBusinessIdOrdersVendor? vendor;
final GetOrdersByBusinessIdOrdersTeamHub teamHub;
GetOrdersByBusinessIdOrders.fromJson(dynamic json): GetOrdersByBusinessIdOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -61,7 +60,6 @@ class GetOrdersByBusinessIdOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -72,7 +70,6 @@ class GetOrdersByBusinessIdOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -80,7 +77,8 @@ class GetOrdersByBusinessIdOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetOrdersByBusinessIdOrdersBusiness.fromJson(json['business']), business = GetOrdersByBusinessIdOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetOrdersByBusinessIdOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetOrdersByBusinessIdOrdersVendor.fromJson(json['vendor']),
teamHub = GetOrdersByBusinessIdOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -96,7 +94,6 @@ class GetOrdersByBusinessIdOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -107,7 +104,6 @@ class GetOrdersByBusinessIdOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -115,11 +111,12 @@ class GetOrdersByBusinessIdOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -135,9 +132,6 @@ class GetOrdersByBusinessIdOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -170,9 +164,6 @@ class GetOrdersByBusinessIdOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -195,6 +186,7 @@ class GetOrdersByBusinessIdOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -204,7 +196,6 @@ class GetOrdersByBusinessIdOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -215,7 +206,6 @@ class GetOrdersByBusinessIdOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -224,6 +214,7 @@ class GetOrdersByBusinessIdOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -319,6 +310,52 @@ class GetOrdersByBusinessIdOrdersVendor {
}); });
} }
@immutable
class GetOrdersByBusinessIdOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
GetOrdersByBusinessIdOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetOrdersByBusinessIdOrdersTeamHub otherTyped = other as GetOrdersByBusinessIdOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetOrdersByBusinessIdOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetOrdersByBusinessIdData { class GetOrdersByBusinessIdData {
final List<GetOrdersByBusinessIdOrders> orders; final List<GetOrdersByBusinessIdOrders> orders;

View File

@@ -35,7 +35,6 @@ class GetOrdersByDateRangeOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -46,7 +45,6 @@ class GetOrdersByDateRangeOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -55,6 +53,7 @@ class GetOrdersByDateRangeOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetOrdersByDateRangeOrdersBusiness business; final GetOrdersByDateRangeOrdersBusiness business;
final GetOrdersByDateRangeOrdersVendor? vendor; final GetOrdersByDateRangeOrdersVendor? vendor;
final GetOrdersByDateRangeOrdersTeamHub teamHub;
GetOrdersByDateRangeOrders.fromJson(dynamic json): GetOrdersByDateRangeOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -62,7 +61,6 @@ class GetOrdersByDateRangeOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -73,7 +71,6 @@ class GetOrdersByDateRangeOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -81,7 +78,8 @@ class GetOrdersByDateRangeOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetOrdersByDateRangeOrdersBusiness.fromJson(json['business']), business = GetOrdersByDateRangeOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetOrdersByDateRangeOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetOrdersByDateRangeOrdersVendor.fromJson(json['vendor']),
teamHub = GetOrdersByDateRangeOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -97,7 +95,6 @@ class GetOrdersByDateRangeOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -108,7 +105,6 @@ class GetOrdersByDateRangeOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -116,11 +112,12 @@ class GetOrdersByDateRangeOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -136,9 +133,6 @@ class GetOrdersByDateRangeOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -171,9 +165,6 @@ class GetOrdersByDateRangeOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -196,6 +187,7 @@ class GetOrdersByDateRangeOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -205,7 +197,6 @@ class GetOrdersByDateRangeOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -216,7 +207,6 @@ class GetOrdersByDateRangeOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -225,6 +215,7 @@ class GetOrdersByDateRangeOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -320,6 +311,52 @@ class GetOrdersByDateRangeOrdersVendor {
}); });
} }
@immutable
class GetOrdersByDateRangeOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
GetOrdersByDateRangeOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetOrdersByDateRangeOrdersTeamHub otherTyped = other as GetOrdersByDateRangeOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetOrdersByDateRangeOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetOrdersByDateRangeData { class GetOrdersByDateRangeData {
final List<GetOrdersByDateRangeOrders> orders; final List<GetOrdersByDateRangeOrders> orders;

View File

@@ -34,7 +34,6 @@ class GetOrdersByStatusOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -45,7 +44,6 @@ class GetOrdersByStatusOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -54,6 +52,7 @@ class GetOrdersByStatusOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetOrdersByStatusOrdersBusiness business; final GetOrdersByStatusOrdersBusiness business;
final GetOrdersByStatusOrdersVendor? vendor; final GetOrdersByStatusOrdersVendor? vendor;
final GetOrdersByStatusOrdersTeamHub teamHub;
GetOrdersByStatusOrders.fromJson(dynamic json): GetOrdersByStatusOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -61,7 +60,6 @@ class GetOrdersByStatusOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -72,7 +70,6 @@ class GetOrdersByStatusOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -80,7 +77,8 @@ class GetOrdersByStatusOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetOrdersByStatusOrdersBusiness.fromJson(json['business']), business = GetOrdersByStatusOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetOrdersByStatusOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetOrdersByStatusOrdersVendor.fromJson(json['vendor']),
teamHub = GetOrdersByStatusOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -96,7 +94,6 @@ class GetOrdersByStatusOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -107,7 +104,6 @@ class GetOrdersByStatusOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -115,11 +111,12 @@ class GetOrdersByStatusOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -135,9 +132,6 @@ class GetOrdersByStatusOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -170,9 +164,6 @@ class GetOrdersByStatusOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -195,6 +186,7 @@ class GetOrdersByStatusOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -204,7 +196,6 @@ class GetOrdersByStatusOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -215,7 +206,6 @@ class GetOrdersByStatusOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -224,6 +214,7 @@ class GetOrdersByStatusOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -319,6 +310,52 @@ class GetOrdersByStatusOrdersVendor {
}); });
} }
@immutable
class GetOrdersByStatusOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
GetOrdersByStatusOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetOrdersByStatusOrdersTeamHub otherTyped = other as GetOrdersByStatusOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetOrdersByStatusOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetOrdersByStatusData { class GetOrdersByStatusData {
final List<GetOrdersByStatusOrders> orders; final List<GetOrdersByStatusOrders> orders;

View File

@@ -34,7 +34,6 @@ class GetOrdersByVendorIdOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -45,7 +44,6 @@ class GetOrdersByVendorIdOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -54,6 +52,7 @@ class GetOrdersByVendorIdOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetOrdersByVendorIdOrdersBusiness business; final GetOrdersByVendorIdOrdersBusiness business;
final GetOrdersByVendorIdOrdersVendor? vendor; final GetOrdersByVendorIdOrdersVendor? vendor;
final GetOrdersByVendorIdOrdersTeamHub teamHub;
GetOrdersByVendorIdOrders.fromJson(dynamic json): GetOrdersByVendorIdOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -61,7 +60,6 @@ class GetOrdersByVendorIdOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -72,7 +70,6 @@ class GetOrdersByVendorIdOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -80,7 +77,8 @@ class GetOrdersByVendorIdOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetOrdersByVendorIdOrdersBusiness.fromJson(json['business']), business = GetOrdersByVendorIdOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetOrdersByVendorIdOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetOrdersByVendorIdOrdersVendor.fromJson(json['vendor']),
teamHub = GetOrdersByVendorIdOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -96,7 +94,6 @@ class GetOrdersByVendorIdOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -107,7 +104,6 @@ class GetOrdersByVendorIdOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -115,11 +111,12 @@ class GetOrdersByVendorIdOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -135,9 +132,6 @@ class GetOrdersByVendorIdOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -170,9 +164,6 @@ class GetOrdersByVendorIdOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -195,6 +186,7 @@ class GetOrdersByVendorIdOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -204,7 +196,6 @@ class GetOrdersByVendorIdOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -215,7 +206,6 @@ class GetOrdersByVendorIdOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -224,6 +214,7 @@ class GetOrdersByVendorIdOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -319,6 +310,52 @@ class GetOrdersByVendorIdOrdersVendor {
}); });
} }
@immutable
class GetOrdersByVendorIdOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
GetOrdersByVendorIdOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetOrdersByVendorIdOrdersTeamHub otherTyped = other as GetOrdersByVendorIdOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetOrdersByVendorIdOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetOrdersByVendorIdData { class GetOrdersByVendorIdData {
final List<GetOrdersByVendorIdOrders> orders; final List<GetOrdersByVendorIdOrders> orders;

View File

@@ -34,7 +34,6 @@ class GetRapidOrdersOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -45,7 +44,6 @@ class GetRapidOrdersOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -54,6 +52,7 @@ class GetRapidOrdersOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final GetRapidOrdersOrdersBusiness business; final GetRapidOrdersOrdersBusiness business;
final GetRapidOrdersOrdersVendor? vendor; final GetRapidOrdersOrdersVendor? vendor;
final GetRapidOrdersOrdersTeamHub teamHub;
GetRapidOrdersOrders.fromJson(dynamic json): GetRapidOrdersOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -61,7 +60,6 @@ class GetRapidOrdersOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -72,7 +70,6 @@ class GetRapidOrdersOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -80,7 +77,8 @@ class GetRapidOrdersOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = GetRapidOrdersOrdersBusiness.fromJson(json['business']), business = GetRapidOrdersOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : GetRapidOrdersOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : GetRapidOrdersOrdersVendor.fromJson(json['vendor']),
teamHub = GetRapidOrdersOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -96,7 +94,6 @@ class GetRapidOrdersOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -107,7 +104,6 @@ class GetRapidOrdersOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -115,11 +111,12 @@ class GetRapidOrdersOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -135,9 +132,6 @@ class GetRapidOrdersOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -170,9 +164,6 @@ class GetRapidOrdersOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -195,6 +186,7 @@ class GetRapidOrdersOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -204,7 +196,6 @@ class GetRapidOrdersOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -215,7 +206,6 @@ class GetRapidOrdersOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -224,6 +214,7 @@ class GetRapidOrdersOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -319,6 +310,52 @@ class GetRapidOrdersOrdersVendor {
}); });
} }
@immutable
class GetRapidOrdersOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
GetRapidOrdersOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetRapidOrdersOrdersTeamHub otherTyped = other as GetRapidOrdersOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
GetRapidOrdersOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class GetRapidOrdersData { class GetRapidOrdersData {
final List<GetRapidOrdersOrders> orders; final List<GetRapidOrdersOrders> orders;

View File

@@ -31,6 +31,11 @@ class GetShiftByIdShift {
final String? locationAddress; final String? locationAddress;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final String? placeId;
final String? city;
final String? state;
final String? street;
final String? country;
final String? description; final String? description;
final EnumValue<ShiftStatus>? status; final EnumValue<ShiftStatus>? status;
final int? workersNeeded; final int? workersNeeded;
@@ -56,6 +61,11 @@ class GetShiftByIdShift {
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']), locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']), latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']), longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
description = json['description'] == null ? null : nativeFromJson<String>(json['description']), description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']), workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
@@ -91,6 +101,11 @@ class GetShiftByIdShift {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -105,7 +120,7 @@ class GetShiftByIdShift {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -140,6 +155,21 @@ class GetShiftByIdShift {
if (longitude != null) { if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude); json['longitude'] = nativeToJson<double?>(longitude);
} }
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (description != null) { if (description != null) {
json['description'] = nativeToJson<String?>(description); json['description'] = nativeToJson<String?>(description);
} }
@@ -189,6 +219,11 @@ class GetShiftByIdShift {
this.locationAddress, this.locationAddress,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.placeId,
this.city,
this.state,
this.street,
this.country,
this.description, this.description,
this.status, this.status,
this.workersNeeded, this.workersNeeded,

View File

@@ -51,6 +51,11 @@ class GetShiftsByBusinessIdShifts {
final String? locationAddress; final String? locationAddress;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final String? placeId;
final String? city;
final String? state;
final String? street;
final String? country;
final String? description; final String? description;
final EnumValue<ShiftStatus>? status; final EnumValue<ShiftStatus>? status;
final int? workersNeeded; final int? workersNeeded;
@@ -76,6 +81,11 @@ class GetShiftsByBusinessIdShifts {
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']), locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']), latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']), longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
description = json['description'] == null ? null : nativeFromJson<String>(json['description']), description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']), workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
@@ -111,6 +121,11 @@ class GetShiftsByBusinessIdShifts {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -125,7 +140,7 @@ class GetShiftsByBusinessIdShifts {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -160,6 +175,21 @@ class GetShiftsByBusinessIdShifts {
if (longitude != null) { if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude); json['longitude'] = nativeToJson<double?>(longitude);
} }
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (description != null) { if (description != null) {
json['description'] = nativeToJson<String?>(description); json['description'] = nativeToJson<String?>(description);
} }
@@ -209,6 +239,11 @@ class GetShiftsByBusinessIdShifts {
this.locationAddress, this.locationAddress,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.placeId,
this.city,
this.state,
this.street,
this.country,
this.description, this.description,
this.status, this.status,
this.workersNeeded, this.workersNeeded,

View File

@@ -51,6 +51,11 @@ class GetShiftsByVendorIdShifts {
final String? locationAddress; final String? locationAddress;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final String? placeId;
final String? city;
final String? state;
final String? street;
final String? country;
final String? description; final String? description;
final EnumValue<ShiftStatus>? status; final EnumValue<ShiftStatus>? status;
final int? workersNeeded; final int? workersNeeded;
@@ -76,6 +81,11 @@ class GetShiftsByVendorIdShifts {
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']), locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']), latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']), longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
description = json['description'] == null ? null : nativeFromJson<String>(json['description']), description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']), workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
@@ -111,6 +121,11 @@ class GetShiftsByVendorIdShifts {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -125,7 +140,7 @@ class GetShiftsByVendorIdShifts {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -160,6 +175,21 @@ class GetShiftsByVendorIdShifts {
if (longitude != null) { if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude); json['longitude'] = nativeToJson<double?>(longitude);
} }
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (description != null) { if (description != null) {
json['description'] = nativeToJson<String?>(description); json['description'] = nativeToJson<String?>(description);
} }
@@ -209,6 +239,11 @@ class GetShiftsByVendorIdShifts {
this.locationAddress, this.locationAddress,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.placeId,
this.city,
this.state,
this.street,
this.country,
this.description, this.description,
this.status, this.status,
this.workersNeeded, this.workersNeeded,

View File

@@ -23,30 +23,34 @@ class GetTeamHubByIdTeamHub {
final String teamId; final String teamId;
final String hubName; final String hubName;
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city; final String? city;
final String? state; final String? state;
final String? street;
final String? country;
final String? zipCode; final String? zipCode;
final String? managerName; final String? managerName;
final bool isActive; final bool isActive;
final AnyValue? departments; final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetTeamHubByIdTeamHub.fromJson(dynamic json): GetTeamHubByIdTeamHub.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']), teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']), hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']), address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']), city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']), state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']), zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']), managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']), isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -61,19 +65,21 @@ class GetTeamHubByIdTeamHub {
teamId == otherTyped.teamId && teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
departments == otherTyped.departments && departments == otherTyped.departments;
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -82,12 +88,27 @@ class GetTeamHubByIdTeamHub {
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName); json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address); json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) { if (city != null) {
json['city'] = nativeToJson<String?>(city); json['city'] = nativeToJson<String?>(city);
} }
if (state != null) { if (state != null) {
json['state'] = nativeToJson<String?>(state); json['state'] = nativeToJson<String?>(state);
} }
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) { if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode); json['zipCode'] = nativeToJson<String?>(zipCode);
} }
@@ -98,15 +119,6 @@ class GetTeamHubByIdTeamHub {
if (departments != null) { if (departments != null) {
json['departments'] = departments!.toJson(); json['departments'] = departments!.toJson();
} }
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json; return json;
} }
@@ -115,15 +127,17 @@ class GetTeamHubByIdTeamHub {
required this.teamId, required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city, this.city,
this.state, this.state,
this.street,
this.country,
this.zipCode, this.zipCode,
this.managerName, this.managerName,
required this.isActive, required this.isActive,
this.departments, this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
}); });
} }

View File

@@ -2,8 +2,18 @@ part of 'generated.dart';
class GetTeamHubsByTeamIdVariablesBuilder { class GetTeamHubsByTeamIdVariablesBuilder {
String teamId; String teamId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; GetTeamHubsByTeamIdVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
GetTeamHubsByTeamIdVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
final FirebaseDataConnect _dataConnect;
GetTeamHubsByTeamIdVariablesBuilder(this._dataConnect, {required this.teamId,}); GetTeamHubsByTeamIdVariablesBuilder(this._dataConnect, {required this.teamId,});
Deserializer<GetTeamHubsByTeamIdData> dataDeserializer = (dynamic json) => GetTeamHubsByTeamIdData.fromJson(jsonDecode(json)); Deserializer<GetTeamHubsByTeamIdData> dataDeserializer = (dynamic json) => GetTeamHubsByTeamIdData.fromJson(jsonDecode(json));
Serializer<GetTeamHubsByTeamIdVariables> varsSerializer = (GetTeamHubsByTeamIdVariables vars) => jsonEncode(vars.toJson()); Serializer<GetTeamHubsByTeamIdVariables> varsSerializer = (GetTeamHubsByTeamIdVariables vars) => jsonEncode(vars.toJson());
@@ -12,7 +22,7 @@ class GetTeamHubsByTeamIdVariablesBuilder {
} }
QueryRef<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables> ref() { QueryRef<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables> ref() {
GetTeamHubsByTeamIdVariables vars= GetTeamHubsByTeamIdVariables(teamId: teamId,); GetTeamHubsByTeamIdVariables vars= GetTeamHubsByTeamIdVariables(teamId: teamId,offset: _offset,limit: _limit,);
return _dataConnect.query("getTeamHubsByTeamId", dataDeserializer, varsSerializer, vars); return _dataConnect.query("getTeamHubsByTeamId", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -23,30 +33,34 @@ class GetTeamHubsByTeamIdTeamHubs {
final String teamId; final String teamId;
final String hubName; final String hubName;
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city; final String? city;
final String? state; final String? state;
final String? street;
final String? country;
final String? zipCode; final String? zipCode;
final String? managerName; final String? managerName;
final bool isActive; final bool isActive;
final AnyValue? departments; final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetTeamHubsByTeamIdTeamHubs.fromJson(dynamic json): GetTeamHubsByTeamIdTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']), teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']), hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']), address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']), city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']), state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']), zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']), managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']), isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -61,19 +75,21 @@ class GetTeamHubsByTeamIdTeamHubs {
teamId == otherTyped.teamId && teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
departments == otherTyped.departments && departments == otherTyped.departments;
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -82,12 +98,27 @@ class GetTeamHubsByTeamIdTeamHubs {
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName); json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address); json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) { if (city != null) {
json['city'] = nativeToJson<String?>(city); json['city'] = nativeToJson<String?>(city);
} }
if (state != null) { if (state != null) {
json['state'] = nativeToJson<String?>(state); json['state'] = nativeToJson<String?>(state);
} }
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) { if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode); json['zipCode'] = nativeToJson<String?>(zipCode);
} }
@@ -98,15 +129,6 @@ class GetTeamHubsByTeamIdTeamHubs {
if (departments != null) { if (departments != null) {
json['departments'] = departments!.toJson(); json['departments'] = departments!.toJson();
} }
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json; return json;
} }
@@ -115,15 +137,17 @@ class GetTeamHubsByTeamIdTeamHubs {
required this.teamId, required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city, this.city,
this.state, this.state,
this.street,
this.country,
this.zipCode, this.zipCode,
this.managerName, this.managerName,
required this.isActive, required this.isActive,
this.departments, this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
}); });
} }
@@ -166,10 +190,23 @@ class GetTeamHubsByTeamIdData {
@immutable @immutable
class GetTeamHubsByTeamIdVariables { class GetTeamHubsByTeamIdVariables {
final String teamId; final String teamId;
late final Optional<int>offset;
late final Optional<int>limit;
@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.')
GetTeamHubsByTeamIdVariables.fromJson(Map<String, dynamic> json): GetTeamHubsByTeamIdVariables.fromJson(Map<String, dynamic> json):
teamId = nativeFromJson<String>(json['teamId']); teamId = nativeFromJson<String>(json['teamId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -180,21 +217,31 @@ class GetTeamHubsByTeamIdVariables {
} }
final GetTeamHubsByTeamIdVariables otherTyped = other as GetTeamHubsByTeamIdVariables; final GetTeamHubsByTeamIdVariables otherTyped = other as GetTeamHubsByTeamIdVariables;
return teamId == otherTyped.teamId; return teamId == otherTyped.teamId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
} }
@override @override
int get hashCode => teamId.hashCode; int get hashCode => Object.hashAll([teamId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
Map<String, dynamic> json = {}; Map<String, dynamic> json = {};
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json; return json;
} }
GetTeamHubsByTeamIdVariables({ GetTeamHubsByTeamIdVariables({
required this.teamId, required this.teamId,
required this.offset,
required this.limit,
}); });
} }

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

@@ -197,14 +197,14 @@ class ListApplicationsApplicationsShift {
class ListApplicationsApplicationsShiftOrder { class ListApplicationsApplicationsShiftOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListApplicationsApplicationsShiftOrderTeamHub teamHub;
final ListApplicationsApplicationsShiftOrderBusiness business; final ListApplicationsApplicationsShiftOrderBusiness business;
final ListApplicationsApplicationsShiftOrderVendor? vendor; final ListApplicationsApplicationsShiftOrderVendor? vendor;
ListApplicationsApplicationsShiftOrder.fromJson(dynamic json): ListApplicationsApplicationsShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']), teamHub = ListApplicationsApplicationsShiftOrderTeamHub.fromJson(json['teamHub']),
business = ListApplicationsApplicationsShiftOrderBusiness.fromJson(json['business']), business = ListApplicationsApplicationsShiftOrderBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : ListApplicationsApplicationsShiftOrderVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : ListApplicationsApplicationsShiftOrderVendor.fromJson(json['vendor']);
@override @override
@@ -219,13 +219,13 @@ class ListApplicationsApplicationsShiftOrder {
final ListApplicationsApplicationsShiftOrder otherTyped = other as ListApplicationsApplicationsShiftOrder; final ListApplicationsApplicationsShiftOrder otherTyped = other as ListApplicationsApplicationsShiftOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location && teamHub == otherTyped.teamHub &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -234,9 +234,7 @@ class ListApplicationsApplicationsShiftOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
json['business'] = business.toJson(); json['business'] = business.toJson();
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
@@ -247,12 +245,58 @@ class ListApplicationsApplicationsShiftOrder {
ListApplicationsApplicationsShiftOrder({ ListApplicationsApplicationsShiftOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
required this.business, required this.business,
this.vendor, this.vendor,
}); });
} }
@immutable
class ListApplicationsApplicationsShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListApplicationsApplicationsShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListApplicationsApplicationsShiftOrderTeamHub otherTyped = other as ListApplicationsApplicationsShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListApplicationsApplicationsShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class ListApplicationsApplicationsShiftOrderBusiness { class ListApplicationsApplicationsShiftOrderBusiness {
final String id; final String id;

View File

@@ -331,15 +331,15 @@ class ListInvoicesInvoicesBusiness {
@immutable @immutable
class ListInvoicesInvoicesOrder { class ListInvoicesInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListInvoicesInvoicesOrderTeamHub teamHub;
ListInvoicesInvoicesOrder.fromJson(dynamic json): ListInvoicesInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListInvoicesInvoicesOrder {
final ListInvoicesInvoicesOrder otherTyped = other as ListInvoicesInvoicesOrder; final ListInvoicesInvoicesOrder otherTyped = other as ListInvoicesInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListInvoicesInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListInvoicesInvoicesOrder({ ListInvoicesInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListInvoicesInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListInvoicesInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListInvoicesInvoicesOrderTeamHub otherTyped = other as ListInvoicesInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListInvoicesInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -331,15 +331,15 @@ class ListInvoicesByBusinessIdInvoicesBusiness {
@immutable @immutable
class ListInvoicesByBusinessIdInvoicesOrder { class ListInvoicesByBusinessIdInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListInvoicesByBusinessIdInvoicesOrderTeamHub teamHub;
ListInvoicesByBusinessIdInvoicesOrder.fromJson(dynamic json): ListInvoicesByBusinessIdInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListInvoicesByBusinessIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListInvoicesByBusinessIdInvoicesOrder {
final ListInvoicesByBusinessIdInvoicesOrder otherTyped = other as ListInvoicesByBusinessIdInvoicesOrder; final ListInvoicesByBusinessIdInvoicesOrder otherTyped = other as ListInvoicesByBusinessIdInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListInvoicesByBusinessIdInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListInvoicesByBusinessIdInvoicesOrder({ ListInvoicesByBusinessIdInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListInvoicesByBusinessIdInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListInvoicesByBusinessIdInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListInvoicesByBusinessIdInvoicesOrderTeamHub otherTyped = other as ListInvoicesByBusinessIdInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListInvoicesByBusinessIdInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -331,15 +331,15 @@ class ListInvoicesByOrderIdInvoicesBusiness {
@immutable @immutable
class ListInvoicesByOrderIdInvoicesOrder { class ListInvoicesByOrderIdInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListInvoicesByOrderIdInvoicesOrderTeamHub teamHub;
ListInvoicesByOrderIdInvoicesOrder.fromJson(dynamic json): ListInvoicesByOrderIdInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListInvoicesByOrderIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListInvoicesByOrderIdInvoicesOrder {
final ListInvoicesByOrderIdInvoicesOrder otherTyped = other as ListInvoicesByOrderIdInvoicesOrder; final ListInvoicesByOrderIdInvoicesOrder otherTyped = other as ListInvoicesByOrderIdInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListInvoicesByOrderIdInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListInvoicesByOrderIdInvoicesOrder({ ListInvoicesByOrderIdInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListInvoicesByOrderIdInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListInvoicesByOrderIdInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListInvoicesByOrderIdInvoicesOrderTeamHub otherTyped = other as ListInvoicesByOrderIdInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListInvoicesByOrderIdInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -331,15 +331,15 @@ class ListInvoicesByStatusInvoicesBusiness {
@immutable @immutable
class ListInvoicesByStatusInvoicesOrder { class ListInvoicesByStatusInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListInvoicesByStatusInvoicesOrderTeamHub teamHub;
ListInvoicesByStatusInvoicesOrder.fromJson(dynamic json): ListInvoicesByStatusInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListInvoicesByStatusInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListInvoicesByStatusInvoicesOrder {
final ListInvoicesByStatusInvoicesOrder otherTyped = other as ListInvoicesByStatusInvoicesOrder; final ListInvoicesByStatusInvoicesOrder otherTyped = other as ListInvoicesByStatusInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListInvoicesByStatusInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListInvoicesByStatusInvoicesOrder({ ListInvoicesByStatusInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListInvoicesByStatusInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListInvoicesByStatusInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListInvoicesByStatusInvoicesOrderTeamHub otherTyped = other as ListInvoicesByStatusInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListInvoicesByStatusInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -331,15 +331,15 @@ class ListInvoicesByVendorIdInvoicesBusiness {
@immutable @immutable
class ListInvoicesByVendorIdInvoicesOrder { class ListInvoicesByVendorIdInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListInvoicesByVendorIdInvoicesOrderTeamHub teamHub;
ListInvoicesByVendorIdInvoicesOrder.fromJson(dynamic json): ListInvoicesByVendorIdInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListInvoicesByVendorIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListInvoicesByVendorIdInvoicesOrder {
final ListInvoicesByVendorIdInvoicesOrder otherTyped = other as ListInvoicesByVendorIdInvoicesOrder; final ListInvoicesByVendorIdInvoicesOrder otherTyped = other as ListInvoicesByVendorIdInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListInvoicesByVendorIdInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListInvoicesByVendorIdInvoicesOrder({ ListInvoicesByVendorIdInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListInvoicesByVendorIdInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListInvoicesByVendorIdInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListInvoicesByVendorIdInvoicesOrderTeamHub otherTyped = other as ListInvoicesByVendorIdInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListInvoicesByVendorIdInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -34,7 +34,6 @@ class ListOrdersOrders {
final String? vendorId; final String? vendorId;
final String businessId; final String businessId;
final EnumValue<OrderType> orderType; final EnumValue<OrderType> orderType;
final String? location;
final EnumValue<OrderStatus> status; final EnumValue<OrderStatus> status;
final Timestamp? date; final Timestamp? date;
final Timestamp? startDate; final Timestamp? startDate;
@@ -45,7 +44,6 @@ class ListOrdersOrders {
final AnyValue? assignedStaff; final AnyValue? assignedStaff;
final AnyValue? shifts; final AnyValue? shifts;
final int? requested; final int? requested;
final String? hub;
final AnyValue? recurringDays; final AnyValue? recurringDays;
final AnyValue? permanentDays; final AnyValue? permanentDays;
final String? poReference; final String? poReference;
@@ -54,6 +52,7 @@ class ListOrdersOrders {
final Timestamp? createdAt; final Timestamp? createdAt;
final ListOrdersOrdersBusiness business; final ListOrdersOrdersBusiness business;
final ListOrdersOrdersVendor? vendor; final ListOrdersOrdersVendor? vendor;
final ListOrdersOrdersTeamHub teamHub;
ListOrdersOrders.fromJson(dynamic json): ListOrdersOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
@@ -61,7 +60,6 @@ class ListOrdersOrders {
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
businessId = nativeFromJson<String>(json['businessId']), businessId = nativeFromJson<String>(json['businessId']),
orderType = orderTypeDeserializer(json['orderType']), orderType = orderTypeDeserializer(json['orderType']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
status = orderStatusDeserializer(json['status']), status = orderStatusDeserializer(json['status']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
@@ -72,7 +70,6 @@ class ListOrdersOrders {
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']), requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']),
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']), poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
@@ -80,7 +77,8 @@ class ListOrdersOrders {
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']), notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
business = ListOrdersOrdersBusiness.fromJson(json['business']), business = ListOrdersOrdersBusiness.fromJson(json['business']),
vendor = json['vendor'] == null ? null : ListOrdersOrdersVendor.fromJson(json['vendor']); vendor = json['vendor'] == null ? null : ListOrdersOrdersVendor.fromJson(json['vendor']),
teamHub = ListOrdersOrdersTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -96,7 +94,6 @@ class ListOrdersOrders {
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
orderType == otherTyped.orderType && orderType == otherTyped.orderType &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -107,7 +104,6 @@ class ListOrdersOrders {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
poReference == otherTyped.poReference && poReference == otherTyped.poReference &&
@@ -115,11 +111,12 @@ class ListOrdersOrders {
notes == otherTyped.notes && notes == otherTyped.notes &&
createdAt == otherTyped.createdAt && createdAt == otherTyped.createdAt &&
business == otherTyped.business && business == otherTyped.business &&
vendor == otherTyped.vendor; vendor == otherTyped.vendor &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -135,9 +132,6 @@ class ListOrdersOrders {
json['orderType'] = json['orderType'] =
orderTypeSerializer(orderType) orderTypeSerializer(orderType)
; ;
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
json['status'] = json['status'] =
orderStatusSerializer(status) orderStatusSerializer(status)
; ;
@@ -170,9 +164,6 @@ class ListOrdersOrders {
if (requested != null) { if (requested != null) {
json['requested'] = nativeToJson<int?>(requested); json['requested'] = nativeToJson<int?>(requested);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (recurringDays != null) { if (recurringDays != null) {
json['recurringDays'] = recurringDays!.toJson(); json['recurringDays'] = recurringDays!.toJson();
} }
@@ -195,6 +186,7 @@ class ListOrdersOrders {
if (vendor != null) { if (vendor != null) {
json['vendor'] = vendor!.toJson(); json['vendor'] = vendor!.toJson();
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
@@ -204,7 +196,6 @@ class ListOrdersOrders {
this.vendorId, this.vendorId,
required this.businessId, required this.businessId,
required this.orderType, required this.orderType,
this.location,
required this.status, required this.status,
this.date, this.date,
this.startDate, this.startDate,
@@ -215,7 +206,6 @@ class ListOrdersOrders {
this.assignedStaff, this.assignedStaff,
this.shifts, this.shifts,
this.requested, this.requested,
this.hub,
this.recurringDays, this.recurringDays,
this.permanentDays, this.permanentDays,
this.poReference, this.poReference,
@@ -224,6 +214,7 @@ class ListOrdersOrders {
this.createdAt, this.createdAt,
required this.business, required this.business,
this.vendor, this.vendor,
required this.teamHub,
}); });
} }
@@ -319,6 +310,52 @@ class ListOrdersOrdersVendor {
}); });
} }
@immutable
class ListOrdersOrdersTeamHub {
final String address;
final String? placeId;
final String hubName;
ListOrdersOrdersTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListOrdersOrdersTeamHub otherTyped = other as ListOrdersOrdersTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListOrdersOrdersTeamHub({
required this.address,
this.placeId,
required this.hubName,
});
}
@immutable @immutable
class ListOrdersData { class ListOrdersData {
final List<ListOrdersOrders> orders; final List<ListOrdersOrders> orders;

View File

@@ -0,0 +1,274 @@
part of 'generated.dart';
class ListOrdersByBusinessAndTeamHubVariablesBuilder {
String businessId;
String teamHubId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListOrdersByBusinessAndTeamHubVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListOrdersByBusinessAndTeamHubVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListOrdersByBusinessAndTeamHubVariablesBuilder(this._dataConnect, {required this.businessId,required this.teamHubId,});
Deserializer<ListOrdersByBusinessAndTeamHubData> dataDeserializer = (dynamic json) => ListOrdersByBusinessAndTeamHubData.fromJson(jsonDecode(json));
Serializer<ListOrdersByBusinessAndTeamHubVariables> varsSerializer = (ListOrdersByBusinessAndTeamHubVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables>> execute() {
return ref().execute();
}
QueryRef<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables> ref() {
ListOrdersByBusinessAndTeamHubVariables vars= ListOrdersByBusinessAndTeamHubVariables(businessId: businessId,teamHubId: teamHubId,offset: _offset,limit: _limit,);
return _dataConnect.query("listOrdersByBusinessAndTeamHub", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListOrdersByBusinessAndTeamHubOrders {
final String id;
final String? eventName;
final EnumValue<OrderType> orderType;
final EnumValue<OrderStatus> status;
final EnumValue<OrderDuration>? duration;
final String businessId;
final String? vendorId;
final String teamHubId;
final Timestamp? date;
final Timestamp? startDate;
final Timestamp? endDate;
final int? requested;
final double? total;
final String? notes;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
ListOrdersByBusinessAndTeamHubOrders.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
orderType = orderTypeDeserializer(json['orderType']),
status = orderStatusDeserializer(json['status']),
duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']),
businessId = nativeFromJson<String>(json['businessId']),
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
teamHubId = nativeFromJson<String>(json['teamHubId']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']),
requested = json['requested'] == null ? null : nativeFromJson<int>(json['requested']),
total = json['total'] == null ? null : nativeFromJson<double>(json['total']),
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListOrdersByBusinessAndTeamHubOrders otherTyped = other as ListOrdersByBusinessAndTeamHubOrders;
return id == otherTyped.id &&
eventName == otherTyped.eventName &&
orderType == otherTyped.orderType &&
status == otherTyped.status &&
duration == otherTyped.duration &&
businessId == otherTyped.businessId &&
vendorId == otherTyped.vendorId &&
teamHubId == otherTyped.teamHubId &&
date == otherTyped.date &&
startDate == otherTyped.startDate &&
endDate == otherTyped.endDate &&
requested == otherTyped.requested &&
total == otherTyped.total &&
notes == otherTyped.notes &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
}
@override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, orderType.hashCode, status.hashCode, duration.hashCode, businessId.hashCode, vendorId.hashCode, teamHubId.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, requested.hashCode, total.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName);
}
json['orderType'] =
orderTypeSerializer(orderType)
;
json['status'] =
orderStatusSerializer(status)
;
if (duration != null) {
json['duration'] =
orderDurationSerializer(duration!)
;
}
json['businessId'] = nativeToJson<String>(businessId);
if (vendorId != null) {
json['vendorId'] = nativeToJson<String?>(vendorId);
}
json['teamHubId'] = nativeToJson<String>(teamHubId);
if (date != null) {
json['date'] = date!.toJson();
}
if (startDate != null) {
json['startDate'] = startDate!.toJson();
}
if (endDate != null) {
json['endDate'] = endDate!.toJson();
}
if (requested != null) {
json['requested'] = nativeToJson<int?>(requested);
}
if (total != null) {
json['total'] = nativeToJson<double?>(total);
}
if (notes != null) {
json['notes'] = nativeToJson<String?>(notes);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
ListOrdersByBusinessAndTeamHubOrders({
required this.id,
this.eventName,
required this.orderType,
required this.status,
this.duration,
required this.businessId,
this.vendorId,
required this.teamHubId,
this.date,
this.startDate,
this.endDate,
this.requested,
this.total,
this.notes,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}
@immutable
class ListOrdersByBusinessAndTeamHubData {
final List<ListOrdersByBusinessAndTeamHubOrders> orders;
ListOrdersByBusinessAndTeamHubData.fromJson(dynamic json):
orders = (json['orders'] as List<dynamic>)
.map((e) => ListOrdersByBusinessAndTeamHubOrders.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListOrdersByBusinessAndTeamHubData otherTyped = other as ListOrdersByBusinessAndTeamHubData;
return orders == otherTyped.orders;
}
@override
int get hashCode => orders.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['orders'] = orders.map((e) => e.toJson()).toList();
return json;
}
ListOrdersByBusinessAndTeamHubData({
required this.orders,
});
}
@immutable
class ListOrdersByBusinessAndTeamHubVariables {
final String businessId;
final String teamHubId;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListOrdersByBusinessAndTeamHubVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
teamHubId = nativeFromJson<String>(json['teamHubId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListOrdersByBusinessAndTeamHubVariables otherTyped = other as ListOrdersByBusinessAndTeamHubVariables;
return businessId == otherTyped.businessId &&
teamHubId == otherTyped.teamHubId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, teamHubId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['teamHubId'] = nativeToJson<String>(teamHubId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListOrdersByBusinessAndTeamHubVariables({
required this.businessId,
required this.teamHubId,
required this.offset,
required this.limit,
});
}

View File

@@ -331,15 +331,15 @@ class ListOverdueInvoicesInvoicesBusiness {
@immutable @immutable
class ListOverdueInvoicesInvoicesOrder { class ListOverdueInvoicesInvoicesOrder {
final String? eventName; final String? eventName;
final String? hub;
final String? deparment; final String? deparment;
final String? poReference; final String? poReference;
final ListOverdueInvoicesInvoicesOrderTeamHub teamHub;
ListOverdueInvoicesInvoicesOrder.fromJson(dynamic json): ListOverdueInvoicesInvoicesOrder.fromJson(dynamic json):
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
hub = json['hub'] == null ? null : nativeFromJson<String>(json['hub']),
deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']), deparment = json['deparment'] == null ? null : nativeFromJson<String>(json['deparment']),
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']); poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
teamHub = ListOverdueInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -351,13 +351,13 @@ class ListOverdueInvoicesInvoicesOrder {
final ListOverdueInvoicesInvoicesOrder otherTyped = other as ListOverdueInvoicesInvoicesOrder; final ListOverdueInvoicesInvoicesOrder otherTyped = other as ListOverdueInvoicesInvoicesOrder;
return eventName == otherTyped.eventName && return eventName == otherTyped.eventName &&
hub == otherTyped.hub &&
deparment == otherTyped.deparment && deparment == otherTyped.deparment &&
poReference == otherTyped.poReference; poReference == otherTyped.poReference &&
teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([eventName.hashCode, deparment.hashCode, poReference.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -365,23 +365,67 @@ class ListOverdueInvoicesInvoicesOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (hub != null) {
json['hub'] = nativeToJson<String?>(hub);
}
if (deparment != null) { if (deparment != null) {
json['deparment'] = nativeToJson<String?>(deparment); json['deparment'] = nativeToJson<String?>(deparment);
} }
if (poReference != null) { if (poReference != null) {
json['poReference'] = nativeToJson<String?>(poReference); json['poReference'] = nativeToJson<String?>(poReference);
} }
json['teamHub'] = teamHub.toJson();
return json; return json;
} }
ListOverdueInvoicesInvoicesOrder({ ListOverdueInvoicesInvoicesOrder({
this.eventName, this.eventName,
this.hub,
this.deparment, this.deparment,
this.poReference, this.poReference,
required this.teamHub,
});
}
@immutable
class ListOverdueInvoicesInvoicesOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListOverdueInvoicesInvoicesOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListOverdueInvoicesInvoicesOrderTeamHub otherTyped = other as ListOverdueInvoicesInvoicesOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListOverdueInvoicesInvoicesOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -467,12 +467,12 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder { class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -485,11 +485,11 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder; final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -498,16 +498,60 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder({ ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -517,12 +517,12 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder { class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -535,11 +535,11 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder; final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -548,16 +548,60 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder({ ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -465,12 +465,12 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder { class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -483,11 +483,11 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder; final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -496,16 +496,60 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder({ ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -460,12 +460,12 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder { class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -478,11 +478,11 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder; final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -491,16 +491,60 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder({ ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -491,12 +491,12 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder { class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -509,11 +509,11 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder; final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -522,16 +522,60 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder({ ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -460,12 +460,12 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor {
class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder { class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
final String id; final String id;
final String? eventName; final String? eventName;
final String? location; final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub teamHub;
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder.fromJson(dynamic json): ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']), eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -478,11 +478,11 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder; final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder;
return id == otherTyped.id && return id == otherTyped.id &&
eventName == otherTyped.eventName && eventName == otherTyped.eventName &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -491,16 +491,60 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
if (eventName != null) { if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName); json['eventName'] = nativeToJson<String?>(eventName);
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder({ ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder({
required this.id, required this.id,
this.eventName, this.eventName,
this.location, required this.teamHub,
});
}
@immutable
class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -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,
}); });
} }

View File

@@ -255,13 +255,15 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShift {
@immutable @immutable
class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder { class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
final String? vendorId; final String? vendorId;
final String? eventName;
final Timestamp? date; final Timestamp? date;
final String? location; final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub teamHub;
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder.fromJson(dynamic json): ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder.fromJson(dynamic json):
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']), vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']), date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']); teamHub = ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub.fromJson(json['teamHub']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -273,12 +275,13 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder; final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder;
return vendorId == otherTyped.vendorId && return vendorId == otherTyped.vendorId &&
eventName == otherTyped.eventName &&
date == otherTyped.date && date == otherTyped.date &&
location == otherTyped.location; teamHub == otherTyped.teamHub;
} }
@override @override
int get hashCode => Object.hashAll([vendorId.hashCode, date.hashCode, location.hashCode]); int get hashCode => Object.hashAll([vendorId.hashCode, eventName.hashCode, date.hashCode, teamHub.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -286,19 +289,67 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
if (vendorId != null) { if (vendorId != null) {
json['vendorId'] = nativeToJson<String?>(vendorId); json['vendorId'] = nativeToJson<String?>(vendorId);
} }
if (eventName != null) {
json['eventName'] = nativeToJson<String?>(eventName);
}
if (date != null) { if (date != null) {
json['date'] = date!.toJson(); json['date'] = date!.toJson();
} }
if (location != null) { json['teamHub'] = teamHub.toJson();
json['location'] = nativeToJson<String?>(location);
}
return json; return json;
} }
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder({ ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder({
this.vendorId, this.vendorId,
this.eventName,
this.date, this.date,
this.location, required this.teamHub,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub {
final String address;
final String? placeId;
final String hubName;
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub.fromJson(dynamic json):
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
hubName = nativeFromJson<String>(json['hubName']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub;
return address == otherTyped.address &&
placeId == otherTyped.placeId &&
hubName == otherTyped.hubName;
}
@override
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
json['hubName'] = nativeToJson<String>(hubName);
return json;
}
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub({
required this.address,
this.placeId,
required this.hubName,
}); });
} }

View File

@@ -41,6 +41,11 @@ class ListShiftsShifts {
final String? locationAddress; final String? locationAddress;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final String? placeId;
final String? city;
final String? state;
final String? street;
final String? country;
final String? description; final String? description;
final EnumValue<ShiftStatus>? status; final EnumValue<ShiftStatus>? status;
final int? workersNeeded; final int? workersNeeded;
@@ -66,6 +71,11 @@ class ListShiftsShifts {
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']), locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']), latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']), longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
description = json['description'] == null ? null : nativeFromJson<String>(json['description']), description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']), workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
@@ -101,6 +111,11 @@ class ListShiftsShifts {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -115,7 +130,7 @@ class ListShiftsShifts {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -150,6 +165,21 @@ class ListShiftsShifts {
if (longitude != null) { if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude); json['longitude'] = nativeToJson<double?>(longitude);
} }
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (description != null) { if (description != null) {
json['description'] = nativeToJson<String?>(description); json['description'] = nativeToJson<String?>(description);
} }
@@ -199,6 +229,11 @@ class ListShiftsShifts {
this.locationAddress, this.locationAddress,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.placeId,
this.city,
this.state,
this.street,
this.country,
this.description, this.description,
this.status, this.status,
this.workersNeeded, this.workersNeeded,

View File

@@ -116,12 +116,14 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift shift; final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift shift;
final int count; final int count;
final int? assigned; final int? assigned;
final double? hours;
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole role; final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole role;
ListStaffsApplicationsByBusinessForDayApplicationsShiftRole.fromJson(dynamic json): ListStaffsApplicationsByBusinessForDayApplicationsShiftRole.fromJson(dynamic json):
shift = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift.fromJson(json['shift']), shift = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift.fromJson(json['shift']),
count = nativeFromJson<int>(json['count']), count = nativeFromJson<int>(json['count']),
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']), assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
role = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole.fromJson(json['role']); role = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole.fromJson(json['role']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
@@ -136,11 +138,12 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
return shift == otherTyped.shift && return shift == otherTyped.shift &&
count == otherTyped.count && count == otherTyped.count &&
assigned == otherTyped.assigned && assigned == otherTyped.assigned &&
hours == otherTyped.hours &&
role == otherTyped.role; role == otherTyped.role;
} }
@override @override
int get hashCode => Object.hashAll([shift.hashCode, count.hashCode, assigned.hashCode, role.hashCode]); int get hashCode => Object.hashAll([shift.hashCode, count.hashCode, assigned.hashCode, hours.hashCode, role.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -150,6 +153,9 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
if (assigned != null) { if (assigned != null) {
json['assigned'] = nativeToJson<int?>(assigned); json['assigned'] = nativeToJson<int?>(assigned);
} }
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
json['role'] = role.toJson(); json['role'] = role.toJson();
return json; return json;
} }
@@ -158,6 +164,7 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
required this.shift, required this.shift,
required this.count, required this.count,
this.assigned, this.assigned,
this.hours,
required this.role, required this.role,
}); });
} }

View File

@@ -1,18 +1,29 @@
part of 'generated.dart'; part of 'generated.dart';
class ListTeamHubsVariablesBuilder { class ListTeamHubsVariablesBuilder {
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; final FirebaseDataConnect _dataConnect;
ListTeamHubsVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListTeamHubsVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListTeamHubsVariablesBuilder(this._dataConnect, ); ListTeamHubsVariablesBuilder(this._dataConnect, );
Deserializer<ListTeamHubsData> dataDeserializer = (dynamic json) => ListTeamHubsData.fromJson(jsonDecode(json)); Deserializer<ListTeamHubsData> dataDeserializer = (dynamic json) => ListTeamHubsData.fromJson(jsonDecode(json));
Serializer<ListTeamHubsVariables> varsSerializer = (ListTeamHubsVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListTeamHubsData, void>> execute() { Future<QueryResult<ListTeamHubsData, ListTeamHubsVariables>> execute() {
return ref().execute(); return ref().execute();
} }
QueryRef<ListTeamHubsData, void> ref() { QueryRef<ListTeamHubsData, ListTeamHubsVariables> ref() {
ListTeamHubsVariables vars= ListTeamHubsVariables(offset: _offset,limit: _limit,);
return _dataConnect.query("listTeamHubs", dataDeserializer, emptySerializer, null); return _dataConnect.query("listTeamHubs", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -22,30 +33,34 @@ class ListTeamHubsTeamHubs {
final String teamId; final String teamId;
final String hubName; final String hubName;
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city; final String? city;
final String? state; final String? state;
final String? street;
final String? country;
final String? zipCode; final String? zipCode;
final String? managerName; final String? managerName;
final bool isActive; final bool isActive;
final AnyValue? departments; final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
ListTeamHubsTeamHubs.fromJson(dynamic json): ListTeamHubsTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']), teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']), hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']), address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']), city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']), state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']), zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']), managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']), isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -60,19 +75,21 @@ class ListTeamHubsTeamHubs {
teamId == otherTyped.teamId && teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
departments == otherTyped.departments && departments == otherTyped.departments;
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -81,12 +98,27 @@ class ListTeamHubsTeamHubs {
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName); json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address); json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) { if (city != null) {
json['city'] = nativeToJson<String?>(city); json['city'] = nativeToJson<String?>(city);
} }
if (state != null) { if (state != null) {
json['state'] = nativeToJson<String?>(state); json['state'] = nativeToJson<String?>(state);
} }
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) { if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode); json['zipCode'] = nativeToJson<String?>(zipCode);
} }
@@ -97,15 +129,6 @@ class ListTeamHubsTeamHubs {
if (departments != null) { if (departments != null) {
json['departments'] = departments!.toJson(); json['departments'] = departments!.toJson();
} }
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json; return json;
} }
@@ -114,15 +137,17 @@ class ListTeamHubsTeamHubs {
required this.teamId, required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city, this.city,
this.state, this.state,
this.street,
this.country,
this.zipCode, this.zipCode,
this.managerName, this.managerName,
required this.isActive, required this.isActive,
this.departments, this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
}); });
} }
@@ -162,3 +187,54 @@ class ListTeamHubsData {
}); });
} }
@immutable
class ListTeamHubsVariables {
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListTeamHubsVariables.fromJson(Map<String, dynamic> json) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListTeamHubsVariables otherTyped = other as ListTeamHubsVariables;
return offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListTeamHubsVariables({
required this.offset,
required this.limit,
});
}

View File

@@ -2,8 +2,18 @@ part of 'generated.dart';
class ListTeamHubsByOwnerIdVariablesBuilder { class ListTeamHubsByOwnerIdVariablesBuilder {
String ownerId; String ownerId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListTeamHubsByOwnerIdVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListTeamHubsByOwnerIdVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
final FirebaseDataConnect _dataConnect;
ListTeamHubsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); ListTeamHubsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,});
Deserializer<ListTeamHubsByOwnerIdData> dataDeserializer = (dynamic json) => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json)); Deserializer<ListTeamHubsByOwnerIdData> dataDeserializer = (dynamic json) => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json));
Serializer<ListTeamHubsByOwnerIdVariables> varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson()); Serializer<ListTeamHubsByOwnerIdVariables> varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson());
@@ -12,7 +22,7 @@ class ListTeamHubsByOwnerIdVariablesBuilder {
} }
QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables> ref() { QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables> ref() {
ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,); ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,offset: _offset,limit: _limit,);
return _dataConnect.query("listTeamHubsByOwnerId", dataDeserializer, varsSerializer, vars); return _dataConnect.query("listTeamHubsByOwnerId", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -23,26 +33,34 @@ class ListTeamHubsByOwnerIdTeamHubs {
final String teamId; final String teamId;
final String hubName; final String hubName;
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city; final String? city;
final String? state; final String? state;
final String? street;
final String? country;
final String? zipCode; final String? zipCode;
final String? managerName; final String? managerName;
final bool isActive; final bool isActive;
final AnyValue? departments; final AnyValue? departments;
final Timestamp? createdAt;
ListTeamHubsByOwnerIdTeamHubs.fromJson(dynamic json): ListTeamHubsByOwnerIdTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']), id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']), teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']), hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']), address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']), city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']), state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']), zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']), managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']), isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -57,17 +75,21 @@ class ListTeamHubsByOwnerIdTeamHubs {
teamId == otherTyped.teamId && teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
departments == otherTyped.departments && departments == otherTyped.departments;
createdAt == otherTyped.createdAt;
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode]); int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -76,12 +98,27 @@ class ListTeamHubsByOwnerIdTeamHubs {
json['teamId'] = nativeToJson<String>(teamId); json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName); json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address); json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) { if (city != null) {
json['city'] = nativeToJson<String?>(city); json['city'] = nativeToJson<String?>(city);
} }
if (state != null) { if (state != null) {
json['state'] = nativeToJson<String?>(state); json['state'] = nativeToJson<String?>(state);
} }
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) { if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode); json['zipCode'] = nativeToJson<String?>(zipCode);
} }
@@ -92,9 +129,6 @@ class ListTeamHubsByOwnerIdTeamHubs {
if (departments != null) { if (departments != null) {
json['departments'] = departments!.toJson(); json['departments'] = departments!.toJson();
} }
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
return json; return json;
} }
@@ -103,13 +137,17 @@ class ListTeamHubsByOwnerIdTeamHubs {
required this.teamId, required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city, this.city,
this.state, this.state,
this.street,
this.country,
this.zipCode, this.zipCode,
this.managerName, this.managerName,
required this.isActive, required this.isActive,
this.departments, this.departments,
this.createdAt,
}); });
} }
@@ -152,10 +190,23 @@ class ListTeamHubsByOwnerIdData {
@immutable @immutable
class ListTeamHubsByOwnerIdVariables { class ListTeamHubsByOwnerIdVariables {
final String ownerId; final String ownerId;
late final Optional<int>offset;
late final Optional<int>limit;
@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.')
ListTeamHubsByOwnerIdVariables.fromJson(Map<String, dynamic> json): ListTeamHubsByOwnerIdVariables.fromJson(Map<String, dynamic> json):
ownerId = nativeFromJson<String>(json['ownerId']); ownerId = nativeFromJson<String>(json['ownerId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
if(identical(this, other)) { if(identical(this, other)) {
@@ -166,21 +217,31 @@ class ListTeamHubsByOwnerIdVariables {
} }
final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables; final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables;
return ownerId == otherTyped.ownerId; return ownerId == otherTyped.ownerId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
} }
@override @override
int get hashCode => ownerId.hashCode; int get hashCode => Object.hashAll([ownerId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
Map<String, dynamic> json = {}; Map<String, dynamic> json = {};
json['ownerId'] = nativeToJson<String>(ownerId); json['ownerId'] = nativeToJson<String>(ownerId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json; return json;
} }
ListTeamHubsByOwnerIdVariables({ ListTeamHubsByOwnerIdVariables({
required this.ownerId, required this.ownerId,
required this.offset,
required this.limit,
}); });
} }

View File

@@ -4,7 +4,6 @@ class UpdateOrderVariablesBuilder {
String id; String id;
Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _businessId = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _businessId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _location = Optional.optional(nativeFromJson, nativeToJson);
Optional<OrderStatus> _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); Optional<OrderStatus> _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer);
Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
Optional<Timestamp> _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); Optional<Timestamp> _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer);
@@ -14,7 +13,7 @@ class UpdateOrderVariablesBuilder {
Optional<AnyValue> _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<int> _requested = Optional.optional(nativeFromJson, nativeToJson); Optional<int> _requested = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _hub = Optional.optional(nativeFromJson, nativeToJson); String teamHubId;
Optional<AnyValue> _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<String> _notes = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _notes = Optional.optional(nativeFromJson, nativeToJson);
@@ -29,10 +28,6 @@ class UpdateOrderVariablesBuilder {
_businessId.value = t; _businessId.value = t;
return this; return this;
} }
UpdateOrderVariablesBuilder location(String? t) {
_location.value = t;
return this;
}
UpdateOrderVariablesBuilder status(OrderStatus? t) { UpdateOrderVariablesBuilder status(OrderStatus? t) {
_status.value = t; _status.value = t;
return this; return this;
@@ -69,10 +64,6 @@ class UpdateOrderVariablesBuilder {
_requested.value = t; _requested.value = t;
return this; return this;
} }
UpdateOrderVariablesBuilder hub(String? t) {
_hub.value = t;
return this;
}
UpdateOrderVariablesBuilder recurringDays(AnyValue? t) { UpdateOrderVariablesBuilder recurringDays(AnyValue? t) {
_recurringDays.value = t; _recurringDays.value = t;
return this; return this;
@@ -94,7 +85,7 @@ class UpdateOrderVariablesBuilder {
return this; return this;
} }
UpdateOrderVariablesBuilder(this._dataConnect, {required this.id,}); UpdateOrderVariablesBuilder(this._dataConnect, {required this.id,required this.teamHubId,});
Deserializer<UpdateOrderData> dataDeserializer = (dynamic json) => UpdateOrderData.fromJson(jsonDecode(json)); Deserializer<UpdateOrderData> dataDeserializer = (dynamic json) => UpdateOrderData.fromJson(jsonDecode(json));
Serializer<UpdateOrderVariables> varsSerializer = (UpdateOrderVariables vars) => jsonEncode(vars.toJson()); Serializer<UpdateOrderVariables> varsSerializer = (UpdateOrderVariables vars) => jsonEncode(vars.toJson());
Future<OperationResult<UpdateOrderData, UpdateOrderVariables>> execute() { Future<OperationResult<UpdateOrderData, UpdateOrderVariables>> execute() {
@@ -102,7 +93,7 @@ class UpdateOrderVariablesBuilder {
} }
MutationRef<UpdateOrderData, UpdateOrderVariables> ref() { MutationRef<UpdateOrderData, UpdateOrderVariables> ref() {
UpdateOrderVariables vars= UpdateOrderVariables(id: id,vendorId: _vendorId,businessId: _businessId,location: _location,status: _status,date: _date,startDate: _startDate,endDate: _endDate,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,); UpdateOrderVariables vars= UpdateOrderVariables(id: id,vendorId: _vendorId,businessId: _businessId,status: _status,date: _date,startDate: _startDate,endDate: _endDate,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,teamHubId: teamHubId,recurringDays: _recurringDays,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,);
return _dataConnect.mutation("updateOrder", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("updateOrder", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -182,7 +173,6 @@ class UpdateOrderVariables {
final String id; final String id;
late final Optional<String>vendorId; late final Optional<String>vendorId;
late final Optional<String>businessId; late final Optional<String>businessId;
late final Optional<String>location;
late final Optional<OrderStatus>status; late final Optional<OrderStatus>status;
late final Optional<Timestamp>date; late final Optional<Timestamp>date;
late final Optional<Timestamp>startDate; late final Optional<Timestamp>startDate;
@@ -192,7 +182,7 @@ class UpdateOrderVariables {
late final Optional<AnyValue>assignedStaff; late final Optional<AnyValue>assignedStaff;
late final Optional<AnyValue>shifts; late final Optional<AnyValue>shifts;
late final Optional<int>requested; late final Optional<int>requested;
late final Optional<String>hub; final String teamHubId;
late final Optional<AnyValue>recurringDays; late final Optional<AnyValue>recurringDays;
late final Optional<AnyValue>permanentDays; late final Optional<AnyValue>permanentDays;
late final Optional<String>notes; late final Optional<String>notes;
@@ -201,7 +191,8 @@ class UpdateOrderVariables {
@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.')
UpdateOrderVariables.fromJson(Map<String, dynamic> json): UpdateOrderVariables.fromJson(Map<String, dynamic> json):
id = nativeFromJson<String>(json['id']) { id = nativeFromJson<String>(json['id']),
teamHubId = nativeFromJson<String>(json['teamHubId']) {
@@ -213,10 +204,6 @@ class UpdateOrderVariables {
businessId.value = json['businessId'] == null ? null : nativeFromJson<String>(json['businessId']); businessId.value = json['businessId'] == null ? null : nativeFromJson<String>(json['businessId']);
location = Optional.optional(nativeFromJson, nativeToJson);
location.value = json['location'] == null ? null : nativeFromJson<String>(json['location']);
status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer);
status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']); status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']);
@@ -253,9 +240,6 @@ class UpdateOrderVariables {
requested.value = json['requested'] == null ? null : nativeFromJson<int>(json['requested']); requested.value = json['requested'] == null ? null : nativeFromJson<int>(json['requested']);
hub = Optional.optional(nativeFromJson, nativeToJson);
hub.value = json['hub'] == null ? null : nativeFromJson<String>(json['hub']);
recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']); recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']);
@@ -290,7 +274,6 @@ class UpdateOrderVariables {
return id == otherTyped.id && return id == otherTyped.id &&
vendorId == otherTyped.vendorId && vendorId == otherTyped.vendorId &&
businessId == otherTyped.businessId && businessId == otherTyped.businessId &&
location == otherTyped.location &&
status == otherTyped.status && status == otherTyped.status &&
date == otherTyped.date && date == otherTyped.date &&
startDate == otherTyped.startDate && startDate == otherTyped.startDate &&
@@ -300,7 +283,7 @@ class UpdateOrderVariables {
assignedStaff == otherTyped.assignedStaff && assignedStaff == otherTyped.assignedStaff &&
shifts == otherTyped.shifts && shifts == otherTyped.shifts &&
requested == otherTyped.requested && requested == otherTyped.requested &&
hub == otherTyped.hub && teamHubId == otherTyped.teamHubId &&
recurringDays == otherTyped.recurringDays && recurringDays == otherTyped.recurringDays &&
permanentDays == otherTyped.permanentDays && permanentDays == otherTyped.permanentDays &&
notes == otherTyped.notes && notes == otherTyped.notes &&
@@ -309,7 +292,7 @@ class UpdateOrderVariables {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, businessId.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]); int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, businessId.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, teamHubId.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -321,9 +304,6 @@ class UpdateOrderVariables {
if(businessId.state == OptionalState.set) { if(businessId.state == OptionalState.set) {
json['businessId'] = businessId.toJson(); json['businessId'] = businessId.toJson();
} }
if(location.state == OptionalState.set) {
json['location'] = location.toJson();
}
if(status.state == OptionalState.set) { if(status.state == OptionalState.set) {
json['status'] = status.toJson(); json['status'] = status.toJson();
} }
@@ -351,9 +331,7 @@ class UpdateOrderVariables {
if(requested.state == OptionalState.set) { if(requested.state == OptionalState.set) {
json['requested'] = requested.toJson(); json['requested'] = requested.toJson();
} }
if(hub.state == OptionalState.set) { json['teamHubId'] = nativeToJson<String>(teamHubId);
json['hub'] = hub.toJson();
}
if(recurringDays.state == OptionalState.set) { if(recurringDays.state == OptionalState.set) {
json['recurringDays'] = recurringDays.toJson(); json['recurringDays'] = recurringDays.toJson();
} }
@@ -376,7 +354,6 @@ class UpdateOrderVariables {
required this.id, required this.id,
required this.vendorId, required this.vendorId,
required this.businessId, required this.businessId,
required this.location,
required this.status, required this.status,
required this.date, required this.date,
required this.startDate, required this.startDate,
@@ -386,7 +363,7 @@ class UpdateOrderVariables {
required this.assignedStaff, required this.assignedStaff,
required this.shifts, required this.shifts,
required this.requested, required this.requested,
required this.hub, required this.teamHubId,
required this.recurringDays, required this.recurringDays,
required this.permanentDays, required this.permanentDays,
required this.notes, required this.notes,

View File

@@ -13,6 +13,11 @@ class UpdateShiftVariablesBuilder {
Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson); Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson); Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _description = Optional.optional(nativeFromJson, nativeToJson);
Optional<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); Optional<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer);
Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson); Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson);
@@ -65,6 +70,26 @@ class UpdateShiftVariablesBuilder {
_longitude.value = t; _longitude.value = t;
return this; return this;
} }
UpdateShiftVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
UpdateShiftVariablesBuilder city(String? t) {
_city.value = t;
return this;
}
UpdateShiftVariablesBuilder state(String? t) {
_state.value = t;
return this;
}
UpdateShiftVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
UpdateShiftVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
UpdateShiftVariablesBuilder description(String? t) { UpdateShiftVariablesBuilder description(String? t) {
_description.value = t; _description.value = t;
return this; return this;
@@ -102,7 +127,7 @@ class UpdateShiftVariablesBuilder {
} }
MutationRef<UpdateShiftData, UpdateShiftVariables> ref() { MutationRef<UpdateShiftData, UpdateShiftVariables> ref() {
UpdateShiftVariables vars= UpdateShiftVariables(id: id,title: _title,orderId: _orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,); UpdateShiftVariables vars= UpdateShiftVariables(id: id,title: _title,orderId: _orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,placeId: _placeId,city: _city,state: _state,street: _street,country: _country,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,);
return _dataConnect.mutation("updateShift", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("updateShift", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -191,6 +216,11 @@ class UpdateShiftVariables {
late final Optional<String>locationAddress; late final Optional<String>locationAddress;
late final Optional<double>latitude; late final Optional<double>latitude;
late final Optional<double>longitude; late final Optional<double>longitude;
late final Optional<String>placeId;
late final Optional<String>city;
late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>description; late final Optional<String>description;
late final Optional<ShiftStatus>status; late final Optional<ShiftStatus>status;
late final Optional<int>workersNeeded; late final Optional<int>workersNeeded;
@@ -249,6 +279,26 @@ class UpdateShiftVariables {
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']); longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
state = Optional.optional(nativeFromJson, nativeToJson);
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
description = Optional.optional(nativeFromJson, nativeToJson); description = Optional.optional(nativeFromJson, nativeToJson);
description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']); description.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
@@ -301,6 +351,11 @@ class UpdateShiftVariables {
locationAddress == otherTyped.locationAddress && locationAddress == otherTyped.locationAddress &&
latitude == otherTyped.latitude && latitude == otherTyped.latitude &&
longitude == otherTyped.longitude && longitude == otherTyped.longitude &&
placeId == otherTyped.placeId &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
description == otherTyped.description && description == otherTyped.description &&
status == otherTyped.status && status == otherTyped.status &&
workersNeeded == otherTyped.workersNeeded && workersNeeded == otherTyped.workersNeeded &&
@@ -311,7 +366,7 @@ class UpdateShiftVariables {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode]); int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, placeId.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode]);
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@@ -350,6 +405,21 @@ class UpdateShiftVariables {
if(longitude.state == OptionalState.set) { if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson(); json['longitude'] = longitude.toJson();
} }
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(city.state == OptionalState.set) {
json['city'] = city.toJson();
}
if(state.state == OptionalState.set) {
json['state'] = state.toJson();
}
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(description.state == OptionalState.set) { if(description.state == OptionalState.set) {
json['description'] = description.toJson(); json['description'] = description.toJson();
} }
@@ -387,6 +457,11 @@ class UpdateShiftVariables {
required this.locationAddress, required this.locationAddress,
required this.latitude, required this.latitude,
required this.longitude, required this.longitude,
required this.placeId,
required this.city,
required this.state,
required this.street,
required this.country,
required this.description, required this.description,
required this.status, required this.status,
required this.workersNeeded, required this.workersNeeded,

View File

@@ -2,16 +2,26 @@ part of 'generated.dart';
class UpdateTeamHubVariablesBuilder { class UpdateTeamHubVariablesBuilder {
String id; String id;
Optional<String> _teamId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _hubName = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _hubName = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _address = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _address = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson); Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson);
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson); Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
final FirebaseDataConnect _dataConnect; UpdateTeamHubVariablesBuilder hubName(String? t) { final FirebaseDataConnect _dataConnect; UpdateTeamHubVariablesBuilder teamId(String? t) {
_teamId.value = t;
return this;
}
UpdateTeamHubVariablesBuilder hubName(String? t) {
_hubName.value = t; _hubName.value = t;
return this; return this;
} }
@@ -19,6 +29,18 @@ class UpdateTeamHubVariablesBuilder {
_address.value = t; _address.value = t;
return this; return this;
} }
UpdateTeamHubVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
UpdateTeamHubVariablesBuilder latitude(double? t) {
_latitude.value = t;
return this;
}
UpdateTeamHubVariablesBuilder longitude(double? t) {
_longitude.value = t;
return this;
}
UpdateTeamHubVariablesBuilder city(String? t) { UpdateTeamHubVariablesBuilder city(String? t) {
_city.value = t; _city.value = t;
return this; return this;
@@ -27,6 +49,14 @@ class UpdateTeamHubVariablesBuilder {
_state.value = t; _state.value = t;
return this; return this;
} }
UpdateTeamHubVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
UpdateTeamHubVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
UpdateTeamHubVariablesBuilder zipCode(String? t) { UpdateTeamHubVariablesBuilder zipCode(String? t) {
_zipCode.value = t; _zipCode.value = t;
return this; return this;
@@ -52,7 +82,7 @@ class UpdateTeamHubVariablesBuilder {
} }
MutationRef<UpdateTeamHubData, UpdateTeamHubVariables> ref() { MutationRef<UpdateTeamHubData, UpdateTeamHubVariables> ref() {
UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,hubName: _hubName,address: _address,city: _city,state: _state,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,); UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,teamId: _teamId,hubName: _hubName,address: _address,placeId: _placeId,latitude: _latitude,longitude: _longitude,city: _city,state: _state,street: _street,country: _country,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
return _dataConnect.mutation("updateTeamHub", dataDeserializer, varsSerializer, vars); return _dataConnect.mutation("updateTeamHub", dataDeserializer, varsSerializer, vars);
} }
} }
@@ -130,10 +160,16 @@ class UpdateTeamHubData {
@immutable @immutable
class UpdateTeamHubVariables { class UpdateTeamHubVariables {
final String id; final String id;
late final Optional<String>teamId;
late final Optional<String>hubName; late final Optional<String>hubName;
late final Optional<String>address; late final Optional<String>address;
late final Optional<String>placeId;
late final Optional<double>latitude;
late final Optional<double>longitude;
late final Optional<String>city; late final Optional<String>city;
late final Optional<String>state; late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>zipCode; late final Optional<String>zipCode;
late final Optional<String>managerName; late final Optional<String>managerName;
late final Optional<bool>isActive; late final Optional<bool>isActive;
@@ -145,6 +181,10 @@ class UpdateTeamHubVariables {
teamId = Optional.optional(nativeFromJson, nativeToJson);
teamId.value = json['teamId'] == null ? null : nativeFromJson<String>(json['teamId']);
hubName = Optional.optional(nativeFromJson, nativeToJson); hubName = Optional.optional(nativeFromJson, nativeToJson);
hubName.value = json['hubName'] == null ? null : nativeFromJson<String>(json['hubName']); hubName.value = json['hubName'] == null ? null : nativeFromJson<String>(json['hubName']);
@@ -153,6 +193,18 @@ class UpdateTeamHubVariables {
address.value = json['address'] == null ? null : nativeFromJson<String>(json['address']); address.value = json['address'] == null ? null : nativeFromJson<String>(json['address']);
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
latitude = Optional.optional(nativeFromJson, nativeToJson);
latitude.value = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']);
longitude = Optional.optional(nativeFromJson, nativeToJson);
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
city = Optional.optional(nativeFromJson, nativeToJson); city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']); city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
@@ -161,6 +213,14 @@ class UpdateTeamHubVariables {
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']); state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
zipCode = Optional.optional(nativeFromJson, nativeToJson); zipCode = Optional.optional(nativeFromJson, nativeToJson);
zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']); zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
@@ -188,10 +248,16 @@ class UpdateTeamHubVariables {
final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables; final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables;
return id == otherTyped.id && return id == otherTyped.id &&
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName && hubName == otherTyped.hubName &&
address == otherTyped.address && address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city && city == otherTyped.city &&
state == otherTyped.state && state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode && zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName && managerName == otherTyped.managerName &&
isActive == otherTyped.isActive && isActive == otherTyped.isActive &&
@@ -199,24 +265,42 @@ class UpdateTeamHubVariables {
} }
@override @override
int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]); int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.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(teamId.state == OptionalState.set) {
json['teamId'] = teamId.toJson();
}
if(hubName.state == OptionalState.set) { if(hubName.state == OptionalState.set) {
json['hubName'] = hubName.toJson(); json['hubName'] = hubName.toJson();
} }
if(address.state == OptionalState.set) { if(address.state == OptionalState.set) {
json['address'] = address.toJson(); json['address'] = address.toJson();
} }
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(latitude.state == OptionalState.set) {
json['latitude'] = latitude.toJson();
}
if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson();
}
if(city.state == OptionalState.set) { if(city.state == OptionalState.set) {
json['city'] = city.toJson(); json['city'] = city.toJson();
} }
if(state.state == OptionalState.set) { if(state.state == OptionalState.set) {
json['state'] = state.toJson(); json['state'] = state.toJson();
} }
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(zipCode.state == OptionalState.set) { if(zipCode.state == OptionalState.set) {
json['zipCode'] = zipCode.toJson(); json['zipCode'] = zipCode.toJson();
} }
@@ -234,10 +318,16 @@ class UpdateTeamHubVariables {
UpdateTeamHubVariables({ UpdateTeamHubVariables({
required this.id, required this.id,
required this.teamId,
required this.hubName, required this.hubName,
required this.address, required this.address,
required this.placeId,
required this.latitude,
required this.longitude,
required this.city, required this.city,
required this.state, required this.state,
required this.street,
required this.country,
required this.zipCode, required this.zipCode,
required this.managerName, required this.managerName,
required this.isActive, required this.isActive,

View File

@@ -37,4 +37,7 @@ class UiConstants {
static const double space12 = 48.0; static const double space12 = 48.0;
static const double space14 = 56.0; static const double space14 = 56.0;
static const double space16 = 64.0; static const double space16 = 64.0;
static const double space20 = 80.0;
static const double space24 = 96.0;
static const double space32 = 128.0;
} }

View File

@@ -10,6 +10,8 @@ class OneTimeOrder extends Equatable {
required this.date, required this.date,
required this.location, required this.location,
required this.positions, required this.positions,
this.hub,
this.eventName,
this.vendorId, this.vendorId,
this.roleRates = const <String, double>{}, this.roleRates = const <String, double>{},
}); });
@@ -22,6 +24,12 @@ class OneTimeOrder extends Equatable {
/// The list of positions and headcounts required for this order. /// The list of positions and headcounts required for this order.
final List<OneTimeOrderPosition> positions; final List<OneTimeOrderPosition> positions;
/// Selected hub details for this order.
final OneTimeOrderHubDetails? hub;
/// Optional order name.
final String? eventName;
/// Selected vendor id for this order. /// Selected vendor id for this order.
final String? vendorId; final String? vendorId;
@@ -33,7 +41,53 @@ class OneTimeOrder extends Equatable {
date, date,
location, location,
positions, positions,
hub,
eventName,
vendorId, vendorId,
roleRates, roleRates,
]; ];
} }
/// Minimal hub details used during order creation.
class OneTimeOrderHubDetails extends Equatable {
const OneTimeOrderHubDetails({
required this.id,
required this.name,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
});
final String id;
final String name;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
@override
List<Object?> get props => <Object?>[
id,
name,
address,
placeId,
latitude,
longitude,
city,
state,
street,
country,
zipCode,
];
}

View File

@@ -166,9 +166,10 @@ class BillingRepositoryImpl implements BillingRepository {
} }
fdc.Timestamp _toTimestamp(DateTime dateTime) { fdc.Timestamp _toTimestamp(DateTime dateTime) {
final int seconds = dateTime.millisecondsSinceEpoch ~/ 1000; final DateTime utc = dateTime.toUtc();
final int seconds = utc.millisecondsSinceEpoch ~/ 1000;
final int nanoseconds = final int nanoseconds =
(dateTime.millisecondsSinceEpoch % 1000) * 1000000; (utc.millisecondsSinceEpoch % 1000) * 1000000;
return fdc.Timestamp(nanoseconds, seconds); return fdc.Timestamp(nanoseconds, seconds);
} }

View File

@@ -2,16 +2,16 @@ import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_modular/flutter_modular.dart'; import 'package:flutter_modular/flutter_modular.dart';
import '../blocs/billing_bloc.dart'; import '../blocs/billing_bloc.dart';
import '../blocs/billing_event.dart'; import '../blocs/billing_event.dart';
import '../blocs/billing_state.dart'; import '../blocs/billing_state.dart';
import '../widgets/billing_header.dart'; import '../widgets/billing_header.dart';
import '../widgets/pending_invoices_section.dart';
import '../widgets/payment_method_card.dart';
import '../widgets/spending_breakdown_card.dart';
import '../widgets/savings_card.dart';
import '../widgets/invoice_history_section.dart'; import '../widgets/invoice_history_section.dart';
import '../widgets/export_invoices_button.dart'; import '../widgets/payment_method_card.dart';
import '../widgets/pending_invoices_section.dart';
import '../widgets/savings_card.dart';
import '../widgets/spending_breakdown_card.dart';
/// The entry point page for the client billing feature. /// The entry point page for the client billing feature.
/// ///
@@ -43,7 +43,6 @@ class BillingView extends StatelessWidget {
return BlocBuilder<BillingBloc, BillingState>( return BlocBuilder<BillingBloc, BillingState>(
builder: (BuildContext context, BillingState state) { builder: (BuildContext context, BillingState state) {
return Scaffold( return Scaffold(
backgroundColor: UiColors.bgPrimary,
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
BillingHeader( BillingHeader(
@@ -89,9 +88,7 @@ class BillingView extends StatelessWidget {
SavingsCard(savings: state.savings), SavingsCard(savings: state.savings),
const SizedBox(height: UiConstants.space6), const SizedBox(height: UiConstants.space6),
InvoiceHistorySection(invoices: state.invoiceHistory), InvoiceHistorySection(invoices: state.invoiceHistory),
const SizedBox(height: UiConstants.space6), const SizedBox(height: UiConstants.space24),
const ExportInvoicesButton(),
const SizedBox(height: UiConstants.space6),
], ],
), ),
); );

View File

@@ -1,7 +1,7 @@
name: billing name: billing
description: Client Billing feature package description: Client Billing feature package
publish_to: 'none' publish_to: 'none'
version: 1.0.0+1 version: 0.0.1
resolution: workspace resolution: workspace
environment: environment:

View File

@@ -100,9 +100,10 @@ class CoverageRepositoryImpl implements CoverageRepository {
} }
fdc.Timestamp _toTimestamp(DateTime dateTime) { fdc.Timestamp _toTimestamp(DateTime dateTime) {
final int seconds = dateTime.millisecondsSinceEpoch ~/ 1000; final DateTime utc = dateTime.toUtc();
final int seconds = utc.millisecondsSinceEpoch ~/ 1000;
final int nanoseconds = final int nanoseconds =
(dateTime.millisecondsSinceEpoch % 1000) * 1000000; (utc.millisecondsSinceEpoch % 1000) * 1000000;
return fdc.Timestamp(nanoseconds, seconds); return fdc.Timestamp(nanoseconds, seconds);
} }
@@ -195,7 +196,7 @@ class CoverageRepositoryImpl implements CoverageRepository {
if (timestamp == null) { if (timestamp == null) {
return null; return null;
} }
final DateTime date = timestamp.toDateTime(); final DateTime date = timestamp.toDateTime().toLocal();
final String hour = date.hour.toString().padLeft(2, '0'); final String hour = date.hour.toString().padLeft(2, '0');
final String minute = date.minute.toString().padLeft(2, '0'); final String minute = date.minute.toString().padLeft(2, '0');
return '$hour:$minute'; return '$hour:$minute';

View File

@@ -39,7 +39,7 @@ class CoverageShift extends Equatable {
/// Calculates the coverage percentage for this shift. /// Calculates the coverage percentage for this shift.
int get coveragePercent { int get coveragePercent {
if (workersNeeded == 0) return 100; if (workersNeeded == 0) return 0;
return ((workers.length / workersNeeded) * 100).round(); return ((workers.length / workersNeeded) * 100).round();
} }
@@ -118,7 +118,7 @@ class CoverageStats extends Equatable {
/// Calculates the overall coverage percentage. /// Calculates the overall coverage percentage.
int get coveragePercent { int get coveragePercent {
if (totalNeeded == 0) return 100; if (totalNeeded == 0) return 0;
return ((totalConfirmed / totalNeeded) * 100).round(); return ((totalConfirmed / totalNeeded) * 100).round();
} }

View File

@@ -24,7 +24,6 @@ class CoveragePage extends StatelessWidget {
create: (BuildContext context) => Modular.get<CoverageBloc>() create: (BuildContext context) => Modular.get<CoverageBloc>()
..add(CoverageLoadRequested(date: DateTime.now())), ..add(CoverageLoadRequested(date: DateTime.now())),
child: Scaffold( child: Scaffold(
backgroundColor: UiColors.background,
body: BlocBuilder<CoverageBloc, CoverageState>( body: BlocBuilder<CoverageBloc, CoverageState>(
builder: (BuildContext context, CoverageState state) { builder: (BuildContext context, CoverageState state) {
return Column( return Column(
@@ -114,13 +113,14 @@ class CoveragePage extends StatelessWidget {
const SizedBox(height: UiConstants.space5), const SizedBox(height: UiConstants.space5),
], ],
Text( Text(
'Shifts', 'Shifts (${state.shifts.length})',
style: UiTypography.title2b.copyWith( style: UiTypography.title2b.copyWith(
color: UiColors.textPrimary, color: UiColors.textPrimary,
), ),
), ),
const SizedBox(height: UiConstants.space3), const SizedBox(height: UiConstants.space3),
CoverageShiftList(shifts: state.shifts), CoverageShiftList(shifts: state.shifts),
const SizedBox(height: 100),
], ],
), ),
); );

View File

@@ -35,24 +35,23 @@ class CoverageShiftList extends StatelessWidget {
if (shifts.isEmpty) { if (shifts.isEmpty) {
return Container( return Container(
padding: const EdgeInsets.all(UiConstants.space8), padding: const EdgeInsets.all(UiConstants.space8),
width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: UiColors.bgPopup, color: UiColors.bgPopup,
borderRadius: UiConstants.radiusLg, borderRadius: UiConstants.radiusLg,
border: Border.all(color: UiColors.border), border: Border.all(color: UiColors.border),
), ),
child: Column( child: Column(
spacing: UiConstants.space4,
children: <Widget>[ children: <Widget>[
const Icon( const Icon(
UiIcons.users, UiIcons.users,
size: UiConstants.space12, size: UiConstants.space12,
color: UiColors.mutedForeground, color: UiColors.textSecondary,
), ),
const SizedBox(height: UiConstants.space3),
Text( Text(
'No shifts scheduled for this day', 'No shifts scheduled for this day',
style: UiTypography.body2r.copyWith( style: UiTypography.body2r.textSecondary,
color: UiColors.mutedForeground,
),
), ),
], ],
), ),
@@ -160,12 +159,15 @@ class _ShiftHeader extends StatelessWidget {
), ),
), ),
child: Row( child: Row(
spacing: UiConstants.space4,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
spacing: UiConstants.space2,
children: <Widget>[ children: <Widget>[
Row( Row(
spacing: UiConstants.space2,
children: <Widget>[ children: <Widget>[
Container( Container(
width: UiConstants.space2, width: UiConstants.space2,
@@ -175,42 +177,43 @@ class _ShiftHeader extends StatelessWidget {
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
), ),
const SizedBox(width: UiConstants.space2),
Text( Text(
title, title,
style: UiTypography.body1b.copyWith( style: UiTypography.body1b.textPrimary,
color: UiColors.textPrimary,
),
), ),
], ],
), ),
const SizedBox(height: UiConstants.space2), Column(
Row( crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
const Icon( Row(
UiIcons.mapPin, spacing: UiConstants.space1,
size: UiConstants.space3, children: <Widget>[
color: UiColors.mutedForeground, const Icon(
UiIcons.mapPin,
size: UiConstants.space3,
color: UiColors.iconSecondary,
),
Expanded(child: Text(
location,
style: UiTypography.body3r.textSecondary,
overflow: TextOverflow.ellipsis,
)),
],
), ),
const SizedBox(width: UiConstants.space1), Row(
Text( spacing: UiConstants.space1,
location, children: <Widget>[
style: UiTypography.body3r.copyWith( const Icon(
color: UiColors.mutedForeground, UiIcons.clock,
), size: UiConstants.space3,
), color: UiColors.iconSecondary,
const SizedBox(width: UiConstants.space3), ),
const Icon( Text(
UiIcons.clock, startTime,
size: UiConstants.space3, style: UiTypography.body3r.textSecondary,
color: UiColors.mutedForeground, ),
), ],
const SizedBox(width: UiConstants.space1),
Text(
startTime,
style: UiTypography.body3r.copyWith(
color: UiColors.mutedForeground,
),
), ),
], ],
), ),

View File

@@ -1,6 +1,6 @@
name: client_coverage name: client_coverage
description: Client coverage feature for tracking daily shift coverage and worker status description: Client coverage feature for tracking daily shift coverage and worker status
version: 1.0.0 version: 0.0.1
publish_to: none publish_to: none
resolution: workspace resolution: workspace
@@ -33,4 +33,4 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^5.0.0 flutter_lints: ^6.0.0

View File

@@ -99,13 +99,6 @@ class ClientMainBottomBar extends StatelessWidget {
activeColor: activeColor, activeColor: activeColor,
inactiveColor: inactiveColor, inactiveColor: inactiveColor,
), ),
_buildNavItem(
index: 4,
icon: UiIcons.chart,
label: t.client_main.tabs.reports,
activeColor: activeColor,
inactiveColor: inactiveColor,
),
], ],
), ),
), ),

View File

@@ -27,26 +27,28 @@ class ClientCreateOrderRepositoryImpl
@override @override
Future<List<domain.OrderType>> getOrderTypes() { Future<List<domain.OrderType>> getOrderTypes() {
return Future.value(const <domain.OrderType>[ return Future.value(const <domain.OrderType>[
domain.OrderType(
id: 'rapid',
titleKey: 'client_create_order.types.rapid',
descriptionKey: 'client_create_order.types.rapid_desc',
),
domain.OrderType( domain.OrderType(
id: 'one-time', id: 'one-time',
titleKey: 'client_create_order.types.one_time', titleKey: 'client_create_order.types.one_time',
descriptionKey: 'client_create_order.types.one_time_desc', descriptionKey: 'client_create_order.types.one_time_desc',
), ),
domain.OrderType(
id: 'recurring', /// TODO: FEATURE_NOT_YET_IMPLEMENTED
titleKey: 'client_create_order.types.recurring', // domain.OrderType(
descriptionKey: 'client_create_order.types.recurring_desc', // id: 'rapid',
), // titleKey: 'client_create_order.types.rapid',
domain.OrderType( // descriptionKey: 'client_create_order.types.rapid_desc',
id: 'permanent', // ),
titleKey: 'client_create_order.types.permanent', // domain.OrderType(
descriptionKey: 'client_create_order.types.permanent_desc', // id: 'recurring',
), // titleKey: 'client_create_order.types.recurring',
// descriptionKey: 'client_create_order.types.recurring_desc',
// ),
// domain.OrderType(
// id: 'permanent',
// titleKey: 'client_create_order.types.permanent',
// descriptionKey: 'client_create_order.types.permanent_desc',
// ),
]); ]);
} }
@@ -61,12 +63,25 @@ class ClientCreateOrderRepositoryImpl
if (vendorId == null || vendorId.isEmpty) { if (vendorId == null || vendorId.isEmpty) {
throw Exception('Vendor is missing.'); throw Exception('Vendor is missing.');
} }
final domain.OneTimeOrderHubDetails? hub = order.hub;
if (hub == null || hub.id.isEmpty) {
throw Exception('Hub is missing.');
}
final fdc.Timestamp orderTimestamp = _toTimestamp(order.date); final DateTime orderDateOnly = DateTime(
order.date.year,
order.date.month,
order.date.day,
);
final fdc.Timestamp orderTimestamp = _toTimestamp(orderDateOnly);
final fdc.OperationResult<dc.CreateOrderData, dc.CreateOrderVariables> orderResult = await _dataConnect final fdc.OperationResult<dc.CreateOrderData, dc.CreateOrderVariables> orderResult = await _dataConnect
.createOrder(businessId: businessId, orderType: dc.OrderType.ONE_TIME) .createOrder(
businessId: businessId,
orderType: dc.OrderType.ONE_TIME,
teamHubId: hub.id,
)
.vendorId(vendorId) .vendorId(vendorId)
.location(order.location) .eventName(order.eventName)
.status(dc.OrderStatus.POSTED) .status(dc.OrderStatus.POSTED)
.date(orderTimestamp) .date(orderTimestamp)
.execute(); .execute();
@@ -86,8 +101,15 @@ class ClientCreateOrderRepositoryImpl
final fdc.OperationResult<dc.CreateShiftData, dc.CreateShiftVariables> shiftResult = await _dataConnect final fdc.OperationResult<dc.CreateShiftData, dc.CreateShiftVariables> shiftResult = await _dataConnect
.createShift(title: shiftTitle, orderId: orderId) .createShift(title: shiftTitle, orderId: orderId)
.date(orderTimestamp) .date(orderTimestamp)
.location(order.location) .location(hub.name)
.locationAddress(order.location) .locationAddress(hub.address)
.latitude(hub.latitude)
.longitude(hub.longitude)
.placeId(hub.placeId)
.city(hub.city)
.state(hub.state)
.street(hub.street)
.country(hub.country)
.status(dc.ShiftStatus.PENDING) .status(dc.ShiftStatus.PENDING)
.workersNeeded(workersNeeded) .workersNeeded(workersNeeded)
.filled(0) .filled(0)
@@ -109,6 +131,10 @@ class ClientCreateOrderRepositoryImpl
final double rate = order.roleRates[position.role] ?? 0; final double rate = order.roleRates[position.role] ?? 0;
final double totalValue = rate * hours * position.count; final double totalValue = rate * hours * position.count;
print(
'CreateOneTimeOrder shiftRole: start=${start.toIso8601String()} end=${normalizedEnd.toIso8601String()}',
);
await _dataConnect await _dataConnect
.createShiftRole( .createShiftRole(
shiftId: shiftId, shiftId: shiftId,
@@ -124,7 +150,7 @@ class ClientCreateOrderRepositoryImpl
} }
await _dataConnect await _dataConnect
.updateOrder(id: orderId) .updateOrder(id: orderId, teamHubId: hub.id)
.shifts(fdc.AnyValue(<String>[shiftId])) .shifts(fdc.AnyValue(<String>[shiftId]))
.execute(); .execute();
} }

View File

@@ -13,14 +13,17 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
: super(OneTimeOrderState.initial()) { : super(OneTimeOrderState.initial()) {
on<OneTimeOrderVendorsLoaded>(_onVendorsLoaded); on<OneTimeOrderVendorsLoaded>(_onVendorsLoaded);
on<OneTimeOrderVendorChanged>(_onVendorChanged); on<OneTimeOrderVendorChanged>(_onVendorChanged);
on<OneTimeOrderHubsLoaded>(_onHubsLoaded);
on<OneTimeOrderHubChanged>(_onHubChanged);
on<OneTimeOrderEventNameChanged>(_onEventNameChanged);
on<OneTimeOrderDateChanged>(_onDateChanged); on<OneTimeOrderDateChanged>(_onDateChanged);
on<OneTimeOrderLocationChanged>(_onLocationChanged);
on<OneTimeOrderPositionAdded>(_onPositionAdded); on<OneTimeOrderPositionAdded>(_onPositionAdded);
on<OneTimeOrderPositionRemoved>(_onPositionRemoved); on<OneTimeOrderPositionRemoved>(_onPositionRemoved);
on<OneTimeOrderPositionUpdated>(_onPositionUpdated); on<OneTimeOrderPositionUpdated>(_onPositionUpdated);
on<OneTimeOrderSubmitted>(_onSubmitted); on<OneTimeOrderSubmitted>(_onSubmitted);
_loadVendors(); _loadVendors();
_loadHubs();
} }
final CreateOneTimeOrderUseCase _createOneTimeOrderUseCase; final CreateOneTimeOrderUseCase _createOneTimeOrderUseCase;
final dc.ExampleConnector _dataConnect; final dc.ExampleConnector _dataConnect;
@@ -63,6 +66,38 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
} }
} }
Future<void> _loadHubs() async {
try {
final String? businessId = dc.ClientSessionStore.instance.session?.business?.id;
if (businessId == null || businessId.isEmpty) {
add(const OneTimeOrderHubsLoaded(<OneTimeOrderHubOption>[]));
return;
}
final QueryResult<dc.ListTeamHubsByOwnerIdData, dc.ListTeamHubsByOwnerIdVariables>
result = await _dataConnect.listTeamHubsByOwnerId(ownerId: businessId).execute();
final List<OneTimeOrderHubOption> hubs = result.data.teamHubs
.map(
(dc.ListTeamHubsByOwnerIdTeamHubs hub) => OneTimeOrderHubOption(
id: hub.id,
name: hub.hubName,
address: hub.address,
placeId: hub.placeId,
latitude: hub.latitude,
longitude: hub.longitude,
city: hub.city,
state: hub.state,
street: hub.street,
country: hub.country,
zipCode: hub.zipCode,
),
)
.toList();
add(OneTimeOrderHubsLoaded(hubs));
} catch (_) {
add(const OneTimeOrderHubsLoaded(<OneTimeOrderHubOption>[]));
}
}
void _onVendorsLoaded( void _onVendorsLoaded(
OneTimeOrderVendorsLoaded event, OneTimeOrderVendorsLoaded event,
Emitter<OneTimeOrderState> emit, Emitter<OneTimeOrderState> emit,
@@ -88,6 +123,40 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
_loadRolesForVendor(event.vendor.id); _loadRolesForVendor(event.vendor.id);
} }
void _onHubsLoaded(
OneTimeOrderHubsLoaded event,
Emitter<OneTimeOrderState> emit,
) {
final OneTimeOrderHubOption? selectedHub =
event.hubs.isNotEmpty ? event.hubs.first : null;
emit(
state.copyWith(
hubs: event.hubs,
selectedHub: selectedHub,
location: selectedHub?.name ?? '',
),
);
}
void _onHubChanged(
OneTimeOrderHubChanged event,
Emitter<OneTimeOrderState> emit,
) {
emit(
state.copyWith(
selectedHub: event.hub,
location: event.hub.name,
),
);
}
void _onEventNameChanged(
OneTimeOrderEventNameChanged event,
Emitter<OneTimeOrderState> emit,
) {
emit(state.copyWith(eventName: event.eventName));
}
void _onDateChanged( void _onDateChanged(
OneTimeOrderDateChanged event, OneTimeOrderDateChanged event,
Emitter<OneTimeOrderState> emit, Emitter<OneTimeOrderState> emit,
@@ -95,13 +164,6 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
emit(state.copyWith(date: event.date)); emit(state.copyWith(date: event.date));
} }
void _onLocationChanged(
OneTimeOrderLocationChanged event,
Emitter<OneTimeOrderState> emit,
) {
emit(state.copyWith(location: event.location));
}
void _onPositionAdded( void _onPositionAdded(
OneTimeOrderPositionAdded event, OneTimeOrderPositionAdded event,
Emitter<OneTimeOrderState> emit, Emitter<OneTimeOrderState> emit,
@@ -149,10 +211,28 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
final Map<String, double> roleRates = <String, double>{ final Map<String, double> roleRates = <String, double>{
for (final OneTimeOrderRoleOption role in state.roles) role.id: role.costPerHour, for (final OneTimeOrderRoleOption role in state.roles) role.id: role.costPerHour,
}; };
final OneTimeOrderHubOption? selectedHub = state.selectedHub;
if (selectedHub == null) {
throw Exception('Hub is missing.');
}
final OneTimeOrder order = OneTimeOrder( final OneTimeOrder order = OneTimeOrder(
date: state.date, date: state.date,
location: state.location, location: selectedHub.name,
positions: state.positions, positions: state.positions,
hub: OneTimeOrderHubDetails(
id: selectedHub.id,
name: selectedHub.name,
address: selectedHub.address,
placeId: selectedHub.placeId,
latitude: selectedHub.latitude,
longitude: selectedHub.longitude,
city: selectedHub.city,
state: selectedHub.state,
street: selectedHub.street,
country: selectedHub.country,
zipCode: selectedHub.zipCode,
),
eventName: state.eventName,
vendorId: state.selectedVendor?.id, vendorId: state.selectedVendor?.id,
roleRates: roleRates, roleRates: roleRates,
); );

View File

@@ -1,5 +1,6 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart'; import 'package:krow_domain/krow_domain.dart';
import 'one_time_order_state.dart';
abstract class OneTimeOrderEvent extends Equatable { abstract class OneTimeOrderEvent extends Equatable {
const OneTimeOrderEvent(); const OneTimeOrderEvent();
@@ -24,6 +25,30 @@ class OneTimeOrderVendorChanged extends OneTimeOrderEvent {
List<Object?> get props => <Object?>[vendor]; List<Object?> get props => <Object?>[vendor];
} }
class OneTimeOrderHubsLoaded extends OneTimeOrderEvent {
const OneTimeOrderHubsLoaded(this.hubs);
final List<OneTimeOrderHubOption> hubs;
@override
List<Object?> get props => <Object?>[hubs];
}
class OneTimeOrderHubChanged extends OneTimeOrderEvent {
const OneTimeOrderHubChanged(this.hub);
final OneTimeOrderHubOption hub;
@override
List<Object?> get props => <Object?>[hub];
}
class OneTimeOrderEventNameChanged extends OneTimeOrderEvent {
const OneTimeOrderEventNameChanged(this.eventName);
final String eventName;
@override
List<Object?> get props => <Object?>[eventName];
}
class OneTimeOrderDateChanged extends OneTimeOrderEvent { class OneTimeOrderDateChanged extends OneTimeOrderEvent {
const OneTimeOrderDateChanged(this.date); const OneTimeOrderDateChanged(this.date);
final DateTime date; final DateTime date;
@@ -32,14 +57,6 @@ class OneTimeOrderDateChanged extends OneTimeOrderEvent {
List<Object?> get props => <Object?>[date]; List<Object?> get props => <Object?>[date];
} }
class OneTimeOrderLocationChanged extends OneTimeOrderEvent {
const OneTimeOrderLocationChanged(this.location);
final String location;
@override
List<Object?> get props => <Object?>[location];
}
class OneTimeOrderPositionAdded extends OneTimeOrderEvent { class OneTimeOrderPositionAdded extends OneTimeOrderEvent {
const OneTimeOrderPositionAdded(); const OneTimeOrderPositionAdded();
} }

View File

@@ -7,11 +7,14 @@ class OneTimeOrderState extends Equatable {
const OneTimeOrderState({ const OneTimeOrderState({
required this.date, required this.date,
required this.location, required this.location,
required this.eventName,
required this.positions, required this.positions,
this.status = OneTimeOrderStatus.initial, this.status = OneTimeOrderStatus.initial,
this.errorMessage, this.errorMessage,
this.vendors = const <Vendor>[], this.vendors = const <Vendor>[],
this.selectedVendor, this.selectedVendor,
this.hubs = const <OneTimeOrderHubOption>[],
this.selectedHub,
this.roles = const <OneTimeOrderRoleOption>[], this.roles = const <OneTimeOrderRoleOption>[],
}); });
@@ -19,40 +22,51 @@ class OneTimeOrderState extends Equatable {
return OneTimeOrderState( return OneTimeOrderState(
date: DateTime.now(), date: DateTime.now(),
location: '', location: '',
eventName: '',
positions: const <OneTimeOrderPosition>[ positions: const <OneTimeOrderPosition>[
OneTimeOrderPosition(role: '', count: 1, startTime: '', endTime: ''), OneTimeOrderPosition(role: '', count: 1, startTime: '', endTime: ''),
], ],
vendors: const <Vendor>[], vendors: const <Vendor>[],
hubs: const <OneTimeOrderHubOption>[],
roles: const <OneTimeOrderRoleOption>[], roles: const <OneTimeOrderRoleOption>[],
); );
} }
final DateTime date; final DateTime date;
final String location; final String location;
final String eventName;
final List<OneTimeOrderPosition> positions; final List<OneTimeOrderPosition> positions;
final OneTimeOrderStatus status; final OneTimeOrderStatus status;
final String? errorMessage; final String? errorMessage;
final List<Vendor> vendors; final List<Vendor> vendors;
final Vendor? selectedVendor; final Vendor? selectedVendor;
final List<OneTimeOrderHubOption> hubs;
final OneTimeOrderHubOption? selectedHub;
final List<OneTimeOrderRoleOption> roles; final List<OneTimeOrderRoleOption> roles;
OneTimeOrderState copyWith({ OneTimeOrderState copyWith({
DateTime? date, DateTime? date,
String? location, String? location,
String? eventName,
List<OneTimeOrderPosition>? positions, List<OneTimeOrderPosition>? positions,
OneTimeOrderStatus? status, OneTimeOrderStatus? status,
String? errorMessage, String? errorMessage,
List<Vendor>? vendors, List<Vendor>? vendors,
Vendor? selectedVendor, Vendor? selectedVendor,
List<OneTimeOrderHubOption>? hubs,
OneTimeOrderHubOption? selectedHub,
List<OneTimeOrderRoleOption>? roles, List<OneTimeOrderRoleOption>? roles,
}) { }) {
return OneTimeOrderState( return OneTimeOrderState(
date: date ?? this.date, date: date ?? this.date,
location: location ?? this.location, location: location ?? this.location,
eventName: eventName ?? this.eventName,
positions: positions ?? this.positions, positions: positions ?? this.positions,
status: status ?? this.status, status: status ?? this.status,
errorMessage: errorMessage ?? this.errorMessage, errorMessage: errorMessage ?? this.errorMessage,
vendors: vendors ?? this.vendors, vendors: vendors ?? this.vendors,
selectedVendor: selectedVendor ?? this.selectedVendor, selectedVendor: selectedVendor ?? this.selectedVendor,
hubs: hubs ?? this.hubs,
selectedHub: selectedHub ?? this.selectedHub,
roles: roles ?? this.roles, roles: roles ?? this.roles,
); );
} }
@@ -61,15 +75,61 @@ class OneTimeOrderState extends Equatable {
List<Object?> get props => <Object?>[ List<Object?> get props => <Object?>[
date, date,
location, location,
eventName,
positions, positions,
status, status,
errorMessage, errorMessage,
vendors, vendors,
selectedVendor, selectedVendor,
hubs,
selectedHub,
roles, roles,
]; ];
} }
class OneTimeOrderHubOption extends Equatable {
const OneTimeOrderHubOption({
required this.id,
required this.name,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
});
final String id;
final String name;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
@override
List<Object?> get props => <Object?>[
id,
name,
address,
placeId,
latitude,
longitude,
city,
state,
street,
country,
zipCode,
];
}
class OneTimeOrderRoleOption extends Equatable { class OneTimeOrderRoleOption extends Equatable {
const OneTimeOrderRoleOption({ const OneTimeOrderRoleOption({
required this.id, required this.id,

View File

@@ -0,0 +1,56 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
/// A text input for the order name in the one-time order form.
class OneTimeOrderEventNameInput extends StatefulWidget {
const OneTimeOrderEventNameInput({
required this.label,
required this.value,
required this.onChanged,
super.key,
});
final String label;
final String value;
final ValueChanged<String> onChanged;
@override
State<OneTimeOrderEventNameInput> createState() =>
_OneTimeOrderEventNameInputState();
}
class _OneTimeOrderEventNameInputState
extends State<OneTimeOrderEventNameInput> {
late final TextEditingController _controller;
@override
void initState() {
super.initState();
_controller = TextEditingController(text: widget.value);
}
@override
void didUpdateWidget(OneTimeOrderEventNameInput oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.value != _controller.text) {
_controller.text = widget.value;
}
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return UiTextField(
label: widget.label,
controller: _controller,
onChanged: widget.onChanged,
hintText: 'Order name',
prefixIcon: UiIcons.briefcase,
);
}
}

View File

@@ -8,8 +8,8 @@ import '../../blocs/one_time_order_bloc.dart';
import '../../blocs/one_time_order_event.dart'; import '../../blocs/one_time_order_event.dart';
import '../../blocs/one_time_order_state.dart'; import '../../blocs/one_time_order_state.dart';
import 'one_time_order_date_picker.dart'; import 'one_time_order_date_picker.dart';
import 'one_time_order_event_name_input.dart';
import 'one_time_order_header.dart'; import 'one_time_order_header.dart';
import 'one_time_order_location_input.dart';
import 'one_time_order_position_card.dart'; import 'one_time_order_position_card.dart';
import 'one_time_order_section_header.dart'; import 'one_time_order_section_header.dart';
import 'one_time_order_success_view.dart'; import 'one_time_order_success_view.dart';
@@ -31,7 +31,12 @@ class OneTimeOrderView extends StatelessWidget {
title: labels.success_title, title: labels.success_title,
message: labels.success_message, message: labels.success_message,
buttonLabel: labels.back_to_orders, buttonLabel: labels.back_to_orders,
onDone: () => Modular.to.pop(), onDone: () => Modular.to.navigate(
'/client-main/orders/',
arguments: <String, dynamic>{
'initialDate': state.date.toIso8601String(),
},
),
); );
} }
@@ -129,6 +134,15 @@ class _OneTimeOrderForm extends StatelessWidget {
), ),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
OneTimeOrderEventNameInput(
label: 'ORDER NAME',
value: state.eventName,
onChanged: (String value) => BlocProvider.of<OneTimeOrderBloc>(
context,
).add(OneTimeOrderEventNameChanged(value)),
),
const SizedBox(height: UiConstants.space4),
// Vendor Selection // Vendor Selection
Text('SELECT VENDOR', style: UiTypography.footnote2r.textSecondary), Text('SELECT VENDOR', style: UiTypography.footnote2r.textSecondary),
const SizedBox(height: 8), const SizedBox(height: 8),
@@ -179,12 +193,43 @@ class _OneTimeOrderForm extends StatelessWidget {
), ),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
OneTimeOrderLocationInput( Text('HUB', style: UiTypography.footnote2r.textSecondary),
label: labels.location_label, const SizedBox(height: 8),
value: state.location, Container(
onChanged: (String location) => BlocProvider.of<OneTimeOrderBloc>( padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
context, height: 48,
).add(OneTimeOrderLocationChanged(location)), decoration: BoxDecoration(
color: UiColors.white,
borderRadius: UiConstants.radiusMd,
border: Border.all(color: UiColors.border),
),
child: DropdownButtonHideUnderline(
child: DropdownButton<OneTimeOrderHubOption>(
isExpanded: true,
value: state.selectedHub,
icon: const Icon(
UiIcons.chevronDown,
size: 18,
color: UiColors.iconSecondary,
),
onChanged: (OneTimeOrderHubOption? hub) {
if (hub != null) {
BlocProvider.of<OneTimeOrderBloc>(
context,
).add(OneTimeOrderHubChanged(hub));
}
},
items: state.hubs.map((OneTimeOrderHubOption hub) {
return DropdownMenuItem<OneTimeOrderHubOption>(
value: hub,
child: Text(
hub.name,
style: UiTypography.body2m.textPrimary,
),
);
}).toList(),
),
),
), ),
const SizedBox(height: UiConstants.space6), const SizedBox(height: UiConstants.space6),

View File

@@ -25,6 +25,7 @@ dependencies:
krow_data_connect: krow_data_connect:
path: ../../../data_connect path: ../../../data_connect
firebase_data_connect: ^0.2.2+2 firebase_data_connect: ^0.2.2+2
firebase_auth: ^6.1.4
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@@ -1,5 +1,3 @@
library client_home;
import 'package:flutter_modular/flutter_modular.dart'; import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_data_connect/krow_data_connect.dart'; import 'package:krow_data_connect/krow_data_connect.dart';
import 'src/data/repositories_impl/home_repository_impl.dart'; import 'src/data/repositories_impl/home_repository_impl.dart';

View File

@@ -89,6 +89,14 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
end: _toTimestamp(end), end: _toTimestamp(end),
) )
.execute(); .execute();
print(
'Home coverage: businessId=$businessId '
'startLocal=${start.toIso8601String()} '
'endLocal=${end.toIso8601String()} '
'startUtc=${_toTimestamp(start).toJson()} '
'endUtc=${_toTimestamp(end).toJson()} '
'shiftRoles=${result.data.shiftRoles.length}',
);
int totalNeeded = 0; int totalNeeded = 0;
int totalFilled = 0; int totalFilled = 0;
@@ -169,7 +177,8 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
} }
fdc.Timestamp _toTimestamp(DateTime date) { fdc.Timestamp _toTimestamp(DateTime date) {
final int millis = date.millisecondsSinceEpoch; final DateTime utc = date.toUtc();
final int millis = utc.millisecondsSinceEpoch;
final int seconds = millis ~/ 1000; final int seconds = millis ~/ 1000;
final int nanos = (millis % 1000) * 1000000; final int nanos = (millis % 1000) * 1000000;
return fdc.Timestamp(nanos, seconds); return fdc.Timestamp(nanos, seconds);

View File

@@ -26,6 +26,8 @@ class ClientHomeBloc extends Bloc<ClientHomeEvent, ClientHomeState> {
on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled); on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled);
on<ClientHomeWidgetReordered>(_onWidgetReordered); on<ClientHomeWidgetReordered>(_onWidgetReordered);
on<ClientHomeLayoutReset>(_onLayoutReset); on<ClientHomeLayoutReset>(_onLayoutReset);
add(ClientHomeStarted());
} }
Future<void> _onStarted( Future<void> _onStarted(

View File

@@ -35,12 +35,12 @@ class ClientHomeState extends Equatable {
this.isEditMode = false, this.isEditMode = false,
this.errorMessage, this.errorMessage,
this.dashboardData = const HomeDashboardData( this.dashboardData = const HomeDashboardData(
weeklySpending: 4250.0, weeklySpending: 0.0,
next7DaysSpending: 6100.0, next7DaysSpending: 0.0,
weeklyShifts: 12, weeklyShifts: 0,
next7DaysScheduled: 18, next7DaysScheduled: 0,
totalNeeded: 10, totalNeeded: 0,
totalFilled: 8, totalFilled: 0,
), ),
this.reorderItems = const <ReorderItem>[], this.reorderItems = const <ReorderItem>[],
this.businessName = 'Your Company', this.businessName = 'Your Company',

View File

@@ -34,10 +34,7 @@ class ClientHomeSheets {
builder: (BuildContext context) { builder: (BuildContext context) {
return ShiftOrderFormSheet( return ShiftOrderFormSheet(
initialData: initialData, initialData: initialData,
onSubmit: (Map<String, dynamic> data) { onSubmit: onSubmit,
Navigator.pop(context);
onSubmit(data);
},
); );
}, },
); );

View File

@@ -24,8 +24,7 @@ class ClientHomePage extends StatelessWidget {
final TranslationsClientHomeEn i18n = t.client_home; final TranslationsClientHomeEn i18n = t.client_home;
return BlocProvider<ClientHomeBloc>( return BlocProvider<ClientHomeBloc>(
create: (BuildContext context) => create: (BuildContext context) => Modular.get<ClientHomeBloc>(),
Modular.get<ClientHomeBloc>()..add(ClientHomeStarted()),
child: Scaffold( child: Scaffold(
body: SafeArea( body: SafeArea(
child: Column( child: Column(
@@ -59,19 +58,15 @@ class ClientHomePage extends StatelessWidget {
100, 100,
), ),
onReorder: (int oldIndex, int newIndex) { onReorder: (int oldIndex, int newIndex) {
BlocProvider.of<ClientHomeBloc>(context).add( BlocProvider.of<ClientHomeBloc>(
ClientHomeWidgetReordered(oldIndex, newIndex), context,
); ).add(ClientHomeWidgetReordered(oldIndex, newIndex));
}, },
children: state.widgetOrder.map((String id) { children: state.widgetOrder.map((String id) {
return Container( return Container(
key: ValueKey(id), key: ValueKey<String>(id),
margin: const EdgeInsets.only(bottom: UiConstants.space4), margin: const EdgeInsets.only(bottom: UiConstants.space4),
child: DashboardWidgetBuilder( child: DashboardWidgetBuilder(id: id, state: state, isEditMode: true),
id: id,
state: state,
isEditMode: true,
),
); );
}).toList(), }).toList(),
); );

View File

@@ -24,21 +24,22 @@ class ActionsWidget extends StatelessWidget {
return Row( return Row(
children: <Widget>[ children: <Widget>[
Expanded( /// TODO: FEATURE_NOT_YET_IMPLEMENTED
child: _ActionCard( // Expanded(
title: i18n.rapid, // child: _ActionCard(
subtitle: i18n.rapid_subtitle, // title: i18n.rapid,
icon: UiIcons.zap, // subtitle: i18n.rapid_subtitle,
color: const Color(0xFFFEF2F2), // icon: UiIcons.zap,
borderColor: const Color(0xFFFECACA), // color: const Color(0xFFFEF2F2),
iconBgColor: const Color(0xFFFEE2E2), // borderColor: const Color(0xFFFECACA),
iconColor: const Color(0xFFDC2626), // iconBgColor: const Color(0xFFFEE2E2),
textColor: const Color(0xFF7F1D1D), // iconColor: const Color(0xFFDC2626),
subtitleColor: const Color(0xFFB91C1C), // textColor: const Color(0xFF7F1D1D),
onTap: onRapidPressed, // subtitleColor: const Color(0xFFB91C1C),
), // onTap: onRapidPressed,
), // ),
const SizedBox(width: UiConstants.space2), // ),
// const SizedBox(width: UiConstants.space2),
Expanded( Expanded(
child: _ActionCard( child: _ActionCard(
title: i18n.create_order, title: i18n.create_order,

View File

@@ -25,11 +25,12 @@ class CoverageDashboard extends StatelessWidget {
for (final s in shifts) { for (final s in shifts) {
final int needed = s['workersNeeded'] as int? ?? 0; final int needed = s['workersNeeded'] as int? ?? 0;
final int confirmed = s['filled'] as int? ?? 0; final int confirmed = s['filled'] as int? ?? 0;
final double rate = s['hourlyRate'] as double? ?? 20.0; final double rate = s['hourlyRate'] as double? ?? 0.0;
final double hours = s['hours'] as double? ?? 0.0;
totalNeeded += needed; totalNeeded += needed;
totalConfirmed += confirmed; totalConfirmed += confirmed;
todayCost += rate * 8 * confirmed; todayCost += rate * hours;
} }
final int coveragePercent = totalNeeded > 0 final int coveragePercent = totalNeeded > 0
@@ -104,15 +105,13 @@ class CoverageDashboard extends StatelessWidget {
icon: UiIcons.warning, icon: UiIcons.warning,
isWarning: unfilledPositions > 0, isWarning: unfilledPositions > 0,
), ),
if (lateWorkersCount > 0) ...<Widget>[ const SizedBox(height: UiConstants.space2),
const SizedBox(height: UiConstants.space2), _StatusCard(
_StatusCard( label: 'Running Late',
label: 'Running Late', value: '$lateWorkersCount',
value: '$lateWorkersCount', icon: UiIcons.error,
icon: UiIcons.error, isError: true,
isError: true, ),
),
],
], ],
), ),
), ),
@@ -122,7 +121,7 @@ class CoverageDashboard extends StatelessWidget {
children: <Widget>[ children: <Widget>[
_StatusCard( _StatusCard(
label: 'Checked In', label: 'Checked In',
value: '$checkedInCount/$totalConfirmed', value: '$checkedInCount/$totalNeeded',
icon: UiIcons.success, icon: UiIcons.success,
isInfo: true, isInfo: true,
), ),

View File

@@ -15,9 +15,9 @@ class CoverageWidget extends StatelessWidget {
/// Creates a [CoverageWidget]. /// Creates a [CoverageWidget].
const CoverageWidget({ const CoverageWidget({
super.key, super.key,
this.totalNeeded = 10, this.totalNeeded = 0,
this.totalConfirmed = 8, this.totalConfirmed = 0,
this.coveragePercent = 80, this.coveragePercent = 0,
}); });
@override @override

View File

@@ -70,7 +70,21 @@ class DashboardWidgetBuilder extends StatelessWidget {
context, context,
data, data,
onSubmit: (Map<String, dynamic> submittedData) { onSubmit: (Map<String, dynamic> submittedData) {
// Handle form submission if needed final String? dateStr =
submittedData['date']?.toString();
if (dateStr == null || dateStr.isEmpty) {
return;
}
final DateTime? initialDate = DateTime.tryParse(dateStr);
if (initialDate == null) {
return;
}
Modular.to.navigate(
'/client-main/orders/',
arguments: <String, dynamic>{
'initialDate': initialDate.toIso8601String(),
},
);
}, },
); );
}, },

View File

@@ -31,6 +31,15 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
final DateTime now = DateTime.now(); final DateTime now = DateTime.now();
final DateTime start = DateTime(now.year, now.month, now.day); final DateTime start = DateTime(now.year, now.month, now.day);
final DateTime end = DateTime(now.year, now.month, now.day, 23, 59, 59, 999); final DateTime end = DateTime(now.year, now.month, now.day, 23, 59, 59, 999);
final fdc.QueryResult<dc.ListShiftRolesByBusinessAndDateRangeData,
dc.ListShiftRolesByBusinessAndDateRangeVariables> shiftRolesResult =
await dc.ExampleConnector.instance
.listShiftRolesByBusinessAndDateRange(
businessId: businessId,
start: _toTimestamp(start),
end: _toTimestamp(end),
)
.execute();
final fdc.QueryResult<dc.ListStaffsApplicationsByBusinessForDayData, final fdc.QueryResult<dc.ListStaffsApplicationsByBusinessForDayData,
dc.ListStaffsApplicationsByBusinessForDayVariables> result = dc.ListStaffsApplicationsByBusinessForDayVariables> result =
await dc.ExampleConnector.instance await dc.ExampleConnector.instance
@@ -41,33 +50,20 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
) )
.execute(); .execute();
if (result.data.applications.isEmpty) { if (shiftRolesResult.data.shiftRoles.isEmpty &&
result.data.applications.isEmpty) {
return _LiveActivityData.empty(); return _LiveActivityData.empty();
} }
final Map<String, _LiveShiftAggregate> aggregates =
<String, _LiveShiftAggregate>{};
for (final dc.ListStaffsApplicationsByBusinessForDayApplications app
in result.data.applications) {
final String key = '${app.shiftId}:${app.roleId}';
final _LiveShiftAggregate aggregate = aggregates[key] ??
_LiveShiftAggregate(
workersNeeded: app.shiftRole.count,
assigned: app.shiftRole.assigned ?? 0,
cost: app.shiftRole.shift.cost ?? 0,
);
aggregates[key] = aggregate;
}
int totalNeeded = 0; int totalNeeded = 0;
int totalAssigned = 0;
double totalCost = 0; double totalCost = 0;
for (final _LiveShiftAggregate aggregate in aggregates.values) { for (final dc.ListShiftRolesByBusinessAndDateRangeShiftRoles shiftRole
totalNeeded += aggregate.workersNeeded; in shiftRolesResult.data.shiftRoles) {
totalAssigned += aggregate.assigned; totalNeeded += shiftRole.count;
totalCost += aggregate.cost; totalCost += shiftRole.totalValue ?? 0;
} }
final int totalAssigned = result.data.applications.length;
int lateCount = 0; int lateCount = 0;
int checkedInCount = 0; int checkedInCount = 0;
for (final dc.ListStaffsApplicationsByBusinessForDayApplications app for (final dc.ListStaffsApplicationsByBusinessForDayApplications app
@@ -92,9 +88,10 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
} }
fdc.Timestamp _toTimestamp(DateTime dateTime) { fdc.Timestamp _toTimestamp(DateTime dateTime) {
final int seconds = dateTime.millisecondsSinceEpoch ~/ 1000; final DateTime utc = dateTime.toUtc();
final int seconds = utc.millisecondsSinceEpoch ~/ 1000;
final int nanoseconds = final int nanoseconds =
(dateTime.millisecondsSinceEpoch % 1000) * 1000000; (utc.millisecondsSinceEpoch % 1000) * 1000000;
return fdc.Timestamp(nanoseconds, seconds); return fdc.Timestamp(nanoseconds, seconds);
} }
@@ -136,9 +133,8 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
<String, Object>{ <String, Object>{
'workersNeeded': data.totalNeeded, 'workersNeeded': data.totalNeeded,
'filled': data.totalAssigned, 'filled': data.totalAssigned,
'hourlyRate': data.totalAssigned == 0 'hourlyRate': 1.0,
? 0.0 'hours': data.totalCost,
: data.totalCost / data.totalAssigned,
'status': 'OPEN', 'status': 'OPEN',
'date': DateTime.now().toIso8601String().split('T')[0], 'date': DateTime.now().toIso8601String().split('T')[0],
}, },
@@ -192,15 +188,3 @@ class _LiveActivityData {
); );
} }
} }
class _LiveShiftAggregate {
_LiveShiftAggregate({
required this.workersNeeded,
required this.assigned,
required this.cost,
});
final int workersNeeded;
final int assigned;
final double cost;
}

View File

@@ -1,3 +1,4 @@
import 'package:core_localization/core_localization.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc; import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -52,6 +53,7 @@ class ShiftOrderFormSheet extends StatefulWidget {
class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> { class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
late TextEditingController _dateController; late TextEditingController _dateController;
late TextEditingController _globalLocationController; late TextEditingController _globalLocationController;
late TextEditingController _orderNameController;
late List<Map<String, dynamic>> _positions; late List<Map<String, dynamic>> _positions;
@@ -59,6 +61,10 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
List<_VendorOption> _vendors = const <_VendorOption>[]; List<_VendorOption> _vendors = const <_VendorOption>[];
List<_RoleOption> _roles = const <_RoleOption>[]; List<_RoleOption> _roles = const <_RoleOption>[];
String? _selectedVendorId; String? _selectedVendorId;
List<dc.ListTeamHubsByOwnerIdTeamHubs> _hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
dc.ListTeamHubsByOwnerIdTeamHubs? _selectedHub;
bool _showSuccess = false;
Map<String, dynamic>? _submitData;
@override @override
void initState() { void initState() {
@@ -75,6 +81,9 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
widget.initialData?['locationAddress'] ?? widget.initialData?['locationAddress'] ??
'', '',
); );
_orderNameController = TextEditingController(
text: widget.initialData?['eventName']?.toString() ?? '',
);
// Initialize positions // Initialize positions
_positions = <Map<String, dynamic>>[ _positions = <Map<String, dynamic>>[
@@ -96,6 +105,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
]; ];
_loadVendors(); _loadVendors();
_loadHubs();
_loadOrderDetails(); _loadOrderDetails();
} }
@@ -103,6 +113,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
void dispose() { void dispose() {
_dateController.dispose(); _dateController.dispose();
_globalLocationController.dispose(); _globalLocationController.dispose();
_orderNameController.dispose();
super.dispose(); super.dispose();
} }
@@ -187,9 +198,14 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
if (businessId == null || businessId.isEmpty) { if (businessId == null || businessId.isEmpty) {
return; return;
} }
final dc.ListTeamHubsByOwnerIdTeamHubs? selectedHub = _selectedHub;
if (selectedHub == null) {
return;
}
final DateTime date = DateTime.parse(_dateController.text); final DateTime date = DateTime.parse(_dateController.text);
final fdc.Timestamp orderTimestamp = _toTimestamp(date); final DateTime dateOnly = DateTime.utc(date.year, date.month, date.day);
final fdc.Timestamp orderTimestamp = _toTimestamp(dateOnly);
final dc.OrderType orderType = final dc.OrderType orderType =
_orderTypeFromValue(widget.initialData?['type']?.toString()); _orderTypeFromValue(widget.initialData?['type']?.toString());
@@ -198,9 +214,10 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
.createOrder( .createOrder(
businessId: businessId, businessId: businessId,
orderType: orderType, orderType: orderType,
teamHubId: selectedHub.id,
) )
.vendorId(_selectedVendorId) .vendorId(_selectedVendorId)
.location(_globalLocationController.text) .eventName(_orderNameController.text)
.status(dc.OrderStatus.POSTED) .status(dc.OrderStatus.POSTED)
.date(orderTimestamp) .date(orderTimestamp)
.execute(); .execute();
@@ -222,8 +239,15 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
shiftResult = await _dataConnect shiftResult = await _dataConnect
.createShift(title: shiftTitle, orderId: orderId) .createShift(title: shiftTitle, orderId: orderId)
.date(orderTimestamp) .date(orderTimestamp)
.location(_globalLocationController.text) .location(selectedHub.hubName)
.locationAddress(_globalLocationController.text) .locationAddress(selectedHub.address)
.latitude(selectedHub.latitude)
.longitude(selectedHub.longitude)
.placeId(selectedHub.placeId)
.city(selectedHub.city)
.state(selectedHub.state)
.street(selectedHub.street)
.country(selectedHub.country)
.status(dc.ShiftStatus.PENDING) .status(dc.ShiftStatus.PENDING)
.workersNeeded(workersNeeded) .workersNeeded(workersNeeded)
.filled(0) .filled(0)
@@ -266,12 +290,17 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
} }
await _dataConnect await _dataConnect
.updateOrder(id: orderId) .updateOrder(id: orderId, teamHubId: selectedHub.id)
.shifts(fdc.AnyValue(<String>[shiftId])) .shifts(fdc.AnyValue(<String>[shiftId]))
.execute(); .execute();
widget.onSubmit(<String, dynamic>{ if (!mounted) return;
'orderId': orderId, setState(() {
_submitData = <String, dynamic>{
'orderId': orderId,
'date': _dateController.text,
};
_showSuccess = true;
}); });
} }
@@ -306,6 +335,35 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
} }
} }
Future<void> _loadHubs() async {
final String? businessId = dc.ClientSessionStore.instance.session?.business?.id;
if (businessId == null || businessId.isEmpty) {
return;
}
try {
final fdc.QueryResult<
dc.ListTeamHubsByOwnerIdData,
dc.ListTeamHubsByOwnerIdVariables> result =
await _dataConnect.listTeamHubsByOwnerId(ownerId: businessId).execute();
final List<dc.ListTeamHubsByOwnerIdTeamHubs> hubs = result.data.teamHubs;
if (!mounted) return;
setState(() {
_hubs = hubs;
_selectedHub = hubs.isNotEmpty ? hubs.first : null;
if (_selectedHub != null) {
_globalLocationController.text = _selectedHub!.address;
}
});
} catch (_) {
if (!mounted) return;
setState(() {
_hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
_selectedHub = null;
});
}
}
Future<void> _loadRolesForVendor(String vendorId) async { Future<void> _loadRolesForVendor(String vendorId) async {
try { try {
final fdc.QueryResult<dc.ListRolesByVendorIdData, dc.ListRolesByVendorIdVariables> final fdc.QueryResult<dc.ListRolesByVendorIdData, dc.ListRolesByVendorIdVariables>
@@ -357,10 +415,14 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
final dc.ListShiftRolesByBusinessAndOrderShiftRolesShift firstShift = final dc.ListShiftRolesByBusinessAndOrderShiftRolesShift firstShift =
shiftRoles.first.shift; shiftRoles.first.shift;
_globalLocationController.text = firstShift.order.location ?? final dc.ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub?
firstShift.locationAddress ?? teamHub = firstShift.order.teamHub;
firstShift.location ?? await _loadHubsAndSelect(
_globalLocationController.text; placeId: teamHub?.placeId,
hubName: teamHub?.hubName,
address: teamHub?.address,
);
_orderNameController.text = firstShift.order.eventName ?? '';
final String? vendorId = firstShift.order.vendorId; final String? vendorId = firstShift.order.vendorId;
if (mounted) { if (mounted) {
@@ -394,6 +456,70 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
} }
} }
Future<void> _loadHubsAndSelect({
String? placeId,
String? hubName,
String? address,
}) async {
final String? businessId = dc.ClientSessionStore.instance.session?.business?.id;
if (businessId == null || businessId.isEmpty) {
return;
}
try {
final fdc.QueryResult<
dc.ListTeamHubsByOwnerIdData,
dc.ListTeamHubsByOwnerIdVariables> result =
await _dataConnect.listTeamHubsByOwnerId(ownerId: businessId).execute();
final List<dc.ListTeamHubsByOwnerIdTeamHubs> hubs = result.data.teamHubs;
dc.ListTeamHubsByOwnerIdTeamHubs? selected;
if (placeId != null && placeId.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.placeId == placeId) {
selected = hub;
break;
}
}
}
if (selected == null && hubName != null && hubName.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.hubName == hubName) {
selected = hub;
break;
}
}
}
if (selected == null && address != null && address.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.address == address) {
selected = hub;
break;
}
}
}
selected ??= hubs.isNotEmpty ? hubs.first : null;
if (!mounted) return;
setState(() {
_hubs = hubs;
_selectedHub = selected;
if (selected != null) {
_globalLocationController.text = selected.address;
}
});
} catch (_) {
if (!mounted) return;
setState(() {
_hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
_selectedHub = null;
});
}
}
String _formatTimeForField(fdc.Timestamp? value) { String _formatTimeForField(fdc.Timestamp? value) {
if (value == null) return ''; if (value == null) return '';
try { try {
@@ -472,7 +598,8 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
} }
fdc.Timestamp _toTimestamp(DateTime date) { fdc.Timestamp _toTimestamp(DateTime date) {
final int millis = date.millisecondsSinceEpoch; final DateTime utc = date.toUtc();
final int millis = utc.millisecondsSinceEpoch;
final int seconds = millis ~/ 1000; final int seconds = millis ~/ 1000;
final int nanos = (millis % 1000) * 1000000; final int nanos = (millis % 1000) * 1000000;
return fdc.Timestamp(nanos, seconds); return fdc.Timestamp(nanos, seconds);
@@ -480,6 +607,16 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (_showSuccess) {
final TranslationsClientCreateOrderOneTimeEn labels =
t.client_create_order.one_time;
return _buildSuccessView(
title: labels.success_title,
message: labels.success_message,
buttonLabel: labels.back_to_orders,
);
}
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.95, height: MediaQuery.of(context).size.height * 0.95,
decoration: const BoxDecoration( decoration: const BoxDecoration(
@@ -546,12 +683,16 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
_buildVendorDropdown(), _buildVendorDropdown(),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
_buildSectionHeader('ORDER NAME'),
_buildOrderNameField(),
const SizedBox(height: UiConstants.space4),
_buildSectionHeader('DATE'), _buildSectionHeader('DATE'),
_buildDateField(), _buildDateField(),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
_buildSectionHeader('LOCATION'), _buildSectionHeader('HUB'),
_buildLocationField(), _buildHubField(),
const SizedBox(height: UiConstants.space5), const SizedBox(height: UiConstants.space5),
Row( Row(
@@ -783,7 +924,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
); );
} }
Widget _buildLocationField() { Widget _buildHubField() {
return Container( return Container(
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3), padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -791,21 +932,52 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
borderRadius: UiConstants.radiusMd, borderRadius: UiConstants.radiusMd,
border: Border.all(color: UiColors.border), border: Border.all(color: UiColors.border),
), ),
child: Row( child: DropdownButtonHideUnderline(
children: <Widget>[ child: DropdownButton<dc.ListTeamHubsByOwnerIdTeamHubs>(
const Icon(UiIcons.mapPin, size: 20, color: UiColors.iconSecondary), isExpanded: true,
const SizedBox(width: UiConstants.space2), value: _selectedHub,
Expanded( icon: const Icon(
child: TextField( UiIcons.chevronDown,
controller: _globalLocationController, size: 18,
decoration: const InputDecoration( color: UiColors.iconSecondary,
hintText: 'Enter location address',
border: InputBorder.none,
),
style: UiTypography.body2r.textPrimary,
),
), ),
], onChanged: (dc.ListTeamHubsByOwnerIdTeamHubs? hub) {
if (hub != null) {
setState(() {
_selectedHub = hub;
_globalLocationController.text = hub.address;
});
}
},
items: _hubs.map((dc.ListTeamHubsByOwnerIdTeamHubs hub) {
return DropdownMenuItem<dc.ListTeamHubsByOwnerIdTeamHubs>(
value: hub,
child: Text(
hub.hubName,
style: UiTypography.body2r.textPrimary,
),
);
}).toList(),
),
),
);
}
Widget _buildOrderNameField() {
return Container(
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
decoration: BoxDecoration(
color: UiColors.white,
borderRadius: UiConstants.radiusMd,
border: Border.all(color: UiColors.border),
),
child: TextField(
controller: _orderNameController,
decoration: const InputDecoration(
hintText: 'Order name',
border: InputBorder.none,
),
style: UiTypography.body2r.textPrimary,
), ),
); );
} }
@@ -1109,6 +1281,90 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
); );
} }
Widget _buildSuccessView({
required String title,
required String message,
required String buttonLabel,
}) {
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.95,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[UiColors.primary, UiColors.buttonPrimaryHover],
),
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
),
child: SafeArea(
child: Center(
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 40),
padding: const EdgeInsets.all(UiConstants.space8),
decoration: BoxDecoration(
color: UiColors.white,
borderRadius: UiConstants.radiusLg * 1.5,
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.black.withValues(alpha: 0.2),
blurRadius: 20,
offset: const Offset(0, 10),
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: 64,
height: 64,
decoration: const BoxDecoration(
color: UiColors.accent,
shape: BoxShape.circle,
),
child: const Center(
child: Icon(
UiIcons.check,
color: UiColors.black,
size: 32,
),
),
),
const SizedBox(height: UiConstants.space6),
Text(
title,
style: UiTypography.headline2m.textPrimary,
textAlign: TextAlign.center,
),
const SizedBox(height: UiConstants.space3),
Text(
message,
textAlign: TextAlign.center,
style: UiTypography.body2r.textSecondary.copyWith(
height: 1.5,
),
),
const SizedBox(height: UiConstants.space8),
SizedBox(
width: double.infinity,
child: UiButton.primary(
text: buttonLabel,
onPressed: () {
widget.onSubmit(_submitData ?? <String, dynamic>{});
Navigator.pop(context);
},
size: UiButtonSize.large,
),
),
],
),
),
),
),
);
}
Widget _buildInlineTimeInput({ Widget _buildInlineTimeInput({
required String label, required String label,
required String value, required String value,

View File

@@ -22,6 +22,7 @@ dependencies:
core_localization: core_localization:
path: ../../../core_localization path: ../../../core_localization
krow_domain: ^0.0.1 krow_domain: ^0.0.1
krow_data_connect: ^0.0.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@@ -1,9 +1,13 @@
import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart' as firebase; import 'package:firebase_auth/firebase_auth.dart' as firebase;
import 'package:firebase_data_connect/firebase_data_connect.dart'; import 'package:firebase_data_connect/firebase_data_connect.dart';
import 'package:http/http.dart' as http;
import 'package:krow_data_connect/krow_data_connect.dart' as dc; import 'package:krow_data_connect/krow_data_connect.dart' as dc;
import 'package:krow_domain/krow_domain.dart' as domain; import 'package:krow_domain/krow_domain.dart' as domain;
import '../../domain/repositories/hub_repository_interface.dart'; import '../../domain/repositories/hub_repository_interface.dart';
import '../../util/hubs_constants.dart';
/// Implementation of [HubRepositoryInterface] backed by Data Connect. /// Implementation of [HubRepositoryInterface] backed by Data Connect.
class HubRepositoryImpl implements HubRepositoryInterface { class HubRepositoryImpl implements HubRepositoryInterface {
@@ -27,10 +31,24 @@ class HubRepositoryImpl implements HubRepositoryInterface {
Future<domain.Hub> createHub({ Future<domain.Hub> createHub({
required String name, required String name,
required String address, required String address,
String? placeId,
double? latitude,
double? longitude,
String? city,
String? state,
String? street,
String? country,
String? zipCode,
}) async { }) async {
final dc.GetBusinessesByUserIdBusinesses business = await _getBusinessForCurrentUser(); final dc.GetBusinessesByUserIdBusinesses business = await _getBusinessForCurrentUser();
final String teamId = await _getOrCreateTeamId(business); final String teamId = await _getOrCreateTeamId(business);
final String? city = business.city; final _PlaceAddress? placeAddress =
placeId == null || placeId.isEmpty ? null : await _fetchPlaceAddress(placeId);
final String? cityValue = city ?? placeAddress?.city ?? business.city;
final String? stateValue = state ?? placeAddress?.state;
final String? streetValue = street ?? placeAddress?.street;
final String? countryValue = country ?? placeAddress?.country;
final String? zipCodeValue = zipCode ?? placeAddress?.zipCode;
final OperationResult<dc.CreateTeamHubData, dc.CreateTeamHubVariables> result = await _dataConnect final OperationResult<dc.CreateTeamHubData, dc.CreateTeamHubVariables> result = await _dataConnect
.createTeamHub( .createTeamHub(
@@ -38,7 +56,14 @@ class HubRepositoryImpl implements HubRepositoryInterface {
hubName: name, hubName: name,
address: address, address: address,
) )
.city(city?.isNotEmpty == true ? city : '') .placeId(placeId)
.latitude(latitude)
.longitude(longitude)
.city(cityValue?.isNotEmpty == true ? cityValue : '')
.state(stateValue)
.street(streetValue)
.country(countryValue)
.zipCode(zipCodeValue)
.execute(); .execute();
final String? createdId = result.data?.teamHub_insert.id; final String? createdId = result.data?.teamHub_insert.id;
if (createdId == null) { if (createdId == null) {
@@ -69,6 +94,25 @@ class HubRepositoryImpl implements HubRepositoryInterface {
@override @override
Future<void> deleteHub(String id) async { Future<void> deleteHub(String id) async {
final String? businessId = dc.ClientSessionStore.instance.session?.business?.id;
if (businessId == null || businessId.isEmpty) {
await _firebaseAuth.signOut();
throw Exception('Business is missing. Please sign in again.');
}
final QueryResult<
dc.ListOrdersByBusinessAndTeamHubData,
dc.ListOrdersByBusinessAndTeamHubVariables> result = await _dataConnect
.listOrdersByBusinessAndTeamHub(
businessId: businessId,
teamHubId: id,
)
.execute();
if (result.data.orders.isNotEmpty) {
throw Exception("Sorry this hub has orders, it can't be deleted.");
}
await _dataConnect.deleteTeamHub(id: id).execute(); await _dataConnect.deleteTeamHub(id: id).execute();
} }
@@ -192,4 +236,99 @@ class HubRepositoryImpl implements HubRepositoryInterface {
) )
.toList(); .toList();
} }
Future<_PlaceAddress?> _fetchPlaceAddress(String placeId) async {
final Uri uri = Uri.https(
'maps.googleapis.com',
'/maps/api/place/details/json',
<String, String>{
'place_id': placeId,
'fields': 'address_component',
'key': HubsConstants.googlePlacesApiKey,
},
);
try {
final http.Response response = await http.get(uri);
if (response.statusCode != 200) {
return null;
}
final Map<String, dynamic> payload =
json.decode(response.body) as Map<String, dynamic>;
if (payload['status'] != 'OK') {
return null;
}
final Map<String, dynamic>? result =
payload['result'] as Map<String, dynamic>?;
final List<dynamic>? components =
result?['address_components'] as List<dynamic>?;
if (components == null || components.isEmpty) {
return null;
}
String? streetNumber;
String? route;
String? city;
String? state;
String? country;
String? zipCode;
for (final dynamic entry in components) {
final Map<String, dynamic> component = entry as Map<String, dynamic>;
final List<dynamic> types = component['types'] as List<dynamic>? ?? <dynamic>[];
final String? longName = component['long_name'] as String?;
final String? shortName = component['short_name'] as String?;
if (types.contains('street_number')) {
streetNumber = longName;
} else if (types.contains('route')) {
route = longName;
} else if (types.contains('locality')) {
city = longName;
} else if (types.contains('postal_town')) {
city ??= longName;
} else if (types.contains('administrative_area_level_2')) {
city ??= longName;
} else if (types.contains('administrative_area_level_1')) {
state = shortName ?? longName;
} else if (types.contains('country')) {
country = shortName ?? longName;
} else if (types.contains('postal_code')) {
zipCode = longName;
}
}
final String? streetValue = <String?>[streetNumber, route]
.where((String? value) => value != null && value!.isNotEmpty)
.join(' ')
.trim();
return _PlaceAddress(
street: streetValue?.isEmpty == true ? null : streetValue,
city: city,
state: state,
country: country,
zipCode: zipCode,
);
} catch (_) {
return null;
}
}
}
class _PlaceAddress {
const _PlaceAddress({
this.street,
this.city,
this.state,
this.country,
this.zipCode,
});
final String? street;
final String? city;
final String? state;
final String? country;
final String? zipCode;
} }

View File

@@ -10,11 +10,42 @@ class CreateHubArguments extends UseCaseArgument {
/// The physical address of the hub. /// The physical address of the hub.
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
/// Creates a [CreateHubArguments] instance. /// Creates a [CreateHubArguments] instance.
/// ///
/// Both [name] and [address] are required. /// Both [name] and [address] are required.
const CreateHubArguments({required this.name, required this.address}); const CreateHubArguments({
required this.name,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
});
@override @override
List<Object?> get props => <Object?>[name, address]; List<Object?> get props => <Object?>[
name,
address,
placeId,
latitude,
longitude,
city,
state,
street,
country,
zipCode,
];
} }

View File

@@ -15,7 +15,18 @@ abstract interface class HubRepositoryInterface {
/// ///
/// Takes the [name] and [address] of the new hub. /// Takes the [name] and [address] of the new hub.
/// Returns the created [Hub] entity. /// Returns the created [Hub] entity.
Future<Hub> createHub({required String name, required String address}); Future<Hub> createHub({
required String name,
required String address,
String? placeId,
double? latitude,
double? longitude,
String? city,
String? state,
String? street,
String? country,
String? zipCode,
});
/// Deletes a hub by its [id]. /// Deletes a hub by its [id].
Future<void> deleteHub(String id); Future<void> deleteHub(String id);

View File

@@ -21,6 +21,14 @@ class CreateHubUseCase implements UseCase<CreateHubArguments, Hub> {
return _repository.createHub( return _repository.createHub(
name: arguments.name, name: arguments.name,
address: arguments.address, address: arguments.address,
placeId: arguments.placeId,
latitude: arguments.latitude,
longitude: arguments.longitude,
city: arguments.city,
state: arguments.state,
street: arguments.street,
country: arguments.country,
zipCode: arguments.zipCode,
); );
} }
} }

View File

@@ -84,7 +84,18 @@ class ClientHubsBloc extends Bloc<ClientHubsEvent, ClientHubsState>
emit(state.copyWith(status: ClientHubsStatus.actionInProgress)); emit(state.copyWith(status: ClientHubsStatus.actionInProgress));
try { try {
await _createHubUseCase( await _createHubUseCase(
CreateHubArguments(name: event.name, address: event.address), CreateHubArguments(
name: event.name,
address: event.address,
placeId: event.placeId,
latitude: event.latitude,
longitude: event.longitude,
city: event.city,
state: event.state,
street: event.street,
country: event.country,
zipCode: event.zipCode,
),
); );
final List<Hub> hubs = await _getHubsUseCase(); final List<Hub> hubs = await _getHubsUseCase();
emit( emit(

View File

@@ -18,11 +18,41 @@ class ClientHubsFetched extends ClientHubsEvent {
class ClientHubsAddRequested extends ClientHubsEvent { class ClientHubsAddRequested extends ClientHubsEvent {
final String name; final String name;
final String address; final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
const ClientHubsAddRequested({required this.name, required this.address}); const ClientHubsAddRequested({
required this.name,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
});
@override @override
List<Object?> get props => <Object?>[name, address]; List<Object?> get props => <Object?>[
name,
address,
placeId,
latitude,
longitude,
city,
state,
street,
country,
zipCode,
];
} }
/// Event triggered to delete a hub. /// Event triggered to delete a hub.

View File

@@ -27,8 +27,12 @@ class ClientHubsPage extends StatelessWidget {
create: (BuildContext context) => create: (BuildContext context) =>
Modular.get<ClientHubsBloc>()..add(const ClientHubsFetched()), Modular.get<ClientHubsBloc>()..add(const ClientHubsFetched()),
child: BlocConsumer<ClientHubsBloc, ClientHubsState>( child: BlocConsumer<ClientHubsBloc, ClientHubsState>(
listenWhen: (ClientHubsState previous, ClientHubsState current) {
return previous.errorMessage != current.errorMessage ||
previous.successMessage != current.successMessage;
},
listener: (BuildContext context, ClientHubsState state) { listener: (BuildContext context, ClientHubsState state) {
if (state.errorMessage != null) { if (state.errorMessage != null && state.errorMessage!.isNotEmpty) {
ScaffoldMessenger.of( ScaffoldMessenger.of(
context, context,
).showSnackBar(SnackBar(content: Text(state.errorMessage!))); ).showSnackBar(SnackBar(content: Text(state.errorMessage!)));
@@ -36,7 +40,7 @@ class ClientHubsPage extends StatelessWidget {
context, context,
).add(const ClientHubsMessageCleared()); ).add(const ClientHubsMessageCleared());
} }
if (state.successMessage != null) { if (state.successMessage != null && state.successMessage!.isNotEmpty) {
ScaffoldMessenger.of( ScaffoldMessenger.of(
context, context,
).showSnackBar(SnackBar(content: Text(state.successMessage!))); ).showSnackBar(SnackBar(content: Text(state.successMessage!)));
@@ -106,9 +110,21 @@ class ClientHubsPage extends StatelessWidget {
), ),
if (state.showAddHubDialog) if (state.showAddHubDialog)
AddHubDialog( AddHubDialog(
onCreate: (String name, String address) { onCreate: (
String name,
String address, {
String? placeId,
double? latitude,
double? longitude,
}) {
BlocProvider.of<ClientHubsBloc>(context).add( BlocProvider.of<ClientHubsBloc>(context).add(
ClientHubsAddRequested(name: name, address: address), ClientHubsAddRequested(
name: name,
address: address,
placeId: placeId,
latitude: latitude,
longitude: longitude,
),
); );
}, },
onCancel: () => BlocProvider.of<ClientHubsBloc>( onCancel: () => BlocProvider.of<ClientHubsBloc>(

View File

@@ -1,11 +1,20 @@
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:core_localization/core_localization.dart'; import 'package:core_localization/core_localization.dart';
import 'package:google_places_flutter/model/prediction.dart';
import 'hub_address_autocomplete.dart';
/// A dialog for adding a new hub. /// A dialog for adding a new hub.
class AddHubDialog extends StatefulWidget { class AddHubDialog extends StatefulWidget {
/// Callback when the "Create Hub" button is pressed. /// Callback when the "Create Hub" button is pressed.
final Function(String name, String address) onCreate; final void Function(
String name,
String address, {
String? placeId,
double? latitude,
double? longitude,
}) onCreate;
/// Callback when the dialog is cancelled. /// Callback when the dialog is cancelled.
final VoidCallback onCancel; final VoidCallback onCancel;
@@ -24,18 +33,22 @@ class AddHubDialog extends StatefulWidget {
class _AddHubDialogState extends State<AddHubDialog> { class _AddHubDialogState extends State<AddHubDialog> {
late final TextEditingController _nameController; late final TextEditingController _nameController;
late final TextEditingController _addressController; late final TextEditingController _addressController;
late final FocusNode _addressFocusNode;
Prediction? _selectedPrediction;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_nameController = TextEditingController(); _nameController = TextEditingController();
_addressController = TextEditingController(); _addressController = TextEditingController();
_addressFocusNode = FocusNode();
} }
@override @override
void dispose() { void dispose() {
_nameController.dispose(); _nameController.dispose();
_addressController.dispose(); _addressController.dispose();
_addressFocusNode.dispose();
super.dispose(); super.dispose();
} }
@@ -74,12 +87,13 @@ class _AddHubDialogState extends State<AddHubDialog> {
), ),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
_buildFieldLabel(t.client_hubs.add_hub_dialog.address_label), _buildFieldLabel(t.client_hubs.add_hub_dialog.address_label),
TextField( HubAddressAutocomplete(
controller: _addressController, controller: _addressController,
style: UiTypography.body1r.textPrimary, hintText: t.client_hubs.add_hub_dialog.address_hint,
decoration: _buildInputDecoration( focusNode: _addressFocusNode,
t.client_hubs.add_hub_dialog.address_hint, onSelected: (Prediction prediction) {
), _selectedPrediction = prediction;
},
), ),
const SizedBox(height: UiConstants.space8), const SizedBox(height: UiConstants.space8),
Row( Row(
@@ -98,6 +112,13 @@ class _AddHubDialogState extends State<AddHubDialog> {
widget.onCreate( widget.onCreate(
_nameController.text, _nameController.text,
_addressController.text, _addressController.text,
placeId: _selectedPrediction?.placeId,
latitude: double.tryParse(
_selectedPrediction?.lat ?? '',
),
longitude: double.tryParse(
_selectedPrediction?.lng ?? '',
),
); );
} }
}, },

View File

@@ -0,0 +1,61 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:google_places_flutter/google_places_flutter.dart';
import 'package:google_places_flutter/model/prediction.dart';
import '../../util/hubs_constants.dart';
class HubAddressAutocomplete extends StatelessWidget {
const HubAddressAutocomplete({
required this.controller,
required this.hintText,
this.focusNode,
this.onSelected,
super.key,
});
final TextEditingController controller;
final String hintText;
final FocusNode? focusNode;
final void Function(Prediction prediction)? onSelected;
@override
Widget build(BuildContext context) {
return GooglePlaceAutoCompleteTextField(
textEditingController: controller,
focusNode: focusNode,
googleAPIKey: HubsConstants.googlePlacesApiKey,
debounceTime: 500,
countries: HubsConstants.supportedCountries,
isLatLngRequired: true,
getPlaceDetailWithLatLng: (Prediction prediction) {
onSelected?.call(prediction);
},
itemClick: (Prediction prediction) {
controller.text = prediction.description ?? '';
controller.selection = TextSelection.fromPosition(
TextPosition(offset: controller.text.length),
);
onSelected?.call(prediction);
},
itemBuilder: (_, _, Prediction prediction) {
return Padding(
padding: const EdgeInsets.all(UiConstants.space2),
child: Row(
spacing: UiConstants.space1,
children: <Widget>[
const Icon(UiIcons.mapPin, color: UiColors.iconSecondary),
Expanded(
child: Text(
prediction.description ?? "",
style: UiTypography.body1r.textSecondary,
),
),
],
),
);
},
textStyle: UiTypography.body1r.textPrimary,
);
}
}

View File

@@ -0,0 +1,4 @@
class HubsConstants {
static const String googlePlacesApiKey = String.fromEnvironment('GOOGLE_PLACES_API_KEY');
static const List<String> supportedCountries = <String>['us'];
}

View File

@@ -11,10 +11,6 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_bloc: ^8.1.0
flutter_modular: ^6.3.2
equatable: ^2.0.5
lucide_icons: ^0.257.0
# Architecture Packages # Architecture Packages
krow_core: krow_core:
@@ -27,8 +23,15 @@ dependencies:
path: ../../../design_system path: ../../../design_system
core_localization: core_localization:
path: ../../../core_localization path: ../../../core_localization
flutter_bloc: ^8.1.0
flutter_modular: ^6.3.2
equatable: ^2.0.5
lucide_icons: ^0.257.0
firebase_auth: ^6.1.4 firebase_auth: ^6.1.4
firebase_data_connect: ^0.2.2+2 firebase_data_connect: ^0.2.2+2
google_places_flutter: ^2.1.1
http: ^1.2.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@@ -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,
@@ -117,6 +120,8 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
'worker_name': application.staff.fullName, 'worker_name': application.staff.fullName,
'status': 'confirmed', 'status': 'confirmed',
'photo_url': application.staff.photoUrl, 'photo_url': application.staff.photoUrl,
'phone': application.staff.phone,
'rating': application.staff.averageRating,
}); });
} }
return grouped; return grouped;
@@ -145,7 +150,7 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
if (timestamp == null) { if (timestamp == null) {
return ''; return '';
} }
final DateTime dateTime = timestamp.toDateTime(); final DateTime dateTime = timestamp.toDateTime().toLocal();
return DateFormat('HH:mm').format(dateTime); return DateFormat('HH:mm').format(dateTime);
} }

View File

@@ -23,6 +23,7 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
final GetOrdersUseCase _getOrdersUseCase; final GetOrdersUseCase _getOrdersUseCase;
final GetAcceptedApplicationsForDayUseCase _getAcceptedAppsUseCase; final GetAcceptedApplicationsForDayUseCase _getAcceptedAppsUseCase;
int _requestId = 0;
void _init() { void _init() {
updateWeekOffset(0); // Initialize calendar days updateWeekOffset(0); // Initialize calendar days
@@ -33,6 +34,7 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
required DateTime rangeEnd, required DateTime rangeEnd,
required DateTime dayForApps, required DateTime dayForApps,
}) async { }) async {
final int requestId = ++_requestId;
emit(state.copyWith(status: ViewOrdersStatus.loading)); emit(state.copyWith(status: ViewOrdersStatus.loading));
try { try {
final List<OrderItem> orders = await _getOrdersUseCase( final List<OrderItem> orders = await _getOrdersUseCase(
@@ -42,6 +44,9 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
OrdersDayArguments(day: dayForApps), OrdersDayArguments(day: dayForApps),
); );
final List<OrderItem> updatedOrders = _applyApplications(orders, apps); final List<OrderItem> updatedOrders = _applyApplications(orders, apps);
if (requestId != _requestId) {
return;
}
emit( emit(
state.copyWith( state.copyWith(
status: ViewOrdersStatus.success, status: ViewOrdersStatus.success,
@@ -50,6 +55,9 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
); );
_updateDerivedState(); _updateDerivedState();
} catch (_) { } catch (_) {
if (requestId != _requestId) {
return;
}
emit(state.copyWith(status: ViewOrdersStatus.failure)); emit(state.copyWith(status: ViewOrdersStatus.failure));
} }
} }
@@ -88,6 +96,28 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
); );
} }
void jumpToDate(DateTime date) {
final DateTime target = DateTime(date.year, date.month, date.day);
final DateTime startDate = _calculateCalendarDays(0).first;
final int diffDays = target.difference(startDate).inDays;
final int targetOffset = (diffDays / 7).floor();
final List<DateTime> calendarDays = _calculateCalendarDays(targetOffset);
emit(
state.copyWith(
weekOffset: targetOffset,
calendarDays: calendarDays,
selectedDate: target,
),
);
_loadOrdersForRange(
rangeStart: calendarDays.first,
rangeEnd: calendarDays.last,
dayForApps: target,
);
}
void _updateDerivedState() { void _updateDerivedState() {
final List<OrderItem> filteredOrders = _calculateFilteredOrders(state); final List<OrderItem> filteredOrders = _calculateFilteredOrders(state);
final int activeCount = _calculateCategoryCount('active'); final int activeCount = _calculateCategoryCount('active');

View File

@@ -20,24 +20,53 @@ import '../navigation/view_orders_navigator.dart';
/// - Adhering to the project's Design System. /// - Adhering to the project's Design System.
class ViewOrdersPage extends StatelessWidget { class ViewOrdersPage extends StatelessWidget {
/// Creates a [ViewOrdersPage]. /// Creates a [ViewOrdersPage].
const ViewOrdersPage({super.key}); const ViewOrdersPage({super.key, this.initialDate});
final DateTime? initialDate;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BlocProvider<ViewOrdersCubit>( return BlocProvider<ViewOrdersCubit>(
create: (BuildContext context) => Modular.get<ViewOrdersCubit>(), create: (BuildContext context) => Modular.get<ViewOrdersCubit>(),
child: const ViewOrdersView(), child: ViewOrdersView(initialDate: initialDate),
); );
} }
} }
/// The internal view implementation for [ViewOrdersPage]. /// The internal view implementation for [ViewOrdersPage].
class ViewOrdersView extends StatelessWidget { class ViewOrdersView extends StatefulWidget {
/// Creates a [ViewOrdersView]. /// Creates a [ViewOrdersView].
const ViewOrdersView({super.key}); const ViewOrdersView({super.key, this.initialDate});
final DateTime? initialDate;
@override
State<ViewOrdersView> createState() => _ViewOrdersViewState();
}
class _ViewOrdersViewState extends State<ViewOrdersView> {
bool _didInitialJump = false;
ViewOrdersCubit? _cubit;
@override
void initState() {
super.initState();
if (widget.initialDate != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
if (_didInitialJump) return;
_didInitialJump = true;
_cubit ??= BlocProvider.of<ViewOrdersCubit>(context);
_cubit!.jumpToDate(widget.initialDate!);
});
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (_cubit == null) {
_cubit = BlocProvider.of<ViewOrdersCubit>(context);
}
return BlocBuilder<ViewOrdersCubit, ViewOrdersState>( return BlocBuilder<ViewOrdersCubit, ViewOrdersState>(
builder: (BuildContext context, ViewOrdersState state) { builder: (BuildContext context, ViewOrdersState state) {
final List<DateTime> calendarDays = state.calendarDays; final List<DateTime> calendarDays = state.calendarDays;
@@ -218,6 +247,7 @@ class ViewOrdersView extends StatelessWidget {
label: t.client_view_orders.tabs.up_next, label: t.client_view_orders.tabs.up_next,
isSelected: state.filterTab == 'all', isSelected: state.filterTab == 'all',
tabId: 'all', tabId: 'all',
count: state.upNextCount,
), ),
const SizedBox(width: UiConstants.space6), const SizedBox(width: UiConstants.space6),
_buildFilterTab( _buildFilterTab(
@@ -225,7 +255,7 @@ class ViewOrdersView extends StatelessWidget {
label: t.client_view_orders.tabs.active, label: t.client_view_orders.tabs.active,
isSelected: state.filterTab == 'active', isSelected: state.filterTab == 'active',
tabId: 'active', tabId: 'active',
count: state.activeCount + state.upNextCount, count: state.activeCount,
), ),
const SizedBox(width: UiConstants.space6), const SizedBox(width: UiConstants.space6),
_buildFilterTab( _buildFilterTab(

View File

@@ -3,9 +3,12 @@ import 'package:design_system/design_system.dart';
import 'package:firebase_auth/firebase_auth.dart' as firebase; import 'package:firebase_auth/firebase_auth.dart' as firebase;
import 'package:firebase_data_connect/firebase_data_connect.dart'; import 'package:firebase_data_connect/firebase_data_connect.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:krow_data_connect/krow_data_connect.dart' as dc; import 'package:krow_data_connect/krow_data_connect.dart' as dc;
import 'package:krow_domain/krow_domain.dart'; import 'package:krow_domain/krow_domain.dart';
import 'package:url_launcher/url_launcher.dart';
import '../blocs/view_orders_cubit.dart';
/// A rich card displaying details of a client order/shift. /// A rich card displaying details of a client order/shift.
/// ///
@@ -30,7 +33,10 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (BuildContext context) => _OrderEditSheet(order: order), builder: (BuildContext context) => _OrderEditSheet(
order: order,
onUpdated: () => this.context.read<ViewOrdersCubit>().updateWeekOffset(0),
),
); );
} }
@@ -192,19 +198,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
order.clientName, order.clientName,
style: UiTypography.body3r.textSecondary, style: UiTypography.body3r.textSecondary,
), ),
Padding( const SizedBox(width: 0),
padding: const EdgeInsets.symmetric(
horizontal: 6,
),
child: Text(
'',
style: UiTypography.body3r.textInactive,
),
),
Text(
_formatDate(dateStr: order.date),
style: UiTypography.body3m.textSecondary,
),
], ],
), ),
const SizedBox(height: UiConstants.space2), const SizedBox(height: UiConstants.space2),
@@ -241,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),
),
], ],
), ),
], ],
@@ -276,8 +272,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
_buildStatDivider(), _buildStatDivider(),
_buildStatItem( _buildStatItem(
icon: UiIcons.users, icon: UiIcons.users,
value: value: '${order.workersNeeded}',
'${order.filled > 0 ? order.filled : order.workersNeeded}',
label: 'Workers', label: 'Workers',
), ),
], ],
@@ -320,7 +315,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'${order.filled}/${order.workersNeeded} Workers Filled', '${order.workersNeeded} Workers Filled',
style: UiTypography.body2m.textPrimary, style: UiTypography.body2m.textPrimary,
), ),
], ],
@@ -492,6 +487,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
/// Builds a detailed row for a worker. /// Builds a detailed row for a worker.
Widget _buildWorkerRow(Map<String, dynamic> app) { Widget _buildWorkerRow(Map<String, dynamic> app) {
final String? phone = app['phone'] as String?;
return Container( return Container(
margin: const EdgeInsets.only(bottom: 12), margin: const EdgeInsets.only(bottom: 12),
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
@@ -522,9 +518,19 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
const SizedBox(height: 2), const SizedBox(height: 2),
Row( Row(
children: <Widget>[ children: <Widget>[
const Icon(UiIcons.star, size: 10, color: UiColors.accent), if ((app['rating'] as num?) != null &&
const SizedBox(width: 2), (app['rating'] as num) > 0) ...<Widget>[
Text('4.8', style: UiTypography.footnote2r.textSecondary), const Icon(
UiIcons.star,
size: 10,
color: UiColors.accent,
),
const SizedBox(width: 2),
Text(
(app['rating'] as num).toStringAsFixed(1),
style: UiTypography.footnote2r.textSecondary,
),
],
if (app['check_in_time'] != null) ...<Widget>[ if (app['check_in_time'] != null) ...<Widget>[
const SizedBox(width: 8), const SizedBox(width: 8),
Container( Container(
@@ -543,20 +549,70 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
), ),
), ),
), ),
] else if ((app['status'] as String?)?.isNotEmpty ?? false) ...<Widget>[
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 1,
),
decoration: BoxDecoration(
color: UiColors.bgSecondary,
borderRadius: BorderRadius.circular(4),
),
child: Text(
(app['status'] as String).toUpperCase(),
style: UiTypography.titleUppercase4m.copyWith(
color: UiColors.textSecondary,
),
),
),
], ],
], ],
), ),
], ],
), ),
), ),
_buildActionIconButton(icon: UiIcons.phone, onTap: () {}), if (phone != null && phone.isNotEmpty) ...<Widget>[
const SizedBox(width: 8), _buildActionIconButton(
_buildActionIconButton(icon: UiIcons.messageCircle, onTap: () {}), icon: UiIcons.phone,
onTap: () => _confirmAndCall(phone),
),
],
], ],
), ),
); );
} }
Future<void> _confirmAndCall(String phone) async {
final bool? shouldCall = await showDialog<bool>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Call'),
content: Text('Do you want to call $phone?'),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(false),
child: const Text('Cancel'),
),
TextButton(
onPressed: () => Navigator.of(context).pop(true),
child: const Text('Call'),
),
],
);
},
);
if (shouldCall != true) {
return;
}
final Uri uri = Uri(scheme: 'tel', path: phone);
await launchUrl(uri);
}
/// Specialized action button for worker rows. /// Specialized action button for worker rows.
Widget _buildActionIconButton({ Widget _buildActionIconButton({
required IconData icon, required IconData icon,
@@ -644,9 +700,13 @@ class _ShiftRoleKey {
/// A sophisticated bottom sheet for editing an existing order, /// A sophisticated bottom sheet for editing an existing order,
/// following the Unified Order Flow prototype and matching OneTimeOrderView. /// following the Unified Order Flow prototype and matching OneTimeOrderView.
class _OrderEditSheet extends StatefulWidget { class _OrderEditSheet extends StatefulWidget {
const _OrderEditSheet({required this.order}); const _OrderEditSheet({
required this.order,
this.onUpdated,
});
final OrderItem order; final OrderItem order;
final VoidCallback? onUpdated;
@override @override
State<_OrderEditSheet> createState() => _OrderEditSheetState(); State<_OrderEditSheet> createState() => _OrderEditSheetState();
@@ -658,6 +718,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
late TextEditingController _dateController; late TextEditingController _dateController;
late TextEditingController _globalLocationController; late TextEditingController _globalLocationController;
late TextEditingController _orderNameController;
late List<Map<String, dynamic>> _positions; late List<Map<String, dynamic>> _positions;
@@ -667,6 +728,8 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
List<Vendor> _vendors = const <Vendor>[]; List<Vendor> _vendors = const <Vendor>[];
Vendor? _selectedVendor; Vendor? _selectedVendor;
List<_RoleOption> _roles = const <_RoleOption>[]; List<_RoleOption> _roles = const <_RoleOption>[];
List<dc.ListTeamHubsByOwnerIdTeamHubs> _hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
dc.ListTeamHubsByOwnerIdTeamHubs? _selectedHub;
String? _shiftId; String? _shiftId;
List<_ShiftRoleKey> _originalShiftRoles = const <_ShiftRoleKey>[]; List<_ShiftRoleKey> _originalShiftRoles = const <_ShiftRoleKey>[];
@@ -678,6 +741,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
_globalLocationController = TextEditingController( _globalLocationController = TextEditingController(
text: widget.order.locationAddress, text: widget.order.locationAddress,
); );
_orderNameController = TextEditingController();
_positions = <Map<String, dynamic>>[ _positions = <Map<String, dynamic>>[
<String, dynamic>{ <String, dynamic>{
@@ -700,6 +764,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
void dispose() { void dispose() {
_dateController.dispose(); _dateController.dispose();
_globalLocationController.dispose(); _globalLocationController.dispose();
_orderNameController.dispose();
super.dispose(); super.dispose();
} }
@@ -728,6 +793,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
final List<dc.ListShiftRolesByBusinessAndOrderShiftRoles> shiftRoles = final List<dc.ListShiftRolesByBusinessAndOrderShiftRoles> shiftRoles =
result.data.shiftRoles; result.data.shiftRoles;
if (shiftRoles.isEmpty) { if (shiftRoles.isEmpty) {
await _loadHubsAndSelect();
return; return;
} }
@@ -737,13 +803,14 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
final String dateText = orderDate == null final String dateText = orderDate == null
? widget.order.date ? widget.order.date
: DateFormat('yyyy-MM-dd').format(orderDate); : DateFormat('yyyy-MM-dd').format(orderDate);
final String location = firstShift.order.location ?? final String location = firstShift.order.teamHub?.hubName ??
firstShift.locationAddress ?? firstShift.locationAddress ??
firstShift.location ?? firstShift.location ??
widget.order.locationAddress; widget.order.locationAddress;
_dateController.text = dateText; _dateController.text = dateText;
_globalLocationController.text = location; _globalLocationController.text = location;
_orderNameController.text = firstShift.order.eventName ?? '';
_shiftId = shiftRoles.first.shiftId; _shiftId = shiftRoles.first.shiftId;
final List<Map<String, dynamic>> positions = final List<Map<String, dynamic>> positions =
@@ -774,6 +841,13 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
.toList(); .toList();
await _loadVendorsAndSelect(firstShift.order.vendorId); await _loadVendorsAndSelect(firstShift.order.vendorId);
final dc.ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub?
teamHub = firstShift.order.teamHub;
await _loadHubsAndSelect(
placeId: teamHub?.placeId,
hubName: teamHub?.hubName,
address: teamHub?.address,
);
if (mounted) { if (mounted) {
setState(() { setState(() {
@@ -786,6 +860,75 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
} }
} }
Future<void> _loadHubsAndSelect({
String? placeId,
String? hubName,
String? address,
}) async {
final String? businessId =
dc.ClientSessionStore.instance.session?.business?.id;
if (businessId == null || businessId.isEmpty) {
return;
}
try {
final QueryResult<
dc.ListTeamHubsByOwnerIdData,
dc.ListTeamHubsByOwnerIdVariables> result = await _dataConnect
.listTeamHubsByOwnerId(ownerId: businessId)
.execute();
final List<dc.ListTeamHubsByOwnerIdTeamHubs> hubs = result.data.teamHubs;
dc.ListTeamHubsByOwnerIdTeamHubs? selected;
if (placeId != null && placeId.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.placeId == placeId) {
selected = hub;
break;
}
}
}
if (selected == null && hubName != null && hubName.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.hubName == hubName) {
selected = hub;
break;
}
}
}
if (selected == null && address != null && address.isNotEmpty) {
for (final dc.ListTeamHubsByOwnerIdTeamHubs hub in hubs) {
if (hub.address == address) {
selected = hub;
break;
}
}
}
selected ??= hubs.isNotEmpty ? hubs.first : null;
if (mounted) {
setState(() {
_hubs = hubs;
_selectedHub = selected;
if (selected != null) {
_globalLocationController.text = selected.address;
}
});
}
} catch (_) {
if (mounted) {
setState(() {
_hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
_selectedHub = null;
});
}
}
}
Future<void> _loadVendorsAndSelect(String? selectedVendorId) async { Future<void> _loadVendorsAndSelect(String? selectedVendorId) async {
try { try {
final QueryResult<dc.ListVendorsData, void> result = final QueryResult<dc.ListVendorsData, void> result =
@@ -874,7 +1017,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
String _formatTimeForField(Timestamp? value) { String _formatTimeForField(Timestamp? value) {
if (value == null) return ''; if (value == null) return '';
try { try {
return DateFormat('HH:mm').format(value.toDateTime()); return DateFormat('HH:mm').format(value.toDateTime().toLocal());
} catch (_) { } catch (_) {
return ''; return '';
} }
@@ -948,7 +1091,8 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
} }
Timestamp _toTimestamp(DateTime date) { Timestamp _toTimestamp(DateTime date) {
final int millis = date.millisecondsSinceEpoch; final DateTime utc = date.toUtc();
final int millis = utc.millisecondsSinceEpoch;
final int seconds = millis ~/ 1000; final int seconds = millis ~/ 1000;
final int nanos = (millis % 1000) * 1000000; final int nanos = (millis % 1000) * 1000000;
return Timestamp(nanos, seconds); return Timestamp(nanos, seconds);
@@ -987,7 +1131,10 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
} }
final DateTime orderDate = _parseDate(_dateController.text); final DateTime orderDate = _parseDate(_dateController.text);
final String location = _globalLocationController.text; final dc.ListTeamHubsByOwnerIdTeamHubs? selectedHub = _selectedHub;
if (selectedHub == null) {
return;
}
int totalWorkers = 0; int totalWorkers = 0;
double shiftCost = 0; double shiftCost = 0;
@@ -1071,19 +1218,32 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
.execute(); .execute();
} }
final DateTime orderDateOnly = DateTime.utc(
orderDate.year,
orderDate.month,
orderDate.day,
);
await _dataConnect await _dataConnect
.updateOrder(id: widget.order.orderId) .updateOrder(id: widget.order.orderId, teamHubId: selectedHub.id)
.vendorId(_selectedVendor?.id) .vendorId(_selectedVendor?.id)
.location(location) .date(_toTimestamp(orderDateOnly))
.date(_toTimestamp(orderDate)) .eventName(_orderNameController.text)
.execute(); .execute();
await _dataConnect await _dataConnect
.updateShift(id: _shiftId!) .updateShift(id: _shiftId!)
.title('shift 1 ${DateFormat('yyyy-MM-dd').format(orderDate)}') .title('shift 1 ${DateFormat('yyyy-MM-dd').format(orderDate)}')
.date(_toTimestamp(orderDate)) .date(_toTimestamp(orderDateOnly))
.location(location) .location(selectedHub.hubName)
.locationAddress(location) .locationAddress(selectedHub.address)
.latitude(selectedHub.latitude)
.longitude(selectedHub.longitude)
.placeId(selectedHub.placeId)
.city(selectedHub.city)
.state(selectedHub.state)
.street(selectedHub.street)
.country(selectedHub.country)
.workersNeeded(totalWorkers) .workersNeeded(totalWorkers)
.cost(shiftCost) .cost(shiftCost)
.durationDays(1) .durationDays(1)
@@ -1185,11 +1345,57 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
), ),
const SizedBox(height: UiConstants.space4), const SizedBox(height: UiConstants.space4),
_buildSectionHeader('LOCATION'), _buildSectionHeader('ORDER NAME'),
UiTextField( UiTextField(
controller: _globalLocationController, controller: _orderNameController,
hintText: 'Business address', hintText: 'Order name',
prefixIcon: UiIcons.mapPin, prefixIcon: UiIcons.briefcase,
),
const SizedBox(height: UiConstants.space4),
_buildSectionHeader('HUB'),
Container(
padding: const EdgeInsets.symmetric(
horizontal: UiConstants.space3,
),
height: 48,
decoration: BoxDecoration(
color: UiColors.white,
borderRadius: UiConstants.radiusMd,
border: Border.all(color: UiColors.border),
),
child: DropdownButtonHideUnderline(
child: DropdownButton<dc.ListTeamHubsByOwnerIdTeamHubs>(
isExpanded: true,
value: _selectedHub,
icon: const Icon(
UiIcons.chevronDown,
size: 18,
color: UiColors.iconSecondary,
),
onChanged:
(dc.ListTeamHubsByOwnerIdTeamHubs? hub) {
if (hub != null) {
setState(() {
_selectedHub = hub;
_globalLocationController.text = hub.address;
});
}
},
items: _hubs.map(
(dc.ListTeamHubsByOwnerIdTeamHubs hub) {
return DropdownMenuItem<
dc.ListTeamHubsByOwnerIdTeamHubs>(
value: hub,
child: Text(
hub.hubName,
style: UiTypography.body2m.textPrimary,
),
);
},
).toList(),
),
),
), ),
const SizedBox(height: UiConstants.space6), const SizedBox(height: UiConstants.space6),
@@ -1370,7 +1576,19 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
child: _buildInlineTimeInput( child: _buildInlineTimeInput(
label: 'Start', label: 'Start',
value: pos['start_time'], value: pos['start_time'],
onTap: () {}, onTap: () async {
final TimeOfDay? picked = await showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
);
if (picked != null && context.mounted) {
_updatePosition(
index,
'start_time',
picked.format(context),
);
}
},
), ),
), ),
const SizedBox(width: UiConstants.space2), const SizedBox(width: UiConstants.space2),
@@ -1378,7 +1596,19 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
child: _buildInlineTimeInput( child: _buildInlineTimeInput(
label: 'End', label: 'End',
value: pos['end_time'], value: pos['end_time'],
onTap: () {}, onTap: () async {
final TimeOfDay? picked = await showTimePicker(
context: context,
initialTime: TimeOfDay.now(),
);
if (picked != null && context.mounted) {
_updatePosition(
index,
'end_time',
picked.format(context),
);
}
},
), ),
), ),
const SizedBox(width: UiConstants.space2), const SizedBox(width: UiConstants.space2),
@@ -1766,7 +1996,10 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
onPressed: () async { onPressed: () async {
setState(() => _isLoading = true); setState(() => _isLoading = true);
await _saveOrderChanges(); await _saveOrderChanges();
if (mounted) Navigator.pop(context); if (mounted) {
widget.onUpdated?.call();
Navigator.pop(context);
}
}, },
), ),
), ),

Some files were not shown because too many files have changed in this diff Show More