|
|
|
|
@ -642,16 +642,13 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
|
|
|
|
|
|
|
|
|
|
void getItgRequestAttachments() async {
|
|
|
|
|
try {
|
|
|
|
|
// Utils.showLoading(context);
|
|
|
|
|
itgFormAttachmentsList =
|
|
|
|
|
isAttachmentLoaded = false;
|
|
|
|
|
itgFormAttachmentsList.clear();
|
|
|
|
|
List<ITGFormsAttachmentsModel> _itgFormAttachmentsList =
|
|
|
|
|
(await WorkListApiClient().getITGFormAttachments(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""))!;
|
|
|
|
|
// allowedActionList = itgRequest?.allowedActions ?? [];
|
|
|
|
|
// if (allowedActionList.isNotEmpty) {
|
|
|
|
|
// isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE");
|
|
|
|
|
// isApproveAvailable = itgRequest!.allowedActions!.any((element) => element.action == "Approve");
|
|
|
|
|
// isRejectAvailable = itgRequest!.allowedActions!.any((element) => element.action == "Reject");
|
|
|
|
|
// }
|
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
|
if (!isAttachmentLoaded) {
|
|
|
|
|
itgFormAttachmentsList = _itgFormAttachmentsList;
|
|
|
|
|
}
|
|
|
|
|
setState(() {
|
|
|
|
|
isAttachmentLoaded = true;
|
|
|
|
|
});
|
|
|
|
|
|