|
|
|
|
@ -146,7 +146,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
getPRNotification();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(controller.hasClients) {
|
|
|
|
|
if (controller.hasClients) {
|
|
|
|
|
controller.jumpToPage(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -210,6 +210,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Stack(
|
|
|
|
|
key: ValueKey(AppState().workListIndex ?? 0),
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
@ -251,19 +252,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
|
|
|
|
|
? DetailFragment(workListData, memberInformationListModel)
|
|
|
|
|
: RequestFragment(
|
|
|
|
|
moNotificationBodyList: getMoNotificationBodyList,
|
|
|
|
|
poLinesList: getPoNotificationBody?.pOLines ?? [],
|
|
|
|
|
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
|
|
|
|
|
prLinesList: getPrNotificationBody?.pRLines ?? [],
|
|
|
|
|
),
|
|
|
|
|
moNotificationBodyList: getMoNotificationBodyList,
|
|
|
|
|
poLinesList: getPoNotificationBody?.pOLines ?? [],
|
|
|
|
|
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
|
|
|
|
|
prLinesList: getPrNotificationBody?.pRLines ?? [],
|
|
|
|
|
),
|
|
|
|
|
isActionHistoryLoaded
|
|
|
|
|
? actionHistoryList.isEmpty
|
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
|
: ActionsFragment(
|
|
|
|
|
workListData!.nOTIFICATIONID,
|
|
|
|
|
actionHistoryList,
|
|
|
|
|
voidCallback: reloadWorkList,
|
|
|
|
|
)
|
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
|
: ActionsFragment(
|
|
|
|
|
workListData!.nOTIFICATIONID,
|
|
|
|
|
actionHistoryList,
|
|
|
|
|
voidCallback: reloadWorkList,
|
|
|
|
|
)
|
|
|
|
|
: showLoadingAnimation(),
|
|
|
|
|
InfoFragment(
|
|
|
|
|
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
|
|
|
|
|
@ -565,7 +566,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 +649,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,
|
|
|
|
|
@ -934,9 +935,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) {
|
|
|
|
|
|