แก้ fetch data ระบบ kpi
This commit is contained in:
parent
c01ad19889
commit
525d363825
3 changed files with 12 additions and 11 deletions
|
|
@ -264,9 +264,7 @@ function onSubmitScore() {
|
|||
})
|
||||
.then(async (res) => {
|
||||
await fetchEvaluation();
|
||||
await getProfile();
|
||||
await getOrgOp();
|
||||
await success($q, "บันทึกสำเร็จ");
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
modalScore.value = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -288,7 +286,7 @@ async function clearScore() {
|
|||
|
||||
async function getAll() {
|
||||
await fetchEvaluation();
|
||||
await getProfile();
|
||||
await (store.dataProfile === null ? getProfile() : "");
|
||||
await getOrgOp();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -213,22 +213,25 @@ function onSubmit() {
|
|||
}
|
||||
|
||||
function getProfile() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileBykeycloak())
|
||||
.get(config.API.profilePosition())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formRound.profileId = data.id;
|
||||
store.dataProfile = data;
|
||||
store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
|
||||
formRound.profileId = data.profileId;
|
||||
formRound.prefix = data.prefix;
|
||||
formRound.firstName = data.firstName;
|
||||
formRound.lastName = data.lastName;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
}
|
||||
|
||||
function checkClosed() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue