From ecaede0deb29d0f3f139334ae2b49a51b0dd6edc Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 11 Dec 2022 16:22:54 +0300 Subject: [PATCH] Updates & fixes --- lib/classes/utils.dart | 3 +- lib/ui/work_list/worklist_detail_screen.dart | 32 ++++++++++---------- pubspec.yaml | 1 + 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart index 3b30d05..050ae4d 100644 --- a/lib/classes/utils.dart +++ b/lib/classes/utils.dart @@ -121,7 +121,8 @@ class Utils { ), ); } else { - showToast(errorMessage); + // showToast(errorMessage); + confirmDialog(cxt, errorMessage); } } } diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index 8b22041..75ee88f 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -233,9 +233,9 @@ class _WorkListDetailScreenState extends State { ), child: Row( children: [ - (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 0) : myTab(LocaleKeys.request.tr(), 0), - myTab(LocaleKeys.actions.tr(), 1), - myTab(LocaleKeys.info.tr(), 2), + myTab(LocaleKeys.info.tr(), 0), + (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 1) : myTab(LocaleKeys.request.tr(), 1), + myTab(LocaleKeys.actions.tr(), 2), myTab(LocaleKeys.attachments.tr(), 3), ], ), @@ -249,6 +249,19 @@ class _WorkListDetailScreenState extends State { }); }, children: [ + InfoFragment( + poHeaderList: getPoNotificationBody?.pOHeader ?? [], + workListData: workListData, + itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [], + getStampMsNotifications: getStampMsNotifications, + getStampNsNotifications: getStampNsNotifications, + getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, + getPhonesNotificationBodyList: getPhonesNotificationBodyList, + getBasicDetNtfBodyList: getBasicDetNtfBodyList, + getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList, + getContactNotificationBodyList: getContactNotificationBodyList, + getPrNotificationBodyList: getPrNotificationBody, + ), (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? DetailFragment(workListData, memberInformationListModel) : RequestFragment( @@ -266,19 +279,6 @@ class _WorkListDetailScreenState extends State { voidCallback: reloadWorkList, ) : showLoadingAnimation(), - InfoFragment( - poHeaderList: getPoNotificationBody?.pOHeader ?? [], - workListData: workListData, - itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [], - getStampMsNotifications: getStampMsNotifications, - getStampNsNotifications: getStampNsNotifications, - getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList, - getPhonesNotificationBodyList: getPhonesNotificationBodyList, - getBasicDetNtfBodyList: getBasicDetNtfBodyList, - getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList, - getContactNotificationBodyList: getContactNotificationBodyList, - getPrNotificationBodyList: getPrNotificationBody, - ), isAttachmentLoaded ? getAttachmentList.isEmpty ? Utils.getNoDataWidget(context) diff --git a/pubspec.yaml b/pubspec.yaml index 4fc00c8..0d5cda5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -98,6 +98,7 @@ dependencies: video_player: ^2.4.7 just_audio: ^0.9.30 + safe_device: ^1.1.2 dev_dependencies: flutter_test: