ITG change pushed.

master
Sultan khan 11 months ago
parent 6d92a78843
commit d7f45fa0b9

@ -348,7 +348,7 @@ class WorkListApiClient {
}, url, postParams);
}
Future<ITGRequest?> getITGFormDetails(String requestType, int taskId, int itemId, String employeeNumber) async {
Future<ITGRequest?> getITGFormDetails(String requestType, taskId, itemId, String employeeNumber) async {
String url = "${ApiConsts.cocRest}ITGGetFormDetials";
Map<String, dynamic> postParams = {
"RequestType": requestType,
@ -363,7 +363,7 @@ class WorkListApiClient {
}, url, postParams);
}
Future<ITGRequest?> rejectITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String comments) async {
Future<ITGRequest?> rejectITGRequest(String requestType, taskId, itemId, String employeeNumber, String comments) async {
String url = "${ApiConsts.cocRest}ITGRejectRequest";
Map<String, dynamic> postParams = {
"RequestType": requestType,
@ -379,7 +379,7 @@ class WorkListApiClient {
}, url, postParams);
}
Future<ITGRequest?> approveITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String comments) async {
Future<ITGRequest?> approveITGRequest(String requestType, taskId, itemId, String employeeNumber, String comments) async {
String url = "${ApiConsts.cocRest}ITGApproveRequest";
Map<String, dynamic> postParams = {
"RequestType": requestType,
@ -395,7 +395,7 @@ class WorkListApiClient {
}, url, postParams);
}
Future<ITGRequest?> delegateITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async {
Future<ITGRequest?> delegateITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async {
String url = "${ApiConsts.cocRest}ITGDelegateRequest";
Map<String, dynamic> postParams = {
"RequestType": requestType,
@ -414,7 +414,7 @@ class WorkListApiClient {
// ANSWER = 'Services/COCWS.svc/REST/ITGAnswer';
Future<ITGRequest?> answerITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async {
Future<ITGRequest?> answerITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async {
String url = "${ApiConsts.cocRest}ITGAnswer";
Map<String, dynamic> postParams = {
"RequestType": requestType,
@ -448,7 +448,7 @@ class WorkListApiClient {
}, url, postParams);
}
Future<ITGRequest?> informationITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async {
Future<ITGRequest?> informationITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async {
String url = "${ApiConsts.cocRest}ITGRequestInformation";
Map<String, dynamic> postParams = {
"RequestType": requestType,

@ -1,6 +1,6 @@
class RequestDetails {
int? iD;
int? itemID;
dynamic iD;
dynamic itemID;
String? listID;
String? listName;
String? modifiedDate;

@ -64,7 +64,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
void getItgData() async {
try {
Utils.showLoading(context);
itgRequest = await WorkListApiClient().getITGFormDetails(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
itgRequest = await WorkListApiClient().getITGFormDetails(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
allowedActionList = itgRequest?.allowedActions ?? [];
if (allowedActionList.isNotEmpty) {
isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE");
@ -467,18 +467,18 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
actionMode: actionMode,
onTap: (note) {
if (actionMode == "APPROVED") {
performApproveAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
performApproveAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
} else if (actionMode == "Answer") {
performAnswerAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
performAnswerAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
} else {
performRejectAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
performRejectAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
}
},
),
);
}
void performAnswerAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async {
void performAnswerAction(String requestType, taskId, itemId, String employeeNumber, String comments) async {
try {
Utils.showLoading(context);
ITGRequest? itgRequest = await WorkListApiClient().answerITGRequest(requestType, taskId, itemId, employeeNumber, "", comments);
@ -502,7 +502,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
}
}
void performRejectAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async {
void performRejectAction(String requestType, taskId, itemId, String employeeNumber, String comments) async {
try {
Utils.showLoading(context);
ITGRequest? itgRequest = await WorkListApiClient().rejectITGRequest(requestType, taskId, itemId, employeeNumber, comments);
@ -526,7 +526,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
}
}
void performApproveAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async {
void performApproveAction(String requestType, taskId, itemId, String employeeNumber, String comments) async {
try {
Utils.showLoading(context);
ITGRequest? itgRequest = await WorkListApiClient().approveITGRequest(requestType, taskId, itemId, employeeNumber, comments);

@ -211,13 +211,13 @@ class SelectedItemSheet extends StatelessWidget {
try {
var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!];
if (apiMode == "Delegate") {
await WorkListApiClient().delegateITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
await WorkListApiClient().delegateITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
} else if (apiMode == "RequestInformation") {
await WorkListApiClient().informationITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
await WorkListApiClient().informationITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
} else if (apiMode == "Answer") {
await WorkListApiClient().answerITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
await WorkListApiClient().answerITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "",
isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
}
Utils.hideLoading(context);

@ -122,13 +122,13 @@ class SelectedItgItemSheet extends StatelessWidget {
var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!];
if (apiMode == "Delegate") {
await WorkListApiClient()
.delegateITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
.delegateITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
} else if (apiMode == "RequestInformation") {
await WorkListApiClient()
.informationITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
.informationITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
} else if (apiMode == "Answer") {
await WorkListApiClient()
.answerITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
.answerITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment);
}
Utils.hideLoading(context);
Navigator.pop(context, "delegate_reload");

Loading…
Cancel
Save