|
|
|
|
@ -117,7 +117,7 @@ class GenericAttachmentModel {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
name = json['attachmentName'];
|
|
|
|
|
moduleReferenceId = json['gasRefillId'];
|
|
|
|
|
documentType = json['attachmentType'] != null ? Lookup.fromJson(json['attachmentType']) : null;
|
|
|
|
|
documentType = json['documentType'] != null ? Lookup.fromJson(json['documentType']) : null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GenericAttachmentModel.fromIncidentJson(Map<String, dynamic> json) {
|
|
|
|
|
@ -199,8 +199,8 @@ class GenericAttachmentModel {
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['loanId'] = moduleReferenceId;
|
|
|
|
|
data['loanAttachmentTypeId'] = attachmentTypeId;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['loanAttachmentTypeId'] = documentType?.id;
|
|
|
|
|
// data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentDescription'] = attachmentDescription;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
@ -221,16 +221,6 @@ class GenericAttachmentModel {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TODO need to check where to use this need to verify with backend team.
|
|
|
|
|
Map<String, dynamic> toPpmJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['visitId'] = moduleReferenceId;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentURL'] = attachmentURL;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toGasRefillJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
@ -246,7 +236,7 @@ class GenericAttachmentModel {
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['incidentId'] = moduleReferenceId;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentDescription'] = attachmentDescription;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
@ -255,7 +245,7 @@ class GenericAttachmentModel {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentTypeId'] = documentType?.id;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -276,7 +266,7 @@ class GenericAttachmentModel {
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['name'] = name;
|
|
|
|
|
data['originalName'] = originalName;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentTypeId'] = documentType?.id;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -284,7 +274,7 @@ class GenericAttachmentModel {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['documentTypeId'] = documentType?.id;
|
|
|
|
|
data['attachmentTypeId'] = documentType?.id;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -297,6 +287,15 @@ class GenericAttachmentModel {
|
|
|
|
|
data['originalName'] = originalName;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
Map<String, dynamic> toInventoryJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['attachmentName'] = name;
|
|
|
|
|
data['attachmentURL'] = attachmentURL;
|
|
|
|
|
data['attachmentTypeId'] = documentType?.id;
|
|
|
|
|
data['originalName'] = originalName;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toTrafJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
|