get commander
This commit is contained in:
parent
3887cdaed1
commit
759a7c556d
3 changed files with 35 additions and 0 deletions
|
|
@ -4,4 +4,6 @@ const org = `${env.API_URI}/org`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
profilePosition: () => `${org}/profile/keycloak/position`,
|
profilePosition: () => `${org}/profile/keycloak/position`,
|
||||||
|
|
||||||
|
searchCommander: `${org}/profile/search/commander`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,7 @@ async function fetcheSigner(id: string) {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
store.statusUpload = false;
|
store.statusUpload = false;
|
||||||
|
getCommander();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -410,6 +411,21 @@ onMounted(async () => {
|
||||||
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
downloadFile("6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getCommander() {
|
||||||
|
http
|
||||||
|
.get(config.API.searchCommander)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
formCommand.commanderFullname = data.commanderFullname;
|
||||||
|
formCommand.commanderPosition = data.commanderPosition;
|
||||||
|
formCommand.commanderAboveFullname = data.commanderAboveFullname;
|
||||||
|
formCommand.commanderAbovePosition = data.commanderAbovePosition;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
/** callback function */
|
/** callback function */
|
||||||
watch(
|
watch(
|
||||||
() => store.checkFileupload,
|
() => store.checkFileupload,
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ async function fetcheSigner(id: string) {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
store.statusUpload = false;
|
store.statusUpload = false;
|
||||||
|
getCommander();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -222,6 +223,22 @@ onMounted(async () => {
|
||||||
await fetchCheckDate();
|
await fetchCheckDate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getCommander() {
|
||||||
|
http
|
||||||
|
.get(config.API.searchCommander)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
formCommand.commanderFullname = data.commanderFullname;
|
||||||
|
formCommand.commanderPosition = data.commanderPosition;
|
||||||
|
formCommand.commanderAboveFullname = data.commanderAboveFullname;
|
||||||
|
formCommand.commanderAbovePosition = data.commanderAbovePosition;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.checkFileupload,
|
() => store.checkFileupload,
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue