@@ -58,6 +58,28 @@
|
||||
:error="errors.endsAt"
|
||||
/>
|
||||
</div>
|
||||
<div class="term-form__cell term-form__cell--third">
|
||||
<TextField
|
||||
v-model="form.minimumScore"
|
||||
name="minimumScore"
|
||||
label="حد نصاب قبولی"
|
||||
inputmode="numeric"
|
||||
:convert-digits="true"
|
||||
:error="errors.minimumScore"
|
||||
@blur="validateAt('minimumScore', form.minimumScore)"
|
||||
/>
|
||||
</div>
|
||||
<div class="term-form__cell term-form__cell--third">
|
||||
<TextField
|
||||
v-model="form.score"
|
||||
name="score"
|
||||
label="کل نمره آزمون"
|
||||
inputmode="numeric"
|
||||
:convert-digits="true"
|
||||
:error="errors.score"
|
||||
@blur="validateAt('score', form.score)"
|
||||
/>
|
||||
</div>
|
||||
<div class="term-form__cell term-form__cell--full">
|
||||
<TextareaField
|
||||
v-model="form.description"
|
||||
@@ -138,6 +160,8 @@ const form = ref({
|
||||
isActive: true,
|
||||
startsAt: '',
|
||||
endsAt: '',
|
||||
minimumScore: '',
|
||||
score: '',
|
||||
coverMediaId: null,
|
||||
})
|
||||
|
||||
@@ -152,7 +176,6 @@ const { data: existingTerm } = useAdminTermQuery(termId, {
|
||||
watch(
|
||||
existingTerm,
|
||||
(term) => {
|
||||
console.log(term)
|
||||
if (!term) return
|
||||
form.value = {
|
||||
title: term.title || '',
|
||||
@@ -160,6 +183,8 @@ watch(
|
||||
isActive: term.isActive ?? true,
|
||||
startsAt: term.startsAt || '',
|
||||
endsAt: term.endsAt || '',
|
||||
minimumScore: term.minimumScore ?? '',
|
||||
score: term.score ?? '',
|
||||
}
|
||||
if (term.coverUrl) image.value = { url: term.coverUrl }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user