This commit is contained in:
AnandaTon 2023-03-22 13:34:44 +07:00
commit 879b9cd2e1
7 changed files with 126 additions and 67 deletions

View file

@ -282,27 +282,26 @@ const saveData = async () => {
if (store.consend == true) {
edit.value = false
emit('update:statusEdit', false)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
} else {
}
})
} else {
modalConsend.value = true
}
}
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
}
} else {
emit('update:statusEdit', false)
}
}
} else {
emit('update:statusEdit', false)
}
})
}
const selectProvince = (e: string, name: string) => {

View file

@ -402,27 +402,26 @@ const saveData = async () => {
if (store.consend == true) {
edit.value = false
emit('update:statusEdit', false)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
} else {
}
})
} else {
modalConsend.value = true
}
}
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
}
} else {
emit('update:statusEdit', false)
}
}
} else {
emit('update:statusEdit', false)
}
})
}
const selectRadio = (e: boolean, i: any) => {

View file

@ -106,7 +106,11 @@
:label="`${'วัน/เดือน/ปี เกิด'}`"
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
<q-icon
name="event"
class="cursor-pointer"
:style="edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)'"
>
</q-icon>
</template>
</q-input>
@ -241,7 +245,11 @@
:label="`${'วัน/เดือน/ปี'}`"
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
<q-icon
name="event"
class="cursor-pointer"
:style="edit ? 'color: var(--q-primary)' : 'color: var(--q-grey)'"
>
</q-icon>
</template>
</q-input>
@ -420,27 +428,26 @@ const saveData = async () => {
if (store.consend == true) {
edit.value = false
emit('update:statusEdit', false)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
} else {
}
})
} else {
modalConsend.value = true
}
}
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
}
} else {
emit('update:statusEdit', false)
}
}
} else {
emit('update:statusEdit', false)
}
})
}
const fetchProvince = async () => {

View file

@ -277,27 +277,26 @@ const saveData = async () => {
if (store.consend == true) {
edit.value = false
emit('update:statusEdit', false)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
} else {
}
})
} else {
modalConsend.value = true
}
}
const changeBtn = async () => {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
await myform.value.validate().then(async (success: boolean) => {
if (success) {
if (edit.value == true) {
if (props.statusEdit === true) {
edit.value = false
props.notiNoEdit()
} else {
emit('update:statusEdit', true)
}
} else {
emit('update:statusEdit', false)
}
}
} else {
emit('update:statusEdit', false)
}
})
}
const consenClose = () => {