ทะเบียนประวัติ => ข้อมูลส่วนตัว

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-16 13:45:46 +07:00
parent 722794a27e
commit ddf4c8b9d4
9 changed files with 228 additions and 168 deletions

View file

@ -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)"
>
<!-- <div
class="absolute-top bg-transparent cursor-pointer text-right"
style="padding: 5px"
>
<q-btn
icon="delete"
unelevated
round
dense
@click="deletePhoto"
style="color: #ff8080"
/>
</div> -->
<div
class="absolute-bottom col-12 cursor-pointer flex justify-between items-center"
style="padding: 5px"

View file

@ -132,6 +132,9 @@ const statusOption = ref<DataOption[]>(store.optionStatus);
const modalStatus = ref<boolean>(false);
const requestId = ref<string>("");
/**
* 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();
}