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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,7 +18,6 @@ $RECYCLE.BIN/
|
||||
|
||||
# IDE & Editors
|
||||
.idea/
|
||||
.vscode/
|
||||
*.iml
|
||||
*.iws
|
||||
*.swp
|
||||
|
||||
41
.vscode/launch.json
vendored
Normal file
41
.vscode/launch.json
vendored
Normal 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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
# 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.
|
||||
version: 1.0.0+1
|
||||
version: 0.0.1
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
|
||||
3
apps/mobile/config.dev.json
Normal file
3
apps/mobile/config.dev.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"GOOGLE_PLACES_API_KEY": "AIzaSyAS9yTf4q51_CNSZ7mbmeS9V3l_LZR80lU"
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
/// Locales: 2
|
||||
/// 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
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Basic Usage
|
||||
|
||||
```dart
|
||||
ExampleConnector.instance.CreateAssignment(createAssignmentVariables).execute();
|
||||
ExampleConnector.instance.UpdateAssignment(updateAssignmentVariables).execute();
|
||||
ExampleConnector.instance.DeleteAssignment(deleteAssignmentVariables).execute();
|
||||
ExampleConnector.instance.listBenefitsData(listBenefitsDataVariables).execute();
|
||||
ExampleConnector.instance.getBenefitsDataByKey(getBenefitsDataByKeyVariables).execute();
|
||||
ExampleConnector.instance.listBenefitsDataByStaffId(listBenefitsDataByStaffIdVariables).execute();
|
||||
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVariables).execute();
|
||||
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVariables).execute();
|
||||
ExampleConnector.instance.createRecentPayment(createRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.updateRecentPayment(updateRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.deleteRecentPayment(deleteRecentPaymentVariables).execute();
|
||||
ExampleConnector.instance.CreateStaff(createStaffVariables).execute();
|
||||
ExampleConnector.instance.UpdateStaff(updateStaffVariables).execute();
|
||||
ExampleConnector.instance.DeleteStaff(deleteStaffVariables).execute();
|
||||
ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).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:
|
||||
|
||||
```dart
|
||||
await ExampleConnector.instance.filterStaffAvailabilityStats({ ... })
|
||||
.needWorkIndexMin(...)
|
||||
await ExampleConnector.instance.updateAttireOption({ ... })
|
||||
.itemId(...)
|
||||
.execute();
|
||||
```
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,6 @@ class CreateOrderVariablesBuilder {
|
||||
Optional<String> _vendorId = Optional.optional(nativeFromJson, nativeToJson);
|
||||
String businessId;
|
||||
OrderType orderType;
|
||||
Optional<String> _location = Optional.optional(nativeFromJson, nativeToJson);
|
||||
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> _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> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
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<Timestamp> _permanentStartDate = Optional.optional((json) => json['permanentStartDate'] = Timestamp.fromJson(json['permanentStartDate']), defaultSerializer);
|
||||
Optional<AnyValue> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
@@ -29,10 +28,6 @@ class CreateOrderVariablesBuilder {
|
||||
_vendorId.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateOrderVariablesBuilder location(String? t) {
|
||||
_location.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateOrderVariablesBuilder status(OrderStatus? t) {
|
||||
_status.value = t;
|
||||
return this;
|
||||
@@ -77,10 +72,6 @@ class CreateOrderVariablesBuilder {
|
||||
_requested.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateOrderVariablesBuilder hub(String? t) {
|
||||
_hub.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateOrderVariablesBuilder recurringDays(AnyValue? t) {
|
||||
_recurringDays.value = t;
|
||||
return this;
|
||||
@@ -106,7 +97,7 @@ class CreateOrderVariablesBuilder {
|
||||
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));
|
||||
Serializer<CreateOrderVariables> varsSerializer = (CreateOrderVariables vars) => jsonEncode(vars.toJson());
|
||||
Future<OperationResult<CreateOrderData, CreateOrderVariables>> execute() {
|
||||
@@ -114,7 +105,7 @@ class CreateOrderVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -192,7 +183,6 @@ class CreateOrderVariables {
|
||||
late final Optional<String>vendorId;
|
||||
final String businessId;
|
||||
final OrderType orderType;
|
||||
late final Optional<String>location;
|
||||
late final Optional<OrderStatus>status;
|
||||
late final Optional<Timestamp>date;
|
||||
late final Optional<Timestamp>startDate;
|
||||
@@ -204,7 +194,7 @@ class CreateOrderVariables {
|
||||
late final Optional<AnyValue>assignedStaff;
|
||||
late final Optional<AnyValue>shifts;
|
||||
late final Optional<int>requested;
|
||||
late final Optional<String>hub;
|
||||
final String teamHubId;
|
||||
late final Optional<AnyValue>recurringDays;
|
||||
late final Optional<Timestamp>permanentStartDate;
|
||||
late final Optional<AnyValue>permanentDays;
|
||||
@@ -215,7 +205,8 @@ class CreateOrderVariables {
|
||||
CreateOrderVariables.fromJson(Map<String, dynamic> json):
|
||||
|
||||
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);
|
||||
@@ -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.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']);
|
||||
|
||||
|
||||
hub = Optional.optional(nativeFromJson, nativeToJson);
|
||||
hub.value = json['hub'] == null ? null : nativeFromJson<String>(json['hub']);
|
||||
|
||||
|
||||
recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']);
|
||||
@@ -313,7 +297,6 @@ class CreateOrderVariables {
|
||||
return vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -325,7 +308,7 @@ class CreateOrderVariables {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
teamHubId == otherTyped.teamHubId &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentStartDate == otherTyped.permanentStartDate &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
@@ -335,7 +318,7 @@ class CreateOrderVariables {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -347,9 +330,6 @@ class CreateOrderVariables {
|
||||
json['orderType'] =
|
||||
orderType.name
|
||||
;
|
||||
if(location.state == OptionalState.set) {
|
||||
json['location'] = location.toJson();
|
||||
}
|
||||
if(status.state == OptionalState.set) {
|
||||
json['status'] = status.toJson();
|
||||
}
|
||||
@@ -383,9 +363,7 @@ class CreateOrderVariables {
|
||||
if(requested.state == OptionalState.set) {
|
||||
json['requested'] = requested.toJson();
|
||||
}
|
||||
if(hub.state == OptionalState.set) {
|
||||
json['hub'] = hub.toJson();
|
||||
}
|
||||
json['teamHubId'] = nativeToJson<String>(teamHubId);
|
||||
if(recurringDays.state == OptionalState.set) {
|
||||
json['recurringDays'] = recurringDays.toJson();
|
||||
}
|
||||
@@ -411,7 +389,6 @@ class CreateOrderVariables {
|
||||
required this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
required this.location,
|
||||
required this.status,
|
||||
required this.date,
|
||||
required this.startDate,
|
||||
@@ -423,7 +400,7 @@ class CreateOrderVariables {
|
||||
required this.assignedStaff,
|
||||
required this.shifts,
|
||||
required this.requested,
|
||||
required this.hub,
|
||||
required this.teamHubId,
|
||||
required this.recurringDays,
|
||||
required this.permanentStartDate,
|
||||
required this.permanentDays,
|
||||
|
||||
@@ -12,6 +12,11 @@ class CreateShiftVariablesBuilder {
|
||||
Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<double> _latitude = 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<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer);
|
||||
Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson);
|
||||
@@ -57,6 +62,26 @@ class CreateShiftVariablesBuilder {
|
||||
_longitude.value = t;
|
||||
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) {
|
||||
_description.value = t;
|
||||
return this;
|
||||
@@ -98,7 +123,7 @@ class CreateShiftVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -184,6 +209,11 @@ class CreateShiftVariables {
|
||||
late final Optional<String>locationAddress;
|
||||
late final Optional<double>latitude;
|
||||
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<ShiftStatus>status;
|
||||
late final Optional<int>workersNeeded;
|
||||
@@ -237,6 +267,26 @@ class CreateShiftVariables {
|
||||
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.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
|
||||
|
||||
@@ -292,6 +342,11 @@ class CreateShiftVariables {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -303,7 +358,7 @@ class CreateShiftVariables {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -337,6 +392,21 @@ class CreateShiftVariables {
|
||||
if(longitude.state == OptionalState.set) {
|
||||
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) {
|
||||
json['description'] = description.toJson();
|
||||
}
|
||||
@@ -376,6 +446,11 @@ class CreateShiftVariables {
|
||||
required this.locationAddress,
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.placeId,
|
||||
required this.city,
|
||||
required this.state,
|
||||
required this.street,
|
||||
required this.country,
|
||||
required this.description,
|
||||
required this.status,
|
||||
required this.workersNeeded,
|
||||
|
||||
@@ -4,14 +4,31 @@ class CreateTeamHubVariablesBuilder {
|
||||
String teamId;
|
||||
String hubName;
|
||||
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> _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> _managerName = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
|
||||
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;
|
||||
return this;
|
||||
}
|
||||
@@ -19,6 +36,14 @@ class CreateTeamHubVariablesBuilder {
|
||||
_state.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateTeamHubVariablesBuilder street(String? t) {
|
||||
_street.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateTeamHubVariablesBuilder country(String? t) {
|
||||
_country.value = t;
|
||||
return this;
|
||||
}
|
||||
CreateTeamHubVariablesBuilder zipCode(String? t) {
|
||||
_zipCode.value = t;
|
||||
return this;
|
||||
@@ -44,7 +69,7 @@ class CreateTeamHubVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -122,8 +147,13 @@ class CreateTeamHubVariables {
|
||||
final String teamId;
|
||||
final String hubName;
|
||||
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>state;
|
||||
late final Optional<String>street;
|
||||
late final Optional<String>country;
|
||||
late final Optional<String>zipCode;
|
||||
late final Optional<String>managerName;
|
||||
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.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']);
|
||||
|
||||
|
||||
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.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
|
||||
|
||||
@@ -176,8 +226,13 @@ class CreateTeamHubVariables {
|
||||
return teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
@@ -185,7 +240,7 @@ class CreateTeamHubVariables {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -193,12 +248,27 @@ class CreateTeamHubVariables {
|
||||
json['teamId'] = nativeToJson<String>(teamId);
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
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) {
|
||||
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(zipCode.state == OptionalState.set) {
|
||||
json['zipCode'] = zipCode.toJson();
|
||||
}
|
||||
@@ -218,8 +288,13 @@ class CreateTeamHubVariables {
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
required this.placeId,
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.city,
|
||||
required this.state,
|
||||
required this.street,
|
||||
required this.country,
|
||||
required this.zipCode,
|
||||
required this.managerName,
|
||||
required this.isActive,
|
||||
|
||||
@@ -371,15 +371,15 @@ class FilterInvoicesInvoicesBusiness {
|
||||
@immutable
|
||||
class FilterInvoicesInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final FilterInvoicesInvoicesOrderTeamHub teamHub;
|
||||
FilterInvoicesInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = FilterInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -391,13 +391,13 @@ class FilterInvoicesInvoicesOrder {
|
||||
|
||||
final FilterInvoicesInvoicesOrder otherTyped = other as FilterInvoicesInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -405,23 +405,67 @@ class FilterInvoicesInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
FilterInvoicesInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,11 @@ class FilterShiftsShifts {
|
||||
final String? locationAddress;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final String? placeId;
|
||||
final String? city;
|
||||
final String? state;
|
||||
final String? street;
|
||||
final String? country;
|
||||
final String? description;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? workersNeeded;
|
||||
@@ -86,6 +91,11 @@ class FilterShiftsShifts {
|
||||
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
|
||||
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
|
||||
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']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
|
||||
@@ -121,6 +131,11 @@ class FilterShiftsShifts {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -135,7 +150,7 @@ class FilterShiftsShifts {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -170,6 +185,21 @@ class FilterShiftsShifts {
|
||||
if (longitude != null) {
|
||||
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) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
@@ -219,6 +249,11 @@ class FilterShiftsShifts {
|
||||
this.locationAddress,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.placeId,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.description,
|
||||
this.status,
|
||||
this.workersNeeded,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -198,14 +198,14 @@ class GetApplicationByIdApplicationShift {
|
||||
class GetApplicationByIdApplicationShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final GetApplicationByIdApplicationShiftOrderTeamHub teamHub;
|
||||
final GetApplicationByIdApplicationShiftOrderBusiness business;
|
||||
final GetApplicationByIdApplicationShiftOrderVendor? vendor;
|
||||
GetApplicationByIdApplicationShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
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']),
|
||||
vendor = json['vendor'] == null ? null : GetApplicationByIdApplicationShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
@@ -220,13 +220,13 @@ class GetApplicationByIdApplicationShiftOrder {
|
||||
final GetApplicationByIdApplicationShiftOrder otherTyped = other as GetApplicationByIdApplicationShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -235,9 +235,7 @@ class GetApplicationByIdApplicationShiftOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
@@ -248,12 +246,58 @@ class GetApplicationByIdApplicationShiftOrder {
|
||||
GetApplicationByIdApplicationShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
this.location,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
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
|
||||
class GetApplicationByIdApplicationShiftOrderBusiness {
|
||||
final String id;
|
||||
|
||||
@@ -198,14 +198,14 @@ class GetApplicationsByShiftIdApplicationsShift {
|
||||
class GetApplicationsByShiftIdApplicationsShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final GetApplicationsByShiftIdApplicationsShiftOrderTeamHub teamHub;
|
||||
final GetApplicationsByShiftIdApplicationsShiftOrderBusiness business;
|
||||
final GetApplicationsByShiftIdApplicationsShiftOrderVendor? vendor;
|
||||
GetApplicationsByShiftIdApplicationsShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
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']),
|
||||
vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdApplicationsShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
@@ -220,13 +220,13 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
|
||||
final GetApplicationsByShiftIdApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -235,9 +235,7 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
@@ -248,12 +246,58 @@ class GetApplicationsByShiftIdApplicationsShiftOrder {
|
||||
GetApplicationsByShiftIdApplicationsShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
this.location,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
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
|
||||
class GetApplicationsByShiftIdApplicationsShiftOrderBusiness {
|
||||
final String id;
|
||||
|
||||
@@ -209,14 +209,14 @@ class GetApplicationsByShiftIdAndStatusApplicationsShift {
|
||||
class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderTeamHub teamHub;
|
||||
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness business;
|
||||
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor? vendor;
|
||||
GetApplicationsByShiftIdAndStatusApplicationsShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
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']),
|
||||
vendor = json['vendor'] == null ? null : GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
@@ -231,13 +231,13 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
|
||||
final GetApplicationsByShiftIdAndStatusApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -246,9 +246,7 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
@@ -259,12 +257,58 @@ class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder {
|
||||
GetApplicationsByShiftIdAndStatusApplicationsShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
this.location,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
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
|
||||
class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness {
|
||||
final String id;
|
||||
|
||||
@@ -208,14 +208,14 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
class GetApplicationsByStaffIdApplicationsShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final GetApplicationsByStaffIdApplicationsShiftOrderTeamHub teamHub;
|
||||
final GetApplicationsByStaffIdApplicationsShiftOrderBusiness business;
|
||||
final GetApplicationsByStaffIdApplicationsShiftOrderVendor? vendor;
|
||||
GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
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']),
|
||||
vendor = json['vendor'] == null ? null : GetApplicationsByStaffIdApplicationsShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
@@ -230,13 +230,13 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
|
||||
final GetApplicationsByStaffIdApplicationsShiftOrder otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -245,9 +245,7 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
@@ -258,12 +256,58 @@ class GetApplicationsByStaffIdApplicationsShiftOrder {
|
||||
GetApplicationsByStaffIdApplicationsShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
this.location,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
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
|
||||
class GetApplicationsByStaffIdApplicationsShiftOrderBusiness {
|
||||
final String id;
|
||||
|
||||
@@ -321,15 +321,15 @@ class GetInvoiceByIdInvoiceBusiness {
|
||||
@immutable
|
||||
class GetInvoiceByIdInvoiceOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final GetInvoiceByIdInvoiceOrderTeamHub teamHub;
|
||||
GetInvoiceByIdInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = GetInvoiceByIdInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -341,13 +341,13 @@ class GetInvoiceByIdInvoiceOrder {
|
||||
|
||||
final GetInvoiceByIdInvoiceOrder otherTyped = other as GetInvoiceByIdInvoiceOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -355,23 +355,67 @@ class GetInvoiceByIdInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
GetInvoiceByIdInvoiceOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ class GetOrderByIdOrder {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -35,7 +34,6 @@ class GetOrderByIdOrder {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -44,6 +42,7 @@ class GetOrderByIdOrder {
|
||||
final Timestamp? createdAt;
|
||||
final GetOrderByIdOrderBusiness business;
|
||||
final GetOrderByIdOrderVendor? vendor;
|
||||
final GetOrderByIdOrderTeamHub teamHub;
|
||||
GetOrderByIdOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -51,7 +50,6 @@ class GetOrderByIdOrder {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -62,7 +60,6 @@ class GetOrderByIdOrder {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -70,7 +67,8 @@ class GetOrderByIdOrder {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -86,7 +84,6 @@ class GetOrderByIdOrder {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -97,7 +94,6 @@ class GetOrderByIdOrder {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -105,11 +101,12 @@ class GetOrderByIdOrder {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -125,9 +122,6 @@ class GetOrderByIdOrder {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -160,9 +154,6 @@ class GetOrderByIdOrder {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -185,6 +176,7 @@ class GetOrderByIdOrder {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -194,7 +186,6 @@ class GetOrderByIdOrder {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -205,7 +196,6 @@ class GetOrderByIdOrder {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -214,6 +204,7 @@ class GetOrderByIdOrder {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetOrderByIdData {
|
||||
final GetOrderByIdOrder? order;
|
||||
|
||||
@@ -34,7 +34,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -45,7 +44,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -54,6 +52,7 @@ class GetOrdersByBusinessIdOrders {
|
||||
final Timestamp? createdAt;
|
||||
final GetOrdersByBusinessIdOrdersBusiness business;
|
||||
final GetOrdersByBusinessIdOrdersVendor? vendor;
|
||||
final GetOrdersByBusinessIdOrdersTeamHub teamHub;
|
||||
GetOrdersByBusinessIdOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -61,7 +60,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -72,7 +70,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -80,7 +77,8 @@ class GetOrdersByBusinessIdOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -96,7 +94,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -107,7 +104,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -115,11 +111,12 @@ class GetOrdersByBusinessIdOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -135,9 +132,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -170,9 +164,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -195,6 +186,7 @@ class GetOrdersByBusinessIdOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -204,7 +196,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -215,7 +206,6 @@ class GetOrdersByBusinessIdOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -224,6 +214,7 @@ class GetOrdersByBusinessIdOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetOrdersByBusinessIdData {
|
||||
final List<GetOrdersByBusinessIdOrders> orders;
|
||||
|
||||
@@ -35,7 +35,6 @@ class GetOrdersByDateRangeOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -46,7 +45,6 @@ class GetOrdersByDateRangeOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -55,6 +53,7 @@ class GetOrdersByDateRangeOrders {
|
||||
final Timestamp? createdAt;
|
||||
final GetOrdersByDateRangeOrdersBusiness business;
|
||||
final GetOrdersByDateRangeOrdersVendor? vendor;
|
||||
final GetOrdersByDateRangeOrdersTeamHub teamHub;
|
||||
GetOrdersByDateRangeOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -62,7 +61,6 @@ class GetOrdersByDateRangeOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -73,7 +71,6 @@ class GetOrdersByDateRangeOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -81,7 +78,8 @@ class GetOrdersByDateRangeOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -97,7 +95,6 @@ class GetOrdersByDateRangeOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -108,7 +105,6 @@ class GetOrdersByDateRangeOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -116,11 +112,12 @@ class GetOrdersByDateRangeOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -136,9 +133,6 @@ class GetOrdersByDateRangeOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -171,9 +165,6 @@ class GetOrdersByDateRangeOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -196,6 +187,7 @@ class GetOrdersByDateRangeOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -205,7 +197,6 @@ class GetOrdersByDateRangeOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -216,7 +207,6 @@ class GetOrdersByDateRangeOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -225,6 +215,7 @@ class GetOrdersByDateRangeOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetOrdersByDateRangeData {
|
||||
final List<GetOrdersByDateRangeOrders> orders;
|
||||
|
||||
@@ -34,7 +34,6 @@ class GetOrdersByStatusOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -45,7 +44,6 @@ class GetOrdersByStatusOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -54,6 +52,7 @@ class GetOrdersByStatusOrders {
|
||||
final Timestamp? createdAt;
|
||||
final GetOrdersByStatusOrdersBusiness business;
|
||||
final GetOrdersByStatusOrdersVendor? vendor;
|
||||
final GetOrdersByStatusOrdersTeamHub teamHub;
|
||||
GetOrdersByStatusOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -61,7 +60,6 @@ class GetOrdersByStatusOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -72,7 +70,6 @@ class GetOrdersByStatusOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -80,7 +77,8 @@ class GetOrdersByStatusOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -96,7 +94,6 @@ class GetOrdersByStatusOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -107,7 +104,6 @@ class GetOrdersByStatusOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -115,11 +111,12 @@ class GetOrdersByStatusOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -135,9 +132,6 @@ class GetOrdersByStatusOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -170,9 +164,6 @@ class GetOrdersByStatusOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -195,6 +186,7 @@ class GetOrdersByStatusOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -204,7 +196,6 @@ class GetOrdersByStatusOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -215,7 +206,6 @@ class GetOrdersByStatusOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -224,6 +214,7 @@ class GetOrdersByStatusOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetOrdersByStatusData {
|
||||
final List<GetOrdersByStatusOrders> orders;
|
||||
|
||||
@@ -34,7 +34,6 @@ class GetOrdersByVendorIdOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -45,7 +44,6 @@ class GetOrdersByVendorIdOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -54,6 +52,7 @@ class GetOrdersByVendorIdOrders {
|
||||
final Timestamp? createdAt;
|
||||
final GetOrdersByVendorIdOrdersBusiness business;
|
||||
final GetOrdersByVendorIdOrdersVendor? vendor;
|
||||
final GetOrdersByVendorIdOrdersTeamHub teamHub;
|
||||
GetOrdersByVendorIdOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -61,7 +60,6 @@ class GetOrdersByVendorIdOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -72,7 +70,6 @@ class GetOrdersByVendorIdOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -80,7 +77,8 @@ class GetOrdersByVendorIdOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -96,7 +94,6 @@ class GetOrdersByVendorIdOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -107,7 +104,6 @@ class GetOrdersByVendorIdOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -115,11 +111,12 @@ class GetOrdersByVendorIdOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -135,9 +132,6 @@ class GetOrdersByVendorIdOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -170,9 +164,6 @@ class GetOrdersByVendorIdOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -195,6 +186,7 @@ class GetOrdersByVendorIdOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -204,7 +196,6 @@ class GetOrdersByVendorIdOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -215,7 +206,6 @@ class GetOrdersByVendorIdOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -224,6 +214,7 @@ class GetOrdersByVendorIdOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetOrdersByVendorIdData {
|
||||
final List<GetOrdersByVendorIdOrders> orders;
|
||||
|
||||
@@ -34,7 +34,6 @@ class GetRapidOrdersOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -45,7 +44,6 @@ class GetRapidOrdersOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -54,6 +52,7 @@ class GetRapidOrdersOrders {
|
||||
final Timestamp? createdAt;
|
||||
final GetRapidOrdersOrdersBusiness business;
|
||||
final GetRapidOrdersOrdersVendor? vendor;
|
||||
final GetRapidOrdersOrdersTeamHub teamHub;
|
||||
GetRapidOrdersOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -61,7 +60,6 @@ class GetRapidOrdersOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -72,7 +70,6 @@ class GetRapidOrdersOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -80,7 +77,8 @@ class GetRapidOrdersOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -96,7 +94,6 @@ class GetRapidOrdersOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -107,7 +104,6 @@ class GetRapidOrdersOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -115,11 +111,12 @@ class GetRapidOrdersOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -135,9 +132,6 @@ class GetRapidOrdersOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -170,9 +164,6 @@ class GetRapidOrdersOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -195,6 +186,7 @@ class GetRapidOrdersOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -204,7 +196,6 @@ class GetRapidOrdersOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -215,7 +206,6 @@ class GetRapidOrdersOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -224,6 +214,7 @@ class GetRapidOrdersOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class GetRapidOrdersData {
|
||||
final List<GetRapidOrdersOrders> orders;
|
||||
|
||||
@@ -31,6 +31,11 @@ class GetShiftByIdShift {
|
||||
final String? locationAddress;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final String? placeId;
|
||||
final String? city;
|
||||
final String? state;
|
||||
final String? street;
|
||||
final String? country;
|
||||
final String? description;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? workersNeeded;
|
||||
@@ -56,6 +61,11 @@ class GetShiftByIdShift {
|
||||
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
|
||||
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
|
||||
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']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
|
||||
@@ -91,6 +101,11 @@ class GetShiftByIdShift {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -105,7 +120,7 @@ class GetShiftByIdShift {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -140,6 +155,21 @@ class GetShiftByIdShift {
|
||||
if (longitude != null) {
|
||||
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) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
@@ -189,6 +219,11 @@ class GetShiftByIdShift {
|
||||
this.locationAddress,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.placeId,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.description,
|
||||
this.status,
|
||||
this.workersNeeded,
|
||||
|
||||
@@ -51,6 +51,11 @@ class GetShiftsByBusinessIdShifts {
|
||||
final String? locationAddress;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final String? placeId;
|
||||
final String? city;
|
||||
final String? state;
|
||||
final String? street;
|
||||
final String? country;
|
||||
final String? description;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? workersNeeded;
|
||||
@@ -76,6 +81,11 @@ class GetShiftsByBusinessIdShifts {
|
||||
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
|
||||
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
|
||||
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']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
|
||||
@@ -111,6 +121,11 @@ class GetShiftsByBusinessIdShifts {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -125,7 +140,7 @@ class GetShiftsByBusinessIdShifts {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -160,6 +175,21 @@ class GetShiftsByBusinessIdShifts {
|
||||
if (longitude != null) {
|
||||
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) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
@@ -209,6 +239,11 @@ class GetShiftsByBusinessIdShifts {
|
||||
this.locationAddress,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.placeId,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.description,
|
||||
this.status,
|
||||
this.workersNeeded,
|
||||
|
||||
@@ -51,6 +51,11 @@ class GetShiftsByVendorIdShifts {
|
||||
final String? locationAddress;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final String? placeId;
|
||||
final String? city;
|
||||
final String? state;
|
||||
final String? street;
|
||||
final String? country;
|
||||
final String? description;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? workersNeeded;
|
||||
@@ -76,6 +81,11 @@ class GetShiftsByVendorIdShifts {
|
||||
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
|
||||
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
|
||||
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']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
|
||||
@@ -111,6 +121,11 @@ class GetShiftsByVendorIdShifts {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -125,7 +140,7 @@ class GetShiftsByVendorIdShifts {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -160,6 +175,21 @@ class GetShiftsByVendorIdShifts {
|
||||
if (longitude != null) {
|
||||
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) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
@@ -209,6 +239,11 @@ class GetShiftsByVendorIdShifts {
|
||||
this.locationAddress,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.placeId,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.description,
|
||||
this.status,
|
||||
this.workersNeeded,
|
||||
|
||||
@@ -23,30 +23,34 @@ class GetTeamHubByIdTeamHub {
|
||||
final String teamId;
|
||||
final String hubName;
|
||||
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;
|
||||
final String? managerName;
|
||||
final bool isActive;
|
||||
final AnyValue? departments;
|
||||
final Timestamp? createdAt;
|
||||
final Timestamp? updatedAt;
|
||||
final String? createdBy;
|
||||
GetTeamHubByIdTeamHub.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
teamId = nativeFromJson<String>(json['teamId']),
|
||||
hubName = nativeFromJson<String>(json['hubName']),
|
||||
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']),
|
||||
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']),
|
||||
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
|
||||
isActive = nativeFromJson<bool>(json['isActive']),
|
||||
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']);
|
||||
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -61,19 +65,21 @@ class GetTeamHubByIdTeamHub {
|
||||
teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
departments == otherTyped.departments &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
updatedAt == otherTyped.updatedAt &&
|
||||
createdBy == otherTyped.createdBy;
|
||||
departments == otherTyped.departments;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -82,12 +88,27 @@ class GetTeamHubByIdTeamHub {
|
||||
json['teamId'] = nativeToJson<String>(teamId);
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
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) {
|
||||
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 (zipCode != null) {
|
||||
json['zipCode'] = nativeToJson<String?>(zipCode);
|
||||
}
|
||||
@@ -98,15 +119,6 @@ class GetTeamHubByIdTeamHub {
|
||||
if (departments != null) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -115,15 +127,17 @@ class GetTeamHubByIdTeamHub {
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
this.placeId,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.zipCode,
|
||||
this.managerName,
|
||||
required this.isActive,
|
||||
this.departments,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.createdBy,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,18 @@ part of 'generated.dart';
|
||||
|
||||
class GetTeamHubsByTeamIdVariablesBuilder {
|
||||
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,});
|
||||
Deserializer<GetTeamHubsByTeamIdData> dataDeserializer = (dynamic json) => GetTeamHubsByTeamIdData.fromJson(jsonDecode(json));
|
||||
Serializer<GetTeamHubsByTeamIdVariables> varsSerializer = (GetTeamHubsByTeamIdVariables vars) => jsonEncode(vars.toJson());
|
||||
@@ -12,7 +22,7 @@ class GetTeamHubsByTeamIdVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -23,30 +33,34 @@ class GetTeamHubsByTeamIdTeamHubs {
|
||||
final String teamId;
|
||||
final String hubName;
|
||||
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;
|
||||
final String? managerName;
|
||||
final bool isActive;
|
||||
final AnyValue? departments;
|
||||
final Timestamp? createdAt;
|
||||
final Timestamp? updatedAt;
|
||||
final String? createdBy;
|
||||
GetTeamHubsByTeamIdTeamHubs.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
teamId = nativeFromJson<String>(json['teamId']),
|
||||
hubName = nativeFromJson<String>(json['hubName']),
|
||||
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']),
|
||||
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']),
|
||||
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
|
||||
isActive = nativeFromJson<bool>(json['isActive']),
|
||||
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']);
|
||||
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -61,19 +75,21 @@ class GetTeamHubsByTeamIdTeamHubs {
|
||||
teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
departments == otherTyped.departments &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
updatedAt == otherTyped.updatedAt &&
|
||||
createdBy == otherTyped.createdBy;
|
||||
departments == otherTyped.departments;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -82,12 +98,27 @@ class GetTeamHubsByTeamIdTeamHubs {
|
||||
json['teamId'] = nativeToJson<String>(teamId);
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
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) {
|
||||
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 (zipCode != null) {
|
||||
json['zipCode'] = nativeToJson<String?>(zipCode);
|
||||
}
|
||||
@@ -98,15 +129,6 @@ class GetTeamHubsByTeamIdTeamHubs {
|
||||
if (departments != null) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -115,15 +137,17 @@ class GetTeamHubsByTeamIdTeamHubs {
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
this.placeId,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.zipCode,
|
||||
this.managerName,
|
||||
required this.isActive,
|
||||
this.departments,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.createdBy,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -166,10 +190,23 @@ class GetTeamHubsByTeamIdData {
|
||||
@immutable
|
||||
class GetTeamHubsByTeamIdVariables {
|
||||
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.')
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -180,21 +217,31 @@ class GetTeamHubsByTeamIdVariables {
|
||||
}
|
||||
|
||||
final GetTeamHubsByTeamIdVariables otherTyped = other as GetTeamHubsByTeamIdVariables;
|
||||
return teamId == otherTyped.teamId;
|
||||
return teamId == otherTyped.teamId &&
|
||||
offset == otherTyped.offset &&
|
||||
limit == otherTyped.limit;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => teamId.hashCode;
|
||||
int get hashCode => Object.hashAll([teamId.hashCode, offset.hashCode, limit.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
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;
|
||||
}
|
||||
|
||||
GetTeamHubsByTeamIdVariables({
|
||||
required this.teamId,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -106,13 +106,15 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
|
||||
final String? email;
|
||||
final String? phone;
|
||||
final String? photoUrl;
|
||||
final double? averageRating;
|
||||
ListAcceptedApplicationsByBusinessForDayApplicationsStaff.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
fullName = nativeFromJson<String>(json['fullName']),
|
||||
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -127,11 +129,12 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
|
||||
fullName == otherTyped.fullName &&
|
||||
email == otherTyped.email &&
|
||||
phone == otherTyped.phone &&
|
||||
photoUrl == otherTyped.photoUrl;
|
||||
photoUrl == otherTyped.photoUrl &&
|
||||
averageRating == otherTyped.averageRating;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -147,6 +150,9 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
|
||||
if (photoUrl != null) {
|
||||
json['photoUrl'] = nativeToJson<String?>(photoUrl);
|
||||
}
|
||||
if (averageRating != null) {
|
||||
json['averageRating'] = nativeToJson<double?>(averageRating);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -156,6 +162,7 @@ class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
|
||||
this.email,
|
||||
this.phone,
|
||||
this.photoUrl,
|
||||
this.averageRating,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -197,14 +197,14 @@ class ListApplicationsApplicationsShift {
|
||||
class ListApplicationsApplicationsShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListApplicationsApplicationsShiftOrderTeamHub teamHub;
|
||||
final ListApplicationsApplicationsShiftOrderBusiness business;
|
||||
final ListApplicationsApplicationsShiftOrderVendor? vendor;
|
||||
ListApplicationsApplicationsShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
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']),
|
||||
vendor = json['vendor'] == null ? null : ListApplicationsApplicationsShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
@@ -219,13 +219,13 @@ class ListApplicationsApplicationsShiftOrder {
|
||||
final ListApplicationsApplicationsShiftOrder otherTyped = other as ListApplicationsApplicationsShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -234,9 +234,7 @@ class ListApplicationsApplicationsShiftOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
@@ -247,12 +245,58 @@ class ListApplicationsApplicationsShiftOrder {
|
||||
ListApplicationsApplicationsShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
this.location,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
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
|
||||
class ListApplicationsApplicationsShiftOrderBusiness {
|
||||
final String id;
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListInvoicesInvoicesBusiness {
|
||||
@immutable
|
||||
class ListInvoicesInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListInvoicesInvoicesOrderTeamHub teamHub;
|
||||
ListInvoicesInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListInvoicesInvoicesOrder {
|
||||
|
||||
final ListInvoicesInvoicesOrder otherTyped = other as ListInvoicesInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListInvoicesInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListInvoicesInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListInvoicesByBusinessIdInvoicesBusiness {
|
||||
@immutable
|
||||
class ListInvoicesByBusinessIdInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListInvoicesByBusinessIdInvoicesOrderTeamHub teamHub;
|
||||
ListInvoicesByBusinessIdInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListInvoicesByBusinessIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListInvoicesByBusinessIdInvoicesOrder {
|
||||
|
||||
final ListInvoicesByBusinessIdInvoicesOrder otherTyped = other as ListInvoicesByBusinessIdInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListInvoicesByBusinessIdInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListInvoicesByBusinessIdInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListInvoicesByOrderIdInvoicesBusiness {
|
||||
@immutable
|
||||
class ListInvoicesByOrderIdInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListInvoicesByOrderIdInvoicesOrderTeamHub teamHub;
|
||||
ListInvoicesByOrderIdInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListInvoicesByOrderIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListInvoicesByOrderIdInvoicesOrder {
|
||||
|
||||
final ListInvoicesByOrderIdInvoicesOrder otherTyped = other as ListInvoicesByOrderIdInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListInvoicesByOrderIdInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListInvoicesByOrderIdInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListInvoicesByStatusInvoicesBusiness {
|
||||
@immutable
|
||||
class ListInvoicesByStatusInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListInvoicesByStatusInvoicesOrderTeamHub teamHub;
|
||||
ListInvoicesByStatusInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListInvoicesByStatusInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListInvoicesByStatusInvoicesOrder {
|
||||
|
||||
final ListInvoicesByStatusInvoicesOrder otherTyped = other as ListInvoicesByStatusInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListInvoicesByStatusInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListInvoicesByStatusInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListInvoicesByVendorIdInvoicesBusiness {
|
||||
@immutable
|
||||
class ListInvoicesByVendorIdInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListInvoicesByVendorIdInvoicesOrderTeamHub teamHub;
|
||||
ListInvoicesByVendorIdInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListInvoicesByVendorIdInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListInvoicesByVendorIdInvoicesOrder {
|
||||
|
||||
final ListInvoicesByVendorIdInvoicesOrder otherTyped = other as ListInvoicesByVendorIdInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListInvoicesByVendorIdInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListInvoicesByVendorIdInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ class ListOrdersOrders {
|
||||
final String? vendorId;
|
||||
final String businessId;
|
||||
final EnumValue<OrderType> orderType;
|
||||
final String? location;
|
||||
final EnumValue<OrderStatus> status;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startDate;
|
||||
@@ -45,7 +44,6 @@ class ListOrdersOrders {
|
||||
final AnyValue? assignedStaff;
|
||||
final AnyValue? shifts;
|
||||
final int? requested;
|
||||
final String? hub;
|
||||
final AnyValue? recurringDays;
|
||||
final AnyValue? permanentDays;
|
||||
final String? poReference;
|
||||
@@ -54,6 +52,7 @@ class ListOrdersOrders {
|
||||
final Timestamp? createdAt;
|
||||
final ListOrdersOrdersBusiness business;
|
||||
final ListOrdersOrdersVendor? vendor;
|
||||
final ListOrdersOrdersTeamHub teamHub;
|
||||
ListOrdersOrders.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
@@ -61,7 +60,6 @@ class ListOrdersOrders {
|
||||
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
orderType = orderTypeDeserializer(json['orderType']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = orderStatusDeserializer(json['status']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']),
|
||||
@@ -72,7 +70,6 @@ class ListOrdersOrders {
|
||||
assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']),
|
||||
shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']),
|
||||
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']),
|
||||
permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
@@ -80,7 +77,8 @@ class ListOrdersOrders {
|
||||
notes = json['notes'] == null ? null : nativeFromJson<String>(json['notes']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -96,7 +94,6 @@ class ListOrdersOrders {
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
orderType == otherTyped.orderType &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -107,7 +104,6 @@ class ListOrdersOrders {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
poReference == otherTyped.poReference &&
|
||||
@@ -115,11 +111,12 @@ class ListOrdersOrders {
|
||||
notes == otherTyped.notes &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
vendor == otherTyped.vendor &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -135,9 +132,6 @@ class ListOrdersOrders {
|
||||
json['orderType'] =
|
||||
orderTypeSerializer(orderType)
|
||||
;
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['status'] =
|
||||
orderStatusSerializer(status)
|
||||
;
|
||||
@@ -170,9 +164,6 @@ class ListOrdersOrders {
|
||||
if (requested != null) {
|
||||
json['requested'] = nativeToJson<int?>(requested);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (recurringDays != null) {
|
||||
json['recurringDays'] = recurringDays!.toJson();
|
||||
}
|
||||
@@ -195,6 +186,7 @@ class ListOrdersOrders {
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -204,7 +196,6 @@ class ListOrdersOrders {
|
||||
this.vendorId,
|
||||
required this.businessId,
|
||||
required this.orderType,
|
||||
this.location,
|
||||
required this.status,
|
||||
this.date,
|
||||
this.startDate,
|
||||
@@ -215,7 +206,6 @@ class ListOrdersOrders {
|
||||
this.assignedStaff,
|
||||
this.shifts,
|
||||
this.requested,
|
||||
this.hub,
|
||||
this.recurringDays,
|
||||
this.permanentDays,
|
||||
this.poReference,
|
||||
@@ -224,6 +214,7 @@ class ListOrdersOrders {
|
||||
this.createdAt,
|
||||
required this.business,
|
||||
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
|
||||
class ListOrdersData {
|
||||
final List<ListOrdersOrders> orders;
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -331,15 +331,15 @@ class ListOverdueInvoicesInvoicesBusiness {
|
||||
@immutable
|
||||
class ListOverdueInvoicesInvoicesOrder {
|
||||
final String? eventName;
|
||||
final String? hub;
|
||||
final String? deparment;
|
||||
final String? poReference;
|
||||
final ListOverdueInvoicesInvoicesOrderTeamHub teamHub;
|
||||
ListOverdueInvoicesInvoicesOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']);
|
||||
poReference = json['poReference'] == null ? null : nativeFromJson<String>(json['poReference']),
|
||||
teamHub = ListOverdueInvoicesInvoicesOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -351,13 +351,13 @@ class ListOverdueInvoicesInvoicesOrder {
|
||||
|
||||
final ListOverdueInvoicesInvoicesOrder otherTyped = other as ListOverdueInvoicesInvoicesOrder;
|
||||
return eventName == otherTyped.eventName &&
|
||||
hub == otherTyped.hub &&
|
||||
deparment == otherTyped.deparment &&
|
||||
poReference == otherTyped.poReference;
|
||||
poReference == otherTyped.poReference &&
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -365,23 +365,67 @@ class ListOverdueInvoicesInvoicesOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (hub != null) {
|
||||
json['hub'] = nativeToJson<String?>(hub);
|
||||
}
|
||||
if (deparment != null) {
|
||||
json['deparment'] = nativeToJson<String?>(deparment);
|
||||
}
|
||||
if (poReference != null) {
|
||||
json['poReference'] = nativeToJson<String?>(poReference);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListOverdueInvoicesInvoicesOrder({
|
||||
this.eventName,
|
||||
this.hub,
|
||||
this.deparment,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -467,12 +467,12 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -485,11 +485,11 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -498,16 +498,60 @@ class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -517,12 +517,12 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -535,11 +535,11 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -548,16 +548,60 @@ class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -465,12 +465,12 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -483,11 +483,11 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -496,16 +496,60 @@ class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -460,12 +460,12 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -478,11 +478,11 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -491,16 +491,60 @@ class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -491,12 +491,12 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -509,11 +509,11 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -522,16 +522,60 @@ class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -460,12 +460,12 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor {
|
||||
class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final String? location;
|
||||
final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub teamHub;
|
||||
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListRecentPaymentsByStatusRecentPaymentsInvoiceOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -478,11 +478,11 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
|
||||
final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -491,16 +491,60 @@ class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder {
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder({
|
||||
required this.id,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -239,9 +239,11 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
|
||||
@immutable
|
||||
class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']);
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -252,21 +254,26 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
|
||||
}
|
||||
|
||||
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder;
|
||||
return id == otherTyped.id;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => id.hashCode;
|
||||
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -255,13 +255,15 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShift {
|
||||
@immutable
|
||||
class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
|
||||
final String? vendorId;
|
||||
final String? eventName;
|
||||
final Timestamp? date;
|
||||
final String? location;
|
||||
final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub teamHub;
|
||||
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder.fromJson(dynamic json):
|
||||
|
||||
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']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
teamHub = ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub.fromJson(json['teamHub']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -273,12 +275,13 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
|
||||
|
||||
final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder;
|
||||
return vendorId == otherTyped.vendorId &&
|
||||
eventName == otherTyped.eventName &&
|
||||
date == otherTyped.date &&
|
||||
location == otherTyped.location;
|
||||
teamHub == otherTyped.teamHub;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -286,19 +289,67 @@ class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
|
||||
if (vendorId != null) {
|
||||
json['vendorId'] = nativeToJson<String?>(vendorId);
|
||||
}
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
if (date != null) {
|
||||
json['date'] = date!.toJson();
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder({
|
||||
this.vendorId,
|
||||
this.eventName,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ class ListShiftsShifts {
|
||||
final String? locationAddress;
|
||||
final double? latitude;
|
||||
final double? longitude;
|
||||
final String? placeId;
|
||||
final String? city;
|
||||
final String? state;
|
||||
final String? street;
|
||||
final String? country;
|
||||
final String? description;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? workersNeeded;
|
||||
@@ -66,6 +71,11 @@ class ListShiftsShifts {
|
||||
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
|
||||
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
|
||||
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']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
|
||||
@@ -101,6 +111,11 @@ class ListShiftsShifts {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -115,7 +130,7 @@ class ListShiftsShifts {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -150,6 +165,21 @@ class ListShiftsShifts {
|
||||
if (longitude != null) {
|
||||
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) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
@@ -199,6 +229,11 @@ class ListShiftsShifts {
|
||||
this.locationAddress,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.placeId,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.description,
|
||||
this.status,
|
||||
this.workersNeeded,
|
||||
|
||||
@@ -116,12 +116,14 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift shift;
|
||||
final int count;
|
||||
final int? assigned;
|
||||
final double? hours;
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole role;
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRole.fromJson(dynamic json):
|
||||
|
||||
shift = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift.fromJson(json['shift']),
|
||||
count = nativeFromJson<int>(json['count']),
|
||||
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
|
||||
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
|
||||
role = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole.fromJson(json['role']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@@ -136,11 +138,12 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
|
||||
return shift == otherTyped.shift &&
|
||||
count == otherTyped.count &&
|
||||
assigned == otherTyped.assigned &&
|
||||
hours == otherTyped.hours &&
|
||||
role == otherTyped.role;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -150,6 +153,9 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
|
||||
if (assigned != null) {
|
||||
json['assigned'] = nativeToJson<int?>(assigned);
|
||||
}
|
||||
if (hours != null) {
|
||||
json['hours'] = nativeToJson<double?>(hours);
|
||||
}
|
||||
json['role'] = role.toJson();
|
||||
return json;
|
||||
}
|
||||
@@ -158,6 +164,7 @@ class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
|
||||
required this.shift,
|
||||
required this.count,
|
||||
this.assigned,
|
||||
this.hours,
|
||||
required this.role,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,18 +1,29 @@
|
||||
part of 'generated.dart';
|
||||
|
||||
class ListTeamHubsVariablesBuilder {
|
||||
|
||||
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||
|
||||
final FirebaseDataConnect _dataConnect;
|
||||
ListTeamHubsVariablesBuilder offset(int? t) {
|
||||
_offset.value = t;
|
||||
return this;
|
||||
}
|
||||
ListTeamHubsVariablesBuilder limit(int? t) {
|
||||
_limit.value = t;
|
||||
return this;
|
||||
}
|
||||
|
||||
ListTeamHubsVariablesBuilder(this._dataConnect, );
|
||||
Deserializer<ListTeamHubsData> dataDeserializer = (dynamic json) => ListTeamHubsData.fromJson(jsonDecode(json));
|
||||
|
||||
Future<QueryResult<ListTeamHubsData, void>> execute() {
|
||||
Serializer<ListTeamHubsVariables> varsSerializer = (ListTeamHubsVariables vars) => jsonEncode(vars.toJson());
|
||||
Future<QueryResult<ListTeamHubsData, ListTeamHubsVariables>> execute() {
|
||||
return ref().execute();
|
||||
}
|
||||
|
||||
QueryRef<ListTeamHubsData, void> ref() {
|
||||
|
||||
return _dataConnect.query("listTeamHubs", dataDeserializer, emptySerializer, null);
|
||||
QueryRef<ListTeamHubsData, ListTeamHubsVariables> ref() {
|
||||
ListTeamHubsVariables vars= ListTeamHubsVariables(offset: _offset,limit: _limit,);
|
||||
return _dataConnect.query("listTeamHubs", dataDeserializer, varsSerializer, vars);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,30 +33,34 @@ class ListTeamHubsTeamHubs {
|
||||
final String teamId;
|
||||
final String hubName;
|
||||
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;
|
||||
final String? managerName;
|
||||
final bool isActive;
|
||||
final AnyValue? departments;
|
||||
final Timestamp? createdAt;
|
||||
final Timestamp? updatedAt;
|
||||
final String? createdBy;
|
||||
ListTeamHubsTeamHubs.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
teamId = nativeFromJson<String>(json['teamId']),
|
||||
hubName = nativeFromJson<String>(json['hubName']),
|
||||
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']),
|
||||
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']),
|
||||
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
|
||||
isActive = nativeFromJson<bool>(json['isActive']),
|
||||
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']);
|
||||
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -60,19 +75,21 @@ class ListTeamHubsTeamHubs {
|
||||
teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
departments == otherTyped.departments &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
updatedAt == otherTyped.updatedAt &&
|
||||
createdBy == otherTyped.createdBy;
|
||||
departments == otherTyped.departments;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -81,12 +98,27 @@ class ListTeamHubsTeamHubs {
|
||||
json['teamId'] = nativeToJson<String>(teamId);
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
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) {
|
||||
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 (zipCode != null) {
|
||||
json['zipCode'] = nativeToJson<String?>(zipCode);
|
||||
}
|
||||
@@ -97,15 +129,6 @@ class ListTeamHubsTeamHubs {
|
||||
if (departments != null) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -114,15 +137,17 @@ class ListTeamHubsTeamHubs {
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
this.placeId,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.zipCode,
|
||||
this.managerName,
|
||||
required this.isActive,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,18 @@ part of 'generated.dart';
|
||||
|
||||
class ListTeamHubsByOwnerIdVariablesBuilder {
|
||||
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,});
|
||||
Deserializer<ListTeamHubsByOwnerIdData> dataDeserializer = (dynamic json) => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json));
|
||||
Serializer<ListTeamHubsByOwnerIdVariables> varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson());
|
||||
@@ -12,7 +22,7 @@ class ListTeamHubsByOwnerIdVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -23,26 +33,34 @@ class ListTeamHubsByOwnerIdTeamHubs {
|
||||
final String teamId;
|
||||
final String hubName;
|
||||
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;
|
||||
final String? managerName;
|
||||
final bool isActive;
|
||||
final AnyValue? departments;
|
||||
final Timestamp? createdAt;
|
||||
ListTeamHubsByOwnerIdTeamHubs.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
teamId = nativeFromJson<String>(json['teamId']),
|
||||
hubName = nativeFromJson<String>(json['hubName']),
|
||||
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']),
|
||||
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']),
|
||||
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
|
||||
isActive = nativeFromJson<bool>(json['isActive']),
|
||||
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
|
||||
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -57,17 +75,21 @@ class ListTeamHubsByOwnerIdTeamHubs {
|
||||
teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
departments == otherTyped.departments &&
|
||||
createdAt == otherTyped.createdAt;
|
||||
departments == otherTyped.departments;
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -76,12 +98,27 @@ class ListTeamHubsByOwnerIdTeamHubs {
|
||||
json['teamId'] = nativeToJson<String>(teamId);
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
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) {
|
||||
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 (zipCode != null) {
|
||||
json['zipCode'] = nativeToJson<String?>(zipCode);
|
||||
}
|
||||
@@ -92,9 +129,6 @@ class ListTeamHubsByOwnerIdTeamHubs {
|
||||
if (departments != null) {
|
||||
json['departments'] = departments!.toJson();
|
||||
}
|
||||
if (createdAt != null) {
|
||||
json['createdAt'] = createdAt!.toJson();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -103,13 +137,17 @@ class ListTeamHubsByOwnerIdTeamHubs {
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
this.placeId,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.city,
|
||||
this.state,
|
||||
this.street,
|
||||
this.country,
|
||||
this.zipCode,
|
||||
this.managerName,
|
||||
required this.isActive,
|
||||
this.departments,
|
||||
this.createdAt,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -152,10 +190,23 @@ class ListTeamHubsByOwnerIdData {
|
||||
@immutable
|
||||
class ListTeamHubsByOwnerIdVariables {
|
||||
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.')
|
||||
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
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
@@ -166,21 +217,31 @@ class ListTeamHubsByOwnerIdVariables {
|
||||
}
|
||||
|
||||
final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables;
|
||||
return ownerId == otherTyped.ownerId;
|
||||
return ownerId == otherTyped.ownerId &&
|
||||
offset == otherTyped.offset &&
|
||||
limit == otherTyped.limit;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => ownerId.hashCode;
|
||||
int get hashCode => Object.hashAll([ownerId.hashCode, offset.hashCode, limit.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
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;
|
||||
}
|
||||
|
||||
ListTeamHubsByOwnerIdVariables({
|
||||
required this.ownerId,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ class UpdateOrderVariablesBuilder {
|
||||
String id;
|
||||
Optional<String> _vendorId = 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<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);
|
||||
@@ -14,7 +13,7 @@ class UpdateOrderVariablesBuilder {
|
||||
Optional<AnyValue> _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
Optional<AnyValue> _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
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> _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
Optional<String> _notes = Optional.optional(nativeFromJson, nativeToJson);
|
||||
@@ -29,10 +28,6 @@ class UpdateOrderVariablesBuilder {
|
||||
_businessId.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateOrderVariablesBuilder location(String? t) {
|
||||
_location.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateOrderVariablesBuilder status(OrderStatus? t) {
|
||||
_status.value = t;
|
||||
return this;
|
||||
@@ -69,10 +64,6 @@ class UpdateOrderVariablesBuilder {
|
||||
_requested.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateOrderVariablesBuilder hub(String? t) {
|
||||
_hub.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateOrderVariablesBuilder recurringDays(AnyValue? t) {
|
||||
_recurringDays.value = t;
|
||||
return this;
|
||||
@@ -94,7 +85,7 @@ class UpdateOrderVariablesBuilder {
|
||||
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));
|
||||
Serializer<UpdateOrderVariables> varsSerializer = (UpdateOrderVariables vars) => jsonEncode(vars.toJson());
|
||||
Future<OperationResult<UpdateOrderData, UpdateOrderVariables>> execute() {
|
||||
@@ -102,7 +93,7 @@ class UpdateOrderVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -182,7 +173,6 @@ class UpdateOrderVariables {
|
||||
final String id;
|
||||
late final Optional<String>vendorId;
|
||||
late final Optional<String>businessId;
|
||||
late final Optional<String>location;
|
||||
late final Optional<OrderStatus>status;
|
||||
late final Optional<Timestamp>date;
|
||||
late final Optional<Timestamp>startDate;
|
||||
@@ -192,7 +182,7 @@ class UpdateOrderVariables {
|
||||
late final Optional<AnyValue>assignedStaff;
|
||||
late final Optional<AnyValue>shifts;
|
||||
late final Optional<int>requested;
|
||||
late final Optional<String>hub;
|
||||
final String teamHubId;
|
||||
late final Optional<AnyValue>recurringDays;
|
||||
late final Optional<AnyValue>permanentDays;
|
||||
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.')
|
||||
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']);
|
||||
|
||||
|
||||
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.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']);
|
||||
|
||||
|
||||
hub = Optional.optional(nativeFromJson, nativeToJson);
|
||||
hub.value = json['hub'] == null ? null : nativeFromJson<String>(json['hub']);
|
||||
|
||||
|
||||
recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer);
|
||||
recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']);
|
||||
@@ -290,7 +274,6 @@ class UpdateOrderVariables {
|
||||
return id == otherTyped.id &&
|
||||
vendorId == otherTyped.vendorId &&
|
||||
businessId == otherTyped.businessId &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
date == otherTyped.date &&
|
||||
startDate == otherTyped.startDate &&
|
||||
@@ -300,7 +283,7 @@ class UpdateOrderVariables {
|
||||
assignedStaff == otherTyped.assignedStaff &&
|
||||
shifts == otherTyped.shifts &&
|
||||
requested == otherTyped.requested &&
|
||||
hub == otherTyped.hub &&
|
||||
teamHubId == otherTyped.teamHubId &&
|
||||
recurringDays == otherTyped.recurringDays &&
|
||||
permanentDays == otherTyped.permanentDays &&
|
||||
notes == otherTyped.notes &&
|
||||
@@ -309,7 +292,7 @@ class UpdateOrderVariables {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -321,9 +304,6 @@ class UpdateOrderVariables {
|
||||
if(businessId.state == OptionalState.set) {
|
||||
json['businessId'] = businessId.toJson();
|
||||
}
|
||||
if(location.state == OptionalState.set) {
|
||||
json['location'] = location.toJson();
|
||||
}
|
||||
if(status.state == OptionalState.set) {
|
||||
json['status'] = status.toJson();
|
||||
}
|
||||
@@ -351,9 +331,7 @@ class UpdateOrderVariables {
|
||||
if(requested.state == OptionalState.set) {
|
||||
json['requested'] = requested.toJson();
|
||||
}
|
||||
if(hub.state == OptionalState.set) {
|
||||
json['hub'] = hub.toJson();
|
||||
}
|
||||
json['teamHubId'] = nativeToJson<String>(teamHubId);
|
||||
if(recurringDays.state == OptionalState.set) {
|
||||
json['recurringDays'] = recurringDays.toJson();
|
||||
}
|
||||
@@ -376,7 +354,6 @@ class UpdateOrderVariables {
|
||||
required this.id,
|
||||
required this.vendorId,
|
||||
required this.businessId,
|
||||
required this.location,
|
||||
required this.status,
|
||||
required this.date,
|
||||
required this.startDate,
|
||||
@@ -386,7 +363,7 @@ class UpdateOrderVariables {
|
||||
required this.assignedStaff,
|
||||
required this.shifts,
|
||||
required this.requested,
|
||||
required this.hub,
|
||||
required this.teamHubId,
|
||||
required this.recurringDays,
|
||||
required this.permanentDays,
|
||||
required this.notes,
|
||||
|
||||
@@ -13,6 +13,11 @@ class UpdateShiftVariablesBuilder {
|
||||
Optional<String> _locationAddress = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<double> _latitude = 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<ShiftStatus> _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer);
|
||||
Optional<int> _workersNeeded = Optional.optional(nativeFromJson, nativeToJson);
|
||||
@@ -65,6 +70,26 @@ class UpdateShiftVariablesBuilder {
|
||||
_longitude.value = t;
|
||||
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) {
|
||||
_description.value = t;
|
||||
return this;
|
||||
@@ -102,7 +127,7 @@ class UpdateShiftVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -191,6 +216,11 @@ class UpdateShiftVariables {
|
||||
late final Optional<String>locationAddress;
|
||||
late final Optional<double>latitude;
|
||||
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<ShiftStatus>status;
|
||||
late final Optional<int>workersNeeded;
|
||||
@@ -249,6 +279,26 @@ class UpdateShiftVariables {
|
||||
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.value = json['description'] == null ? null : nativeFromJson<String>(json['description']);
|
||||
|
||||
@@ -301,6 +351,11 @@ class UpdateShiftVariables {
|
||||
locationAddress == otherTyped.locationAddress &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
placeId == otherTyped.placeId &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
description == otherTyped.description &&
|
||||
status == otherTyped.status &&
|
||||
workersNeeded == otherTyped.workersNeeded &&
|
||||
@@ -311,7 +366,7 @@ class UpdateShiftVariables {
|
||||
|
||||
}
|
||||
@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() {
|
||||
@@ -350,6 +405,21 @@ class UpdateShiftVariables {
|
||||
if(longitude.state == OptionalState.set) {
|
||||
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) {
|
||||
json['description'] = description.toJson();
|
||||
}
|
||||
@@ -387,6 +457,11 @@ class UpdateShiftVariables {
|
||||
required this.locationAddress,
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.placeId,
|
||||
required this.city,
|
||||
required this.state,
|
||||
required this.street,
|
||||
required this.country,
|
||||
required this.description,
|
||||
required this.status,
|
||||
required this.workersNeeded,
|
||||
|
||||
@@ -2,16 +2,26 @@ part of 'generated.dart';
|
||||
|
||||
class UpdateTeamHubVariablesBuilder {
|
||||
String id;
|
||||
Optional<String> _teamId = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<String> _hubName = 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> _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> _managerName = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
|
||||
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;
|
||||
return this;
|
||||
}
|
||||
@@ -19,6 +29,18 @@ class UpdateTeamHubVariablesBuilder {
|
||||
_address.value = t;
|
||||
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) {
|
||||
_city.value = t;
|
||||
return this;
|
||||
@@ -27,6 +49,14 @@ class UpdateTeamHubVariablesBuilder {
|
||||
_state.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateTeamHubVariablesBuilder street(String? t) {
|
||||
_street.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateTeamHubVariablesBuilder country(String? t) {
|
||||
_country.value = t;
|
||||
return this;
|
||||
}
|
||||
UpdateTeamHubVariablesBuilder zipCode(String? t) {
|
||||
_zipCode.value = t;
|
||||
return this;
|
||||
@@ -52,7 +82,7 @@ class UpdateTeamHubVariablesBuilder {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -130,10 +160,16 @@ class UpdateTeamHubData {
|
||||
@immutable
|
||||
class UpdateTeamHubVariables {
|
||||
final String id;
|
||||
late final Optional<String>teamId;
|
||||
late final Optional<String>hubName;
|
||||
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>state;
|
||||
late final Optional<String>street;
|
||||
late final Optional<String>country;
|
||||
late final Optional<String>zipCode;
|
||||
late final Optional<String>managerName;
|
||||
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.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']);
|
||||
|
||||
|
||||
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.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']);
|
||||
|
||||
|
||||
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.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
|
||||
|
||||
@@ -188,10 +248,16 @@ class UpdateTeamHubVariables {
|
||||
|
||||
final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables;
|
||||
return id == otherTyped.id &&
|
||||
teamId == otherTyped.teamId &&
|
||||
hubName == otherTyped.hubName &&
|
||||
address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
latitude == otherTyped.latitude &&
|
||||
longitude == otherTyped.longitude &&
|
||||
city == otherTyped.city &&
|
||||
state == otherTyped.state &&
|
||||
street == otherTyped.street &&
|
||||
country == otherTyped.country &&
|
||||
zipCode == otherTyped.zipCode &&
|
||||
managerName == otherTyped.managerName &&
|
||||
isActive == otherTyped.isActive &&
|
||||
@@ -199,24 +265,42 @@ class UpdateTeamHubVariables {
|
||||
|
||||
}
|
||||
@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> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
if(teamId.state == OptionalState.set) {
|
||||
json['teamId'] = teamId.toJson();
|
||||
}
|
||||
if(hubName.state == OptionalState.set) {
|
||||
json['hubName'] = hubName.toJson();
|
||||
}
|
||||
if(address.state == OptionalState.set) {
|
||||
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) {
|
||||
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(zipCode.state == OptionalState.set) {
|
||||
json['zipCode'] = zipCode.toJson();
|
||||
}
|
||||
@@ -234,10 +318,16 @@ class UpdateTeamHubVariables {
|
||||
|
||||
UpdateTeamHubVariables({
|
||||
required this.id,
|
||||
required this.teamId,
|
||||
required this.hubName,
|
||||
required this.address,
|
||||
required this.placeId,
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.city,
|
||||
required this.state,
|
||||
required this.street,
|
||||
required this.country,
|
||||
required this.zipCode,
|
||||
required this.managerName,
|
||||
required this.isActive,
|
||||
|
||||
@@ -37,4 +37,7 @@ class UiConstants {
|
||||
static const double space12 = 48.0;
|
||||
static const double space14 = 56.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;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ class OneTimeOrder extends Equatable {
|
||||
required this.date,
|
||||
required this.location,
|
||||
required this.positions,
|
||||
this.hub,
|
||||
this.eventName,
|
||||
this.vendorId,
|
||||
this.roleRates = const <String, double>{},
|
||||
});
|
||||
@@ -22,6 +24,12 @@ class OneTimeOrder extends Equatable {
|
||||
/// The list of positions and headcounts required for this order.
|
||||
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.
|
||||
final String? vendorId;
|
||||
|
||||
@@ -33,7 +41,53 @@ class OneTimeOrder extends Equatable {
|
||||
date,
|
||||
location,
|
||||
positions,
|
||||
hub,
|
||||
eventName,
|
||||
vendorId,
|
||||
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,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -166,9 +166,10 @@ class BillingRepositoryImpl implements BillingRepository {
|
||||
}
|
||||
|
||||
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 =
|
||||
(dateTime.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
(utc.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
return fdc.Timestamp(nanoseconds, seconds);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@ import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
|
||||
import '../blocs/billing_bloc.dart';
|
||||
import '../blocs/billing_event.dart';
|
||||
import '../blocs/billing_state.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/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.
|
||||
///
|
||||
@@ -43,7 +43,6 @@ class BillingView extends StatelessWidget {
|
||||
return BlocBuilder<BillingBloc, BillingState>(
|
||||
builder: (BuildContext context, BillingState state) {
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
BillingHeader(
|
||||
@@ -89,9 +88,7 @@ class BillingView extends StatelessWidget {
|
||||
SavingsCard(savings: state.savings),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
InvoiceHistorySection(invoices: state.invoiceHistory),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
const ExportInvoicesButton(),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
const SizedBox(height: UiConstants.space24),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: billing
|
||||
description: Client Billing feature package
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
version: 0.0.1
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
|
||||
@@ -100,9 +100,10 @@ class CoverageRepositoryImpl implements CoverageRepository {
|
||||
}
|
||||
|
||||
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 =
|
||||
(dateTime.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
(utc.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
return fdc.Timestamp(nanoseconds, seconds);
|
||||
}
|
||||
|
||||
@@ -195,7 +196,7 @@ class CoverageRepositoryImpl implements CoverageRepository {
|
||||
if (timestamp == 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 minute = date.minute.toString().padLeft(2, '0');
|
||||
return '$hour:$minute';
|
||||
|
||||
@@ -39,7 +39,7 @@ class CoverageShift extends Equatable {
|
||||
|
||||
/// Calculates the coverage percentage for this shift.
|
||||
int get coveragePercent {
|
||||
if (workersNeeded == 0) return 100;
|
||||
if (workersNeeded == 0) return 0;
|
||||
return ((workers.length / workersNeeded) * 100).round();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class CoverageStats extends Equatable {
|
||||
|
||||
/// Calculates the overall coverage percentage.
|
||||
int get coveragePercent {
|
||||
if (totalNeeded == 0) return 100;
|
||||
if (totalNeeded == 0) return 0;
|
||||
return ((totalConfirmed / totalNeeded) * 100).round();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ class CoveragePage extends StatelessWidget {
|
||||
create: (BuildContext context) => Modular.get<CoverageBloc>()
|
||||
..add(CoverageLoadRequested(date: DateTime.now())),
|
||||
child: Scaffold(
|
||||
backgroundColor: UiColors.background,
|
||||
body: BlocBuilder<CoverageBloc, CoverageState>(
|
||||
builder: (BuildContext context, CoverageState state) {
|
||||
return Column(
|
||||
@@ -114,13 +113,14 @@ class CoveragePage extends StatelessWidget {
|
||||
const SizedBox(height: UiConstants.space5),
|
||||
],
|
||||
Text(
|
||||
'Shifts',
|
||||
'Shifts (${state.shifts.length})',
|
||||
style: UiTypography.title2b.copyWith(
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
CoverageShiftList(shifts: state.shifts),
|
||||
const SizedBox(height: 100),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -35,24 +35,23 @@ class CoverageShiftList extends StatelessWidget {
|
||||
if (shifts.isEmpty) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space8),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Column(
|
||||
spacing: UiConstants.space4,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.users,
|
||||
size: UiConstants.space12,
|
||||
color: UiColors.mutedForeground,
|
||||
color: UiColors.textSecondary,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
Text(
|
||||
'No shifts scheduled for this day',
|
||||
style: UiTypography.body2r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -160,12 +159,15 @@ class _ShiftHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
spacing: UiConstants.space4,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: UiConstants.space2,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
spacing: UiConstants.space2,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: UiConstants.space2,
|
||||
@@ -175,42 +177,43 @@ class _ShiftHeader extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
title,
|
||||
style: UiTypography.body1b.copyWith(
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
style: UiTypography.body1b.textPrimary,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Row(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.mapPin,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.mutedForeground,
|
||||
Row(
|
||||
spacing: UiConstants.space1,
|
||||
children: <Widget>[
|
||||
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),
|
||||
Text(
|
||||
location,
|
||||
style: UiTypography.body3r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
startTime,
|
||||
style: UiTypography.body3r.copyWith(
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
Row(
|
||||
spacing: UiConstants.space1,
|
||||
children: <Widget>[
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: UiConstants.space3,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
Text(
|
||||
startTime,
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: client_coverage
|
||||
description: Client coverage feature for tracking daily shift coverage and worker status
|
||||
version: 1.0.0
|
||||
version: 0.0.1
|
||||
publish_to: none
|
||||
resolution: workspace
|
||||
|
||||
@@ -33,4 +33,4 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^5.0.0
|
||||
flutter_lints: ^6.0.0
|
||||
|
||||
@@ -30,7 +30,7 @@ class ClientMainPage extends StatelessWidget {
|
||||
BlocProvider.of<ClientMainCubit>(context).navigateToTab(index);
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -99,13 +99,6 @@ class ClientMainBottomBar extends StatelessWidget {
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 4,
|
||||
icon: UiIcons.chart,
|
||||
label: t.client_main.tabs.reports,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -27,26 +27,28 @@ class ClientCreateOrderRepositoryImpl
|
||||
@override
|
||||
Future<List<domain.OrderType>> getOrderTypes() {
|
||||
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(
|
||||
id: 'one-time',
|
||||
titleKey: 'client_create_order.types.one_time',
|
||||
descriptionKey: 'client_create_order.types.one_time_desc',
|
||||
),
|
||||
domain.OrderType(
|
||||
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',
|
||||
),
|
||||
|
||||
/// TODO: FEATURE_NOT_YET_IMPLEMENTED
|
||||
// domain.OrderType(
|
||||
// id: 'rapid',
|
||||
// titleKey: 'client_create_order.types.rapid',
|
||||
// descriptionKey: 'client_create_order.types.rapid_desc',
|
||||
// ),
|
||||
// domain.OrderType(
|
||||
// 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) {
|
||||
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
|
||||
.createOrder(businessId: businessId, orderType: dc.OrderType.ONE_TIME)
|
||||
.createOrder(
|
||||
businessId: businessId,
|
||||
orderType: dc.OrderType.ONE_TIME,
|
||||
teamHubId: hub.id,
|
||||
)
|
||||
.vendorId(vendorId)
|
||||
.location(order.location)
|
||||
.eventName(order.eventName)
|
||||
.status(dc.OrderStatus.POSTED)
|
||||
.date(orderTimestamp)
|
||||
.execute();
|
||||
@@ -86,8 +101,15 @@ class ClientCreateOrderRepositoryImpl
|
||||
final fdc.OperationResult<dc.CreateShiftData, dc.CreateShiftVariables> shiftResult = await _dataConnect
|
||||
.createShift(title: shiftTitle, orderId: orderId)
|
||||
.date(orderTimestamp)
|
||||
.location(order.location)
|
||||
.locationAddress(order.location)
|
||||
.location(hub.name)
|
||||
.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)
|
||||
.workersNeeded(workersNeeded)
|
||||
.filled(0)
|
||||
@@ -109,6 +131,10 @@ class ClientCreateOrderRepositoryImpl
|
||||
final double rate = order.roleRates[position.role] ?? 0;
|
||||
final double totalValue = rate * hours * position.count;
|
||||
|
||||
print(
|
||||
'CreateOneTimeOrder shiftRole: start=${start.toIso8601String()} end=${normalizedEnd.toIso8601String()}',
|
||||
);
|
||||
|
||||
await _dataConnect
|
||||
.createShiftRole(
|
||||
shiftId: shiftId,
|
||||
@@ -124,7 +150,7 @@ class ClientCreateOrderRepositoryImpl
|
||||
}
|
||||
|
||||
await _dataConnect
|
||||
.updateOrder(id: orderId)
|
||||
.updateOrder(id: orderId, teamHubId: hub.id)
|
||||
.shifts(fdc.AnyValue(<String>[shiftId]))
|
||||
.execute();
|
||||
}
|
||||
|
||||
@@ -13,14 +13,17 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
|
||||
: super(OneTimeOrderState.initial()) {
|
||||
on<OneTimeOrderVendorsLoaded>(_onVendorsLoaded);
|
||||
on<OneTimeOrderVendorChanged>(_onVendorChanged);
|
||||
on<OneTimeOrderHubsLoaded>(_onHubsLoaded);
|
||||
on<OneTimeOrderHubChanged>(_onHubChanged);
|
||||
on<OneTimeOrderEventNameChanged>(_onEventNameChanged);
|
||||
on<OneTimeOrderDateChanged>(_onDateChanged);
|
||||
on<OneTimeOrderLocationChanged>(_onLocationChanged);
|
||||
on<OneTimeOrderPositionAdded>(_onPositionAdded);
|
||||
on<OneTimeOrderPositionRemoved>(_onPositionRemoved);
|
||||
on<OneTimeOrderPositionUpdated>(_onPositionUpdated);
|
||||
on<OneTimeOrderSubmitted>(_onSubmitted);
|
||||
|
||||
_loadVendors();
|
||||
_loadHubs();
|
||||
}
|
||||
final CreateOneTimeOrderUseCase _createOneTimeOrderUseCase;
|
||||
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(
|
||||
OneTimeOrderVendorsLoaded event,
|
||||
Emitter<OneTimeOrderState> emit,
|
||||
@@ -88,6 +123,40 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
|
||||
_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(
|
||||
OneTimeOrderDateChanged event,
|
||||
Emitter<OneTimeOrderState> emit,
|
||||
@@ -95,13 +164,6 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
|
||||
emit(state.copyWith(date: event.date));
|
||||
}
|
||||
|
||||
void _onLocationChanged(
|
||||
OneTimeOrderLocationChanged event,
|
||||
Emitter<OneTimeOrderState> emit,
|
||||
) {
|
||||
emit(state.copyWith(location: event.location));
|
||||
}
|
||||
|
||||
void _onPositionAdded(
|
||||
OneTimeOrderPositionAdded event,
|
||||
Emitter<OneTimeOrderState> emit,
|
||||
@@ -149,10 +211,28 @@ class OneTimeOrderBloc extends Bloc<OneTimeOrderEvent, OneTimeOrderState> {
|
||||
final Map<String, double> roleRates = <String, double>{
|
||||
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(
|
||||
date: state.date,
|
||||
location: state.location,
|
||||
location: selectedHub.name,
|
||||
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,
|
||||
roleRates: roleRates,
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
import 'one_time_order_state.dart';
|
||||
|
||||
abstract class OneTimeOrderEvent extends Equatable {
|
||||
const OneTimeOrderEvent();
|
||||
@@ -24,6 +25,30 @@ class OneTimeOrderVendorChanged extends OneTimeOrderEvent {
|
||||
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 {
|
||||
const OneTimeOrderDateChanged(this.date);
|
||||
final DateTime date;
|
||||
@@ -32,14 +57,6 @@ class OneTimeOrderDateChanged extends OneTimeOrderEvent {
|
||||
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 {
|
||||
const OneTimeOrderPositionAdded();
|
||||
}
|
||||
|
||||
@@ -7,11 +7,14 @@ class OneTimeOrderState extends Equatable {
|
||||
const OneTimeOrderState({
|
||||
required this.date,
|
||||
required this.location,
|
||||
required this.eventName,
|
||||
required this.positions,
|
||||
this.status = OneTimeOrderStatus.initial,
|
||||
this.errorMessage,
|
||||
this.vendors = const <Vendor>[],
|
||||
this.selectedVendor,
|
||||
this.hubs = const <OneTimeOrderHubOption>[],
|
||||
this.selectedHub,
|
||||
this.roles = const <OneTimeOrderRoleOption>[],
|
||||
});
|
||||
|
||||
@@ -19,40 +22,51 @@ class OneTimeOrderState extends Equatable {
|
||||
return OneTimeOrderState(
|
||||
date: DateTime.now(),
|
||||
location: '',
|
||||
eventName: '',
|
||||
positions: const <OneTimeOrderPosition>[
|
||||
OneTimeOrderPosition(role: '', count: 1, startTime: '', endTime: ''),
|
||||
],
|
||||
vendors: const <Vendor>[],
|
||||
hubs: const <OneTimeOrderHubOption>[],
|
||||
roles: const <OneTimeOrderRoleOption>[],
|
||||
);
|
||||
}
|
||||
final DateTime date;
|
||||
final String location;
|
||||
final String eventName;
|
||||
final List<OneTimeOrderPosition> positions;
|
||||
final OneTimeOrderStatus status;
|
||||
final String? errorMessage;
|
||||
final List<Vendor> vendors;
|
||||
final Vendor? selectedVendor;
|
||||
final List<OneTimeOrderHubOption> hubs;
|
||||
final OneTimeOrderHubOption? selectedHub;
|
||||
final List<OneTimeOrderRoleOption> roles;
|
||||
|
||||
OneTimeOrderState copyWith({
|
||||
DateTime? date,
|
||||
String? location,
|
||||
String? eventName,
|
||||
List<OneTimeOrderPosition>? positions,
|
||||
OneTimeOrderStatus? status,
|
||||
String? errorMessage,
|
||||
List<Vendor>? vendors,
|
||||
Vendor? selectedVendor,
|
||||
List<OneTimeOrderHubOption>? hubs,
|
||||
OneTimeOrderHubOption? selectedHub,
|
||||
List<OneTimeOrderRoleOption>? roles,
|
||||
}) {
|
||||
return OneTimeOrderState(
|
||||
date: date ?? this.date,
|
||||
location: location ?? this.location,
|
||||
eventName: eventName ?? this.eventName,
|
||||
positions: positions ?? this.positions,
|
||||
status: status ?? this.status,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
vendors: vendors ?? this.vendors,
|
||||
selectedVendor: selectedVendor ?? this.selectedVendor,
|
||||
hubs: hubs ?? this.hubs,
|
||||
selectedHub: selectedHub ?? this.selectedHub,
|
||||
roles: roles ?? this.roles,
|
||||
);
|
||||
}
|
||||
@@ -61,15 +75,61 @@ class OneTimeOrderState extends Equatable {
|
||||
List<Object?> get props => <Object?>[
|
||||
date,
|
||||
location,
|
||||
eventName,
|
||||
positions,
|
||||
status,
|
||||
errorMessage,
|
||||
vendors,
|
||||
selectedVendor,
|
||||
hubs,
|
||||
selectedHub,
|
||||
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 {
|
||||
const OneTimeOrderRoleOption({
|
||||
required this.id,
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ import '../../blocs/one_time_order_bloc.dart';
|
||||
import '../../blocs/one_time_order_event.dart';
|
||||
import '../../blocs/one_time_order_state.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_location_input.dart';
|
||||
import 'one_time_order_position_card.dart';
|
||||
import 'one_time_order_section_header.dart';
|
||||
import 'one_time_order_success_view.dart';
|
||||
@@ -31,7 +31,12 @@ class OneTimeOrderView extends StatelessWidget {
|
||||
title: labels.success_title,
|
||||
message: labels.success_message,
|
||||
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),
|
||||
|
||||
OneTimeOrderEventNameInput(
|
||||
label: 'ORDER NAME',
|
||||
value: state.eventName,
|
||||
onChanged: (String value) => BlocProvider.of<OneTimeOrderBloc>(
|
||||
context,
|
||||
).add(OneTimeOrderEventNameChanged(value)),
|
||||
),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
// Vendor Selection
|
||||
Text('SELECT VENDOR', style: UiTypography.footnote2r.textSecondary),
|
||||
const SizedBox(height: 8),
|
||||
@@ -179,12 +193,43 @@ class _OneTimeOrderForm extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
OneTimeOrderLocationInput(
|
||||
label: labels.location_label,
|
||||
value: state.location,
|
||||
onChanged: (String location) => BlocProvider.of<OneTimeOrderBloc>(
|
||||
context,
|
||||
).add(OneTimeOrderLocationChanged(location)),
|
||||
Text('HUB', style: UiTypography.footnote2r.textSecondary),
|
||||
const SizedBox(height: 8),
|
||||
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<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),
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ dependencies:
|
||||
krow_data_connect:
|
||||
path: ../../../data_connect
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
firebase_auth: ^6.1.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
library client_home;
|
||||
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:krow_data_connect/krow_data_connect.dart';
|
||||
import 'src/data/repositories_impl/home_repository_impl.dart';
|
||||
|
||||
@@ -89,6 +89,14 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
end: _toTimestamp(end),
|
||||
)
|
||||
.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 totalFilled = 0;
|
||||
@@ -169,7 +177,8 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
}
|
||||
|
||||
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 nanos = (millis % 1000) * 1000000;
|
||||
return fdc.Timestamp(nanos, seconds);
|
||||
|
||||
@@ -26,6 +26,8 @@ class ClientHomeBloc extends Bloc<ClientHomeEvent, ClientHomeState> {
|
||||
on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled);
|
||||
on<ClientHomeWidgetReordered>(_onWidgetReordered);
|
||||
on<ClientHomeLayoutReset>(_onLayoutReset);
|
||||
|
||||
add(ClientHomeStarted());
|
||||
}
|
||||
|
||||
Future<void> _onStarted(
|
||||
|
||||
@@ -35,12 +35,12 @@ class ClientHomeState extends Equatable {
|
||||
this.isEditMode = false,
|
||||
this.errorMessage,
|
||||
this.dashboardData = const HomeDashboardData(
|
||||
weeklySpending: 4250.0,
|
||||
next7DaysSpending: 6100.0,
|
||||
weeklyShifts: 12,
|
||||
next7DaysScheduled: 18,
|
||||
totalNeeded: 10,
|
||||
totalFilled: 8,
|
||||
weeklySpending: 0.0,
|
||||
next7DaysSpending: 0.0,
|
||||
weeklyShifts: 0,
|
||||
next7DaysScheduled: 0,
|
||||
totalNeeded: 0,
|
||||
totalFilled: 0,
|
||||
),
|
||||
this.reorderItems = const <ReorderItem>[],
|
||||
this.businessName = 'Your Company',
|
||||
|
||||
@@ -34,10 +34,7 @@ class ClientHomeSheets {
|
||||
builder: (BuildContext context) {
|
||||
return ShiftOrderFormSheet(
|
||||
initialData: initialData,
|
||||
onSubmit: (Map<String, dynamic> data) {
|
||||
Navigator.pop(context);
|
||||
onSubmit(data);
|
||||
},
|
||||
onSubmit: onSubmit,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -24,8 +24,7 @@ class ClientHomePage extends StatelessWidget {
|
||||
final TranslationsClientHomeEn i18n = t.client_home;
|
||||
|
||||
return BlocProvider<ClientHomeBloc>(
|
||||
create: (BuildContext context) =>
|
||||
Modular.get<ClientHomeBloc>()..add(ClientHomeStarted()),
|
||||
create: (BuildContext context) => Modular.get<ClientHomeBloc>(),
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
@@ -59,19 +58,15 @@ class ClientHomePage extends StatelessWidget {
|
||||
100,
|
||||
),
|
||||
onReorder: (int oldIndex, int newIndex) {
|
||||
BlocProvider.of<ClientHomeBloc>(context).add(
|
||||
ClientHomeWidgetReordered(oldIndex, newIndex),
|
||||
);
|
||||
BlocProvider.of<ClientHomeBloc>(
|
||||
context,
|
||||
).add(ClientHomeWidgetReordered(oldIndex, newIndex));
|
||||
},
|
||||
children: state.widgetOrder.map((String id) {
|
||||
return Container(
|
||||
key: ValueKey(id),
|
||||
key: ValueKey<String>(id),
|
||||
margin: const EdgeInsets.only(bottom: UiConstants.space4),
|
||||
child: DashboardWidgetBuilder(
|
||||
id: id,
|
||||
state: state,
|
||||
isEditMode: true,
|
||||
),
|
||||
child: DashboardWidgetBuilder(id: id, state: state, isEditMode: true),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
|
||||
@@ -24,21 +24,22 @@ class ActionsWidget extends StatelessWidget {
|
||||
|
||||
return Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
title: i18n.rapid,
|
||||
subtitle: i18n.rapid_subtitle,
|
||||
icon: UiIcons.zap,
|
||||
color: const Color(0xFFFEF2F2),
|
||||
borderColor: const Color(0xFFFECACA),
|
||||
iconBgColor: const Color(0xFFFEE2E2),
|
||||
iconColor: const Color(0xFFDC2626),
|
||||
textColor: const Color(0xFF7F1D1D),
|
||||
subtitleColor: const Color(0xFFB91C1C),
|
||||
onTap: onRapidPressed,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
/// TODO: FEATURE_NOT_YET_IMPLEMENTED
|
||||
// Expanded(
|
||||
// child: _ActionCard(
|
||||
// title: i18n.rapid,
|
||||
// subtitle: i18n.rapid_subtitle,
|
||||
// icon: UiIcons.zap,
|
||||
// color: const Color(0xFFFEF2F2),
|
||||
// borderColor: const Color(0xFFFECACA),
|
||||
// iconBgColor: const Color(0xFFFEE2E2),
|
||||
// iconColor: const Color(0xFFDC2626),
|
||||
// textColor: const Color(0xFF7F1D1D),
|
||||
// subtitleColor: const Color(0xFFB91C1C),
|
||||
// onTap: onRapidPressed,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(width: UiConstants.space2),
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
title: i18n.create_order,
|
||||
|
||||
@@ -25,11 +25,12 @@ class CoverageDashboard extends StatelessWidget {
|
||||
for (final s in shifts) {
|
||||
final int needed = s['workersNeeded'] 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;
|
||||
totalConfirmed += confirmed;
|
||||
todayCost += rate * 8 * confirmed;
|
||||
todayCost += rate * hours;
|
||||
}
|
||||
|
||||
final int coveragePercent = totalNeeded > 0
|
||||
@@ -104,15 +105,13 @@ class CoverageDashboard extends StatelessWidget {
|
||||
icon: UiIcons.warning,
|
||||
isWarning: unfilledPositions > 0,
|
||||
),
|
||||
if (lateWorkersCount > 0) ...<Widget>[
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
_StatusCard(
|
||||
label: 'Running Late',
|
||||
value: '$lateWorkersCount',
|
||||
icon: UiIcons.error,
|
||||
isError: true,
|
||||
),
|
||||
],
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
_StatusCard(
|
||||
label: 'Running Late',
|
||||
value: '$lateWorkersCount',
|
||||
icon: UiIcons.error,
|
||||
isError: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -122,7 +121,7 @@ class CoverageDashboard extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
_StatusCard(
|
||||
label: 'Checked In',
|
||||
value: '$checkedInCount/$totalConfirmed',
|
||||
value: '$checkedInCount/$totalNeeded',
|
||||
icon: UiIcons.success,
|
||||
isInfo: true,
|
||||
),
|
||||
|
||||
@@ -15,9 +15,9 @@ class CoverageWidget extends StatelessWidget {
|
||||
/// Creates a [CoverageWidget].
|
||||
const CoverageWidget({
|
||||
super.key,
|
||||
this.totalNeeded = 10,
|
||||
this.totalConfirmed = 8,
|
||||
this.coveragePercent = 80,
|
||||
this.totalNeeded = 0,
|
||||
this.totalConfirmed = 0,
|
||||
this.coveragePercent = 0,
|
||||
});
|
||||
|
||||
@override
|
||||
|
||||
@@ -70,7 +70,21 @@ class DashboardWidgetBuilder extends StatelessWidget {
|
||||
context,
|
||||
data,
|
||||
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(),
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -31,6 +31,15 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
|
||||
final DateTime now = DateTime.now();
|
||||
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 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,
|
||||
dc.ListStaffsApplicationsByBusinessForDayVariables> result =
|
||||
await dc.ExampleConnector.instance
|
||||
@@ -41,33 +50,20 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
|
||||
)
|
||||
.execute();
|
||||
|
||||
if (result.data.applications.isEmpty) {
|
||||
if (shiftRolesResult.data.shiftRoles.isEmpty &&
|
||||
result.data.applications.isEmpty) {
|
||||
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 totalAssigned = 0;
|
||||
double totalCost = 0;
|
||||
for (final _LiveShiftAggregate aggregate in aggregates.values) {
|
||||
totalNeeded += aggregate.workersNeeded;
|
||||
totalAssigned += aggregate.assigned;
|
||||
totalCost += aggregate.cost;
|
||||
for (final dc.ListShiftRolesByBusinessAndDateRangeShiftRoles shiftRole
|
||||
in shiftRolesResult.data.shiftRoles) {
|
||||
totalNeeded += shiftRole.count;
|
||||
totalCost += shiftRole.totalValue ?? 0;
|
||||
}
|
||||
|
||||
final int totalAssigned = result.data.applications.length;
|
||||
int lateCount = 0;
|
||||
int checkedInCount = 0;
|
||||
for (final dc.ListStaffsApplicationsByBusinessForDayApplications app
|
||||
@@ -92,9 +88,10 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
|
||||
}
|
||||
|
||||
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 =
|
||||
(dateTime.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
(utc.millisecondsSinceEpoch % 1000) * 1000000;
|
||||
return fdc.Timestamp(nanoseconds, seconds);
|
||||
}
|
||||
|
||||
@@ -136,9 +133,8 @@ class _LiveActivityWidgetState extends State<LiveActivityWidget> {
|
||||
<String, Object>{
|
||||
'workersNeeded': data.totalNeeded,
|
||||
'filled': data.totalAssigned,
|
||||
'hourlyRate': data.totalAssigned == 0
|
||||
? 0.0
|
||||
: data.totalCost / data.totalAssigned,
|
||||
'hourlyRate': 1.0,
|
||||
'hours': data.totalCost,
|
||||
'status': 'OPEN',
|
||||
'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;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:firebase_data_connect/firebase_data_connect.dart' as fdc;
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -52,6 +53,7 @@ class ShiftOrderFormSheet extends StatefulWidget {
|
||||
class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
late TextEditingController _dateController;
|
||||
late TextEditingController _globalLocationController;
|
||||
late TextEditingController _orderNameController;
|
||||
|
||||
late List<Map<String, dynamic>> _positions;
|
||||
|
||||
@@ -59,6 +61,10 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
List<_VendorOption> _vendors = const <_VendorOption>[];
|
||||
List<_RoleOption> _roles = const <_RoleOption>[];
|
||||
String? _selectedVendorId;
|
||||
List<dc.ListTeamHubsByOwnerIdTeamHubs> _hubs = const <dc.ListTeamHubsByOwnerIdTeamHubs>[];
|
||||
dc.ListTeamHubsByOwnerIdTeamHubs? _selectedHub;
|
||||
bool _showSuccess = false;
|
||||
Map<String, dynamic>? _submitData;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -75,6 +81,9 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
widget.initialData?['locationAddress'] ??
|
||||
'',
|
||||
);
|
||||
_orderNameController = TextEditingController(
|
||||
text: widget.initialData?['eventName']?.toString() ?? '',
|
||||
);
|
||||
|
||||
// Initialize positions
|
||||
_positions = <Map<String, dynamic>>[
|
||||
@@ -96,6 +105,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
];
|
||||
|
||||
_loadVendors();
|
||||
_loadHubs();
|
||||
_loadOrderDetails();
|
||||
}
|
||||
|
||||
@@ -103,6 +113,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
void dispose() {
|
||||
_dateController.dispose();
|
||||
_globalLocationController.dispose();
|
||||
_orderNameController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -187,9 +198,14 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
if (businessId == null || businessId.isEmpty) {
|
||||
return;
|
||||
}
|
||||
final dc.ListTeamHubsByOwnerIdTeamHubs? selectedHub = _selectedHub;
|
||||
if (selectedHub == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
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 =
|
||||
_orderTypeFromValue(widget.initialData?['type']?.toString());
|
||||
|
||||
@@ -198,9 +214,10 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
.createOrder(
|
||||
businessId: businessId,
|
||||
orderType: orderType,
|
||||
teamHubId: selectedHub.id,
|
||||
)
|
||||
.vendorId(_selectedVendorId)
|
||||
.location(_globalLocationController.text)
|
||||
.eventName(_orderNameController.text)
|
||||
.status(dc.OrderStatus.POSTED)
|
||||
.date(orderTimestamp)
|
||||
.execute();
|
||||
@@ -222,8 +239,15 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
shiftResult = await _dataConnect
|
||||
.createShift(title: shiftTitle, orderId: orderId)
|
||||
.date(orderTimestamp)
|
||||
.location(_globalLocationController.text)
|
||||
.locationAddress(_globalLocationController.text)
|
||||
.location(selectedHub.hubName)
|
||||
.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)
|
||||
.workersNeeded(workersNeeded)
|
||||
.filled(0)
|
||||
@@ -266,12 +290,17 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
}
|
||||
|
||||
await _dataConnect
|
||||
.updateOrder(id: orderId)
|
||||
.updateOrder(id: orderId, teamHubId: selectedHub.id)
|
||||
.shifts(fdc.AnyValue(<String>[shiftId]))
|
||||
.execute();
|
||||
|
||||
widget.onSubmit(<String, dynamic>{
|
||||
'orderId': orderId,
|
||||
if (!mounted) return;
|
||||
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 {
|
||||
try {
|
||||
final fdc.QueryResult<dc.ListRolesByVendorIdData, dc.ListRolesByVendorIdVariables>
|
||||
@@ -357,10 +415,14 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
|
||||
final dc.ListShiftRolesByBusinessAndOrderShiftRolesShift firstShift =
|
||||
shiftRoles.first.shift;
|
||||
_globalLocationController.text = firstShift.order.location ??
|
||||
firstShift.locationAddress ??
|
||||
firstShift.location ??
|
||||
_globalLocationController.text;
|
||||
final dc.ListShiftRolesByBusinessAndOrderShiftRolesShiftOrderTeamHub?
|
||||
teamHub = firstShift.order.teamHub;
|
||||
await _loadHubsAndSelect(
|
||||
placeId: teamHub?.placeId,
|
||||
hubName: teamHub?.hubName,
|
||||
address: teamHub?.address,
|
||||
);
|
||||
_orderNameController.text = firstShift.order.eventName ?? '';
|
||||
|
||||
final String? vendorId = firstShift.order.vendorId;
|
||||
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) {
|
||||
if (value == null) return '';
|
||||
try {
|
||||
@@ -472,7 +598,8 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
}
|
||||
|
||||
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 nanos = (millis % 1000) * 1000000;
|
||||
return fdc.Timestamp(nanos, seconds);
|
||||
@@ -480,6 +607,16 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
|
||||
@override
|
||||
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(
|
||||
height: MediaQuery.of(context).size.height * 0.95,
|
||||
decoration: const BoxDecoration(
|
||||
@@ -546,12 +683,16 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
_buildVendorDropdown(),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
_buildSectionHeader('ORDER NAME'),
|
||||
_buildOrderNameField(),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
_buildSectionHeader('DATE'),
|
||||
_buildDateField(),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
_buildSectionHeader('LOCATION'),
|
||||
_buildLocationField(),
|
||||
_buildSectionHeader('HUB'),
|
||||
_buildHubField(),
|
||||
const SizedBox(height: UiConstants.space5),
|
||||
|
||||
Row(
|
||||
@@ -783,7 +924,7 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLocationField() {
|
||||
Widget _buildHubField() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
|
||||
decoration: BoxDecoration(
|
||||
@@ -791,21 +932,52 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
const Icon(UiIcons.mapPin, size: 20, color: UiColors.iconSecondary),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _globalLocationController,
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Enter location address',
|
||||
border: InputBorder.none,
|
||||
),
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
),
|
||||
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.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({
|
||||
required String label,
|
||||
required String value,
|
||||
|
||||
@@ -22,6 +22,7 @@ dependencies:
|
||||
core_localization:
|
||||
path: ../../../core_localization
|
||||
krow_domain: ^0.0.1
|
||||
krow_data_connect: ^0.0.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:firebase_auth/firebase_auth.dart' as firebase;
|
||||
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_domain/krow_domain.dart' as domain;
|
||||
|
||||
import '../../domain/repositories/hub_repository_interface.dart';
|
||||
import '../../util/hubs_constants.dart';
|
||||
|
||||
/// Implementation of [HubRepositoryInterface] backed by Data Connect.
|
||||
class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
@@ -27,10 +31,24 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
Future<domain.Hub> createHub({
|
||||
required String name,
|
||||
required String address,
|
||||
String? placeId,
|
||||
double? latitude,
|
||||
double? longitude,
|
||||
String? city,
|
||||
String? state,
|
||||
String? street,
|
||||
String? country,
|
||||
String? zipCode,
|
||||
}) async {
|
||||
final dc.GetBusinessesByUserIdBusinesses business = await _getBusinessForCurrentUser();
|
||||
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
|
||||
.createTeamHub(
|
||||
@@ -38,7 +56,14 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
hubName: name,
|
||||
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();
|
||||
final String? createdId = result.data?.teamHub_insert.id;
|
||||
if (createdId == null) {
|
||||
@@ -69,6 +94,25 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
|
||||
@override
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -192,4 +236,99 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
||||
)
|
||||
.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;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,42 @@ class CreateHubArguments extends UseCaseArgument {
|
||||
/// The physical address of the hub.
|
||||
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.
|
||||
///
|
||||
/// 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
|
||||
List<Object?> get props => <Object?>[name, address];
|
||||
List<Object?> get props => <Object?>[
|
||||
name,
|
||||
address,
|
||||
placeId,
|
||||
latitude,
|
||||
longitude,
|
||||
city,
|
||||
state,
|
||||
street,
|
||||
country,
|
||||
zipCode,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -15,7 +15,18 @@ abstract interface class HubRepositoryInterface {
|
||||
///
|
||||
/// Takes the [name] and [address] of the new hub.
|
||||
/// 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].
|
||||
Future<void> deleteHub(String id);
|
||||
|
||||
@@ -21,6 +21,14 @@ class CreateHubUseCase implements UseCase<CreateHubArguments, Hub> {
|
||||
return _repository.createHub(
|
||||
name: arguments.name,
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,18 @@ class ClientHubsBloc extends Bloc<ClientHubsEvent, ClientHubsState>
|
||||
emit(state.copyWith(status: ClientHubsStatus.actionInProgress));
|
||||
try {
|
||||
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();
|
||||
emit(
|
||||
|
||||
@@ -18,11 +18,41 @@ class ClientHubsFetched extends ClientHubsEvent {
|
||||
class ClientHubsAddRequested extends ClientHubsEvent {
|
||||
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;
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
@@ -27,8 +27,12 @@ class ClientHubsPage extends StatelessWidget {
|
||||
create: (BuildContext context) =>
|
||||
Modular.get<ClientHubsBloc>()..add(const ClientHubsFetched()),
|
||||
child: BlocConsumer<ClientHubsBloc, ClientHubsState>(
|
||||
listenWhen: (ClientHubsState previous, ClientHubsState current) {
|
||||
return previous.errorMessage != current.errorMessage ||
|
||||
previous.successMessage != current.successMessage;
|
||||
},
|
||||
listener: (BuildContext context, ClientHubsState state) {
|
||||
if (state.errorMessage != null) {
|
||||
if (state.errorMessage != null && state.errorMessage!.isNotEmpty) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(state.errorMessage!)));
|
||||
@@ -36,7 +40,7 @@ class ClientHubsPage extends StatelessWidget {
|
||||
context,
|
||||
).add(const ClientHubsMessageCleared());
|
||||
}
|
||||
if (state.successMessage != null) {
|
||||
if (state.successMessage != null && state.successMessage!.isNotEmpty) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(state.successMessage!)));
|
||||
@@ -106,9 +110,21 @@ class ClientHubsPage extends StatelessWidget {
|
||||
),
|
||||
if (state.showAddHubDialog)
|
||||
AddHubDialog(
|
||||
onCreate: (String name, String address) {
|
||||
onCreate: (
|
||||
String name,
|
||||
String address, {
|
||||
String? placeId,
|
||||
double? latitude,
|
||||
double? longitude,
|
||||
}) {
|
||||
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>(
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.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.
|
||||
class AddHubDialog extends StatefulWidget {
|
||||
/// 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.
|
||||
final VoidCallback onCancel;
|
||||
@@ -24,18 +33,22 @@ class AddHubDialog extends StatefulWidget {
|
||||
class _AddHubDialogState extends State<AddHubDialog> {
|
||||
late final TextEditingController _nameController;
|
||||
late final TextEditingController _addressController;
|
||||
late final FocusNode _addressFocusNode;
|
||||
Prediction? _selectedPrediction;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_nameController = TextEditingController();
|
||||
_addressController = TextEditingController();
|
||||
_addressFocusNode = FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nameController.dispose();
|
||||
_addressController.dispose();
|
||||
_addressFocusNode.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -74,12 +87,13 @@ class _AddHubDialogState extends State<AddHubDialog> {
|
||||
),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildFieldLabel(t.client_hubs.add_hub_dialog.address_label),
|
||||
TextField(
|
||||
HubAddressAutocomplete(
|
||||
controller: _addressController,
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
decoration: _buildInputDecoration(
|
||||
t.client_hubs.add_hub_dialog.address_hint,
|
||||
),
|
||||
hintText: t.client_hubs.add_hub_dialog.address_hint,
|
||||
focusNode: _addressFocusNode,
|
||||
onSelected: (Prediction prediction) {
|
||||
_selectedPrediction = prediction;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: UiConstants.space8),
|
||||
Row(
|
||||
@@ -98,6 +112,13 @@ class _AddHubDialogState extends State<AddHubDialog> {
|
||||
widget.onCreate(
|
||||
_nameController.text,
|
||||
_addressController.text,
|
||||
placeId: _selectedPrediction?.placeId,
|
||||
latitude: double.tryParse(
|
||||
_selectedPrediction?.lat ?? '',
|
||||
),
|
||||
longitude: double.tryParse(
|
||||
_selectedPrediction?.lng ?? '',
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class HubsConstants {
|
||||
static const String googlePlacesApiKey = String.fromEnvironment('GOOGLE_PLACES_API_KEY');
|
||||
static const List<String> supportedCountries = <String>['us'];
|
||||
}
|
||||
@@ -11,11 +11,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.2
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
|
||||
|
||||
# Architecture Packages
|
||||
krow_core:
|
||||
path: ../../../core
|
||||
@@ -27,8 +23,15 @@ dependencies:
|
||||
path: ../../../design_system
|
||||
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_data_connect: ^0.2.2+2
|
||||
google_places_flutter: ^2.1.1
|
||||
http: ^1.2.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -62,10 +62,13 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
|
||||
'end=${shiftRole.endTime?.toJson()} hours=$hours totalValue=$totalValue',
|
||||
);
|
||||
|
||||
final String eventName =
|
||||
shiftRole.shift.order.eventName ?? shiftRole.shift.title;
|
||||
|
||||
return domain.OrderItem(
|
||||
id: _shiftRoleKey(shiftRole.shiftId, shiftRole.roleId),
|
||||
orderId: shiftRole.shift.order.id,
|
||||
title: '${shiftRole.role.name} - ${shiftRole.shift.title}',
|
||||
title: '${shiftRole.role.name} - $eventName',
|
||||
clientName: businessName,
|
||||
status: status,
|
||||
date: dateStr,
|
||||
@@ -117,6 +120,8 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
|
||||
'worker_name': application.staff.fullName,
|
||||
'status': 'confirmed',
|
||||
'photo_url': application.staff.photoUrl,
|
||||
'phone': application.staff.phone,
|
||||
'rating': application.staff.averageRating,
|
||||
});
|
||||
}
|
||||
return grouped;
|
||||
@@ -145,7 +150,7 @@ class ViewOrdersRepositoryImpl implements IViewOrdersRepository {
|
||||
if (timestamp == null) {
|
||||
return '';
|
||||
}
|
||||
final DateTime dateTime = timestamp.toDateTime();
|
||||
final DateTime dateTime = timestamp.toDateTime().toLocal();
|
||||
return DateFormat('HH:mm').format(dateTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
|
||||
|
||||
final GetOrdersUseCase _getOrdersUseCase;
|
||||
final GetAcceptedApplicationsForDayUseCase _getAcceptedAppsUseCase;
|
||||
int _requestId = 0;
|
||||
|
||||
void _init() {
|
||||
updateWeekOffset(0); // Initialize calendar days
|
||||
@@ -33,6 +34,7 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
|
||||
required DateTime rangeEnd,
|
||||
required DateTime dayForApps,
|
||||
}) async {
|
||||
final int requestId = ++_requestId;
|
||||
emit(state.copyWith(status: ViewOrdersStatus.loading));
|
||||
try {
|
||||
final List<OrderItem> orders = await _getOrdersUseCase(
|
||||
@@ -42,6 +44,9 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
|
||||
OrdersDayArguments(day: dayForApps),
|
||||
);
|
||||
final List<OrderItem> updatedOrders = _applyApplications(orders, apps);
|
||||
if (requestId != _requestId) {
|
||||
return;
|
||||
}
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: ViewOrdersStatus.success,
|
||||
@@ -50,6 +55,9 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
|
||||
);
|
||||
_updateDerivedState();
|
||||
} catch (_) {
|
||||
if (requestId != _requestId) {
|
||||
return;
|
||||
}
|
||||
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() {
|
||||
final List<OrderItem> filteredOrders = _calculateFilteredOrders(state);
|
||||
final int activeCount = _calculateCategoryCount('active');
|
||||
|
||||
@@ -20,24 +20,53 @@ import '../navigation/view_orders_navigator.dart';
|
||||
/// - Adhering to the project's Design System.
|
||||
class ViewOrdersPage extends StatelessWidget {
|
||||
/// Creates a [ViewOrdersPage].
|
||||
const ViewOrdersPage({super.key});
|
||||
const ViewOrdersPage({super.key, this.initialDate});
|
||||
|
||||
final DateTime? initialDate;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider<ViewOrdersCubit>(
|
||||
create: (BuildContext context) => Modular.get<ViewOrdersCubit>(),
|
||||
child: const ViewOrdersView(),
|
||||
child: ViewOrdersView(initialDate: initialDate),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// The internal view implementation for [ViewOrdersPage].
|
||||
class ViewOrdersView extends StatelessWidget {
|
||||
class ViewOrdersView extends StatefulWidget {
|
||||
/// 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
|
||||
Widget build(BuildContext context) {
|
||||
if (_cubit == null) {
|
||||
_cubit = BlocProvider.of<ViewOrdersCubit>(context);
|
||||
}
|
||||
return BlocBuilder<ViewOrdersCubit, ViewOrdersState>(
|
||||
builder: (BuildContext context, ViewOrdersState state) {
|
||||
final List<DateTime> calendarDays = state.calendarDays;
|
||||
@@ -218,6 +247,7 @@ class ViewOrdersView extends StatelessWidget {
|
||||
label: t.client_view_orders.tabs.up_next,
|
||||
isSelected: state.filterTab == 'all',
|
||||
tabId: 'all',
|
||||
count: state.upNextCount,
|
||||
),
|
||||
const SizedBox(width: UiConstants.space6),
|
||||
_buildFilterTab(
|
||||
@@ -225,7 +255,7 @@ class ViewOrdersView extends StatelessWidget {
|
||||
label: t.client_view_orders.tabs.active,
|
||||
isSelected: state.filterTab == 'active',
|
||||
tabId: 'active',
|
||||
count: state.activeCount + state.upNextCount,
|
||||
count: state.activeCount,
|
||||
),
|
||||
const SizedBox(width: UiConstants.space6),
|
||||
_buildFilterTab(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user