ใช้ข้อมูลหลักจาก dbหลัก
This commit is contained in:
parent
d2e6979d95
commit
afae9edf5f
3 changed files with 19 additions and 10 deletions
|
|
@ -23,7 +23,7 @@
|
|||
label="บันทึกข้อมูล"
|
||||
outline
|
||||
icon="mdi-content-save"
|
||||
@click="saveAuto = false && saveData"
|
||||
@click="clickSave"
|
||||
v-if="status === 'register' || status === 'rejectRegister'"
|
||||
:disable="!acceptTermOfUse || statusEdit"
|
||||
/>
|
||||
|
|
@ -131,6 +131,11 @@ const saveForm = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const clickSave = async () => {
|
||||
saveAuto.value = false
|
||||
await saveData()
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
await formInformation.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
|
|
@ -218,8 +223,9 @@ const saveData = async () => {
|
|||
? false
|
||||
: null
|
||||
})
|
||||
.then(() => {
|
||||
.then(async () => {
|
||||
success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
||||
if (saveAuto.value) await saveForm()
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
|
|
@ -229,7 +235,6 @@ const saveData = async () => {
|
|||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
if (saveAuto.value) await saveForm()
|
||||
await props.fetchStep()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue