diff --git a/src/modules/01_exam/components/Form/Profile/Address.vue b/src/modules/01_exam/components/Form/Profile/Address.vue index b4e9ff5..0966df4 100644 --- a/src/modules/01_exam/components/Form/Profile/Address.vue +++ b/src/modules/01_exam/components/Form/Profile/Address.vue @@ -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) => { diff --git a/src/modules/01_exam/components/Form/Profile/Family.vue b/src/modules/01_exam/components/Form/Profile/Family.vue index 6960d0a..83d8478 100644 --- a/src/modules/01_exam/components/Form/Profile/Family.vue +++ b/src/modules/01_exam/components/Form/Profile/Family.vue @@ -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) => { diff --git a/src/modules/01_exam/components/Form/Profile/Information.vue b/src/modules/01_exam/components/Form/Profile/Information.vue index 715dac0..966a958 100644 --- a/src/modules/01_exam/components/Form/Profile/Information.vue +++ b/src/modules/01_exam/components/Form/Profile/Information.vue @@ -428,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 () => { diff --git a/src/modules/01_exam/components/Form/Profile/Occupation.vue b/src/modules/01_exam/components/Form/Profile/Occupation.vue index 97b481b..c48f67b 100644 --- a/src/modules/01_exam/components/Form/Profile/Occupation.vue +++ b/src/modules/01_exam/components/Form/Profile/Occupation.vue @@ -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 = () => {