|
|
|
|
@ -50,7 +50,7 @@ class TaskData {
|
|
|
|
|
int? id;
|
|
|
|
|
int? statusValue;
|
|
|
|
|
String? taskJobNo;
|
|
|
|
|
User? userCreated;
|
|
|
|
|
TaskContactUser? userCreated;
|
|
|
|
|
List<TaskJobContactPerson>? taskJobContactPersons;
|
|
|
|
|
TaskTypeModel? taskType;
|
|
|
|
|
TaskJobStatus? taskJobStatus;
|
|
|
|
|
@ -62,7 +62,7 @@ class TaskData {
|
|
|
|
|
Rooms? room;
|
|
|
|
|
String? callComment;
|
|
|
|
|
List<TaskJobAttachment>? taskJobAttachments;
|
|
|
|
|
User? assignedEngineer;
|
|
|
|
|
TaskContactUser? assignedEngineer;
|
|
|
|
|
List<TaskJobAssistantEmployees>? taskJobAssistantEmployees;
|
|
|
|
|
TaskJobAssistantEmployees? modelAssistantEmployees;
|
|
|
|
|
List<AssistantEmployees>? assistantEmployees;
|
|
|
|
|
@ -83,7 +83,7 @@ class TaskData {
|
|
|
|
|
String? estimationDeliveryDate;
|
|
|
|
|
String? reasonOfFSCA;
|
|
|
|
|
String? correctiveActionDescription;
|
|
|
|
|
User? evaluatorUser;
|
|
|
|
|
TaskContactUser? evaluatorUser;
|
|
|
|
|
List<TaskJobActivityEngineerTimer>? taskJobActivityEngineerTimers = [];
|
|
|
|
|
TimerModel? taskTimerModel = TimerModel();
|
|
|
|
|
double? totalWorkingHours = 0.0;
|
|
|
|
|
@ -133,7 +133,8 @@ class TaskData {
|
|
|
|
|
TaskData.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
taskJobNo = json['taskJobNo'];
|
|
|
|
|
userCreated = json['userCreated'] != null ? User.fromJson(json['userCreated']) : null;
|
|
|
|
|
userCreated = json['userCreated'] != null ? TaskContactUser.fromJson(json['userCreated']) : null;
|
|
|
|
|
|
|
|
|
|
if (json['taskJobContactPersons'] != null) {
|
|
|
|
|
taskJobContactPersons = <TaskJobContactPerson>[];
|
|
|
|
|
json['taskJobContactPersons'].forEach((v) {
|
|
|
|
|
@ -155,7 +156,8 @@ class TaskData {
|
|
|
|
|
taskJobAttachments!.add(TaskJobAttachment.fromJson(v));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
assignedEngineer = json['assignedEngineer'] != null ? User.fromJson(json['assignedEngineer']) : null;
|
|
|
|
|
assignedEngineer = json['assignedEngineer'] != null ? TaskContactUser.fromJson(json['assignedEngineer']) : null;
|
|
|
|
|
|
|
|
|
|
asset = json['asset'] != null ? TaskAsset.fromJson(json['asset']) : null;
|
|
|
|
|
if (json['taskJobAssistantEmployees'] != null) {
|
|
|
|
|
taskJobAssistantEmployees = <TaskJobAssistantEmployees>[];
|
|
|
|
|
@ -205,7 +207,7 @@ class TaskData {
|
|
|
|
|
estimationDeliveryDate = json['estimationDeliveryDate'];
|
|
|
|
|
reasonOfFSCA = json['reasonOfFSCA'];
|
|
|
|
|
correctiveActionDescription = json['correctiveActionDescription'];
|
|
|
|
|
evaluatorUser = json['evaluatorUser'] != null ? User.fromJson(json['evaluatorUser']) : null;
|
|
|
|
|
evaluatorUser = json['evaluatorUser'] != null ? TaskContactUser.fromJson(json['evaluatorUser']) : null;
|
|
|
|
|
|
|
|
|
|
site = json["site"] == null ? null : Site.fromJson(json["site"]);
|
|
|
|
|
building = json["building"] == null ? null : Building.fromJson(json["building"]);
|
|
|
|
|
@ -248,6 +250,7 @@ class TaskData {
|
|
|
|
|
if (assignedEngineer != null) {
|
|
|
|
|
data['assignedEngineer'] = assignedEngineer!.toJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (taskJobAssistantEmployees != null) {
|
|
|
|
|
data['taskJobAssistantEmployees'] = taskJobAssistantEmployees!.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
@ -349,41 +352,57 @@ class TaskJobActivityEngineerTimer {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class User {
|
|
|
|
|
final String? userId;
|
|
|
|
|
final String? userName;
|
|
|
|
|
final String? email;
|
|
|
|
|
final String? employeeId;
|
|
|
|
|
final int? languageId;
|
|
|
|
|
|
|
|
|
|
User({this.userId, this.userName, this.email, this.employeeId, this.languageId});
|
|
|
|
|
|
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) => User(
|
|
|
|
|
userId: json['userId'],
|
|
|
|
|
userName: json['userName'],
|
|
|
|
|
email: json['email'],
|
|
|
|
|
employeeId: json['employeeId'],
|
|
|
|
|
languageId: json['languageId'],
|
|
|
|
|
);
|
|
|
|
|
class TaskContactUser {
|
|
|
|
|
String? userId;
|
|
|
|
|
String? userName;
|
|
|
|
|
String? email;
|
|
|
|
|
String? employeeId;
|
|
|
|
|
int? languageId;
|
|
|
|
|
String? extensionNo;
|
|
|
|
|
String? phoneNumber;
|
|
|
|
|
|
|
|
|
|
TaskContactUser({
|
|
|
|
|
this.userId,
|
|
|
|
|
this.userName,
|
|
|
|
|
this.email,
|
|
|
|
|
this.employeeId,
|
|
|
|
|
this.languageId,
|
|
|
|
|
this.extensionNo,
|
|
|
|
|
this.phoneNumber,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
|
'userId': userId,
|
|
|
|
|
'userName': userName,
|
|
|
|
|
'email': email,
|
|
|
|
|
'employeeId': employeeId,
|
|
|
|
|
'languageId': languageId,
|
|
|
|
|
};
|
|
|
|
|
TaskContactUser.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
userId = json['userId'];
|
|
|
|
|
userName = json['userName'];
|
|
|
|
|
email = json['email'];
|
|
|
|
|
employeeId = json['employeeId'];
|
|
|
|
|
languageId = json['languageId'];
|
|
|
|
|
extensionNo = json['extensionNo'];
|
|
|
|
|
phoneNumber = json['phoneNumber'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
return {
|
|
|
|
|
'userId': userId,
|
|
|
|
|
'userName': userName,
|
|
|
|
|
'email': email,
|
|
|
|
|
'employeeId': employeeId,
|
|
|
|
|
'languageId': languageId,
|
|
|
|
|
'extensionNo': extensionNo,
|
|
|
|
|
'phoneNumber': phoneNumber,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class TaskJobContactPerson {
|
|
|
|
|
final int? id;
|
|
|
|
|
final User? user;
|
|
|
|
|
final TaskContactUser? user;
|
|
|
|
|
|
|
|
|
|
TaskJobContactPerson({this.id, this.user});
|
|
|
|
|
|
|
|
|
|
factory TaskJobContactPerson.fromJson(Map<String, dynamic> json) => TaskJobContactPerson(
|
|
|
|
|
id: json['id'],
|
|
|
|
|
user: json['user'] != null ? User.fromJson(json['user']) : null,
|
|
|
|
|
user: json['user'] != null ? TaskContactUser.fromJson(json['user']) : null,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
|
@ -475,17 +494,20 @@ class TaskJobStatus {
|
|
|
|
|
class TaskJobAttachment {
|
|
|
|
|
final int? id;
|
|
|
|
|
final String? name;
|
|
|
|
|
String ?createdBy;
|
|
|
|
|
|
|
|
|
|
TaskJobAttachment({this.id, this.name});
|
|
|
|
|
TaskJobAttachment({this.id, this.name,this.createdBy});
|
|
|
|
|
|
|
|
|
|
factory TaskJobAttachment.fromJson(Map<String, dynamic> json) => TaskJobAttachment(
|
|
|
|
|
id: json['id'],
|
|
|
|
|
name: json['name'],
|
|
|
|
|
createdBy: json['createdBy'],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
|
'id': id,
|
|
|
|
|
'name': name,
|
|
|
|
|
'createdBy': createdBy,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -531,12 +553,12 @@ class TaskJobHistory {
|
|
|
|
|
final int? id;
|
|
|
|
|
final RelatedTo? action;
|
|
|
|
|
final TaskJobStatus? taskJobStatus;
|
|
|
|
|
final User? user;
|
|
|
|
|
final TaskContactUser? user;
|
|
|
|
|
final dynamic typeOfAlert;
|
|
|
|
|
final dynamic riskLevel;
|
|
|
|
|
final dynamic resource;
|
|
|
|
|
final dynamic actionNeeded;
|
|
|
|
|
final User? assignedEmployee;
|
|
|
|
|
final TaskContactUser? assignedEmployee;
|
|
|
|
|
final dynamic alertNo;
|
|
|
|
|
final String? estimationDeliveryDate;
|
|
|
|
|
final String? createdDate;
|
|
|
|
|
@ -570,12 +592,12 @@ class TaskJobHistory {
|
|
|
|
|
id: json['id'],
|
|
|
|
|
action: json['action'] != null ? RelatedTo.fromJson(json['action']) : null,
|
|
|
|
|
taskJobStatus: json['taskJobStatus'] != null ? TaskJobStatus.fromJson(json['taskJobStatus']) : null,
|
|
|
|
|
user: json['user'] != null ? User.fromJson(json['user']) : null,
|
|
|
|
|
user: json['user'] != null ? TaskContactUser.fromJson(json['user']) : null,
|
|
|
|
|
typeOfAlert: json['typeOfAlert'],
|
|
|
|
|
riskLevel: json['riskLevel'],
|
|
|
|
|
resource: json['resource'],
|
|
|
|
|
actionNeeded: json['actionNeeded'],
|
|
|
|
|
assignedEmployee: json['assignedEmployee'] != null ? User.fromJson(json['assignedEmployee']) : null,
|
|
|
|
|
assignedEmployee: json['assignedEmployee'] != null ? TaskContactUser.fromJson(json['assignedEmployee']) : null,
|
|
|
|
|
alertNo: json['alertNo'],
|
|
|
|
|
estimationDeliveryDate: json['estimationDeliveryDate'],
|
|
|
|
|
createdDate: json['createdDate'],
|
|
|
|
|
|