|
|
|
@ -367,6 +367,12 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
|
|
|
|
|
case "Answer":
|
|
|
|
|
performAction("Answer");
|
|
|
|
|
break;
|
|
|
|
|
case "ReportGenerated":
|
|
|
|
|
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
|
|
|
|
|
break;
|
|
|
|
|
case "DataCorrected":
|
|
|
|
|
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
setState(() {
|
|
|
|
|
showFabOptions = false;
|
|
|
|
@ -525,6 +531,29 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void performDataCorrectionORReportGeneratedAction(String requestType, int taskId, int itemId, String employeeNumber) async {
|
|
|
|
|
try {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
ITGRequest? itgRequest = await WorkListApiClient().grantITGRequest(requestType, taskId, itemId, employeeNumber, "", "");
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
|
|
|
|
|
AppState().requestAllList!.removeAt(AppState().itgWorkListIndex!);
|
|
|
|
|
if (AppState().requestAllList!.isEmpty) {
|
|
|
|
|
Navigator.pop(context, "delegate_reload");
|
|
|
|
|
} else {
|
|
|
|
|
if (AppState().requestAllList!.length <= AppState().itgWorkListIndex!) {
|
|
|
|
|
Navigator.pop(context, "delegate_reload");
|
|
|
|
|
} else {
|
|
|
|
|
requestDetails = null;
|
|
|
|
|
getDataFromState();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void reloadITG() {
|
|
|
|
|
AppState().requestAllList!.removeAt(AppState().itgWorkListIndex!);
|
|
|
|
|
if (AppState().requestAllList!.isEmpty) {
|
|
|
|
|