|
|
|
@ -142,19 +142,19 @@ class GasRefillProvider extends ChangeNotifier {
|
|
|
|
@required GasRefillModel oldModel,
|
|
|
|
@required GasRefillModel oldModel,
|
|
|
|
@required GasRefillModel newModel,
|
|
|
|
@required GasRefillModel newModel,
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
|
|
|
|
print("${oldModel?.id} assigned EEEEE ${oldModel?.assignedEmployee?.toJson()}");
|
|
|
|
Map<String, dynamic> body = {
|
|
|
|
Map<String, dynamic> body = {
|
|
|
|
"id": newModel.id,
|
|
|
|
"id": newModel.id,
|
|
|
|
"gazRefillNo": newModel.title ?? "",
|
|
|
|
"gazRefillNo": newModel.title ?? "",
|
|
|
|
"status": newModel.status.toMap(),
|
|
|
|
"status": newModel.status.toMap(),
|
|
|
|
|
|
|
|
"expectedDate": oldModel.expectedDate?.toIso8601String(),
|
|
|
|
|
|
|
|
"expectedTime": oldModel.expectedDate?.toIso8601String(),
|
|
|
|
"startDate": startDate?.toIso8601String(),
|
|
|
|
"startDate": startDate?.toIso8601String(),
|
|
|
|
"startTime": startDate?.toIso8601String(),
|
|
|
|
"startTime": startDate?.toIso8601String(),
|
|
|
|
"endDate": endDate?.toIso8601String(),
|
|
|
|
"endDate": endDate?.toIso8601String(),
|
|
|
|
"endTime": endDate?.toIso8601String(),
|
|
|
|
"endTime": endDate?.toIso8601String(),
|
|
|
|
// "workingHours": 0,
|
|
|
|
"workingHours": ((endDate?.difference(startDate)?.inMinutes ?? 0) / 60),
|
|
|
|
// "assignedEmployee": {
|
|
|
|
"assignedEmployee": oldModel?.assignedEmployee?.toJson(),
|
|
|
|
// "id": "string",
|
|
|
|
|
|
|
|
// "name": "string"
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
"site": hospital?.toMap(),
|
|
|
|
"site": hospital?.toMap(),
|
|
|
|
"building": building?.toJson(includeFloors: false),
|
|
|
|
"building": building?.toJson(includeFloors: false),
|
|
|
|
"floor": floor?.toJson(includeDepartments: false),
|
|
|
|
"floor": floor?.toJson(includeDepartments: false),
|
|
|
|
|