hide bottom space rule

This commit is contained in:
Kittapath 2023-03-28 13:22:07 +07:00
parent 3c12d849f6
commit a95c2fcbb4
10 changed files with 469 additions and 494 deletions

View file

@ -8,7 +8,7 @@
</div>
<div v-if="editData == true">
<div class="q-gutter-sm q-mx-sm" v-if="addData == true">
<q-btn
<!-- <q-btn
size="12px"
v-if="!edit"
flat
@ -19,7 +19,7 @@
icon="mdi-pencil-outline"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-btn> -->
<q-btn
size="12px"
flat
@ -31,7 +31,7 @@
>
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
size="12px"
flat
round
@ -41,10 +41,10 @@
icon="mdi-undo"
>
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
</q-btn> -->
</div>
<div class="q-pl-sm" v-else>
<q-btn
<!-- <q-btn
size="12px"
v-if="!edit"
flat
@ -55,7 +55,7 @@
icon="mdi-pencil-outline"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-btn> -->
<q-btn
size="12px"
flat
@ -67,7 +67,7 @@
>
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
size="12px"
flat
round
@ -77,7 +77,7 @@
icon="mdi-undo"
>
<q-tooltip>ยกเล</q-tooltip>
</q-btn>
</q-btn> -->
</div>
</div>
<q-space />

View file

@ -64,7 +64,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -79,7 +78,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -94,7 +92,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -127,7 +124,6 @@
<q-input
:class="getClass(edit)"
class="datepicker"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -145,7 +141,6 @@
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -177,11 +172,11 @@
</q-form>
</q-card>
</q-dialog>
<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 { onMounted, ref, watch } from 'vue'
@ -230,7 +225,7 @@ const salary = ref<number | null>()
const duration = ref<[Date, Date]>([new Date(), new Date()])
const reason = ref<string>()
const myForm = ref<any>() //form data input
const edit = ref<boolean>(false) // dialog
const edit = ref<boolean>(true) // dialog
const modal = ref<boolean>(false) //modal add detail
const modalEdit = ref<boolean>(false) //modal
const rawItem = ref<RequestItemsObject>() // row
@ -240,7 +235,7 @@ const next = ref<boolean>() //แสดงปุ่มดูข้อมูล
const editRow = ref<boolean>(false) //
const statusCode = ref<number>()
const checkValidate = ref<boolean>(false) //validate data
const modalConsend = ref<boolean>(false)
// const modalConsend = ref<boolean>(false)
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const rows = ref<RequestItemsObject[]>([])
const filter = ref<string>('') //search data table
@ -387,7 +382,7 @@ const checkRowPage = () => {
* กดปมแกไขใน dialog
*/
const clickEdit = () => {
edit.value = true
// edit.value = true
next.value = false
previous.value = false
}
@ -424,11 +419,11 @@ const clickDeleteRow = async () => {
.finally(async () => {
loader.value = false
await fetchData()
edit.value = false
// edit.value = false
})
} else {
await fetchData()
edit.value = false
// edit.value = false
}
}
@ -438,15 +433,15 @@ const clickDeleteRow = async () => {
const clickSave = async () => {
myForm.value.validate().then(async (result: boolean) => {
if (result) {
if (store.consend == true) {
if (modalEdit.value) {
await editData()
} else {
await saveData()
}
// if (store.consend == true) {
if (modalEdit.value) {
await editData()
} else {
modalConsend.value = true
await saveData()
}
// } else {
// modalConsend.value = true
// }
}
})
}
@ -476,7 +471,7 @@ const saveData = async () => {
})
.finally(async () => {
loader.value = false
edit.value = false
// edit.value = false
modal.value = false
await fetchData()
})
@ -507,7 +502,7 @@ const editData = async () => {
})
.finally(async () => {
loader.value = false
edit.value = false
// edit.value = false
modal.value = false
await fetchData()
})
@ -548,12 +543,12 @@ const selectData = (props: DataProps) => {
duration.value = props.row.duration
reason.value = props.row.reason
id.value = props.row.id
if (edit.value == true) {
next.value = false
previous.value = false
} else {
checkRowPage()
}
// if (edit.value == true) {
next.value = false
previous.value = false
// } else {
// checkRowPage()
// }
}
/**
@ -569,21 +564,21 @@ const addRow = () => {
reason.value = ''
}
const consenClose = () => {
modalConsend.value = false
}
// const consenClose = () => {
// modalConsend.value = false
// }
const consendOk = () => {
modalConsend.value = false
store.consend = true
clickSave()
}
// const consendOk = () => {
// modalConsend.value = false
// store.consend = true
// clickSave()
// }
/**
* งกนปมยกเลกการแกไขขอม
*/
const clickCancel = async () => {
edit.value = false
// edit.value = false
}
/**

View file

@ -17,7 +17,6 @@
<div class="col-4">
<q-input
class="q-my-sm"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -100,7 +99,7 @@ const props = defineProps({
}
})
const edit = ref<boolean>(false)
const edit = ref<boolean>(true)
const name = ref<string>('')
const files = ref<any>([
{

View file

@ -61,7 +61,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-select
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -81,7 +80,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -97,7 +95,6 @@
<q-input
type="number"
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -112,7 +109,6 @@
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -144,7 +140,6 @@
<q-input
:class="getClass(edit)"
class="datepicker"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -178,11 +173,11 @@
</q-form>
</q-card>
</q-dialog>
<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 { onMounted, ref, watch } from 'vue'
@ -234,7 +229,7 @@ const scores = ref<number | null>()
const name = ref<string>()
const duration = ref<[Date, Date]>([new Date(), new Date()])
const myForm = ref<any>() //form data input
const edit = ref<boolean>(false) // dialog
const edit = ref<boolean>(true) // dialog
const modal = ref<boolean>(false) //modal add detail
const modalEdit = ref<boolean>(false) //modal
const rawItem = ref<RequestItemsObject>() // row
@ -244,7 +239,7 @@ const next = ref<boolean>() //แสดงปุ่มดูข้อมูล
const editRow = ref<boolean>(false) //
const statusCode = ref<number>()
const checkValidate = ref<boolean>(false) //validate data
const modalConsend = ref<boolean>(false)
// const modalConsend = ref<boolean>(false)
const rows = ref<RequestItemsObject[]>([])
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const filter = ref<string>('') //search data table
@ -413,7 +408,7 @@ const checkRowPage = () => {
* กดปมแกไขใน dialog
*/
const clickEdit = () => {
edit.value = true
// edit.value = true
next.value = false
previous.value = false
}
@ -450,11 +445,11 @@ const clickDeleteRow = async () => {
.finally(async () => {
loader.value = false
await fetchData()
edit.value = false
// edit.value = false
})
} else {
await fetchData()
edit.value = false
// edit.value = false
}
}
@ -464,15 +459,15 @@ const clickDeleteRow = async () => {
const clickSave = async () => {
myForm.value.validate().then(async (result: boolean) => {
if (result) {
if (store.consend == true) {
if (modalEdit.value) {
await editData()
} else {
await saveData()
}
// if (store.consend == true) {
if (modalEdit.value) {
await editData()
} else {
modalConsend.value = true
await saveData()
}
// } else {
// modalConsend.value = true
// }
}
})
}
@ -502,7 +497,7 @@ const saveData = async () => {
})
.finally(async () => {
loader.value = false
edit.value = false
// edit.value = false
modal.value = false
await fetchData()
})
@ -533,7 +528,7 @@ const editData = async () => {
})
.finally(async () => {
loader.value = false
edit.value = false
// edit.value = false
modal.value = false
await fetchData()
})
@ -575,12 +570,12 @@ const selectData = (props: DataProps) => {
name.value = props.row.name
duration.value = props.row.duration
id.value = props.row.id
if (edit.value == true) {
next.value = false
previous.value = false
} else {
checkRowPage()
}
// if (edit.value == true) {
next.value = false
previous.value = false
// } else {
// checkRowPage()
// }
}
/**
@ -597,21 +592,21 @@ const addRow = () => {
duration.value = [new Date(), new Date()]
}
const consenClose = () => {
modalConsend.value = false
}
// const consenClose = () => {
// modalConsend.value = false
// }
const consendOk = () => {
modalConsend.value = false
store.consend = true
clickSave()
}
// const consendOk = () => {
// modalConsend.value = false
// store.consend = true
// clickSave()
// }
/**
* งกนปมยกเลกการแกไขขอม
*/
const clickCancel = async () => {
edit.value = false
// edit.value = false
}
/**

View file

@ -9,16 +9,15 @@
: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-xs-12">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -34,7 +33,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -54,7 +52,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -74,7 +71,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -95,7 +91,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
dense
lazy-rules
readonly
@ -105,7 +100,7 @@
:label="`${'รหัสไปรษณีย์'}`"
/>
</div>
<div class="col-12 q-pt-lg"><q-separator /></div>
<div class="col-12"><q-separator /></div>
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
<label class="text-bold">อยจจนตรงกบทอยตามทะเบยนบาน</label>
<q-radio
@ -131,7 +126,6 @@
<div class="col-xs-12" v-if="addressData.same == '0'">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -146,7 +140,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.same == '0'">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -166,7 +159,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.same == '0'">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -186,7 +178,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.same == '0'">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -207,7 +198,6 @@
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.same == '0'">
<q-input
:class="getClass(edit)"
hide-bottom-space
dense
lazy-rules
readonly
@ -220,11 +210,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'
@ -237,7 +227,7 @@ import { useExamDataStore } from '@/modules/01_exam/store'
import type { Address, DataOption } from '@/modules/01_exam/interface/index/Main'
import { defaultAddress } from '@/modules/01_exam/interface/index/Main'
import HeaderTop from '@/components/top.vue'
import Conference from '@/modules/01_exam/components/Conference.vue'
// import Conference from '@/modules/01_exam/components/Conference.vue'
const props = defineProps({
provinceOptions: {
@ -263,10 +253,10 @@ const mixin = useCounterMixin()
const store = useExamDataStore()
const { success } = mixin
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const edit = ref<boolean>(false)
const edit = ref<boolean>(true)
const addressData = ref<Address>(defaultAddress)
const myform = ref<any>()
const modalConsend = ref<boolean>(false)
// const modalConsend = ref<boolean>(false)
const loader = ref<boolean>(false)
const districtOptions = ref<DataOption[]>([])
const districtCOptions = ref<DataOption[]>([])
@ -277,10 +267,12 @@ const emit = defineEmits(['update:statusEdit'])
onMounted(async () => {
await fetchData()
await fetchDistrict(addressData.value.provinceId, '1')
await fetchDistrict(addressData.value.provinceIdC, '2')
await fetchSubDistrict(addressData.value.districtId, '1')
await fetchSubDistrict(addressData.value.districtIdC, '2')
if (addressData.value.provinceId != null) await fetchDistrict(addressData.value.provinceId, '1')
if (addressData.value.provinceIdC != null) await fetchDistrict(addressData.value.provinceIdC, '2')
if (addressData.value.districtId != null)
await fetchSubDistrict(addressData.value.districtId, '1')
if (addressData.value.districtIdC != null)
await fetchSubDistrict(addressData.value.districtIdC, '2')
})
const fetchData = async () => {
@ -298,7 +290,7 @@ const fetchData = async () => {
addressData.value.subdistrictIdC = data.currentSubDistrictId
addressData.value.code = data.registZipCode
addressData.value.codeC = data.currentZipCode
addressData.value.same = data.registSame == true ? '1' : '0'
addressData.value.same = data.registSame == true ? '1' : data.registSame == false ? '0' : null
})
.catch(() => {})
.finally(() => {
@ -309,57 +301,57 @@ const fetchData = async () => {
const saveData = async () => {
await myform.value.validate().then(async (suc: boolean) => {
if (suc) {
if (store.consend == true) {
loader.value = true
await http
.post(config.API.candidateAddress(candidateId.value), {
registAddress: addressData.value.address,
currentAddress: addressData.value.addressC,
registProvinceId: addressData.value.provinceId,
currentProvinceId: addressData.value.provinceIdC,
registDistrictId: addressData.value.districtId,
currentDistrictId: addressData.value.districtIdC,
registSubDistrictId: addressData.value.subdistrictId,
currentSubDistrictId: addressData.value.subdistrictIdC,
registZipCode: addressData.value.code,
currentZipCode: addressData.value.codeC,
registSame:
addressData.value.same == '1' ? true : addressData.value.same == '0' ? false : null
})
.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) {
loader.value = true
await http
.post(config.API.candidateAddress(candidateId.value), {
registAddress: addressData.value.address,
currentAddress: addressData.value.addressC,
registProvinceId: addressData.value.provinceId,
currentProvinceId: addressData.value.provinceIdC,
registDistrictId: addressData.value.districtId,
currentDistrictId: addressData.value.districtIdC,
registSubDistrictId: addressData.value.subdistrictId,
currentSubDistrictId: addressData.value.subdistrictIdC,
registZipCode: addressData.value.code,
currentZipCode: addressData.value.codeC,
registSame:
addressData.value.same == '1' ? true : addressData.value.same == '0' ? false : null
})
.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 selectProvince = (e: string, name: string) => {
if (name == '1') {
@ -388,7 +380,6 @@ const selectDistrict = (e: string, name: string) => {
}
const selectSubDistrict = (e: string, name: string) => {
console.log('zxc')
if (name == '1') {
const findcode = subdistrictOptions.value.filter((r) => r.id == e)
const namecode = findcode.length > 0 ? findcode[0].zipCode : null
@ -448,15 +439,15 @@ const fetchSubDistrict = async (id: string, position: string) => {
})
}
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 = () => {}

View file

@ -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" class="col-12">
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
@ -40,7 +40,6 @@
</div>
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -61,7 +60,6 @@
<div class="col-xs-6 col-sm-3 col-md-3" v-if="familyData.same == '1'">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -75,7 +73,6 @@
<div class="col-xs-6 col-sm-3 col-md-3" v-if="familyData.same == '1'">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -89,7 +86,6 @@
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -103,7 +99,6 @@
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -118,7 +113,6 @@
<div class="col-xs-12 text-weight-bold"> ดา</div>
<div class="col-xs-12 col-sm-2 col-md-2">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -139,7 +133,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -153,7 +146,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -167,7 +159,6 @@
<div class="col-xs-12 col-sm-2 col-md-2">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -181,7 +172,6 @@
<div class="col-xs-12 col-sm-2 col-md-2">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -196,7 +186,6 @@
<div class="col-xs-12 text-weight-bold"> มารดา</div>
<div class="col-xs-12 col-sm-2 col-md-2">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -216,7 +205,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -230,7 +218,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -244,7 +231,6 @@
<div class="col-xs-12 col-sm-2 col-md-2">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -258,7 +244,6 @@
<div class="col-xs-12 col-sm-2 col-md-2">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -272,11 +257,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 { onMounted, ref, watch } from 'vue'
@ -314,10 +299,10 @@ const $q = useQuasar()
const mixin = useCounterMixin()
const store = useExamDataStore()
const { success } = mixin
const edit = ref<boolean>(false)
const edit = ref<boolean>(true)
const myform = ref<any>()
const familyData = ref<Family>(defaultFamily)
const modalConsend = ref<boolean>(false)
// const modalConsend = ref<boolean>(false)
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const loader = ref<boolean>(false)
@ -359,61 +344,61 @@ const fetchData = async () => {
const saveData = async () => {
await myform.value.validate().then(async (suc: boolean) => {
if (suc) {
if (store.consend == true) {
loader.value = true
await http
.post(config.API.candidateFamily(candidateId.value), {
marryPrefixId: familyData.value.prefixIdC,
marryFirstName: familyData.value.firstnameC,
marryLastName: familyData.value.lastnameC,
marryOccupation: familyData.value.occupationC,
marryNationality: familyData.value.nationalityC,
fatherPrefixId: familyData.value.prefixIdM,
fatherFirstName: familyData.value.firstnameM,
fatherLastName: familyData.value.lastnameM,
fatherOccupation: familyData.value.occupationM,
fatherNationality: familyData.value.nationalityM,
motherPrefixId: familyData.value.prefixIdF,
motherFirstName: familyData.value.firstnameF,
motherLastName: familyData.value.lastnameF,
motherOccupation: familyData.value.occupationF,
motherNationality: familyData.value.nationalityF,
marry: familyData.value.same == '1' ? true : familyData.value.same == '0' ? false : null
})
.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) {
loader.value = true
await http
.post(config.API.candidateFamily(candidateId.value), {
marryPrefixId: familyData.value.prefixIdC,
marryFirstName: familyData.value.firstnameC,
marryLastName: familyData.value.lastnameC,
marryOccupation: familyData.value.occupationC,
marryNationality: familyData.value.nationalityC,
fatherPrefixId: familyData.value.prefixIdM,
fatherFirstName: familyData.value.firstnameM,
fatherLastName: familyData.value.lastnameM,
fatherOccupation: familyData.value.occupationM,
fatherNationality: familyData.value.nationalityM,
motherPrefixId: familyData.value.prefixIdF,
motherFirstName: familyData.value.firstnameF,
motherLastName: familyData.value.lastnameF,
motherOccupation: familyData.value.occupationF,
motherNationality: familyData.value.nationalityF,
marry: familyData.value.same == '1' ? true : familyData.value.same == '0' ? false : null
})
.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 selectRadio = (e: boolean) => {
if (!e) {
@ -424,15 +409,15 @@ const selectRadio = (e: boolean) => {
}
}
const consenClose = () => {
modalConsend.value = false
}
// const consenClose = () => {
// modalConsend.value = false
// }
const consendOk = async () => {
modalConsend.value = false
store.consend = true
saveData()
}
// const consendOk = async () => {
// modalConsend.value = false
// store.consend = true
// saveData()
// }
const cancelData = () => {}

View file

@ -9,15 +9,14 @@
:addData="true"
:editOnly="false"
:cancel="cancelData"
:changeBtn="changeBtn"
:editData="status == 'register' || status == 'rejectRegister'"
:disable="statusEdit"
/>
<!-- :changeBtn="changeBtn" -->
<q-form ref="myform" class="col-12 row">
<div class="row col-10 items-center q-col-gutter-x-sm q-col-gutter-y-sm">
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -37,7 +36,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -51,7 +49,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -65,7 +62,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -95,13 +91,14 @@
<template #trigger>
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
:model-value="date2Thai(informaData.birthDate)"
:model-value="
informaData.birthDate == null ? null : date2Thai(informaData.birthDate)
"
:rules="[(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
:label="`${'วัน/เดือน/ปี เกิด'}`"
>
@ -120,19 +117,17 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
dense
lazy-rules
readonly
borderless
:style="!edit ? '' : 'padding:0 12px;'"
:model-value="calAge(informaData.birthDate)"
:model-value="informaData.birthDate == null ? null : calAge(informaData.birthDate)"
:label="`${'อายุ'}`"
/>
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -152,7 +147,6 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -166,9 +160,9 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
counter
lazy-rules
:readonly="!edit"
:borderless="!edit"
@ -183,7 +177,6 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -204,7 +197,7 @@
<div class="col-xs-6 col-sm-3 col-md-3">
<!-- <q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -215,7 +208,6 @@
label="ออกให้ ณ อำเภอ"
/> -->
<q-select
hide-bottom-space
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -252,13 +244,14 @@
<template #trigger>
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
:model-value="date2Thai(informaData.cardIdDate)"
:model-value="
informaData.cardIdDate == null ? null : date2Thai(informaData.cardIdDate)
"
:rules="[(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี'}`]"
:label="`${'วัน/เดือน/ปี'}`"
>
@ -276,13 +269,12 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
hide-bottom-space
:outlined="edit"
dense
counter
lazy-rules
type="tel"
maxlength="12"
maxlength="10"
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -296,13 +288,12 @@
</div>
<div class="col-xs-6 col-sm-3 col-md-3">
<q-input
hide-bottom-space
:outlined="edit"
dense
counter
lazy-rules
type="tel"
maxlength="12"
maxlength="10"
:class="getClass(edit)"
:readonly="!edit"
:borderless="!edit"
@ -317,7 +308,6 @@
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
:class="getClass(edit)"
hide-bottom-space
:outlined="edit"
dense
lazy-rules
@ -355,11 +345,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'
@ -407,12 +397,12 @@ const store = useExamDataStore()
const { date2Thai, calAge, success, dateToISO } = mixin
const districtOptions = ref<DataOption[]>([])
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const edit = ref<boolean>(false)
const edit = ref<boolean>(true)
const informaData = ref<Information>(defaultInformation)
const myform = ref<any>()
const imageUrl = ref<string | null>(null)
const disabledPic = ref<boolean>(false)
const modalConsend = ref<boolean>(false)
// const modalConsend = ref<boolean>(false)
const fileData = ref<File | null>()
const loader = ref<boolean>(false)
@ -420,7 +410,7 @@ const emit = defineEmits(['update:statusEdit'])
onMounted(async () => {
await fetchData()
await fetchDistrict(informaData.value.provinceId)
if (informaData.value.provinceId != null) await fetchDistrict(informaData.value.provinceId)
})
const fetchData = async () => {
@ -433,8 +423,8 @@ const fetchData = async () => {
informaData.value.lastname = data.lastName
informaData.value.provinceId = data.citizenProvinceId
informaData.value.districtId = data.citizenDistrictId
informaData.value.birthDate = new Date(data.dateOfBirth)
informaData.value.cardIdDate = new Date(data.citizenDate)
informaData.value.birthDate = data.dateOfBirth == null ? null : new Date(data.dateOfBirth)
informaData.value.cardIdDate = data.citizenDate == null ? null : new Date(data.citizenDate)
informaData.value.cardid = data.citizenId
informaData.value.firstname = data.firstName
informaData.value.relationship = data.relationshipId
@ -459,59 +449,61 @@ const selectProvince = (val: string) => {
const saveData = async () => {
await myform.value.validate().then(async (suc: boolean) => {
if (suc) {
if (store.consend == true) {
loader.value = true
await http
.post(config.API.candidateInformation(candidateId.value), {
prefixId: informaData.value.prefixId,
lastName: informaData.value.lastname,
citizenProvinceId: informaData.value.provinceId,
citizenDistrictId: informaData.value.districtId,
dateOfBirth: dateToISO(informaData.value.birthDate),
citizenDate: dateToISO(informaData.value.cardIdDate),
citizenId: informaData.value.cardid,
firstName: informaData.value.firstname,
relationshipId: informaData.value.relationship,
nationality: informaData.value.nationality,
email: informaData.value.email,
mobilePhone: informaData.value.phone,
telephone: informaData.value.tel,
knowledge: informaData.value.knowledge
})
.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) {
loader.value = true
await http
.post(config.API.candidateInformation(candidateId.value), {
prefixId: informaData.value.prefixId,
lastName: informaData.value.lastname,
citizenProvinceId: informaData.value.provinceId,
citizenDistrictId: informaData.value.districtId,
dateOfBirth:
informaData.value.birthDate == null ? null : dateToISO(informaData.value.birthDate),
citizenDate:
informaData.value.cardIdDate == null ? null : dateToISO(informaData.value.cardIdDate),
citizenId: informaData.value.cardid,
firstName: informaData.value.firstname,
relationshipId: informaData.value.relationship,
nationality: informaData.value.nationality,
email: informaData.value.email,
mobilePhone: informaData.value.phone,
telephone: informaData.value.tel,
knowledge: informaData.value.knowledge
})
.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 fetchDistrict = async (id: string) => {
loader.value = true
@ -541,15 +533,15 @@ const pickFile = () => {
disabledPic.value = true
}
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 = () => {
fileData.value = null

View file

@ -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 = () => {}

View file

@ -14,57 +14,57 @@ interface ChangeActive {
//ข้อมูลส่วนตัว
interface Information {
cardid: string
prefix: string
prefixId: string
firstname: string
lastname: string
birthDate: Date
genderId: string
bloodId: string
nationality: string
ethnicity: string
religionId: string
tel: string
phone: string
email: string
province: string
provinceId: string
districtId: string
cardIdDate: Date
relationship: string
statusId: string
knowledge: string
cardid: string | null
prefix: string | null
prefixId: string | null
firstname: string | null
lastname: string | null
birthDate: Date | null
genderId: string | null
bloodId: string | null
nationality: string | null
ethnicity: string | null
religionId: string | null
tel: string | null
phone: string | null
email: string | null
province: string | null
provinceId: string | null
districtId: string | null
cardIdDate: Date | null
relationship: string | null
statusId: string | null
knowledge: string | null
}
interface Family {
prefixC: string // couple
prefixIdC: string
firstnameC: string
lastnameC: string
occupationC: string
nationalityC: string
prefixM: string // male
prefixIdM: string
firstnameM: string
lastnameM: string
occupationM: string
nationalityM: string
prefixF: string // female
prefixIdF: string
firstnameF: string
lastnameF: string
occupationF: string
nationalityF: string
prefixC: string | null // couple
prefixIdC: string | null
firstnameC: string | null
lastnameC: string | null
occupationC: string | null
nationalityC: string | null
prefixM: string | null // male
prefixIdM: string | null
firstnameM: string | null
lastnameM: string | null
occupationM: string | null
nationalityM: string | null
prefixF: string | null // female
prefixIdF: string | null
firstnameF: string | null
lastnameF: string | null
occupationF: string | null
nationalityF: string | null
same: string | null
}
interface Occupation {
status: string
company: string
department: string
email: string
tel: string
status: string | null
company: string | null
department: string | null
email: string | null
tel: string | null
official: string | null
personnel: string | null
officialsOther: string | null
@ -73,17 +73,17 @@ interface Occupation {
}
interface Address {
address: string
provinceId: string
districtId: string
subdistrictId: string
address: string | null
provinceId: string | null
districtId: string | null
subdistrictId: string | null
code?: number | null
addressC: string
provinceIdC: string
districtIdC: string
subdistrictIdC: string
addressC: string | null
provinceIdC: string | null
districtIdC: string | null
subdistrictIdC: string | null
codeC?: number | null
same: string
same: string | null
}
interface DataOption {
@ -202,72 +202,72 @@ const defaultCard: ExamCard[] = [
]
const defaultAddress: Address = {
address: 'บ้านเลขที่ 1/2 ซอย 56 ถนนตัดใหม่',
provinceId: 'กรุงเทพ',
districtId: 'หนองแขม',
subdistrictId: 'หนองค้างพลู',
code: 10160,
addressC: 'บ้านเลขที่ 1/2 ซอย 56 ถนนตัดใหม่',
provinceIdC: 'กรุงเทพ',
districtIdC: 'หนองแขม',
subdistrictIdC: 'หนองค้างพลู',
codeC: 10160,
same: '0'
address: null,
provinceId: null,
districtId: null,
subdistrictId: null,
// code: ,
addressC: null,
provinceIdC: null,
districtIdC: null,
subdistrictIdC: null,
// codeC: ,
same: null
}
const defaultInformation: Information = {
cardid: '',
prefix: '',
prefixId: '',
firstname: '',
lastname: '',
cardid: null,
prefix: null,
prefixId: null,
firstname: null,
lastname: null,
birthDate: new Date(),
genderId: '',
bloodId: '',
nationality: '',
ethnicity: '',
religionId: '',
tel: '',
phone: '',
email: '',
province: '',
genderId: null,
bloodId: null,
nationality: null,
ethnicity: null,
religionId: null,
tel: null,
phone: null,
email: null,
province: null,
cardIdDate: new Date(),
relationship: '',
knowledge: '',
districtId: '',
provinceId: '',
statusId: ''
relationship: null,
knowledge: null,
districtId: null,
provinceId: null,
statusId: null
}
const defaultFamily: Family = {
prefixC: 'นาย',
prefixIdC: 'นาย',
firstnameC: 'ธนาคาร',
lastnameC: 'กสิกร',
occupationC: 'ว่าง',
nationalityC: 'ไทย',
prefixM: 'นาย',
prefixIdM: 'นาย',
firstnameM: 'ธนายุทธ',
lastnameM: 'ชมสิน',
occupationM: 'ว่าง',
nationalityM: 'ไทย',
prefixF: 'นางสาว',
prefixIdF: 'นางสาว',
firstnameF: 'ณัฐกาล',
lastnameF: 'ชมสิน',
occupationF: 'ว่าง',
nationalityF: 'ไทย',
same: '1'
prefixC: null,
prefixIdC: null,
firstnameC: null,
lastnameC: null,
occupationC: null,
nationalityC: null,
prefixM: null,
prefixIdM: null,
firstnameM: null,
lastnameM: null,
occupationM: null,
nationalityM: null,
prefixF: null,
prefixIdF: null,
firstnameF: null,
lastnameF: null,
occupationF: null,
nationalityF: null,
same: null
}
const defaultOccupation: Occupation = {
status: 'official',
company: 'บริษัท ทรู คอร์ปอเรชั่น จำกัด (มหาชน)',
department: '-',
email: 'kittapath@frappet.com',
tel: '0846464646',
official: 'Direct Sales Staff',
status: null,
company: null,
department: null,
email: null,
tel: null,
official: null,
personnel: null,
officialsOther: null,
employee: null,

View file

@ -63,6 +63,11 @@
</q-stepper>
</div>
</q-card>
<q-dialog :model-value="modalConsend" persistent>
<q-card style="min-width: 800px">
<Conference :ok="consendOk" :close="consenClose" />
</q-card>
</q-dialog>
</template>
<script setup lang="ts">
@ -75,6 +80,7 @@ import config from '@/app.config'
import ExamForm from '@/modules/01_exam/components/ExamForm.vue'
import ExamPayment from '@/modules/01_exam/components/ExamPayment.vue'
import ExamFinished from '@/modules/01_exam/components/ExamFinished.vue'
import Conference from '@/modules/01_exam/components/Conference.vue'
const $q = useQuasar()
const store = useExamDataStore()
@ -84,6 +90,7 @@ const tittle = ref<string>('การสอบภาค ข. พิเศษ ส
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const loader = ref<boolean>(false)
const status = ref<string>('register')
const modalConsend = ref<boolean>(false)
onMounted(async () => {
await candidateCheck()
@ -99,6 +106,7 @@ const candidateCheck = async () => {
if (store.consend == true) {
await fetchStep()
} else {
modalConsend.value = true
stepRaw.value = 2
step.value = 2
}
@ -148,6 +156,16 @@ const fetchStep = async () => {
})
}
const consenClose = () => {
modalConsend.value = false
}
const consendOk = () => {
modalConsend.value = false
// store.consend = true
// saveData()
}
/**
* logout keycloak
* confirm อนออกจากระบบ