PMCORE-4006

This commit is contained in:
Luciana Nuñez
2022-11-03 15:04:29 -04:00
parent 305ce67bbc
commit 920c610e25
8 changed files with 435 additions and 23 deletions

View File

@@ -239,6 +239,21 @@ export let cases = {
}
});
},
/**
* get the list of users to re-assign
* @param {*} data
* @returns
*/
getUsersToReassign(data) {
return Api.get({
service: "GET_USERS_TO_REASSIGN",
data: {},
keys: {
task_uid: data.TAS_UID,
app_uid: data.APP_UID
}
});
},
reassingCase(data) {
return Api.update({
service: "REASSIGN_CASE",
@@ -254,6 +269,25 @@ export let cases = {
}
});
},
/**
* Reassign a case to a new user
* @param {*} data
*/
reassingCaseSupervisor(data) {
return Api.update({
service: "REASSIGN_CASE",
data: {
usr_uid_target: data.userSelected,
del_index: data.DEL_INDEX,
reason: data.reasonReassign,
sendMail: data.notifyUser,
usr_uid_source: data.USR_UID
},
keys: {
app_uid: data.APP_UID
}
});
},
/**
* Claim case with endpoint
* @param {*} data
@@ -270,6 +304,38 @@ export let cases = {
}
});
},
/**
* Assign case with endpoint
* @param {*} data
* @returns
*/
assignCase(data) {
return Api.update({
service: "ASSIGN_CASE",
data: {
reason: data.reasonReassign,
sendMail: data.notifyUser,
index: data.DEL_INDEX
},
keys: {
app_uid: data.APP_UID,
usr_uid: data.userSelected
}
});
},
/**
* Verify if the user is Supervisor
* @param {*} data
* @returns
*/
getIsSupervisor(data) {
return Api.get({
service: "IS_SUPERVISOR",
keys: {
app_num: data
}
});
},
/**
* Service to jump a case by it's number
* @param {object} dt