From 0fa9173f01bdb260cc97601ae13da585373b614b Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 30 Sep 2024 10:56:14 +0300 Subject: [PATCH] history log improvement. --- .../views/components/history_log_view.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/service_request_latest/views/components/history_log_view.dart b/lib/service_request_latest/views/components/history_log_view.dart index 18230b4a..20b8bb03 100644 --- a/lib/service_request_latest/views/components/history_log_view.dart +++ b/lib/service_request_latest/views/components/history_log_view.dart @@ -100,13 +100,28 @@ class HistoryLogView extends StatelessWidget { width: 153.toScreenWidth, child: StatusLabel( radius: 4, - label: status, + label: statusText(status.toLowerCase()), labelInCenter: true, textColor: AppColor.getHistoryLogStatusTextColorByName(status), backgroundColor: AppColor.getHistoryLogStatusColorByName(status), ), ).paddingOnly(bottom: 16, start: 40); } + + String statusText(String status) { + if (status == "new") { + return "Open Request".addTranslation; + } else if (status == "in progress") { + return "Status update to In Progress".addTranslation; + } else if (status == "closed") { + return "Status update to Closed".addTranslation; + } else if (status == "completed") { + return "Status update to Completed".addTranslation; + } else if (status == "fixed") { + return "Status update to Fixed".addTranslation; + } else + return status; + } } class HistoryLogModel {