diff --git a/lib/modules/traf_module/traf_request_detail_page.dart b/lib/modules/traf_module/traf_request_detail_page.dart index 5682b444..7283bf98 100644 --- a/lib/modules/traf_module/traf_request_detail_page.dart +++ b/lib/modules/traf_module/traf_request_detail_page.dart @@ -59,10 +59,8 @@ class _TrafRequestDetailPageState extends State { requesterInformation(trafProvider.trafRequestDataModel!), 12.height, requestInformation(trafProvider.trafRequestDataModel!), - if (trafProvider.trafRequestDataModel!.requestTypeId == 733) ...[ - 12.height, - assetInformation(trafProvider.trafRequestDataModel!), - ] + 12.height, + assetInformation(trafProvider.trafRequestDataModel!), ], ).expanded, // // if (isEngineer) @@ -91,12 +89,12 @@ class _TrafRequestDetailPageState extends State { style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ), 8.height, - '${context.translation.employeeId}: ${data.employeeId ?? '-'}'.bodyText(context), - '${context.translation.name}: ${data.employeeId ?? '-'}'.bodyText(context), // todo ask shaheer - '${context.translation.email}: ${data.employeeId ?? '-'}'.bodyText(context), // todo ask shaheer - 'Position: ${data.employeeId ?? '-'}'.bodyText(context), // todo ask shaheer + '${context.translation.employeeId}: ${data.employeeIdForDisplay ?? '-'}'.bodyText(context), + '${context.translation.name}: ${data.employeeName ?? '-'}'.bodyText(context), // todo ask shaheer + '${context.translation.email}: ${data.employeeEmail ?? '-'}'.bodyText(context), // todo ask shaheer + 'Position: ${data.positionName ?? '-'}'.bodyText(context), // todo ask shaheer '${context.translation.site}: ${data.siteName ?? '-'}'.bodyText(context), - '${context.translation.department}: ${data.departments ?? '-'}'.bodyText(context), + '${context.translation.department}: ${data.departments?.map((item) => item.departmentName).toList() ?? '-'}'.bodyText(context), 'Requester Extension: ${data.requesterExtensionName ?? '-'}'.bodyText(context), '${context.translation.extensionNo}: ${data.requesterExtensionNumber ?? '-'}'.bodyText(context), ], @@ -109,23 +107,26 @@ class _TrafRequestDetailPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "TRAF Request Information", + "Request Information", style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ), 8.height, 'TRAF No: ${data.reqCode ?? '-'}'.bodyText(context), 'Request type: ${data.requestTypeName ?? '-'}'.bodyText(context), 4.height, - 'What is the current practice?:\n${data.currentPractise ?? '-'}'.bodyText(context), + 'How would the requested technology solve the current situation and/or serve the purpose?: ${data.purposeAnswer ?? '-'}'.bodyText(context), + 4.height, + 'What is the current practice?: ${data.currentPractise ?? '-'}'.bodyText(context), 4.height, 'Census Q1: ${data.censusQ1 ?? '-'}'.bodyText(context), 'Census Q2: ${data.censusQ2 ?? '-'}'.bodyText(context), 'Census Q3: ${data.censusQ3 ?? '-'}'.bodyText(context), 'Census Q4: ${data.censusQ4 ?? '-'}'.bodyText(context), 4.height, - 'List down names & contact information of users going to use the technology & specify if they are part-time or full time?:\n${data.trafContacts ?? '-'}'.bodyText(context), + 'List down names & contact information of users going to use the technology & specify if they are part-time or full time?:\n${data.trafContacts?.map((item) => item.name).toList() ?? '-'}' + .bodyText(context), 4.height, - 'Is the requesting department going to use the technology solely or shared with other departments?:\n${data.usingSolelyOrSharedId ?? '-'}'.bodyText(context), + 'Is the requesting department going to use the technology solely or shared with other departments?:\n${data.usingSolelyOrSharedName ?? '-'}'.bodyText(context), 4.height, 'Would other services be effected by acquiring the new equipment?:\n${data.effectedServices ?? '-'}'.bodyText(context), 4.height, @@ -144,16 +145,21 @@ class _TrafRequestDetailPageState extends State { style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), ), 8.height, - 'Last price & PO: ${data.poNumber ?? '-'}'.bodyText(context), - 'The quantity of the same asset: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Existing asset under SLA: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Age of the asset: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Total Maintenance Cost (TMC): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Net Book Value (NBV): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Mean Time Between Failure (MTBF): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Down Time (DT): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Up Time (UT): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer - 'Purchased Price: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + '${context.translation.assetName}: ${data.assetName ?? '-'}'.bodyText(context), + '${context.translation.model}: ${data.modelName ?? '-'}'.bodyText(context), + '${context.translation.manufacture}: ${data.manufacturerName ?? '-'}'.bodyText(context), + if (data.requestTypeId == 733) ...[ + 'Last price & PO: ${data.poNumber ?? '-'}'.bodyText(context), + 'The quantity of the same asset: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Existing asset under SLA: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Age of the asset: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Total Maintenance Cost (TMC): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Net Book Value (NBV): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Mean Time Between Failure (MTBF): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Down Time (DT): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Up Time (UT): ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + 'Purchased Price: ${data.qty ?? '-'}'.bodyText(context), // todo check with shaheer + ], ], ).toShadowContainer(context, borderRadius: 20, padding: 12); } diff --git a/lib/modules/traf_module/traf_request_model.dart b/lib/modules/traf_module/traf_request_model.dart index 0d1eedf1..b5de3280 100644 --- a/lib/modules/traf_module/traf_request_model.dart +++ b/lib/modules/traf_module/traf_request_model.dart @@ -46,6 +46,7 @@ class TrafRequestDataModel { int? reqNo; String? reqCode; String? employeeId; + String? employeeIdForDisplay; String? employeeName; String? employeeEmail; int? positionId; @@ -140,6 +141,7 @@ class TrafRequestDataModel { {this.reqNo, this.reqCode, this.employeeId, + this.employeeIdForDisplay, this.employeeName, this.employeeEmail, this.positionId, @@ -234,6 +236,7 @@ class TrafRequestDataModel { reqNo = json['reqNo']; reqCode = json['reqCode']; employeeId = json['employeeId']; + employeeIdForDisplay = json['employeeIdForDisplay']; employeeName = json['employeeName']; employeeEmail = json['employeeEmail']; positionId = json['positionId']; @@ -355,6 +358,7 @@ class TrafRequestDataModel { data['reqNo'] = this.reqNo; data['reqCode'] = this.reqCode; data['employeeId'] = this.employeeId; + data['employeeIdForDisplay'] = this.employeeIdForDisplay; data['employeeName'] = this.employeeName; data['employeeEmail'] = this.employeeEmail; data['positionId'] = this.positionId; @@ -526,13 +530,15 @@ class Departments { int? id; int? trafId; int? departmentId; + String? departmentName; - Departments({this.id, this.trafId, this.departmentId}); + Departments({this.id, this.trafId, this.departmentId, this.departmentName}); Departments.fromJson(Map json) { id = json['id']; trafId = json['trafId']; departmentId = json['departmentId']; + departmentName = json['departmentName']; } Map toJson() { @@ -540,6 +546,7 @@ class Departments { data['id'] = this.id; data['trafId'] = this.trafId; data['departmentId'] = this.departmentId; + data['departmentName'] = this.departmentName; return data; } }