|
|
|
@ -147,7 +147,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
getPRNotification();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
controller.jumpToPage(0);
|
|
|
|
|
if (controller.hasClients) {
|
|
|
|
|
controller.jumpToPage(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// List dataToFetch = await Future.wait([
|
|
|
|
|
//
|
|
|
|
@ -231,9 +233,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
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),
|
|
|
|
|
(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.attachments.tr(), 3),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -241,25 +243,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21),
|
|
|
|
|
PageView(
|
|
|
|
|
controller: controller,
|
|
|
|
|
onPageChanged: (int pageIndex) {
|
|
|
|
|
onPageChanged: (pageIndex) {
|
|
|
|
|
setState(() {
|
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
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(
|
|
|
|
@ -277,6 +266,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
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)
|
|
|
|
@ -565,7 +567,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext cxt) => ConfirmDialog(
|
|
|
|
|
builder: (cxt) => ConfirmDialog(
|
|
|
|
|
message: LocaleKeys.wantToReject.tr(),
|
|
|
|
|
okTitle: LocaleKeys.reject.tr(),
|
|
|
|
|
onTap: () async {
|
|
|
|
@ -648,12 +650,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
print(actionMode);
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext cxt) => AcceptRejectInputDialog(
|
|
|
|
|
builder: (cxt) => AcceptRejectInputDialog(
|
|
|
|
|
message: title != null ? null : LocaleKeys.requestedItems.tr(),
|
|
|
|
|
title: title,
|
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
|
actionMode: actionMode,
|
|
|
|
|
onTap: (String note) {
|
|
|
|
|
onTap: (note) {
|
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
|
|
"P_APPROVER_INDEX": null,
|
|
|
|
@ -936,9 +938,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
|
|
|
|
|
if (notificationButtonsList.isNotEmpty) {
|
|
|
|
|
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
|
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "APPROVED");
|
|
|
|
|
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "REJECTED");
|
|
|
|
|
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
|
isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
|
|
|
|
|
isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED");
|
|
|
|
|
}
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|