|
|
@ -98,6 +98,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
|
|
|
|
getUserInformation();
|
|
|
|
getUserInformation();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notificationGetRespondAttributes();
|
|
|
|
|
|
|
|
getNotificationButtons();
|
|
|
|
|
|
|
|
getAttachments();
|
|
|
|
|
|
|
|
getActionHistory();
|
|
|
|
|
|
|
|
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA") {
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA") {
|
|
|
|
if (workListData!.rEQUESTTYPE == "EIT") {
|
|
|
|
if (workListData!.rEQUESTTYPE == "EIT") {
|
|
|
|
getEitNotificationBody();
|
|
|
|
getEitNotificationBody();
|
|
|
@ -130,8 +136,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
getPRNotification();
|
|
|
|
getPRNotification();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
notificationGetRespondAttributes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// List dataToFetch = await Future.wait([
|
|
|
|
// List dataToFetch = await Future.wait([
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!),
|
|
|
|
// WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!),
|
|
|
@ -142,10 +146,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
// actionHistoryList = dataToFetch[1];
|
|
|
|
// actionHistoryList = dataToFetch[1];
|
|
|
|
// getAttachmentList = dataToFetch[2];
|
|
|
|
// getAttachmentList = dataToFetch[2];
|
|
|
|
|
|
|
|
|
|
|
|
getNotificationButtons();
|
|
|
|
|
|
|
|
getActionHistory();
|
|
|
|
|
|
|
|
getAttachments();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (notificationButtonsList.isNotEmpty) {
|
|
|
|
// if (notificationButtonsList.isNotEmpty) {
|
|
|
|
// isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
// isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
// isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
|
|
|
|
// isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
|
|
|
@ -487,7 +487,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
builder: (cxt) => AcceptRejectInputDialog(
|
|
|
|
builder: (cxt) => AcceptRejectInputDialog(
|
|
|
|
message: LocaleKeys.requestedItems.tr(),
|
|
|
|
message: LocaleKeys.requestedItems.tr(),
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
textEditingController: textEditingController,
|
|
|
|
|
|
|
|
onTap: (note) {
|
|
|
|
onTap: (note) {
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
@ -773,17 +772,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
|
|
|
|
|
|
|
void getActionHistory() async {
|
|
|
|
void getActionHistory() async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
// if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
// apiCallCount++;
|
|
|
|
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
|
|
|
|
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
|
|
|
|
apiCallCount--;
|
|
|
|
// apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
// if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
|
apiCallCount--;
|
|
|
|
// apiCallCount--;
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|