|  |  |  | @ -93,92 +93,73 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> { | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getData() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") { | 
		
	
		
			
				|  |  |  |  |         memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "HRSSA") { | 
		
	
		
			
				|  |  |  |  |         if (workListData!.rEQUESTTYPE == "EIT") { | 
		
	
		
			
				|  |  |  |  |           getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |         } else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") { | 
		
	
		
			
				|  |  |  |  |           getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |         } else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") { | 
		
	
		
			
				|  |  |  |  |           getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |         } else if (workListData!.rEQUESTTYPE == "ABSENCE") { | 
		
	
		
			
				|  |  |  |  |           getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |         } else if (workListData!.rEQUESTTYPE == "CONTACT") { | 
		
	
		
			
				|  |  |  |  |           getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |         // getBasicNTFBody = await WorkListApiClient().getBasicDetNTFBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |         // getAbsenceCollectionNotifications = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |         // subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", ""); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "STAMP") { | 
		
	
		
			
				|  |  |  |  |         if (workListData!.rEQUESTTYPE == "STAMP_MS") { | 
		
	
		
			
				|  |  |  |  |           getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |           getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "INVMOA") { | 
		
	
		
			
				|  |  |  |  |         getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "INVITEM") { | 
		
	
		
			
				|  |  |  |  |         getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       if (workListData!.iTEMTYPE == "POAPPRV") { | 
		
	
		
			
				|  |  |  |  |         getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!); | 
		
	
		
			
				|  |  |  |  |       if (getNotificationRespondAttributes.isNotEmpty) { | 
		
	
		
			
				|  |  |  |  |         notificationNoteInput = getNotificationRespondAttributes.first; | 
		
	
		
			
				|  |  |  |  |     // try { | 
		
	
		
			
				|  |  |  |  |     //   Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") { | 
		
	
		
			
				|  |  |  |  |       getUserInformation(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "HRSSA") { | 
		
	
		
			
				|  |  |  |  |       if (workListData!.rEQUESTTYPE == "EIT") { | 
		
	
		
			
				|  |  |  |  |         getEitNotificationBody(); | 
		
	
		
			
				|  |  |  |  |       } else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") { | 
		
	
		
			
				|  |  |  |  |         getPhonesNotificationBody(); | 
		
	
		
			
				|  |  |  |  |       } else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") { | 
		
	
		
			
				|  |  |  |  |         getBasicDetNtfBody(); | 
		
	
		
			
				|  |  |  |  |       } else if (workListData!.rEQUESTTYPE == "ABSENCE") { | 
		
	
		
			
				|  |  |  |  |         getAbsenceNotificationBody(); | 
		
	
		
			
				|  |  |  |  |       } else if (workListData!.rEQUESTTYPE == "CONTACT") { | 
		
	
		
			
				|  |  |  |  |         getContactNotificationBody(); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       // getBasicNTFBody = await WorkListApiClient().getBasicDetNTFBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       // getAbsenceCollectionNotifications = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       // subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", ""); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "STAMP") { | 
		
	
		
			
				|  |  |  |  |       getStampNotificationBody(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "INVMOA") { | 
		
	
		
			
				|  |  |  |  |       getMoNotificationBody(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "INVITEM") { | 
		
	
		
			
				|  |  |  |  |       getItemCreationNtf(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (workListData!.iTEMTYPE == "POAPPRV") { | 
		
	
		
			
				|  |  |  |  |       getPoNotification(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     notificationGetRespondAttributes(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       List dataToFetch = await Future.wait([ | 
		
	
		
			
				|  |  |  |  |         WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!), | 
		
	
		
			
				|  |  |  |  |         WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!), | 
		
	
		
			
				|  |  |  |  |         WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!), | 
		
	
		
			
				|  |  |  |  |       ]); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       notificationButtonsList = dataToFetch[0]; | 
		
	
		
			
				|  |  |  |  |       actionHistoryList = dataToFetch[1]; | 
		
	
		
			
				|  |  |  |  |       getAttachmentList = dataToFetch[2]; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       // List<Future> futureRequest = []; | 
		
	
		
			
				|  |  |  |  |       // List<Object> futureObject = []; | 
		
	
		
			
				|  |  |  |  |       // | 
		
	
		
			
				|  |  |  |  |       // addRequestInFuture(notificationButtonsList, WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!)); | 
		
	
		
			
				|  |  |  |  |       // addRequestInFuture(actionHistoryList, WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!)); | 
		
	
		
			
				|  |  |  |  |       // addRequestInFuture(getAttachmentList, WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!)); | 
		
	
		
			
				|  |  |  |  |     // List dataToFetch = await Future.wait([ | 
		
	
		
			
				|  |  |  |  |     // | 
		
	
		
			
				|  |  |  |  |     //   WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!), | 
		
	
		
			
				|  |  |  |  |     //   WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!), | 
		
	
		
			
				|  |  |  |  |     // ]); | 
		
	
		
			
				|  |  |  |  |     // | 
		
	
		
			
				|  |  |  |  |     // notificationButtonsList = dataToFetch[0]; | 
		
	
		
			
				|  |  |  |  |     // actionHistoryList = dataToFetch[1]; | 
		
	
		
			
				|  |  |  |  |     // getAttachmentList = dataToFetch[2]; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       // List dataToFetch = await Future.wait(futureRequest); | 
		
	
		
			
				|  |  |  |  |       // for(int i=0;i<dataToFetch.length;i++) { | 
		
	
		
			
				|  |  |  |  |       //   futureObject[i] = dataToFetch[i]; | 
		
	
		
			
				|  |  |  |  |       // } | 
		
	
		
			
				|  |  |  |  |     getNotificationButtons(); | 
		
	
		
			
				|  |  |  |  |     getActionHistory(); | 
		
	
		
			
				|  |  |  |  |     getAttachments(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       if (notificationButtonsList.isNotEmpty) { | 
		
	
		
			
				|  |  |  |  |         isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE"); | 
		
	
		
			
				|  |  |  |  |         isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED"); | 
		
	
		
			
				|  |  |  |  |         isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED"); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       setState(() {}); | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |       setState(() {}); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     // if (notificationButtonsList.isNotEmpty) { | 
		
	
		
			
				|  |  |  |  |     //   isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE"); | 
		
	
		
			
				|  |  |  |  |     //   isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED"); | 
		
	
		
			
				|  |  |  |  |     //   isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED"); | 
		
	
		
			
				|  |  |  |  |     // } | 
		
	
		
			
				|  |  |  |  |     //   Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |     //   setState(() {}); | 
		
	
		
			
				|  |  |  |  |     // } catch (ex) { | 
		
	
		
			
				|  |  |  |  |     //   Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |     //   Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     //   setState(() {}); | 
		
	
		
			
				|  |  |  |  |     // } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   List<Future> futureRequest = []; | 
		
	
		
			
				|  |  |  |  |   List<Object> futureObject = []; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void addRequestInFuture(data, request) { | 
		
	
		
			
				|  |  |  |  |     futureObject.add(data); | 
		
	
		
			
				|  |  |  |  |     futureRequest.add(request); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  |   int apiCallCount = 0; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getDataFromState() { | 
		
	
		
			
				|  |  |  |  |     if (workListData == null) { | 
		
	
	
		
			
				
					|  |  |  | @ -531,4 +512,254 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> { | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getEitNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getUserInformation() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getPhonesNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getBasicDetNtfBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getAbsenceNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getContactNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getStampNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       if (workListData!.rEQUESTTYPE == "STAMP_MS") { | 
		
	
		
			
				|  |  |  |  |         getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       } else { | 
		
	
		
			
				|  |  |  |  |         getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getMoNotificationBody() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getItemCreationNtf() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getPoNotification() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void notificationGetRespondAttributes() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!); | 
		
	
		
			
				|  |  |  |  |       if (getNotificationRespondAttributes.isNotEmpty) { | 
		
	
		
			
				|  |  |  |  |         notificationNoteInput = getNotificationRespondAttributes.first; | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getNotificationButtons() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!); | 
		
	
		
			
				|  |  |  |  |       if (notificationButtonsList.isNotEmpty) { | 
		
	
		
			
				|  |  |  |  |         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) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getActionHistory() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!); | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |         Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         setState(() {}); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void getAttachments() async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       // if (apiCallCount == 0) Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |       //  apiCallCount++; | 
		
	
		
			
				|  |  |  |  |       getAttachmentList = await WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!); | 
		
	
		
			
				|  |  |  |  |       //  apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       //  if (apiCallCount == 0) { | 
		
	
		
			
				|  |  |  |  |       //   Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       setState(() {}); | 
		
	
		
			
				|  |  |  |  |       //  } | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       // apiCallCount--; | 
		
	
		
			
				|  |  |  |  |       //   Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, null); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | } | 
		
	
	
		
			
				
					|  |  |  | 
 |