ราชการฯที่ได้รับทุนการศึกษา => status

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-10 11:09:52 +07:00
parent ec36ffe6ba
commit 9591eed2f8
3 changed files with 7 additions and 18 deletions

View file

@ -21,7 +21,7 @@ export default {
devScholarship,
devScholarshipByid: (id: string) => `${devScholarship}/${id}`,
devScholarshipStatus: (id: string, status: string) =>
`${devScholarship}/${id}/${status}`,
`${devScholarship}/status/${id}/${status}`,
/** download File */
developmentReportMain: () => `${developmentReport}/main`,

View file

@ -216,7 +216,7 @@ function fetchDataDetail(id: string) {
dataGuarantor.positionSide = data.guarantorPosExecutive
? data.guarantorPosExecutive
: "-";
isStatus.value = data.status;
isGov.value = data.citizenId ? true : false;
isGuarantor.value = data.guarantorCitizenId ? true : false;
})
@ -228,17 +228,6 @@ function fetchDataDetail(id: string) {
});
}
function fetchStatus(id: string) {
// http
// .get(config.API.devScholarshipStatus(id,"GRADUATE"))
// .then((res) => {
// const data = res.data.result;
// console.log(data);
isStatus.value = "PENDING";
// })
// .catch((err) => {});
}
function onSubmit() {
dialogConfirm($q, async () => {
showLoader();
@ -323,10 +312,10 @@ function onClickUpdateStatus(type: string) {
showLoader();
http
.get(config.API.devScholarshipStatus(scholarshipId.value, type))
.then((res) => {
const data = res.data.result;
console.log(data);
isStatus.value = type;
.then(() => {
if (scholarshipId.value) {
fetchDataDetail(scholarshipId.value);
}
})
.catch((err) => {
messageError($q, err);
@ -399,7 +388,6 @@ function upDate(data: DataPerson) {
onMounted(() => {
if (scholarshipId.value) {
fetchDataDetail(scholarshipId.value);
fetchStatus(scholarshipId.value);
}
});
</script>

View file

@ -62,6 +62,7 @@ interface DataSholarship {
studyAbroadStartDate: Date | null; //วันเริ่มต้นการศึกษาดูงานต่างประเทศ
studyAbroadEndDate: Date | null; //วันสิ้นสุดการศึกษาดูงานต่างประเทศ
totalPeriod: string; //รวมระยะเวลาในการศึกษา/รวมระยะเวลาในการฝึกอบรม
status: string;
}
export type { DataSholarship, ListSholarship };