hide bottom space rule
This commit is contained in:
parent
3c12d849f6
commit
a95c2fcbb4
10 changed files with 469 additions and 494 deletions
|
|
@ -9,10 +9,10 @@
|
|||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:changeBtn="changeBtn"
|
||||
:editData="status == 'register' || status == 'rejectRegister'"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform">
|
||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-12 row">
|
||||
|
|
@ -230,11 +230,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
|
|
@ -267,10 +267,10 @@ const $q = useQuasar()
|
|||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const edit = ref<boolean>(false)
|
||||
const edit = ref<boolean>(true)
|
||||
const occupationData = ref<Occupation>(defaultOccupation)
|
||||
const myform = ref<any>()
|
||||
const modalConsend = ref<boolean>(false)
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const loader = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
|
||||
|
|
@ -310,68 +310,68 @@ const fetchData = async () => {
|
|||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
if (store.consend == true) {
|
||||
const type = ref<string | null>('')
|
||||
if (occupationData.value.status == 'official') type.value = occupationData.value.official
|
||||
if (occupationData.value.status == 'personnel') type.value = occupationData.value.personnel
|
||||
if (occupationData.value.status == 'officialsOther')
|
||||
type.value = occupationData.value.officialsOther
|
||||
if (occupationData.value.status == 'employee') type.value = occupationData.value.employee
|
||||
if (occupationData.value.status == 'other') type.value = occupationData.value.other
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateOccupation(candidateId.value), {
|
||||
occupationType: occupationData.value.status,
|
||||
occupationCompany: occupationData.value.company,
|
||||
occupationDepartment: occupationData.value.department,
|
||||
occupationEmail: occupationData.value.email,
|
||||
occupationTelephone: occupationData.value.tel,
|
||||
occupationPosition: type.value
|
||||
})
|
||||
.then(() => {
|
||||
success($q, 'บันทึกข้อมูลอาชีพสำเร็จ')
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
// if (store.consend == true) {
|
||||
const type = ref<string | null>('')
|
||||
if (occupationData.value.status == 'official') type.value = occupationData.value.official
|
||||
if (occupationData.value.status == 'personnel') type.value = occupationData.value.personnel
|
||||
if (occupationData.value.status == 'officialsOther')
|
||||
type.value = occupationData.value.officialsOther
|
||||
if (occupationData.value.status == 'employee') type.value = occupationData.value.employee
|
||||
if (occupationData.value.status == 'other') type.value = occupationData.value.other
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateOccupation(candidateId.value), {
|
||||
occupationType: occupationData.value.status,
|
||||
occupationCompany: occupationData.value.company,
|
||||
occupationDepartment: occupationData.value.department,
|
||||
occupationEmail: occupationData.value.email,
|
||||
occupationTelephone: occupationData.value.tel,
|
||||
occupationPosition: type.value
|
||||
})
|
||||
.then(() => {
|
||||
success($q, 'บันทึกข้อมูลอาชีพสำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } 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)
|
||||
}
|
||||
} else {
|
||||
emit('update:statusEdit', false)
|
||||
}
|
||||
}
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue