diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index 498f148d..263efa1a 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -4,11 +4,11 @@ class URLs { static const String appReleaseBuildNumber = "15"; // static const host1 = "https://atomsm.hmg.com"; // production url - static const host1 = "https://atomsmdev.hmg.com"; // local DEV url - // static const host1 = "https://atomsmuat.hmg.com"; // local UAT url + // static const host1 = "https://atomsmdev.hmg.com"; // local DEV url + static const host1 = "https://atomsmuat.hmg.com"; // local UAT url - // static String _baseUrl = "$_host/mobile"; - static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis + static String _baseUrl = "$_host/mobile"; + // static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis // static final String _baseUrl = "$_host/mobile"; // host local UAT // static final String _baseUrl = "$_host/v3/mobile"; // new V3 apis diff --git a/lib/l10n/app_ar.arb b/lib/l10n/app_ar.arb index eb4d129f..5609a14c 100644 --- a/lib/l10n/app_ar.arb +++ b/lib/l10n/app_ar.arb @@ -549,5 +549,9 @@ "part": "جزء", "creationDate": "تاريخ الإنشاء", "transferType": "نوع النقل", - "createdBy": "تم الإنشاء بواسطة" + "createdBy": "تم الإنشاء بواسطة", + "trNumber": "رقم طلب النقل", + "workOrderDetails": "تفاصيل أمر العمل", + "woNumber": "رقم أمر العمل", + "contactInfo": "معلومات الاتصال" } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 2bd2e511..058bcbd1 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -315,7 +315,7 @@ "youHaveToAddRequests": "You have to add requests", "createdSuccessfully": "Created successfully", "failedToCompleteRequest": "Failed to complete request", - "assetNo": "Asset No.", + "assetNo": "Asset No", "manufacture": "Manufacture", "serialNo": "Serial No", "pickAsset": "Pick Asset", @@ -549,5 +549,9 @@ "rejectionDetails": "Rejection Details", "part": "Part", "creationDate": "Creation Date", - "createdBy": "Created BY" + "createdBy": "Created BY", + "trNumber": "TR Number", + "workOrderDetails": "Work Order Details", + "woNumber": "WO Number", + "contactInfo": "Contact Info" } \ No newline at end of file diff --git a/lib/models/new_models/dashboard_detail.dart b/lib/models/new_models/dashboard_detail.dart index 6dd72924..3773dc64 100644 --- a/lib/models/new_models/dashboard_detail.dart +++ b/lib/models/new_models/dashboard_detail.dart @@ -60,6 +60,7 @@ class Data { Data({this.id, this.typeTransaction, this.nameOfType,this.transactionDate, this.statusName, this.priorityName, this.isHighPriority, this.assetName, this.assetNumber, this.requestTypeName, this.requestNo,this.transactionNo}); Data.fromJson(Map json) { + id = json['id']; typeTransaction = json['typeTransaction']; transactionDate = json['transactionDate']; diff --git a/lib/models/search_all_requests_model.dart b/lib/models/search_all_requests_model.dart index 78673d24..0e78d2e0 100644 --- a/lib/models/search_all_requests_model.dart +++ b/lib/models/search_all_requests_model.dart @@ -51,7 +51,7 @@ abstract class SearchAllRequestsBaseModel { class SearchByRequestNumberModel extends SearchAllRequestsBaseModel { SearchByRequestNumberModel(BuildContext context, {TextEditingController? controller, String? value}) // Parameters now nullable - : super(context, controller: controller, label: "${context.translation.requestNo}.", value: value); + : super(context, controller: controller, label: context.translation.woNumber, value: value); } class SearchByAssetNameModel extends SearchAllRequestsBaseModel { diff --git a/lib/modules/cm_module/views/components/service_request_detail_view.dart b/lib/modules/cm_module/views/components/service_request_detail_view.dart index 16fbca98..37682b51 100644 --- a/lib/modules/cm_module/views/components/service_request_detail_view.dart +++ b/lib/modules/cm_module/views/components/service_request_detail_view.dart @@ -222,13 +222,10 @@ class _ServiceRequestDetailViewState extends State { style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), ), Text( - '${context.translation.requesterName}: ${workOrder.workOrderCreatedBy?.userName ?? "-"}', + '${context.translation.createdBy}: ${workOrder.workOrderCreatedBy?.userName ?? "-"}', style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), ), - Text( - 'Requested Date: ${workOrder.requestedDate!.toString().toServiceRequestDetailsFormat}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120), - ), + Text( '${context.translation.arrivedDate}: ${workOrder.iHaveArrivedDate != null ? workOrder.iHaveArrivedDate.toString().toServiceRequestDetailsFormat : '-'}', style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120), diff --git a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart index afa41014..7c412338 100644 --- a/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart +++ b/lib/new_views/pages/land_page/create_request-type_bottomsheet.dart @@ -94,7 +94,7 @@ class CreateRequestModel { } else { list.add(CreateRequestModel(context.translation.correctiveMaintenance, "add_icon", CreateNewRequest.id)); list.add(CreateRequestModel(context.translation.gasRefill, "add_icon", GasRefillRequestForm.routeName)); - list.add(CreateRequestModel(context.translation.deviceTransfer, "add_icon", CreateDeviceTransferRequest.id)); + list.add(CreateRequestModel(context.translation.transferAsset, "add_icon", CreateDeviceTransferRequest.id)); list.add(CreateRequestModel(context.translation.task, "add_icon", CreateTaskView.id)); } return list; diff --git a/lib/new_views/pages/land_page/my_request/all_requests_filter_page.dart b/lib/new_views/pages/land_page/my_request/all_requests_filter_page.dart index aba28215..fb0d7512 100644 --- a/lib/new_views/pages/land_page/my_request/all_requests_filter_page.dart +++ b/lib/new_views/pages/land_page/my_request/all_requests_filter_page.dart @@ -46,7 +46,6 @@ class _AllRequestsFilterPageState extends State { @override Widget build(BuildContext context) { - print('i am here...'); bool isEngineer = (Provider.of(context, listen: false).user?.type) == UsersTypes.engineer; if (search == null) { search = SearchAllRequestsModel( @@ -62,7 +61,7 @@ class _AllRequestsFilterPageState extends State { final types = { context.translation.correctiveMaintenance: 1, context.translation.gasRefill: 2, - context.translation.deviceTransfer: 3, + context.translation.transferAsset: 3, context.translation.preventiveMaintenance: 4, context.translation.task: 6, }; diff --git a/lib/new_views/pages/land_page/my_request/all_requests_search_page.dart b/lib/new_views/pages/land_page/my_request/all_requests_search_page.dart index e7b027f2..35b5210b 100644 --- a/lib/new_views/pages/land_page/my_request/all_requests_search_page.dart +++ b/lib/new_views/pages/land_page/my_request/all_requests_search_page.dart @@ -111,6 +111,7 @@ class _AllRequestsSearchPageState extends State { controller: search!.searchBySelectedValue?.controller, labelText: search!.searchBySelectedValue?.label, textInputType: search!.searchBySelectedValue?.inputType, + labelStyle: AppTextStyles.bodyText2, onChange: (text) { search!.searchBySelectedValue?.controller?.text = text; search!.searchBySelectedValue?.controller?.selection = TextSelection.fromPosition(TextPosition(offset: search!.searchBySelectedValue!.controller!.text.length)); diff --git a/lib/new_views/pages/land_page/my_request/my_requests_page.dart b/lib/new_views/pages/land_page/my_request/my_requests_page.dart index 980d3bec..be7231ae 100644 --- a/lib/new_views/pages/land_page/my_request/my_requests_page.dart +++ b/lib/new_views/pages/land_page/my_request/my_requests_page.dart @@ -34,8 +34,8 @@ class _MyRequestsPageState extends State { requestsList = [ context.translation.allWorkOrder, context.translation.correctiveMaintenance, - context.translation.gasRefillRequest, - context.translation.deviceTransferRequest, + context.translation.gasRefill, + context.translation.transferAsset, context.translation.preventiveMaintenance, context.translation.recurrentWo, context.translation.taskRequest, diff --git a/lib/new_views/pages/land_page/requests/device_item_view.dart b/lib/new_views/pages/land_page/requests/device_item_view.dart index 3df16d98..71cda029 100644 --- a/lib/new_views/pages/land_page/requests/device_item_view.dart +++ b/lib/new_views/pages/land_page/requests/device_item_view.dart @@ -35,13 +35,13 @@ class DeviceItemView extends StatelessWidget { textColor: AppColor.getRequestStatusTextColorByName(context, requestData!.priorityName!), backgroundColor: AppColor.getRequestStatusColorByName(context, requestData!.priorityName!), ), - // 8.width, - // if (request.status != null) - // StatusLabel( - // label: request.status ?? "", - // textColor: AppColor.getRequestStatusTextColorByName(context, request.status), - // backgroundColor: AppColor.getRequestStatusColorByName(context, request.status), - // ), + 8.width, + if (requestData?.statusName != null) + StatusLabel( + label: requestData?.statusName ?? "", + textColor: AppColor.getRequestStatusTextColorByName(context, requestData?.statusName), + backgroundColor: AppColor.getRequestStatusColorByName(context, requestData?.statusName), + ), 1.width.expanded, Text(requestData!.transactionDate?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)), @@ -55,7 +55,7 @@ class DeviceItemView extends StatelessWidget { (requestData?.typeTransaction ?? context.translation.deviceTransferRequest).heading5(context), // "${context.translation.from} : ${request.siteTransferFrom?.cleanupWhitespace.capitalizeFirstOfEach}".bodyText(context), // todo ask ahmed // "${context.translation.to} : ${request.siteTransferTo?.cleanupWhitespace.capitalizeFirstOfEach}".bodyText(context),// todo ask ahmed - requestData!.statusName!.replaceAll("=", ":").bodyText(context), + // requestData!.statusName!.replaceAll("=", ":").bodyText(context), '${context.translation.requestNo}: ${requestData!.requestNo}'.bodyText(context), ], ), @@ -95,13 +95,13 @@ class DeviceItemView extends StatelessWidget { textColor: AppColor.getRequestStatusTextColorByName(context, requestDetails!.priority!), backgroundColor: AppColor.getRequestStatusColorByName(context, requestDetails!.priority!), ), - // 8.width, - // if (request.status != null) - // StatusLabel( - // label: request.status ?? "", - // textColor: AppColor.getRequestStatusTextColorByName(context, request.status), - // backgroundColor: AppColor.getRequestStatusColorByName(context, request.status), - // ), + 8.width, + if (requestDetails?.status != null) + StatusLabel( + label: requestDetails?.status ?? "", + textColor: AppColor.getRequestStatusTextColorByName(context, requestDetails?.status), + backgroundColor: AppColor.getRequestStatusColorByName(context, requestDetails?.status), + ), 1.width.expanded, Text(requestDetails!.date?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)), @@ -114,11 +114,10 @@ class DeviceItemView extends StatelessWidget { children: [ (requestDetails?.nameOfType ?? context.translation.deviceTransferRequest).heading5(context), 8.height, - '${context.translation.requestNo}: ${requestDetails!.requestNo}'.bodyText(context), + '${context.translation.trNumber}: ${requestDetails!.requestNo}'.bodyText(context), "${context.translation.from} : ${requestDetails!.siteTransferFrom?.cleanupWhitespace.capitalizeFirstOfEach}".bodyText(context), "${context.translation.to} : ${requestDetails!.siteTransferTo?.cleanupWhitespace.capitalizeFirstOfEach}".bodyText(context), - requestDetails!.status!.replaceAll("=", ":").bodyText(context), - + // requestDetails!.status!.replaceAll("=", ":").bodyText(context), ], ), 8.height, @@ -143,6 +142,6 @@ class DeviceItemView extends StatelessWidget { }); } - return SizedBox(); + return const SizedBox(); } } diff --git a/lib/views/pages/device_transfer/device_transfer_details.dart b/lib/views/pages/device_transfer/device_transfer_details.dart index 1359c203..7d6d2811 100644 --- a/lib/views/pages/device_transfer/device_transfer_details.dart +++ b/lib/views/pages/device_transfer/device_transfer_details.dart @@ -47,7 +47,7 @@ class _DeviceTransferDetailsState extends State { _userProvider ??= Provider.of(context); return Scaffold( - appBar: DefaultAppBar(title: context.translation.deviceTransferDetails), + appBar: DefaultAppBar(title: context.translation.transferDetails), key: _scaffoldKey, body: SafeArea( child: FutureBuilder( @@ -69,59 +69,17 @@ class _DeviceTransferDetailsState extends State { child: SingleChildScrollView( child: Column( children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.stretch, + Row( children: [ - Text( - "Transfer Details".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - _buildTextWidget('${context.translation.requestNo} : ${_model?.transferCode ?? ""}'), - _buildTextWidget('${context.translation.transferType} : ${_model?.transferType?.name ?? ""}'), - _buildTextWidget('${context.translation.createdBy} : ${_model?.name ?? ""}'), - const Divider().defaultStyle(context), - Text( - "Asset Info".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - _buildTextWidget('${context.translation.assetName} : ${_model?.assetName?.cleanupWhitespace.capitalizeFirstOfEach ?? ""}'), - _buildTextWidget('${context.translation.assetNumber} : ${_model?.assetNumber ?? ""}'), - _buildTextWidget('${context.translation.model} : ${_model?.modelName ?? ""}'), - _buildTextWidget('${context.translation.sn} : ${_model?.assetSerialNo ?? ""}'), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - _contactInfo(), - if ((_model?.comment ?? "").isNotEmpty) ...[ - const Divider().defaultStyle(context), - Text( - "Comments".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - 8.height, - _buildTextWidget(_model!.comment!), - ], - if (_attachments.isNotEmpty) ...[ - const Divider().defaultStyle(context), - Text( - "Attachments".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - 8.height, - FilesList(images: _model?.assetTransferAttachments?.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []), - //attachmentWidget(), - ] - ], + StatusLabel( + label: _model?.transferType?.name, + id: _model?.transferType?.id?.toInt(), + textColor: AppColor.getRequestStatusTextColorByName(context, _model?.transferType?.name), + backgroundColor: AppColor.getRequestStatusColorByName(context, _model?.transferType?.name), ), - ], - ).expanded, - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - 1.width, Text( _model?.createdOn != null ? _model!.createdOn!.toServiceRequestCardFormat : "", textAlign: TextAlign.end, @@ -129,20 +87,47 @@ class _DeviceTransferDetailsState extends State { ), ], ), + 8.height, + context.translation.callDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + _buildTextWidget('${context.translation.trNumber} : ${_model?.transferCode ?? "-"}'), + _buildTextWidget('${context.translation.createdBy} : ${_model?.name ?? "-"}'), + const Divider().defaultStyle(context), + context.translation.assetInformation.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + _buildTextWidget('${context.translation.assetName} : ${_model?.assetName?.cleanupWhitespace.capitalizeFirstOfEach ?? ""}'), + _buildTextWidget('${context.translation.assetNumber} : ${_model?.assetNumber ?? "-"}'), + _buildTextWidget('${context.translation.model} : ${_model?.modelName ?? "-"}'), + _buildTextWidget('${context.translation.sn} : ${_model?.assetSerialNo ?? "-"}'), + _buildTextWidget('${context.translation.site} : ${_model?.senderSiteName ?? "-"}'), + _buildTextWidget('${context.translation.building} : ${_model?.senderBuildingName ?? "-"}'), + _buildTextWidget('${context.translation.floor} : ${_model?.senderFloorName ?? "-"}'), + _buildTextWidget('${context.translation.department} : ${_model?.senderDepartmentName ?? "-"}'), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _contactInfo(), + if ((_model?.comment ?? "").isNotEmpty) ...[ + const Divider().defaultStyle(context), + context.translation.callComments.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + 8.height, + _buildTextWidget(_model!.comment!), + ], + if (_attachments.isNotEmpty) ...[ + const Divider().defaultStyle(context), + Text( + "Attachments".addTranslation, + style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + ), + 8.height, + FilesList(images: _model?.assetTransferAttachments?.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []), + //attachmentWidget(), + ] + ], + ), ], ).toShadowContainer(context), 8.height, if (_model?.transferType?.value == 1) ...[ - _internalRequestDetailsCard( - statusLabel: _model?.senderMachineStatusName != null - ? StatusLabel( - label: _model!.senderMachineStatusName!, - id: _model!.senderMachineStatusId!.toInt(), - textColor: AppColor.getRequestStatusTextColorByName(context, _model!.senderMachineStatusName!), - backgroundColor: AppColor.getRequestStatusColorByName(context, _model!.senderMachineStatusName!), - ) - : null, - ) + _internalRequestDetailsCard() ] else ...[ // sender card _buildCard( @@ -151,6 +136,7 @@ class _DeviceTransferDetailsState extends State { dept: _model?.senderDepartmentName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", building: _model?.senderBuildingName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", floor: _model?.senderFloorName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", + assignTo: _model?.senderAssignedEmployeeName, comment: _model?.senderComment ?? "", statusLabel: _model?.senderMachineStatusName != null ? StatusLabel( @@ -169,6 +155,7 @@ class _DeviceTransferDetailsState extends State { dept: _model?.destDepartmentName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", building: _model?.destBuildingName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", floor: _model?.destFloorName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", + assignTo: _model?.receiverAssignedEmployeeName, comment: _model?.receiverComment ?? "", statusLabel: _model?.receiverMachineStatusName != null ? StatusLabel( @@ -198,7 +185,7 @@ class _DeviceTransferDetailsState extends State { return text.bodyText(context); } - _internalRequestDetailsCard({StatusLabel? statusLabel}) { + _internalRequestDetailsCard() { bool isCurrentEngineerEligibleForEdit = _model?.senderAssignedEmployeeId == _userProvider!.user?.userID; bool isCurrentRequestEditAble = (!(_model?.senderMachineStatusValue == 3)); return Column( @@ -210,8 +197,23 @@ class _DeviceTransferDetailsState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - statusLabel ?? Container(), - if (statusLabel != null) 8.height, + Row( + children: [ + StatusLabel( + label: _model!.senderMachineStatusName!, + id: _model!.senderMachineStatusId!.toInt(), + textColor: AppColor.getRequestStatusTextColorByName(context, _model!.senderMachineStatusName!), + backgroundColor: AppColor.getRequestStatusColorByName(context, _model!.senderMachineStatusName!), + ), + // 8.width, + // StatusLabel( + // label: _model?.transferType?.name, + // id: _model?.transferType?.id?.toInt(), + // textColor: AppColor.getRequestStatusTextColorByName(context, _model?.transferType?.name), + // backgroundColor: AppColor.getRequestStatusColorByName(context, _model?.transferType?.name), + // ) + ], + ), ], ), if ((_userProvider!.user?.type == UsersTypes.engineer)) @@ -224,14 +226,15 @@ class _DeviceTransferDetailsState extends State { }), ], ), - context.translation.details.heading5(context), - infoText(label: context.translation.site, value: _model?.senderSiteName), - infoText(label: "Sender Building".addTranslation, value: _model?.senderBuildingName), - infoText(label: "Sender Floor".addTranslation, value: _model?.senderFloorName), - infoText(label: "Sender Department".addTranslation, value: _model?.senderDepartmentName), - infoText(label: "Receiver Building".addTranslation, value: _model?.destBuildingName), - infoText(label: "Receiver Floor".addTranslation, value: _model?.destFloorName), - infoText(label: "Receiver Department".addTranslation, value: _model?.destDepartmentName), + 8.height, + context.translation.workOrderDetails.heading5(context), + infoText(label: context.translation.destinationSite, value: _model?.senderSiteName), + // infoText(label: "Sender Building".addTranslation, value: _model?.senderBuildingName), + // infoText(label: "Sender Floor".addTranslation, value: _model?.senderFloorName), + // infoText(label: "Sender Department".addTranslation, value: _model?.senderDepartmentName), + infoText(label: "Building".addTranslation, value: _model?.destBuildingName), + infoText(label: "Floor".addTranslation, value: _model?.destFloorName), + infoText(label: "Department".addTranslation, value: _model?.destDepartmentName), if (_model!.senderComment != null && _model!.senderComment!.isNotEmpty) ...[ 8.height, const Divider().defaultStyle(context), @@ -245,11 +248,10 @@ class _DeviceTransferDetailsState extends State { ).toShadowContainer(context); } - _buildCard({required String site, String? building, String? dept, String? floor, required String comment, required bool isSender, StatusLabel? statusLabel}) { + _buildCard({required String site, String? building, String? dept, String? floor, required String comment, required bool isSender, StatusLabel? statusLabel, String? assignTo}) { bool isCurrentEngineerEligibleForEdit = isSender ? _model?.senderAssignedEmployeeId == _userProvider!.user?.userID : _model?.receiverAssignedEmployeeId == _userProvider!.user?.userID; bool isCurrentRequestClosed = isSender ? ((_model?.senderMachineStatusValue == 3)) : ((_model?.receiverMachineStatusValue == 3)); - return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -283,6 +285,7 @@ class _DeviceTransferDetailsState extends State { infoText(label: context.translation.building, value: building), infoText(label: context.translation.floor, value: floor), infoText(label: context.translation.department, value: dept), + infoText(label: context.translation.assignedTo, value: assignTo), if (comment.isNotEmpty) ...[ 8.height, const Divider().defaultStyle(context), diff --git a/lib/views/pages/user/gas_refill/gas_refill_details.dart b/lib/views/pages/user/gas_refill/gas_refill_details.dart index 62bdbe68..67313740 100644 --- a/lib/views/pages/user/gas_refill/gas_refill_details.dart +++ b/lib/views/pages/user/gas_refill/gas_refill_details.dart @@ -82,7 +82,6 @@ class _GasRefillDetailsPageState extends State { }, label: context.translation.updateRequest, ).paddingAll(16) - ] //TODO need to uncomment this to enable nurse edit gas refill request. // else if (_model.status!.value! == 0) ...[ @@ -136,12 +135,9 @@ class _GasRefillDetailsPageState extends State { ], ), 8.height, - // context.translation.gasRefillRequest.heading5(context), - Text( - "Request Details".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), + context.translation.callDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), infoText(label: context.translation.requestNo, value: gasRefillModel.gasRefillNo), + infoText(label: context.translation.createdBy, value: gasRefillModel.name), infoText(label: context.translation.gasType, value: gasRefillModel.gasRefillDetails?[0].gasType?.name), infoText(label: context.translation.cylinderType, value: gasRefillModel.gasRefillDetails?[0].cylinderType?.name), infoText(label: context.translation.cylinderSize, value: gasRefillModel.gasRefillDetails?[0].cylinderSize?.name), @@ -150,14 +146,15 @@ class _GasRefillDetailsPageState extends State { infoText(label: context.translation.floor, value: gasRefillModel.floor?.name), infoText(label: context.translation.department, value: gasRefillModel.department?.name), infoText(label: context.translation.requestedQuantity, value: gasRefillModel.gasRefillDetails?[0].requestedQty.toString()), - infoText(label: context.translation.deliveredQuantity, value: gasRefillModel.gasRefillDetails![0].deliverdQty.toString()), + //need to confirm contact info form backend.. const Divider().defaultStyle(context), - Text( - "Created By".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), + context.translation.contactInfo.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), infoText(label: context.translation.employeeId, value: gasRefillModel.employeeId), infoText(label: context.translation.name, value: gasRefillModel.name), + const Divider().defaultStyle(context), + context.translation.workOrderDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + infoText(label: context.translation.deliveredQuantity, value: gasRefillModel.gasRefillDetails![0].deliverdQty.toString()), + if (gasRefillModel.techComment?.isNotEmpty ?? false) infoText(label: context.translation.technicalComment, value: gasRefillModel.techComment), 8.height, if (gasRefillModel.comment?.isNotEmpty ?? false) ...[ const Divider().defaultStyle(context), @@ -168,15 +165,15 @@ class _GasRefillDetailsPageState extends State { gasRefillModel.comment!.bodyText(context), 8.height, ], - if (gasRefillModel.techComment?.isNotEmpty ?? false) ...[ - const Divider().defaultStyle(context), - Text( - "Technical Comments".addTranslation, - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), - ), - gasRefillModel.techComment!.bodyText(context), - 8.height, - ], + // if (gasRefillModel.techComment?.isNotEmpty ?? false) ...[ + // const Divider().defaultStyle(context), + // Text( + // "Technical Comments".addTranslation, + // style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), + // ), + // gasRefillModel.techComment!.bodyText(context), + // 8.height, + // ], if (_attachments.isNotEmpty) ...[ const Divider().defaultStyle(context), Text( diff --git a/pubspec.lock b/pubspec.lock index 81272515..484acd6c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1337,10 +1337,10 @@ packages: dependency: "direct main" description: name: safe_device - sha256: "953aeac3486180df9118a1a3f5fb842d84015e8aa6f2607edeb5fb881b67a669" + sha256: f4930fe80ef28d047d3e600a318d1549732a8910d2b4342e7fd785aea2b1453e url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" share_plus: dependency: "direct main" description: