แบบบสอบถาม/ review

This commit is contained in:
Thanit Konmek 2023-05-03 22:30:02 +07:00
parent 090980a47a
commit 9b2afb3ac7
2 changed files with 60 additions and 2 deletions

View file

@ -38,6 +38,40 @@
<ExamCard />
</div>
</div>
<q-dialog v-model="dialog" persistent>
<q-card>
<q-card-section>
<div class="text-h6">แบบสอบถามความพงพอใจ</div>
</q-card-section>
<q-card-section class="q-pt-none">
<q-rating
v-model="rating"
max="5"
size="3.5em"
color="orange"
icon="star_border"
icon-selected="star"
class="full-width"
no-dimming
/>
<q-input
v-model="text"
filled
type="textarea"
standout
dense
outlined
label="ความคิดเห็น/ข้อแนะนำ"
class="full-width q-mt-md"
/>
</q-card-section>
<q-card-actions align="center">
<q-btn label="ส่งแบบสอบถาม" class="full-width" color="blue-5" @click="sendRating" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script setup lang="ts">
@ -75,6 +109,10 @@ const scoreSum = ref<number | null>(null)
const examResultinscore = ref<string>('')
const avatar = ref<string>('')
const dialog = ref<boolean>(true)
const rating = ref<number>(5)
const text = ref<string>('')
onMounted(async () => {
await fetchStatus()
})
@ -113,6 +151,24 @@ const fetchStatus = async () => {
})
}
const sendRating = async () => {
// rating.value //
// text.value //
// loader.value = true
// await http
// .get(config.API.candidateCard(examId.value, positionId.value))
// .then((res) => {
// })
// .catch(() => {
// // acceptTermOfUse.value = false
// })
// .finally(() => {
// loader.value = false
dialog.value = false
// })
}
const getClass = (val: string) => {
return val == 'done' || val == 'checkPoint' ? 'bg-green-1' : 'bg-yellow-2'
}

View file

@ -22,10 +22,12 @@ const fullname = ref<string>('')
const notiTrigger = ref<boolean>(false)
const loader = ref<boolean>(false)
const status = ref<string>('register')
const examId = ref<string>(route.params.id.toString())
const positionId = ref<string>(route.params.positionId.toString())
const examId = ref<string>('')
const positionId = ref<string>('')
onMounted(async () => {
examId.value = route.params.id ? route.params.id.toString() : ''
positionId.value = route.params.positionId ? route.params.positionId.toString() : ''
await fetchStatus()
})