fixing registry loading & display value
This commit is contained in:
parent
1a82792683
commit
bcd5d1d56c
4 changed files with 21 additions and 21 deletions
|
|
@ -186,7 +186,6 @@ function onClickViewDetail(id: string) {
|
|||
|
||||
/** function redirect ไปหน้ารายการคำร้องขอแก้ไขข้อมูล*/
|
||||
function redirectToPagePetition() {
|
||||
|
||||
if (empType.value === "officer") {
|
||||
router.push(`/registry-officer/request-edit`);
|
||||
} else {
|
||||
|
|
@ -210,7 +209,10 @@ watch(
|
|||
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center">
|
||||
<div class="row q-gutter-sm">
|
||||
<q-btn
|
||||
v-if="empType === 'officer' || empType === 'perm' && checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
empType === 'officer' ||
|
||||
(empType === 'perm' && checkPermission($route)?.attrIsUpdate)
|
||||
"
|
||||
color="primary"
|
||||
label="รายการคำร้องขอแก้ไข"
|
||||
@click="redirectToPagePetition()"
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ const editId = ref<string>("");
|
|||
const dialog = ref<boolean>(false); // แสดง popup เปลี่ยนชื่อ-นามสกุล
|
||||
const dialogStatus = ref<string>("create"); // สถานะแก้ไข สร้าง
|
||||
const filterSearch = ref<string>(""); // คำค้นหา
|
||||
const historyDialog = ref<boolean>(false); // แสดงประวัติการแก่้ไข
|
||||
const historyKeyword = ref<string>(""); // คำค้นหาประวัติ
|
||||
// ฟอร์มการเปลี่ยนชื่อ
|
||||
const changeNameData = reactive<FormChangeName>({
|
||||
profileId: profileId.value,
|
||||
|
|
@ -235,7 +233,6 @@ function onSubmit() {
|
|||
* @param id
|
||||
*/
|
||||
async function uploadProfile(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(
|
||||
config.API.subFile(
|
||||
|
|
@ -259,7 +256,6 @@ async function uploadProfile(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -269,7 +265,6 @@ async function uploadProfile(id: string) {
|
|||
* @param file ไฟล์เอกสาร
|
||||
*/
|
||||
async function uploadFileURL(uploadUrl: string, file: any) {
|
||||
showLoader();
|
||||
await axios
|
||||
.put(uploadUrl, file, {
|
||||
headers: {
|
||||
|
|
@ -281,9 +276,6 @@ async function uploadFileURL(uploadUrl: string, file: any) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -334,11 +326,11 @@ async function addData() {
|
|||
.then(async (res) => {
|
||||
subId.value = await res.data.result;
|
||||
await uploadProfile(res.data.result);
|
||||
await fetchData(profileId.value);
|
||||
await props?.fetchDataPersonal?.();
|
||||
await fetchDataPersonal();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialog();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
fetchData(profileId.value);
|
||||
props?.fetchDataPersonal?.();
|
||||
fetchDataPersonal();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -364,11 +356,11 @@ function editData(idData: string) {
|
|||
)
|
||||
.then(async () => {
|
||||
await uploadProfile(subId.value);
|
||||
await fetchData(profileId.value);
|
||||
await props.fetchDataPersonal?.();
|
||||
await fetchDataPersonal();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
closeDialog();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
fetchData(profileId.value);
|
||||
props.fetchDataPersonal?.();
|
||||
fetchDataPersonal();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
|
|
@ -1019,14 +1019,14 @@ onMounted(async () => {
|
|||
:val="1"
|
||||
label="ยังมีชีวิตอยู่"
|
||||
dense
|
||||
:color="!fromData.isLive ? 'grey' : 'primary'"
|
||||
color="primary"
|
||||
/>
|
||||
<q-radio
|
||||
v-model="fromData.isLive"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
:val="0"
|
||||
:color="!fromData.isLive ? 'grey' : 'red'"
|
||||
color="primary"
|
||||
label="ถึงแก่กรรม"
|
||||
dense
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -966,7 +966,13 @@ onMounted(async () => {
|
|||
empType === ""
|
||||
? ""
|
||||
: formDetail?.posType?.posTypeShortName
|
||||
} ${formDetail?.posLevel?.posLevelName}` || "-"
|
||||
? formDetail?.posType?.posTypeShortName
|
||||
: ""
|
||||
} ${
|
||||
formDetail?.posLevel?.posLevelName
|
||||
? formDetail?.posLevel?.posLevelName
|
||||
: "-"
|
||||
}`
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue