|
|
|
@ -96,16 +96,16 @@ class GasRefillProvider extends ChangeNotifier {
|
|
|
|
Map<String, dynamic> body = {
|
|
|
|
Map<String, dynamic> body = {
|
|
|
|
"uid": user.id.toString(),
|
|
|
|
"uid": user.id.toString(),
|
|
|
|
"token": user.token ?? "",
|
|
|
|
"token": user.token ?? "",
|
|
|
|
"site": hospital?.toMap(),
|
|
|
|
"site": model.site?.toJson(),
|
|
|
|
"building": {"id": building?.id, "name": building?.name, "value": building?.value},
|
|
|
|
"building": model.building != null ? {"id": model.building?.id, "name": model.building?.name, "value": model.building?.value} : null,
|
|
|
|
"floor": {"id": floor?.id, "name": floor?.name, "value": floor?.value},
|
|
|
|
"floor": model.floor != null ? {"id": model.floor?.id, "name": model.floor?.name, "value": model.floor?.value} : null,
|
|
|
|
//if (expectedDateTime != null) "expectedDate": expectedDateTime?.toIso8601String(),
|
|
|
|
//if (expectedDateTime != null) "expectedDate": expectedDateTime?.toIso8601String(),
|
|
|
|
if (expectedDateTime != null) "expectedTime": expectedDateTime?.toIso8601String(),
|
|
|
|
if (expectedDateTime != null) "expectedTime": expectedDateTime?.toIso8601String(),
|
|
|
|
if (timer?.startAt != null) "startDate": timer.startAt.toIso8601String(),
|
|
|
|
if (timer?.startAt != null) "startDate": timer.startAt.toIso8601String(),
|
|
|
|
if (timer?.startAt != null) "startTime": timer.startAt.toIso8601String(),
|
|
|
|
if (timer?.startAt != null) "startTime": timer.startAt.toIso8601String(),
|
|
|
|
if (timer?.endAt != null) "endDate": timer.endAt.toIso8601String(),
|
|
|
|
if (timer?.endAt != null) "endDate": timer.endAt.toIso8601String(),
|
|
|
|
if (timer?.endAt != null) "endTime": timer.endAt.toIso8601String(),
|
|
|
|
if (timer?.endAt != null) "endTime": timer.endAt.toIso8601String(),
|
|
|
|
"department": {"id": department?.id, "departmentName": department?.name, "departmentCode": "", "ntCode": ""},
|
|
|
|
"department": model.department?.toJson(),
|
|
|
|
"GazRefillNo": "GR-${DateTime.now().toString().split(" ").first}",
|
|
|
|
"GazRefillNo": "GR-${DateTime.now().toString().split(" ").first}",
|
|
|
|
"status": model.status?.toMap(),
|
|
|
|
"status": model.status?.toMap(),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|