|
|
|
|
@ -106,6 +106,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
void getData() async {
|
|
|
|
|
// try {
|
|
|
|
|
// Utils.showLoading(context);
|
|
|
|
|
|
|
|
|
|
getEitCollectionNotificationBodyList!.clear();
|
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
|
getPrNotificationBody = null;
|
|
|
|
|
getStampMsNotifications.clear();
|
|
|
|
|
getStampNsNotifications.clear();
|
|
|
|
|
getPoNotificationBody?.pOHeader!.clear();
|
|
|
|
|
getItemCreationNtfBody?.itemCreationHeader!.clear();
|
|
|
|
|
getPhonesNotificationBodyList!.clear();
|
|
|
|
|
getBasicDetNtfBodyList!.clear();
|
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
|
getContactNotificationBodyList = null;
|
|
|
|
|
|
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
|
|
|
|
|
getUserInformation();
|
|
|
|
|
}
|
|
|
|
|
@ -688,7 +701,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
|
|
|
|
|
animationIndex=animationIndex+1;
|
|
|
|
|
animationIndex = animationIndex + 1;
|
|
|
|
|
AppState().workList!.removeAt(AppState().workListIndex!);
|
|
|
|
|
if (AppState().workList!.isEmpty) {
|
|
|
|
|
Navigator.pop(context, "delegate_reload");
|
|
|
|
|
@ -725,6 +738,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
getEitCollectionNotificationBodyList!.clear();
|
|
|
|
|
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
@ -742,6 +756,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
memberInformationListModel = null;
|
|
|
|
|
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
@ -759,6 +774,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
getPhonesNotificationBodyList!.clear();
|
|
|
|
|
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
@ -776,6 +792,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
getBasicDetNtfBodyList!.clear();
|
|
|
|
|
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
@ -793,6 +810,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
|
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
@ -916,6 +934,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
getNotificationRespondAttributes.clear();
|
|
|
|
|
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
|
|
|
|
|
if (getNotificationRespondAttributes.isNotEmpty) {
|
|
|
|
|
notificationNoteInput = getNotificationRespondAttributes.first;
|
|
|
|
|
@ -936,6 +955,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
try {
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
notificationButtonsList.clear();
|
|
|
|
|
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
|
|
|
|
|
if (notificationButtonsList.isNotEmpty) {
|
|
|
|
|
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
|
|