|
|
|
|
@ -19,6 +19,7 @@ class ServiceRequest {
|
|
|
|
|
String date;
|
|
|
|
|
String audio;
|
|
|
|
|
int statusValue;
|
|
|
|
|
int statusId;
|
|
|
|
|
String statusLabel;
|
|
|
|
|
String reviewComment;
|
|
|
|
|
String comments;
|
|
|
|
|
@ -54,6 +55,7 @@ class ServiceRequest {
|
|
|
|
|
this.callComments,
|
|
|
|
|
this.statusLabel,
|
|
|
|
|
this.statusValue,
|
|
|
|
|
this.statusId,
|
|
|
|
|
this.departmentName,
|
|
|
|
|
this.deviceId,
|
|
|
|
|
this.audio,
|
|
|
|
|
@ -82,8 +84,7 @@ class ServiceRequest {
|
|
|
|
|
|
|
|
|
|
factory ServiceRequest.fromJson(Map<String, dynamic> parsedJson) {
|
|
|
|
|
List<String> images = [];
|
|
|
|
|
if(parsedJson["attachmentsCallRequest"]!=null)
|
|
|
|
|
if (parsedJson["attachmentsCallRequest"] is List) {
|
|
|
|
|
if (parsedJson["attachmentsCallRequest"] != null) if (parsedJson["attachmentsCallRequest"] is List) {
|
|
|
|
|
List list = parsedJson["attachmentsCallRequest"];
|
|
|
|
|
images = list.map((e) => URLs.getFileUrl(e["attachmentsCallRequest"])).toList();
|
|
|
|
|
}
|
|
|
|
|
@ -104,6 +105,7 @@ class ServiceRequest {
|
|
|
|
|
comments: parsedJson["comments"],
|
|
|
|
|
statusLabel: parsedJson["status"] == null ? null : parsedJson["status"]["name"],
|
|
|
|
|
statusValue: parsedJson["status"] == null ? null : parsedJson["status"]["value"],
|
|
|
|
|
statusId: parsedJson["status"] == null ? null : parsedJson["status"]["id"],
|
|
|
|
|
departmentName: parsedJson["asset"]["department"] != null ? parsedJson["asset"]["department"]["name"] : "",
|
|
|
|
|
engineerName: parsedJson["assignedEmployee"] == null ? null : parsedJson["assignedEmployee"]["name"],
|
|
|
|
|
engineerId: parsedJson["assignedEmployee"] == null ? null : parsedJson["assignedEmployee"]["id"],
|
|
|
|
|
|