Merge branch 'develop' into devTee
This commit is contained in:
commit
69f09ac698
3 changed files with 18 additions and 22 deletions
|
|
@ -4,7 +4,7 @@ import type { DataOptions } from "./interface/index/Main";
|
||||||
|
|
||||||
export const useKpiDataStore = defineStore("KPIDate", () => {
|
export const useKpiDataStore = defineStore("KPIDate", () => {
|
||||||
const tabMain = ref<string>("1");
|
const tabMain = ref<string>("1");
|
||||||
const dataProfile = ref<any>();
|
const dataProfile = ref<any>(null);
|
||||||
const dataEvaluation = ref<any>({
|
const dataEvaluation = ref<any>({
|
||||||
plannedPoint: 0,
|
plannedPoint: 0,
|
||||||
rolePoint: 0,
|
rolePoint: 0,
|
||||||
|
|
|
||||||
|
|
@ -97,11 +97,6 @@ function getProfile() {
|
||||||
store.dataProfile = data;
|
store.dataProfile = data;
|
||||||
store.checkCompetency();
|
store.checkCompetency();
|
||||||
store.checkCompetencyDefaultCompetencyLevel();
|
store.checkCompetencyDefaultCompetencyLevel();
|
||||||
|
|
||||||
formProfile.fullName = `${data.prefix}${data.firstName} ${data.lastName}`;
|
|
||||||
formProfile.position = data.position;
|
|
||||||
formProfile.type = data.posTypeName;
|
|
||||||
formProfile.level = data.posLevelName;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -117,7 +112,7 @@ async function fetchProfile(id: string) {
|
||||||
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `profile-${id}`)
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
formProfile.avartar = res.data.downloadUrl;
|
store.dataProfile.avartar = res.data.downloadUrl;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// profilePicture.value = avatar;
|
// profilePicture.value = avatar;
|
||||||
|
|
@ -264,9 +259,7 @@ function onSubmitScore() {
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchEvaluation();
|
await fetchEvaluation();
|
||||||
await getProfile();
|
success($q, "บันทึกสำเร็จ");
|
||||||
await getOrgOp();
|
|
||||||
await success($q, "บันทึกสำเร็จ");
|
|
||||||
modalScore.value = false;
|
modalScore.value = false;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -288,7 +281,7 @@ async function clearScore() {
|
||||||
|
|
||||||
async function getAll() {
|
async function getAll() {
|
||||||
await fetchEvaluation();
|
await fetchEvaluation();
|
||||||
await getProfile();
|
await (store.dataProfile === null ? getProfile() : "");
|
||||||
await getOrgOp();
|
await getOrgOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -330,7 +323,7 @@ onMounted(async () => {
|
||||||
style="left: 2%; top: 50%; transform: translateY(-50%)"
|
style="left: 2%; top: 50%; transform: translateY(-50%)"
|
||||||
>
|
>
|
||||||
<q-avatar size="95px">
|
<q-avatar size="95px">
|
||||||
<q-img :src="formProfile.avartar" />
|
<q-img :src="store.dataProfile.avartar" />
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
|
|
@ -338,7 +331,7 @@ onMounted(async () => {
|
||||||
<div class="col-12" style="padding-left: 12%">
|
<div class="col-12" style="padding-left: 12%">
|
||||||
<div class="row col-12 items-center">
|
<div class="row col-12 items-center">
|
||||||
<span class="text-h6 text-weight-medium text-primary">{{
|
<span class="text-h6 text-weight-medium text-primary">{{
|
||||||
formProfile.fullName ? formProfile.fullName : "-"
|
`${store.dataProfile.prefix}${store.dataProfile.firstName} ${store.dataProfile.lastName}`
|
||||||
}}</span>
|
}}</span>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="q-gutter-x-sm">
|
<div class="q-gutter-x-sm">
|
||||||
|
|
@ -398,7 +391,7 @@ onMounted(async () => {
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span class="text-grey-6">ตำแหน่งในสายงาน</span>
|
<span class="text-grey-6">ตำแหน่งในสายงาน</span>
|
||||||
<span class="text-weight-medium text-dark">{{
|
<span class="text-weight-medium text-dark">{{
|
||||||
formProfile.position
|
store.dataProfile.position
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -406,7 +399,7 @@ onMounted(async () => {
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span class="text-grey-6">ประเภทตำแหน่ง</span>
|
<span class="text-grey-6">ประเภทตำแหน่ง</span>
|
||||||
<span class="text-weight-medium text-dark">{{
|
<span class="text-weight-medium text-dark">{{
|
||||||
formProfile.type
|
store.dataProfile.posTypeName
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -414,7 +407,7 @@ onMounted(async () => {
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<span class="text-grey-6">ระดับตำแหน่ง</span>
|
<span class="text-grey-6">ระดับตำแหน่ง</span>
|
||||||
<span class="text-weight-medium text-dark">{{
|
<span class="text-weight-medium text-dark">{{
|
||||||
formProfile.level
|
store.dataProfile.posLevelName
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -213,22 +213,25 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProfile() {
|
function getProfile() {
|
||||||
showLoader();
|
|
||||||
http
|
http
|
||||||
.get(config.API.profileBykeycloak())
|
.get(config.API.profilePosition())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
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.prefix = data.prefix;
|
||||||
formRound.firstName = data.firstName;
|
formRound.firstName = data.firstName;
|
||||||
formRound.lastName = data.lastName;
|
formRound.lastName = data.lastName;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
});
|
||||||
|
// .finally(() => {
|
||||||
|
// hideLoader();
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkClosed() {
|
function checkClosed() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue