Refactoring code module 05_placement

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-19 15:02:44 +07:00
parent 202fbf27b6
commit 4678ead38e
75 changed files with 3110 additions and 10795 deletions

View file

@ -1,30 +1,20 @@
<!-- หน รายละเอยดของ -->
<script setup lang="ts">
import { onMounted, reactive, ref } from "vue";
import { useDataStore } from "@/stores/data";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router";
import { useDataStore } from "@/stores/data";
import { usePersonalDataStore } from "@/modules/05_placement/storePersona";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import http from "@/plugins/http";
import config from "@/app.config";
import { usePersonalDataStore } from "@/modules/05_placement/storePersona";
import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
import EducationVue from "@/modules/05_placement/components/PersonalDetail/Education.vue";
import Certicate from "@/modules/05_placement/components/PersonalDetail/Information/Certicate.vue";
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
import {
AddressDataDefualt,
FamilyDataDefualt,
} from "@/modules/05_placement/interface/index/Main";
import type {
Property,
PointExam,
@ -35,25 +25,32 @@ import type {
optionData,
InformationOps,
} from "@/modules/05_placement/interface/index/Main";
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
import { checkPermission } from "@/utils/permissions";
const $q = useQuasar(); // show dialog
import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
import Certicate from "@/modules/05_placement/components/PersonalDetail/Information/Certicate.vue";
import EducationVue from "@/modules/05_placement/components/PersonalDetail/Information/Education.vue";
import ExamResult from "@/modules/05_placement/components/PersonalDetail/Information/ExamResult.vue";
import Qualification from "@/modules/05_placement/components/PersonalDetail/Information/Qualification.vue";
import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const store = useDataStore();
const mixin = useCounterMixin(); //
const mixin = useCounterMixin();
const storePersonal = usePersonalDataStore();
const { showLoader, hideLoader, messageError } = mixin;
const { changeTab } = store;
const statusEdit = ref<boolean>(false);
const profileType = ref<string>("");
const route = useRoute();
const examId = ref<string>(
route.params.personalId ? route.params.personalId.toString() : ""
);
const statusEdit = ref<boolean>(false); //
const profileType = ref<string>(""); //
//
const ExamDataDefualt: PointExam = {
pointA: 0,
pointB: 0,
@ -67,7 +64,7 @@ const ExamDataDefualt: PointExam = {
examRound: 0,
pass: "",
};
//
const InformationDataDefualt: Information = {
idCard: "",
prefix: "",
@ -89,29 +86,23 @@ const InformationDataDefualt: Information = {
religion: "",
religionId: "",
};
//
const personalData = ref({
id: "",
fullName: "",
});
const QualificationData = ref<Property[]>([]);
const ExamData = ref<PointExam>(ExamDataDefualt);
const InformationData = ref<Information>(InformationDataDefualt);
const EducationData = ref<Education[]>([]);
const FamilyData = ref<Family>(FamilyDataDefualt);
const AddressData = ref<Address>(AddressDataDefualt);
const CertificateData = ref<Certificate[]>([]);
const ExamData = ref<PointExam>(ExamDataDefualt); //
const InformationData = ref<Information>(InformationDataDefualt); //
const EducationData = ref<Education[]>([]); //
const FamilyData = ref<Family>(FamilyDataDefualt); //
const AddressData = ref<Address>(AddressDataDefualt); //
const CertificateData = ref<Certificate[]>([]); //
//
const isEdit = ref<boolean>(
checkPermission(route)?.attrIsUpdate ? true : false
);
const guidCheck = (id: string) => {
if (id == "00000000-0000-0000-0000-000000000000") {
return null;
}
return id;
};
const Ops = ref<InformationOps>({
prefixOps: [],
genderOps: [],
@ -144,16 +135,19 @@ const OpsFilter = ref<InformationOps>({
],
});
const fetchData = async () => {
/**
* งกนดงขอมลรายละเอยดทงหมด
*/
async function fetchData() {
showLoader();
storePersonal.loading = false;
await http
.get(config.API.placementPersonalId(examId.value))
.then((res: any) => {
const data = res.data.result;
.then(async (res) => {
const data = await res.data.result;
storePersonal.fecthDataInformation(data);
personalData.value.fullName = data.fullName;
personalData.value.id = data.personalId;
InformationData.value.idCard = data.idCard;
InformationData.value.fullName = data.fullName;
InformationData.value.firstname = data.firstname;
@ -263,19 +257,24 @@ const fetchData = async () => {
});
CertificateData.value = listCert;
})
.catch((e: any) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
};
.finally(() => {
hideLoader();
});
}
const fetchDataByType = async (type: string) => {
// storePersonal.loading = false;
/**
* งกนดงขอมลรายละเอยดตามประเภท
* @param type ประเภทของขอม
*/
async function fetchDataByType(type: string) {
showLoader();
await http
.get(config.API.placementPersonalId(examId.value))
.then((res: any) => {
const data = res.data.result;
.then(async (res) => {
const data = await res.data.result;
storePersonal.fecthDataInformation(data);
personalData.value.fullName = data.fullName;
personalData.value.id = data.personalId;
@ -392,18 +391,19 @@ const fetchDataByType = async (type: string) => {
QualificationData.value = data.isProperty;
}
})
.catch((e: any) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
}
/**
* get รายการ อมลเกยวกบบคคล
* งกนดอมลเกยวกบบคคล
*/
const fetchPerson = async () => {
async function fetchPerson() {
showLoader();
await http
.get(config.API.profileNewMetaMain)
.then((res) => {
@ -464,16 +464,32 @@ const fetchPerson = async () => {
Ops.value.religionOps = optionreligions;
OpsFilter.value.religionOps = optionreligions;
})
.catch((e: any) => {})
.finally(() => {});
};
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/**
* งกนเช id
* @param id profile
* @returns ID เป "00000000-0000-0000-0000-000000000000" ให return null
*
*/
function guidCheck(id: string) {
if (id == "00000000-0000-0000-0000-000000000000") {
return null;
}
return id;
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
// await checkProfileData();
await fetchData();
await changeTab("information");
await fetchPerson();
await Promise.all([fetchData(), changeTab("information"), fetchPerson()]);
});
</script>

View file

@ -53,10 +53,6 @@ const edit = async () => {
updateEdit(!props.editvisible);
props.edit();
};
const checkSave = () => {
props.validate();
props.save();
};
const clickNext = async () => {
await props.clickNext();
@ -93,8 +89,7 @@ const clickPrevious = async () => {
label="ลบข้อมูล"
color="red"
@click="clickDelete"
><!-- icon="mdi-delete"
<q-tooltip>ลบขอม</q-tooltip> -->
>
</q-btn>
<q-btn
v-show="editvisible"
@ -106,8 +101,6 @@ const clickPrevious = async () => {
label="ยกเลิกแก้ไข"
v-if="modalEdit == true"
>
<!-- icon="mdi-undo"
<q-tooltip>ยกเล</q-tooltip> -->
</q-btn>
<q-btn
v-if="!editvisible"
@ -117,8 +110,6 @@ const clickPrevious = async () => {
:color="editvisible ? 'grey-7' : 'primary'"
@click="edit"
>
<!-- icon="mdi-pencil-outline"
<q-tooltip></q-tooltip> -->
</q-btn>
<q-btn
@ -128,8 +119,7 @@ const clickPrevious = async () => {
:color="!editvisible ? 'grey-7' : 'public'"
type="submit"
label="บันทึก"
><!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
>
</q-btn>
</q-card-actions>
</template>

View file

@ -1,27 +0,0 @@
<script setup lang="ts">
const props = defineProps({
tittle: String,
close: {
type: Function,
default: () => console.log("not function"),
},
});
const close = async () => {
props.close();
};
</script>
<template>
<q-toolbar>
<q-toolbar-title class="text-subtitle2 text-bold">{{
tittle
}}</q-toolbar-title>
<q-btn
icon="close"
unelevated
round
dense
@click="close"
style="color: #ff8080; background-color: #ffdede"
/>
</q-toolbar>
</template>

View file

@ -1,17 +1,15 @@
<!-- card อมลทอย -->
<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import type { zipCodeOption } from "@/modules/05_placement/components/PersonalDetail/profileType";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
import { useRoute } from "vue-router";
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import { AddressDataDefualt } from "@/modules//05_placement/interface/index/Main";
import type { zipCodeOption } from "@/modules/05_placement/components/PersonalDetail/profileType";
import type {
AddressOps,
Address as AddressType,
@ -20,6 +18,16 @@ import type {
} from "@/modules/05_placement/interface/index/Main";
import type { PropType } from "vue";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const { success, messageError, showLoader, hideLoader, dialogConfirm } = mixin;
/**
* props
*/
const props = defineProps({
statusEdit: {
type: Boolean,
@ -40,21 +48,11 @@ const props = defineProps({
});
const emit = defineEmits(["update:statusEdit"]);
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const {
date2Thai,
success,
messageError,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const edit = ref<boolean>(false);
const onEdit = ref<boolean>(false);
const addressData = ref<AddressType>(props.data);
const myform = ref<any>();
const myform = ref<any>(); //refForm
const edit = ref<boolean>(false); //
const onEdit = ref<boolean>(false); //
const addressData = ref<AddressType>(props.data); //
//
const Ops = ref<AddressOps>({
provinceOps: [],
districtOps: [],
@ -62,6 +60,7 @@ const Ops = ref<AddressOps>({
subdistrictOps: [],
subdistrictCOps: [],
});
//
const OpsFilter = ref<AddressOps>({
provinceOps: [],
districtOps: [],
@ -69,14 +68,14 @@ const OpsFilter = ref<AddressOps>({
subdistrictOps: [],
subdistrictCOps: [],
});
//
const registAddress = reactive<AddressData>({
subDistrictId: "",
zipCode: "",
districtId: "",
provinceId: "",
});
//
const currentAddress = reactive<AddressData>({
subDistrictId: "",
zipCode: "",
@ -84,12 +83,13 @@ const currentAddress = reactive<AddressData>({
provinceId: "",
});
onMounted(async () => {
await getNewData();
emit("update:statusEdit", false);
});
const filterSelector = (val: any, update: Function, refData: string) => {
/**
* งกนคนหาขอมลในรายการตวเลอก
* @param val คำคนหา
* @param update งก
* @param refData ประเภทของตวเลอก
*/
function filterSelector(val: string, update: Function, refData: string) {
switch (refData) {
case "provinceOps":
update(() => {
@ -130,9 +130,9 @@ const filterSelector = (val: any, update: Function, refData: string) => {
default:
break;
}
};
}
const refreshData = async () => {
function refreshData() {
myform.value.reset();
if (onEdit.value) {
dialogConfirm(
@ -150,15 +150,21 @@ const refreshData = async () => {
} else {
edit.value = false;
}
};
}
const getNewData = async () => {
/**
* งกนดงขอมลใหม
*/
async function getNewData() {
await fetchProvince();
};
}
//
const editData = async () => {
/**
* งกนบนทกการแกไข
*/
async function editData() {
dialogConfirm($q, async () => {
showLoader();
const body = {
registrationSame: addressData.value.registSame == "1",
registrationAddress: addressData.value.registAddress,
@ -201,13 +207,19 @@ const editData = async () => {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
}
//
const selectProvince = async (e: string | null, name: string) => {
/**
* งกนเลอกขอมลจงหว
* @param e id งหว
* @param name อยตามทะเบยนบาน , อยจจ
*/
async function selectProvince(e: string | null, name: string) {
onEdit.value = true;
if (e != null) {
if (name == "1") {
@ -222,10 +234,14 @@ const selectProvince = async (e: string | null, name: string) => {
myform.value.resetValidation();
await fetchDistrict(e, name);
}
};
}
//
const selectDistrict = async (e: string | null, name: string) => {
/**
* งกนลอกขอมลอำเภอ
* @param e id อำเภอ
* @param name อยตามทะเบยนบาน , อยจจ
*/
async function selectDistrict(e: string | null, name: string) {
onEdit.value = true;
if (e != null) {
if (name == "1") {
@ -238,10 +254,14 @@ const selectDistrict = async (e: string | null, name: string) => {
myform.value.resetValidation();
await fetchSubDistrict(e, name);
}
};
}
//
const selectSubDistrict = (e: string | null, name: string) => {
/**
* งกนเลอกขอมลตำบล
* @param e id ตำบล
* @param name อยตามทะเบยนบาน , อยจจ
*/
async function selectSubDistrict(e: string | null, name: string) {
onEdit.value = true;
if (e != null) {
if (name == "1") {
@ -254,10 +274,12 @@ const selectSubDistrict = (e: string | null, name: string) => {
currentAddress.zipCode = namecode;
}
}
};
}
//
const fetchProvince = async () => {
/**
* งกนดงขอมลจงหว
*/
async function fetchProvince() {
showLoader();
await http
.get(config.API.orgProvince)
@ -330,10 +352,14 @@ const fetchProvince = async () => {
messageError($q, e);
})
.finally(() => {});
};
}
//
const fetchDistrict = async (id: string | null, position: string) => {
/**
* งกนดงขอมลอำเภอ
* @param id งหว
* @param position อยตามทะเบยนบาน , อยจจ
*/
async function fetchDistrict(id: string | null, position: string) {
if (id != null && id != "") {
await http
.get(config.API.orgProvince + `/${id}`)
@ -373,10 +399,14 @@ const fetchDistrict = async (id: string | null, position: string) => {
})
.finally(() => {});
}
};
}
//
const fetchSubDistrict = async (id: string | null, position: string) => {
/**
* งกนดงขอมลตำบล
* @param id อำเภอ
* @param position อยตามทะเบยนบาน , อยจจ
*/
async function fetchSubDistrict(id: string | null, position: string) {
if (id != null && id != "") {
await http
.get(config.API.orgDistrict + `/${id}`)
@ -422,9 +452,12 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
hideLoader();
});
}
};
}
const changeBtn = async () => {
/**
* งกนการแกไขขอม
*/
function changeBtn() {
if (edit.value == true) {
if (props.statusEdit === true) {
props.notiNoEdit();
@ -434,18 +467,33 @@ const changeBtn = async () => {
} else {
emit("update:statusEdit", false);
}
};
}
const getClass = (val: boolean) => {
/**
* งกนแกไขขอม
*/
function checkEdit() {
onEdit.value = true;
}
/**
* งกนสำหรบคนคาชอคลาสตามคาทกำหนด
* @param val าทใชกำหนดคลาส
*/
function getClass(val: boolean) {
return {
"full-width inputgreen cursor-pointer": val,
"full-width cursor-pointer": !val,
};
};
function checkEdit() {
onEdit.value = true;
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
await getNewData();
emit("update:statusEdit", false);
});
</script>
<template>

View file

@ -1,26 +1,30 @@
<!-- card ใบอนญาตประกอบอาช -->
<script setup lang="ts">
import { onMounted, ref, watch } from "vue";
import { useRoute } from "vue-router";
import { useProfileDataStore } from "@/modules/05_placement/store";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/stores/data";
import ProfileTable from "@/modules/05_placement/components/PersonalDetail/Table.vue";
import DialogHeader from "@/modules/05_placement/components/PersonalDetail/DialogHeader.vue";
import DialogFooter from "@/modules/05_placement/components/PersonalDetail/DialogFooter.vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useProfileDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import type {
RequestItemsObject,
DataProps,
} from "@/modules/05_placement/interface/request/Certificate";
import type { ResponseObject } from "@/modules/05_placement/interface/response/Certificate";
import HistoryTable from "@/components/TableHistory.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
import type { PropType } from "vue";
import type { Certificate } from "@/modules/05_placement/interface/index/Main";
import HistoryTable from "@/components/TableHistory.vue";
import ProfileTable from "@/modules/05_placement/components/PersonalDetail/Information/TableEducation.vue";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogFooter from "@/modules/05_placement/components/PersonalDetail/DialogFooter.vue";
/**
* props
*/
const props = defineProps({
statusEdit: {
type: Boolean,
@ -48,7 +52,7 @@ const mixin = useCounterMixin();
const {
date2Thai,
success,
dateToISO,
messageError,
showLoader,
hideLoader,
@ -75,10 +79,7 @@ const rowsHistory = ref<RequestItemsObject[]>([]); //select data history
const tittleHistory = ref<string>("ประวัติแก้ไขใบอนุญาตประกอบอาชีพ"); //
const filterHistory = ref<string>(""); //search data table history
const modalHistory = ref<boolean>(false); //modal
const checkValidate = ref<boolean>(false); //validate data
// const profileId = ref<string>(
// route.params.id ? route.params.id.toString() : ""
// );
const profileId = ref<string>("");
const rows = ref<Certificate[]>([]);
const filter = ref<string>(""); //search data table
@ -238,19 +239,6 @@ const visibleColumnsHistory = ref<String[]>([
"createdAt",
]);
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
await changeProfileColumns("certicate", count);
});
onMounted(async () => {
// await fetchData();
if (route.params.id) {
profileId.value = route.params.personalId.toString();
}
// await props.fetch();
rows.value = props.data;
});
/**
* กดดอมลกอนหน
*/
@ -489,55 +477,6 @@ const clickEditRow = () => {
editRow.value = true;
};
/**
* งชนดอมลประวแกไขขอมลทเลอก
* @param row อม row ประวการแกไข
*/
const clickHistory = async (row: RequestItemsObject) => {
tittleHistory.value =
props.profileType == "employee"
? "ประวัติแก้ไขใบอนุญาตของลูกจ้าง"
: "ประวัติแก้ไขใบอนุญาตประกอบอาชีพ";
modalHistory.value = true;
showLoader();
await http
.get(config.API.profileCertHisId(row.id))
.then((res) => {
let data = res.data.result;
rowsHistory.value = [];
data.map((e: ResponseObject) => {
rowsHistory.value.push({
id: e.id,
certificateNo: e.certificateNo,
issuer: e.issuer,
issueDate: new Date(e.issueDate),
expireDate: new Date(e.expireDate),
certificateType: e.certificateType,
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
});
});
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
/**
* validate input ใน dialog
*/
const validateData = async () => {
checkValidate.value = true;
await myForm.value.validate().then((result: boolean) => {
if (result == false) {
checkValidate.value = false;
}
});
};
/**
* class ดรปแบบแสดงระหวางขอมลทแกไขหรอแสดงเฉยๆ
* @param val อม input สำหรบแกไขหรอไม
@ -548,6 +487,17 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val,
};
};
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
changeProfileColumns("certicate", count);
});
onMounted(() => {
if (route.params.id) {
profileId.value = route.params.personalId.toString();
}
rows.value = props.data;
});
</script>
<template>
<q-card flat bordered class="col-12 q-px-lg q-py-md q-mt-md no-border">
@ -587,17 +537,6 @@ const getClass = (val: boolean) => {
{{ col.value }}
</div>
</q-td>
<!-- <q-td auto-width>
<q-btn
color="info"
flat
dense
round
size="14px"
icon="mdi-history"
@click="clickHistory(props.row)"
/>
</q-td> -->
</q-tr>
</template>
</ProfileTable>

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, computed, ref, watch } from "vue";
import { useQuasar, QForm } from "quasar";
import { onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useRoute } from "vue-router";
import axios from "axios";
@ -15,6 +15,18 @@ interface ArrayFileList {
fileName: string;
}
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const route = useRoute();
const {
success,
messageError,
showLoader,
dialogConfirm,
hideLoader,
dialogRemove,
} = mixin;
const props = defineProps({
statusEdit: {
type: Boolean,
@ -41,72 +53,13 @@ const emit = defineEmits(["update:statusEdit"]);
const documentFile = ref<any>(null);
const fileList = ref<ArrayFileList[]>([]);
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const route = useRoute();
const {
success,
messageError,
showLoader,
dialogConfirm,
hideLoader,
dialogRemove,
} = mixin;
const profileId = ref<string>(
route.params.personalId ? route.params.personalId.toString() : ""
);
const edit = ref<boolean>(false);
const uploader = ref<any>();
const files = ref<any>([]);
const file = ref<any>([]);
const edit = ref<boolean>(false); //
const uploader = ref<any>(); //
const file = ref<any>([]); //
const name = ref<string>("");
const dataMain = ref<any>([]);
// const getData = async () => {
// if (props.datainformation) {
// dataMain.value = props.datainformation;
// files.value = dataMain.value.docs;
// }
//
// if (profileId.value) {
// showLoader();
// await http
// .get(config.API.profilePaperId(profileId.value))
// .then((res) => {
// const data = res.data.result;
// files.value = data;
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
// }
// };
const deleteData = async (id: string) => {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.delete(config.API.documentDelid(profileId.value, id))
.then(() => {
success($q, "ลบไฟล์เอกสารสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await props.fetch();
});
},
"ยืนยันการลบเอกสารหลักฐาน",
"ต้องการยืนยันการลบเอกสารหลักฐานนี้หรือไม่ ?"
);
};
const uploadData = async () => {
if (profileId.value) {
@ -117,7 +70,6 @@ const uploadData = async () => {
});
const formData = new FormData();
formData.append("file", newFile);
// formData.append("moss", "newFile");
showLoader();
await http
.put(config.API.documentByid(profileId.value), formData)
@ -134,26 +86,10 @@ const uploadData = async () => {
edit.value = false;
emit("update:statusEdit", false);
});
// } else {
// // modalError(
// // $q,
// // "",
// // ""
// // );
// getData();
}
}
};
const fileAdd = async (val: any) => {
name.value = val[0].name;
file.value = val;
};
const downloadData = async (path: string) => {
window.open(path);
};
const changeBtn = async () => {
name.value = "";
if (edit.value == true) {
@ -171,7 +107,6 @@ const changeBtn = async () => {
/** ฟังชั่นใหม่ */
function clickUpload(file: any) {
const fileName = { fileName: file.name };
dialogConfirm(
$q,
async () => {
@ -295,6 +230,9 @@ function deleteFile(fileName: string) {
});
}
/**
* งกนดงขอมลรายการไฟล
*/
async function getData() {
showLoader();
await http
@ -312,6 +250,9 @@ async function getData() {
});
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
await getData();
});

View file

@ -4,8 +4,8 @@ import { useRoute } from "vue-router";
import { useProfileDataStore } from "@/modules/05_placement/store";
import { useCounterMixin } from "@/stores/mixin";
import ProfileTable from "@/modules/05_placement/components/PersonalDetail/Table.vue";
import DialogHeader from "@/modules/05_placement/components/PersonalDetail/DialogHeader.vue";
import ProfileTable from "@/modules/05_placement/components/PersonalDetail/Information/TableEducation.vue";
import DialogHeader from "@/components/DialogHeader.vue";
import DialogFooter from "@/modules/05_placement/components/PersonalDetail/DialogFooter.vue";
import { useQuasar } from "quasar";
import type {
@ -23,6 +23,22 @@ import type {
import type { QTableProps } from "quasar";
import type { PropType } from "vue";
const $q = useQuasar();
const route = useRoute();
const store = useProfileDataStore();
const { profileData, changeProfileColumns } = store;
const mixin = useCounterMixin();
const {
success,
dateToISO,
date2Thai,
messageError,
showLoader,
hideLoader,
dialogRemove,
dialogConfirm,
} = mixin;
const props = defineProps({
statusEdit: {
type: Boolean,
@ -38,21 +54,6 @@ const props = defineProps({
},
});
const $q = useQuasar();
const store = useProfileDataStore();
const { profileData, changeProfileColumns } = store;
const mixin = useCounterMixin();
const {
success,
dateToISO,
date2Thai,
messageError,
showLoader,
hideLoader,
dialogRemove,
dialogConfirm,
} = mixin;
const route = useRoute();
const id = ref<string>("");
const levelId = ref<string>();
const Ops = ref<EduOps>({
@ -96,6 +97,7 @@ const checkValidate = ref<boolean>(false); //validate data ผ่านหรื
const rows = ref<Education[]>(props.data);
const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([]);
profileData.education.columns.length == 0
? (visibleColumns.value = [
"educationLevel",
@ -108,7 +110,6 @@ profileData.education.columns.length == 0
"durationYear",
"other",
"fundName",
// "positionPath",
"finishDate",
"startDate",
"endDate",
@ -170,17 +171,7 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
// {
// name: "positionPath",
// align: "left",
// label: "",
// sortable: true,
// field: "positionPath",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// sort: (a: string, b: string) =>
// a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
// },
{
name: "degree",
align: "left",
@ -271,20 +262,9 @@ const columns = ref<QTableProps["columns"]>([
},
]);
watch(startDate, (count, prevCount) => {
minDate.value = new Date(`${startDate.value}-01-01`);
});
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
await changeProfileColumns("education", count);
});
onMounted(async () => {
await fetchLevel();
await fetchPositionPath();
rows.value = props.data;
});
/**
* งกนดงขอมลระด
*/
const fetchLevel = async () => {
showLoader();
await http
@ -306,6 +286,9 @@ const fetchLevel = async () => {
});
};
/**
* งกนดงขอมลตำแหน
*/
const fetchPositionPath = async () => {
let option: any = [];
option.push({ id: true, name: "ใช่" });
@ -314,7 +297,13 @@ const fetchPositionPath = async () => {
OpsFilter.value.positionPathOptions = option;
};
const filterSelector = (val: any, update: Function, refData: string) => {
/**
* งกนคนหาขอมลในรายการตวเลอก
* @param val คำคนหา
* @param update งก
* @param refData ประเภทของตวเลอก
*/
const filterSelector = (val: string, update: Function, refData: string) => {
switch (refData) {
case "levelOptions":
update(() => {
@ -359,7 +348,7 @@ const clickNext = async () => {
/**
* กดดอมลตอไป
*/
const getData = () => {
const getData = async () => {
const row = rows.value[rowIndex.value];
const checkLevelEducation = OpsFilter.value.levelOptions.find(
(e) => e.id === row.educationLevelId
@ -367,8 +356,6 @@ const getData = () => {
levelId.value = checkLevelEducation ? row.educationLevelId : "";
isDate.value = row.isDate;
isEducation.value = row.isEducation;
// positionPathId.value = resultPath;
institute.value = row.institute;
degree.value = row.degree;
field.value = row.field;
@ -396,7 +383,7 @@ const getData = () => {
/**
* เชคปมดอม อน อไป าตองแสดงไหม
*/
const checkRowPage = () => {
const checkRowPage = async () => {
editRow.value = false;
next.value = true;
previous.value = true;
@ -420,9 +407,9 @@ const clickEdit = () => {
/**
* กดปมเพมดานบน table
*/
const clickAdd = async () => {
const clickAdd = () => {
editRow.value = false;
await addData();
addData();
};
/**
@ -430,9 +417,9 @@ const clickAdd = async () => {
*/
const clickSave = async () => {
if (modalEdit.value) {
await dialogConfirm($q, () => editData());
dialogConfirm($q, () => editData());
} else {
await dialogConfirm($q, () => saveData());
dialogConfirm($q, () => saveData());
}
};
@ -444,7 +431,6 @@ const saveData = async () => {
await http
.post(config.API.placementEducationId(route.params.personalId.toString()), {
id: id.value,
// educationLevel: filter[0].name,
educationLevelId: levelId.value,
positionPathId: positionPathId.value,
institute: institute.value,
@ -475,6 +461,8 @@ const saveData = async () => {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
@ -487,7 +475,6 @@ const editData = async () => {
await http
.put(config.API.placementEducationId(route.params.personalId.toString()), {
id: id.value,
// educationLevel: filter[0].name,
educationLevelId: levelId.value,
positionPathId: positionPathId.value,
institute: institute.value,
@ -518,6 +505,8 @@ const editData = async () => {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
@ -526,22 +515,23 @@ const editData = async () => {
* ลบลบขอม
*/
const clickDelete = async () => {
dialogRemove($q, async () => await deletePlacementEducation());
};
const deletePlacementEducation = async () => {
showLoader();
await http
.delete(config.API.placementEducationId(id.value))
.then(async (res) => {
await props.fetch("Education");
await success($q, "ลบข้อมูลสำเร็จ");
modal.value = false;
rows.value = props.data;
})
.catch((e) => {
messageError($q, e);
hideLoader();
});
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.placementEducationId(id.value))
.then(async () => {
await props.fetch("Education");
await success($q, "ลบข้อมูลสำเร็จ");
modal.value = false;
rows.value = props.data;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
/**
@ -582,9 +572,6 @@ const selectData = async (_props: DataProps) => {
rowIndex.value = _props.rowIndex;
levelId.value = checkLevelEducation ? _props.row.educationLevelId : "";
// positionPathId.value = resultPath;
// levelId.value = _props.row.levelId;
// positionPathId.value = _props.row.positionPathId;
institute.value = _props.row.institute;
degree.value = _props.row.degree;
field.value = _props.row.field;
@ -646,17 +633,6 @@ const clickCancel = async () => {
`ข้อมูลมีการแก้ไข`,
`ยืนยันยกเลิกการแก้ไขใช่หรือไม่?`
);
// $q.dialog({
// title: ``,
// message: `?`,
// cancel: "",
// ok: "",
// persistent: true,
// }).onOk(async () => {
// edit.value = false;
// await checkRowPage();
// await getData();
// });
} else {
edit.value = false;
await checkRowPage();
@ -692,6 +668,23 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val,
};
};
watch(startDate, (count, prevCount) => {
minDate.value = new Date(`${startDate.value}-01-01`);
});
watch(visibleColumns, (count: String[], prevCount: String[]) => {
changeProfileColumns("education", count);
});
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
await fetchLevel();
await fetchPositionPath();
rows.value = props.data;
});
</script>
<template>
<q-card flat bordered class="col-12 q-px-lg q-py-md no-border">
@ -783,7 +776,7 @@ const getClass = (val: boolean) => {
option-value="id"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'levelOptions'
) "
/>
@ -1057,30 +1050,7 @@ const getClass = (val: boolean) => {
</template>
</datepicker>
</div>
<!-- <div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="isEducation"
hide-bottom-space
:label="`${'เป็นวุฒิการศึกษาในตำแหน่ง'}`"
@update:modelValue="clickEditRow"
emit-value
map-options
option-label="name"
:options="Ops.positionPathOptions"
option-value="id"
use-input
input-debounce="0"
@filter="(inputValue:any,
doneFn:Function) => filterSelector(inputValue, doneFn,'positionPathOptions'
) "
/>
</div> -->
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"

View file

@ -1,16 +1,24 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import type { QForm } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import type { DataOption } from "@/modules/05_placement/components/PersonalDetail/profileType";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
import { useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import { useRoute } from "vue-router";
import { FamilyDataDefualt } from "@/modules/05_placement/interface/index/Main";
import type { QForm } from "quasar";
import type { PropType } from "vue";
import type { Family } from "@/modules/05_placement/interface/index/Main";
import { FamilyDataDefualt } from "@/modules/05_placement/interface/index/Main";
import type { DataOption } from "@/modules/05_placement/components/PersonalDetail/profileType";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
const $q = useQuasar();
const route = useRoute();
const mixin = useCounterMixin();
const { success, messageError, showLoader, hideLoader, dialogConfirm } = mixin;
const props = defineProps({
statusEdit: {
@ -38,29 +46,25 @@ const props = defineProps({
});
const emit = defineEmits(["update:statusEdit"]);
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const {
date2Thai,
success,
messageError,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const edit = ref<boolean>(false);
const onEdit = ref<boolean>(false);
const myform = ref<QForm | null>(null);
const familyData = ref<Family>(props.data);
const edit = ref<boolean>(false); //
const onEdit = ref<boolean>(false); //
const familyData = ref<Family>(props.data); //
/**
* งกนแกไขขอม
*/
function checkEdit() {
onEdit.value = true;
}
function filterSelector(val: any, update: Function, refData: string) {
/**
* งกนคนหาขอมลในรายการตวเลอก
* @param val คำคนหา
* @param update งก
* @param refData ประเภทของตวเลอก
*/
function filterSelector(val: string, update: Function, refData: string) {
update(() => {
props.Ops[`${refData}`] = props.OpsFilter[`${refData}`].filter(
(v: DataOption) => v.name.indexOf(val) > -1
@ -121,32 +125,30 @@ async function editData() {
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(async () => {});
.finally(() => {
hideLoader();
});
});
}
async function saveData() {
await myform.value?.validate().then(async (success: boolean) => {
if (success) {
await editData();
} else {
}
});
}
function selectRadio(e: boolean, i: any) {
/**
* งกนเลอกคสมรส
* @param e , ไมสมรส
*/
function selectRadio(e: boolean) {
onEdit.value = true;
if (e) {
familyData.value.marryPrefixId = "";
familyData.value.marryFirstName = "";
familyData.value.marryLastName = "";
// familyData.value.lastnameCOld = "";
familyData.value.marryOccupation = "";
}
}
/**
* งกนการแกไขขอม
*/
async function changeBtn() {
if (edit.value == true) {
if (props.statusEdit === true) {
@ -159,6 +161,10 @@ async function changeBtn() {
}
}
/**
* งกนสำหรบคนคาชอคลาสตามคาทกำหนด
* @param val าทใชกำหนดคลาส
*/
function getClass(val: boolean) {
return {
"full-width inputgreen cursor-pointer": val,
@ -166,6 +172,9 @@ function getClass(val: boolean) {
};
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
emit("update:statusEdit", false);
});

View file

@ -1,25 +1,40 @@
<!-- card อมลสวนต -->
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import type { PropType } from "vue";
import { useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useProfileDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import type {
Information,
DataOption,
} from "@/modules/05_placement/components/PersonalDetail/profileType";
import type { QForm } from "quasar";
import { defaultInformation } from "@/modules/05_placement/components/PersonalDetail/profileType";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useRoute } from "vue-router";
import { useProfileDataStore } from "@/modules/05_placement/store";
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const profileStore = useProfileDataStore();
const { changeRetireText, changeBirth } = profileStore;
const {
date2Thai,
success,
dateToISO,
messageError,
modalError,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
import type { QForm } from "quasar";
import type { PropType } from "vue";
const onEdit = ref<boolean>(false);
const props = defineProps({
statusEdit: {
type: Boolean,
@ -46,30 +61,11 @@ const props = defineProps({
});
const emit = defineEmits(["update:statusEdit"]);
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const {
date2Thai,
success,
dateToISO,
messageError,
modalError,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const profileStore = useProfileDataStore();
const { changeRetireText, changeBirth } = profileStore;
const edit = ref<boolean>(false);
const informaData = ref<Information>(props.data);
const age = ref<boolean>(true);
const myform = ref<QForm | null>(null);
onMounted(async () => {
emit("update:statusEdit", false);
});
const onEdit = ref<boolean>(false); //
const edit = ref<boolean>(false); //
const informaData = ref<Information>(props.data); //
const age = ref<boolean>(true); //
const onCancel = async () => {
if (myform.value != null) {
@ -92,7 +88,13 @@ const onCancel = async () => {
}
};
const filterSelector = (val: any, update: Function, refData: string) => {
/**
* งกนคนหาขอมลในรายการตวเลอก
* @param val คำคนหา
* @param update งก
* @param refData ประเภทของตวเลอก
*/
const filterSelector = (val: string, update: Function, refData: string) => {
switch (refData) {
case "prefixOps":
update(() => {
@ -149,12 +151,20 @@ const filterSelector = (val: any, update: Function, refData: string) => {
}
};
/**
* งกเลอกวนเดอนปเก
* @param modelData นเดอนปเก
*/
const handleDate = async (modelData: Date) => {
informaData.value.dateOfBirth = modelData;
await calRetire(modelData);
onEdit.value = true;
};
/**
* งกนคำนวนวนเกษยณอายราชการ
* @param birth นเดอนปเก
*/
const calRetire = async (birth: Date) => {
const body = {
birthDate: dateToISO(birth),
@ -179,13 +189,16 @@ const calRetire = async (birth: Date) => {
});
};
/**
* นทกการแกไขขอม
*/
const editData = async () => {
dialogConfirm($q, async () => {
if (age.value == false) {
modalError($q, "พบข้อผิดพลาด", "วันเกิดไม่ถูกต้อง");
return;
}
showLoader();
const body: any = {
citizenId: informaData.value.idCard,
prefix: informaData.value.prefixId,
@ -215,11 +228,16 @@ const editData = async () => {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
/**
* งกนการแกไขขอม
*/
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
@ -232,6 +250,17 @@ const changeBtn = async () => {
}
};
/**
* งกนแกไขขอม
*/
function checkEdit() {
onEdit.value = true;
}
/**
* งกนสำหรบคนคาชอคลาสตามคาทกำหนด
* @param val าทใชกำหนดคลาส
*/
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
@ -239,9 +268,12 @@ const getClass = (val: boolean) => {
};
};
function checkEdit() {
onEdit.value = true;
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(async () => {
emit("update:statusEdit", false);
});
</script>
<template>
<q-card flat bordered class="col-12 q-px-lg q-py-md no-border">
@ -300,7 +332,7 @@ function checkEdit() {
:label="`${'คำนำหน้า'}`"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
) "
/>
@ -417,7 +449,7 @@ function checkEdit() {
:label="`${'เพศ'}`"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'genderOps'
) "
/>
@ -443,7 +475,7 @@ function checkEdit() {
:label="`${'สถานภาพ'}`"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'statusOps'
) "
/>
@ -468,7 +500,7 @@ function checkEdit() {
:label="`${'หมู่เลือด'}`"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'bloodOps'
) "
/>
@ -524,7 +556,7 @@ function checkEdit() {
:label="`${'ศาสนา'}`"
use-input
input-debounce="0"
@filter="(inputValue:any,
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'religionOps'
) "
/>

View file

@ -1,17 +1,17 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useRoute } from "vue-router";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
import config from "@/app.config";
import type { PropType } from "vue";
import type { Property } from "@/modules/05_placement/interface/index/Main";
import HeaderTop from "@/modules/05_placement/components/PersonalDetail/Information/top.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
const route = useRoute();
@ -33,13 +33,12 @@ const props = defineProps({
});
const emit = defineEmits(["update:statusEdit", "update:data"]);
const edit = ref<boolean>(false);
const onEdit = ref<boolean>(false);
onMounted(() => {
emit("update:statusEdit", false);
});
const edit = ref<boolean>(false); //
const onEdit = ref<boolean>(false); //
/**
* งกนบนทกการแกไขขอม
*/
const saveData = async () => {
dialogConfirm($q, async () => {
showLoader();
@ -57,11 +56,16 @@ const saveData = async () => {
})
.catch((e: any) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
};
/**
* งกนการแกไขขอม
*/
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
@ -91,9 +95,19 @@ const onCancel = async () => {
}
};
/**
* งกนแกไขขอม
*/
function checkEdit() {
onEdit.value = true;
}
/**
* ทำงานเมอมการเรยกใช Components
*/
onMounted(() => {
emit("update:statusEdit", false);
});
</script>
<template>
<q-form ref="myform" greedy @submit.prevent @validation-success="saveData">

View file

@ -49,12 +49,18 @@ const emit = defineEmits([
"update:editvisible",
]);
const updateEdit = (value: Boolean) => {
emit("update:editvisible", value);
};
/**
* งกนอปเดทคำคนหา
* @param value คำคนหา
*/
const updateInput = (value: string | number | null) => {
emit("update:inputfilter", value);
};
/**
* งกนอปเดท Visible
* @param value Visible
*/
const updateVisible = (value: []) => {
emit("update:inputvisible", value);
};
@ -63,20 +69,13 @@ const paginationLabel = (start: string, end: string, total: string) => {
return start + "-" + end + " ใน " + total;
};
/**
* งกนเพมขอม
*/
const checkAdd = () => {
props.add();
};
const edit = async () => {
updateEdit(!props.editvisible);
props.edit();
};
const cancel = async () => {
updateEdit(!props.editvisible);
props.cancel();
};
const resetFilter = () => {
// reset X
emit("update:inputfilter", "");

View file

@ -1,65 +0,0 @@
<!-- card รวม อมลสวนต อย -->
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";
import Information from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
import Address from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
import { useCounterMixin } from "@/stores/mixin";
const props = defineProps({
statusEdit: {
type: Boolean,
required: true,
},
profileType: {
type: String,
required: true,
},
});
const emit = defineEmits(["update:statusEdit"]);
const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin;
const statusEdit = ref<boolean>(false);
const modalNoEdit = ref<boolean>(false);
const modalNoEditTittle = ref<string>("ไม่สามารถไม่สามารถแก้ไขข้อมูลได้?");
const modalNoEditDetail = ref<string>("มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล");
watch(statusEdit, (count: boolean, prevCount: boolean) => {
emit("update:statusEdit", count);
});
watch(props, (count: any, prevCount: any) => {
statusEdit.value = props.statusEdit;
});
onMounted(() => {
// hideLoader();
});
const notiNoEdit = () => {
modalNoEdit.value = true;
};
const closeModalError = () => {
modalNoEdit.value = false;
};
</script>
<template>
<div class="row col-12 items-center">
<div>
<Information :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
</div>
<div class="col-12 q-px-md"><q-separator size="4px" /></div>
<div>
<Address :notiNoEdit="notiNoEdit" v-model:statusEdit="statusEdit" />
</div>
</div>
</template>
<style lang="scss" scoped>
.horizontal-line {
background-color: #f4f4f4;
height: 5px;
}
</style>