clear code + comment

This commit is contained in:
STW_TTTY\stwtt 2024-04-30 14:31:55 +07:00
parent a9609d2d7f
commit ac70090e22
19 changed files with 231 additions and 166 deletions

View file

@ -70,6 +70,8 @@ const notFound = ref<string>("ไม่พบข้อมูลที่ค้
const noData = ref<string>("ไม่มีข้อมูล");
const expanded = ref<Array<string | null>>([]);
const expanded2 = ref<Array<string | null>>([]);
/** ดึงข้อมูลทั้งหมด */
function fetchData() {
showLoader();
http
@ -129,6 +131,7 @@ function fetchData() {
});
}
/** ดึงข้อมูล ยุทธศาสตร์/แผน */
function fetchTree() {
showLoader();
http
@ -145,6 +148,7 @@ function fetchTree() {
});
}
/** Main save */
async function onSubmit() {
dialogConfirm($q, async () => {
showLoader();
@ -161,6 +165,11 @@ async function onSubmit() {
});
}
/**
* update data
* @param data อมลยทธศาสตร/แผน
* @param type 1/2 เพอเเยก ทธศาสตร1 ทธศาสตร2
*/
function updateSelected(data: DataStrategic, type: string) {
if (type === "1") {
formData.strategyChildPlannedId = data.id;
@ -171,6 +180,7 @@ function updateSelected(data: DataStrategic, type: string) {
}
}
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
onMounted(() => {
fetchData();
fetchTree();