From 05d3b7dd5dee56a9646457f3645a57fed663abaf Mon Sep 17 00:00:00 2001 From: zaid_daoud Date: Tue, 5 Sep 2023 10:22:32 +0300 Subject: [PATCH] department name shown in the gas refill details screen & the delivered quantity is reflected on the details screen --- lib/views/pages/user/gas_refill/gas_refill_details.dart | 7 ++++++- lib/views/pages/user/gas_refill/request_gas_refill.dart | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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 c2ca75af..fac3a13b 100644 --- a/lib/views/pages/user/gas_refill/gas_refill_details.dart +++ b/lib/views/pages/user/gas_refill/gas_refill_details.dart @@ -135,7 +135,8 @@ class _GasRefillDetailsState extends State { ), ), ).then((value) { - _model.status = value; + _model.status = value.status; + _model.details = value.details; }); setState(() {}); }, @@ -168,6 +169,10 @@ class _GasRefillDetailsState extends State { title: "Floor", info: _model.floor?.name, ), + RequestInfoRow( + title: "Department", + info: _model.department?.departmentName, + ), RequestInfoRow( title: _subtitle.startDate, info: _model.startDate == null ? null : "${DateFormat.yMd().format(_model.startDate)} ${DateFormat.Hms().format(_model.startDate)}", diff --git a/lib/views/pages/user/gas_refill/request_gas_refill.dart b/lib/views/pages/user/gas_refill/request_gas_refill.dart index 944be588..9a4b92be 100644 --- a/lib/views/pages/user/gas_refill/request_gas_refill.dart +++ b/lib/views/pages/user/gas_refill/request_gas_refill.dart @@ -104,7 +104,7 @@ class _RequestGasRefillState extends State { Fluttertoast.showToast( msg: _subtitle.requestCompleteSuccessfully, ); - Navigator.of(context).pop(_formModel.status); + Navigator.of(context).pop(_formModel); setState(() {}); } else { String errorMessage = HttpStatusManger.getStatusMessage(status: status, subtitle: _subtitle);