เพิ่ม API Committee
This commit is contained in:
parent
372cacbf8a
commit
de5c82b7ef
2 changed files with 21 additions and 9 deletions
|
|
@ -33,6 +33,7 @@ export default {
|
||||||
probationsGetAssign: (assignId: string) => `${finish}?assign_id=${assignId}`,
|
probationsGetAssign: (assignId: string) => `${finish}?assign_id=${assignId}`,
|
||||||
changestatusProbations: (personalId: string) =>
|
changestatusProbations: (personalId: string) =>
|
||||||
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
||||||
|
probationCommittee : `${appointMain}/committee`,
|
||||||
|
|
||||||
// probationGetAssignList: (personalId: string) =>
|
// probationGetAssignList: (personalId: string) =>
|
||||||
// `${finish}/assign-list?personal_id=${personalId}`,
|
// `${finish}/assign-list?personal_id=${personalId}`,
|
||||||
|
|
|
||||||
|
|
@ -243,12 +243,6 @@ function clickSelect(id: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** รีเซ็ตค่าในช่อง input */
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
function paginationLabel(start: string, end: string, total: string) {
|
function paginationLabel(start: string, end: string, total: string) {
|
||||||
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
||||||
else return start + "-" + end + " ใน " + total;
|
else return start + "-" + end + " ใน " + total;
|
||||||
|
|
@ -284,6 +278,19 @@ async function fetchProfilePhoto() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isCommittee = ref<boolean>(false); //สถานะการแสดงเพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ
|
||||||
|
function fetchCheckCommittee() {
|
||||||
|
http
|
||||||
|
.get(config.API.probationCommittee + `/${personalId.value}`)
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
isCommittee.value = data;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function onSearch() {
|
function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filterKeyword.value,
|
filterKeyword.value,
|
||||||
|
|
@ -294,7 +301,12 @@ function onSearch() {
|
||||||
|
|
||||||
/** get ค่า เมื่อโหลดหน้า */
|
/** get ค่า เมื่อโหลดหน้า */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await Promise.all([getpersonalList(), getAssignList(), fetchProfilePhoto()]);
|
await Promise.all([
|
||||||
|
getpersonalList(),
|
||||||
|
getAssignList(),
|
||||||
|
fetchProfilePhoto(),
|
||||||
|
fetchCheckCommittee(),
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -389,8 +401,7 @@ onMounted(async () => {
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
isCommittee && (probation_status == 1 || probation_status == 7)
|
||||||
(probation_status == 1 || probation_status == 7)
|
|
||||||
"
|
"
|
||||||
@click="router.push(`/probation/add/${personalId}`)"
|
@click="router.push(`/probation/add/${personalId}`)"
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue