This commit is contained in:
setthawutttty 2024-10-16 10:41:37 +07:00
parent 7817c34f90
commit 77120a0f7b

View file

@ -56,6 +56,7 @@ const empType = ref<string>(
: "-employee"
);
const emailVerify = ref<boolean | null>(null);
const id = ref<string>("");
const modal = ref<boolean>(false); //
const informaData = ref<ResponseObject>(); //
@ -78,6 +79,7 @@ const dataLabel = {
religion: "ศาสนา",
bloodGroup: "หมู่เลือด",
phone: "เบอร์โทร",
email: "อีเมล",
prefix: "คำนำหน้าชื่อ",
rank: "ยศ",
firstName: "ชื่อ",
@ -290,6 +292,9 @@ async function getData() {
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then((res) => {
informaData.value = res.data.result;
emailVerify.value = res.data.result.email
? res.data.result.emailVerify
: null;
id.value = res.data.result.id;
if (res.data.result.birthDate) {
@ -511,10 +516,17 @@ onMounted(() => {
<div class="col-md-5 col-12 row">
<div class="col-5 col text-grey-6 text-weight-medium">
<div
v-for="label in Object.keys(dataLabel).slice(6, 11)"
v-for="label in Object.keys(dataLabel).slice(6, 12)"
class="q-py-xs"
>
{{ dataLabel[label as keyof typeof dataLabel] }}
<q-icon
v-if="label == 'email' && emailVerify == false"
name="mdi-alert-box"
size="sm"
color="warning"
><q-tooltip>รอยนยนอเมล</q-tooltip></q-icon
>
</div>
</div>
<!-- data -->
@ -534,6 +546,9 @@ onMounted(() => {
<div class="q-py-xs">
{{ informaData.phone ? informaData.phone : "-" }}
</div>
<div class="q-py-xs">
{{ informaData.email ? informaData.email : "-" }}
</div>
</div>
</div>
</div>