fix: education
Deploy banu-front / deploy (push) Successful in 1m21s

This commit is contained in:
sajjadtalkhabi
2026-05-28 19:49:00 +03:30
parent 9660e3fe8f
commit d42b7aaa7b
27 changed files with 362 additions and 219 deletions
@@ -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 }
},
+2
View File
@@ -6,6 +6,8 @@ export const termSchema = object().shape({
isActive: boolean().default(true),
startsAt: string().required(),
endsAt: string().required(),
minimumScore: number().typeError('حد نصاب قبولی باید عدد باشد').required(),
score: number().typeError('کل نمره آزمون باید عدد باشد').required(),
coverMediaId: number().nullable().notRequired(),
})