สมัครสอบตามตำแหน่ง
This commit is contained in:
parent
24b6365afe
commit
cce5f7adfd
6 changed files with 121 additions and 87 deletions
|
|
@ -1,9 +1,7 @@
|
|||
<!-- page:detail page รายการสอบทั้งหมด -->
|
||||
<template>
|
||||
<q-toolbar class="q-pa-sm text-center">
|
||||
<q-toolbar-title class="text-dark">
|
||||
{{ tittle }}
|
||||
</q-toolbar-title>
|
||||
<q-toolbar-title class="text-dark"> {{ tittle }} {{ position }} </q-toolbar-title>
|
||||
</q-toolbar>
|
||||
<q-stepper
|
||||
v-model="step"
|
||||
|
|
@ -75,6 +73,7 @@ const { modalError } = mixin
|
|||
const step = ref<number>(1)
|
||||
const stepRaw = ref<number>(1)
|
||||
const tittle = ref<string>('')
|
||||
const position = ref<string>('')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const positionId = ref<string>(route.params.positionId.toString())
|
||||
|
|
@ -96,8 +95,13 @@ const candidateCheck = async () => {
|
|||
.then(async (res) => {
|
||||
const data = res.data.result
|
||||
store.consend = data.consend
|
||||
const poition = data.positionExam
|
||||
if (poition == true) {
|
||||
const positionExam = data.positionExam
|
||||
if (
|
||||
positionId.value != '00000000-0000-0000-0000-000000000000' &&
|
||||
positionExam.id != positionId.value &&
|
||||
data.status != 'register' &&
|
||||
data.status != 'rejectRegister'
|
||||
) {
|
||||
modalError(
|
||||
$q,
|
||||
'คุณได้สมัครสอบตำแหน่งอื่นในรอบนี้แล้ว',
|
||||
|
|
@ -164,10 +168,11 @@ const fetchStep = async () => {
|
|||
const fetchPeriodExam = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.periodExamId(examId.value))
|
||||
.get(config.API.periodExamPosition(examId.value, positionId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
tittle.value = data.name
|
||||
position.value = data.posiiton == null ? '' : '(' + data.posiiton.positionName + ')'
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue