spending in home view working

This commit is contained in:
José Salazar
2026-01-27 15:00:25 -05:00
parent dbd4c2fdc8
commit 4cdbebf2c0
6 changed files with 17246 additions and 16776 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.listRoleCategories().execute();
ExampleConnector.instance.getRoleCategoryById(getRoleCategoryByIdVariables).execute();
ExampleConnector.instance.getRoleCategoriesByCategory(getRoleCategoriesByCategoryVariables).execute();
ExampleConnector.instance.createCourse(createCourseVariables).execute();
ExampleConnector.instance.updateCourse(updateCourseVariables).execute();
ExampleConnector.instance.deleteCourse(deleteCourseVariables).execute();
ExampleConnector.instance.listAttireOptions().execute();
ExampleConnector.instance.getAttireOptionById(getAttireOptionByIdVariables).execute();
ExampleConnector.instance.filterAttireOptions(filterAttireOptionsVariables).execute();
ExampleConnector.instance.listFaqDatas().execute();
ExampleConnector.instance.listClientFeedbacks(listClientFeedbacksVariables).execute();
ExampleConnector.instance.getClientFeedbackById(getClientFeedbackByIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVariables).execute();
ExampleConnector.instance.filterClientFeedbacks(filterClientFeedbacksVariables).execute();
ExampleConnector.instance.listClientFeedbackRatingsByVendorId(listClientFeedbackRatingsByVendorIdVariables).execute();
ExampleConnector.instance.createStaffAvailabilityStats(createStaffAvailabilityStatsVariables).execute();
ExampleConnector.instance.updateStaffAvailabilityStats(updateStaffAvailabilityStatsVariables).execute();
ExampleConnector.instance.deleteStaffAvailabilityStats(deleteStaffAvailabilityStatsVariables).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.updateWorkforce({ ... })
.workforceNumber(...)
await ExampleConnector.instance.listWorkforceByStaffId({ ... })
.offset(...)
.execute();
```

View File

@@ -0,0 +1,268 @@
part of 'generated.dart';
class GetCompletedShiftsByBusinessIdVariablesBuilder {
String businessId;
Timestamp dateFrom;
Timestamp dateTo;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; GetCompletedShiftsByBusinessIdVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
GetCompletedShiftsByBusinessIdVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
GetCompletedShiftsByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,required this.dateFrom,required this.dateTo,});
Deserializer<GetCompletedShiftsByBusinessIdData> dataDeserializer = (dynamic json) => GetCompletedShiftsByBusinessIdData.fromJson(jsonDecode(json));
Serializer<GetCompletedShiftsByBusinessIdVariables> varsSerializer = (GetCompletedShiftsByBusinessIdVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables>> execute() {
return ref().execute();
}
QueryRef<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables> ref() {
GetCompletedShiftsByBusinessIdVariables vars= GetCompletedShiftsByBusinessIdVariables(businessId: businessId,dateFrom: dateFrom,dateTo: dateTo,offset: _offset,limit: _limit,);
return _dataConnect.query("getCompletedShiftsByBusinessId", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class GetCompletedShiftsByBusinessIdShifts {
final String id;
final Timestamp? date;
final Timestamp? startTime;
final Timestamp? endTime;
final double? hours;
final double? cost;
final int? workersNeeded;
final int? filled;
final Timestamp? createdAt;
final GetCompletedShiftsByBusinessIdShiftsOrder order;
GetCompletedShiftsByBusinessIdShifts.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
cost = json['cost'] == null ? null : nativeFromJson<double>(json['cost']),
workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson<int>(json['workersNeeded']),
filled = json['filled'] == null ? null : nativeFromJson<int>(json['filled']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
order = GetCompletedShiftsByBusinessIdShiftsOrder.fromJson(json['order']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetCompletedShiftsByBusinessIdShifts otherTyped = other as GetCompletedShiftsByBusinessIdShifts;
return id == otherTyped.id &&
date == otherTyped.date &&
startTime == otherTyped.startTime &&
endTime == otherTyped.endTime &&
hours == otherTyped.hours &&
cost == otherTyped.cost &&
workersNeeded == otherTyped.workersNeeded &&
filled == otherTyped.filled &&
createdAt == otherTyped.createdAt &&
order == otherTyped.order;
}
@override
int get hashCode => Object.hashAll([id.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, workersNeeded.hashCode, filled.hashCode, createdAt.hashCode, order.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if (date != null) {
json['date'] = date!.toJson();
}
if (startTime != null) {
json['startTime'] = startTime!.toJson();
}
if (endTime != null) {
json['endTime'] = endTime!.toJson();
}
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
if (cost != null) {
json['cost'] = nativeToJson<double?>(cost);
}
if (workersNeeded != null) {
json['workersNeeded'] = nativeToJson<int?>(workersNeeded);
}
if (filled != null) {
json['filled'] = nativeToJson<int?>(filled);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
json['order'] = order.toJson();
return json;
}
GetCompletedShiftsByBusinessIdShifts({
required this.id,
this.date,
this.startTime,
this.endTime,
this.hours,
this.cost,
this.workersNeeded,
this.filled,
this.createdAt,
required this.order,
});
}
@immutable
class GetCompletedShiftsByBusinessIdShiftsOrder {
final EnumValue<OrderStatus> status;
GetCompletedShiftsByBusinessIdShiftsOrder.fromJson(dynamic json):
status = orderStatusDeserializer(json['status']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetCompletedShiftsByBusinessIdShiftsOrder otherTyped = other as GetCompletedShiftsByBusinessIdShiftsOrder;
return status == otherTyped.status;
}
@override
int get hashCode => status.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['status'] =
orderStatusSerializer(status)
;
return json;
}
GetCompletedShiftsByBusinessIdShiftsOrder({
required this.status,
});
}
@immutable
class GetCompletedShiftsByBusinessIdData {
final List<GetCompletedShiftsByBusinessIdShifts> shifts;
GetCompletedShiftsByBusinessIdData.fromJson(dynamic json):
shifts = (json['shifts'] as List<dynamic>)
.map((e) => GetCompletedShiftsByBusinessIdShifts.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final GetCompletedShiftsByBusinessIdData otherTyped = other as GetCompletedShiftsByBusinessIdData;
return shifts == otherTyped.shifts;
}
@override
int get hashCode => shifts.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shifts'] = shifts.map((e) => e.toJson()).toList();
return json;
}
GetCompletedShiftsByBusinessIdData({
required this.shifts,
});
}
@immutable
class GetCompletedShiftsByBusinessIdVariables {
final String businessId;
final Timestamp dateFrom;
final Timestamp dateTo;
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.')
GetCompletedShiftsByBusinessIdVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
dateFrom = Timestamp.fromJson(json['dateFrom']),
dateTo = Timestamp.fromJson(json['dateTo']) {
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 GetCompletedShiftsByBusinessIdVariables otherTyped = other as GetCompletedShiftsByBusinessIdVariables;
return businessId == otherTyped.businessId &&
dateFrom == otherTyped.dateFrom &&
dateTo == otherTyped.dateTo &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, dateFrom.hashCode, dateTo.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['dateFrom'] = dateFrom.toJson();
json['dateTo'] = dateTo.toJson();
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
GetCompletedShiftsByBusinessIdVariables({
required this.businessId,
required this.dateFrom,
required this.dateTo,
required this.offset,
required this.limit,
});
}