(statusOptionMain.value);
+/**
+ * function บันทึกรายการคำร้อง
+ */
function onSubmit() {
dialogConfirm($q, () => {
showLoader();
@@ -64,6 +67,9 @@ function onSubmit() {
});
}
+/**
+ * function ปิด popup
+ */
function closeDialog() {
modal.value = false;
formData.status = "";
@@ -77,6 +83,11 @@ function classInput(val: boolean) {
};
}
+/**
+ * function ค้นหาคำใน select สถานะคำร้อง
+ * @param val คำค้น
+ * @param update Function
+ */
function filterOption(val: string, update: Function) {
update(() => {
statusOption.value = statusOptionMain.value.filter(
@@ -85,6 +96,9 @@ function filterOption(val: string, update: Function) {
});
}
+/**
+ * function fetch ข้อมูลคำร้องแก้ไข
+ */
function fetchDataRequest() {
showLoader();
http
diff --git a/src/modules/04_registryPerson/views/detailView.vue b/src/modules/04_registryPerson/views/detailView.vue
index 7af36f89e..e55d5e2dc 100644
--- a/src/modules/04_registryPerson/views/detailView.vue
+++ b/src/modules/04_registryPerson/views/detailView.vue
@@ -573,9 +573,9 @@ function selectAvatarHistory() {
http
.get(config.API.orgProfileAvatar + `/select/${profileId.value}/${data.id}`)
.then(async () => {
- closeImage();
await fetchDataPersonal();
await fetchProfile(profileId.value);
+ closeImage();
})
.catch((e) => {
messageError($q, e);
@@ -942,19 +942,6 @@ onMounted(async () => {
:src="n.downloadUrl"
:class="imageClass(n)"
>
-
(store.optionStatus);
const modalStatus = ref(false);
const requestId = ref("");
+/**
+ * function fetch รายการคำร้องขอแก้ไขทะเบียนประวัติ
+ */
function fetchListRequset() {
showLoader();
http
@@ -157,16 +160,28 @@ function fetchListRequset() {
});
}
+/**
+ * function เลือกสถานะคำร้อง
+ */
function updateStatusValue() {
page.value = 1;
+ // fetch รายการคำร้องขอแก้ไขทะเบียนประวัติ
fetchListRequset();
}
+/**
+ * function เคลียร์ สถานะคำร้อง
+ */
function clearStatus() {
status.value = "";
statusOption.value = store.optionStatus;
}
+/**
+ * function ค้นหาคำใน select สถานะคำร้อง
+ * @param val คำค้น
+ * @param update Function
+ */
function filterOption(val: string, update: Function) {
update(() => {
status.value = val ? "" : status.value;
@@ -176,11 +191,19 @@ function filterOption(val: string, update: Function) {
});
}
+/**
+ * funciton แก่ไขคำร้อง
+ * @param id รายการคำร้อง
+ */
function onclickEdit(id: string) {
modalStatus.value = true;
requestId.value = id;
}
+/**
+ * function เลือกแถวต่อหน้า
+ * @param newPagination
+ */
function updatePageSizePagination(newPagination: Pagination) {
page.value = 1;
pageSize.value = newPagination.rowsPerPage;
@@ -200,9 +223,9 @@ function onDownloadFile(id: string) {
id
)
)
- .then((res) => {
+ .then(async (res) => {
if (res.data.length !== 0) {
- downloadUrl(id, res.data[0].fileName);
+ await downloadUrl(id, res.data[0].fileName);
} else {
hideLoader();
}