fix: bugs
This commit is contained in:
@@ -3,11 +3,14 @@
|
||||
<form class="csf__form" @submit.prevent="onSubmit">
|
||||
<div class="csf__row">
|
||||
<div class="csf__cell">
|
||||
<TextField
|
||||
<SelectField
|
||||
v-model="form.category"
|
||||
name="category"
|
||||
label="نوع خدمت"
|
||||
placeholder="نوع خدمت را وارد کنید"
|
||||
placeholder="نوع خدمت را انتخاب کنید"
|
||||
:options="serviceTypeOptions"
|
||||
option-label="label"
|
||||
option-value="value"
|
||||
:error="errors.category"
|
||||
/>
|
||||
</div>
|
||||
@@ -71,6 +74,7 @@ import useYup from '@/composables/useYup'
|
||||
import BaseButton from '@/components/BaseButton.vue'
|
||||
import SvgIcon from '@/components/icons/SvgIcon.vue'
|
||||
import TextField from '@/components/form/TextField.vue'
|
||||
import SelectField from '@/components/form/SelectField.vue'
|
||||
import FileUploader from '@/components/form/FileUploader.vue'
|
||||
import { objectToFormData } from '@/utils/object-to-formdata'
|
||||
import { useUploadMediaMutation } from '@/services/query/auth'
|
||||
@@ -82,6 +86,11 @@ defineProps({
|
||||
|
||||
const emit = defineEmits(['submit', 'file-error'])
|
||||
|
||||
const serviceTypeOptions = [
|
||||
{ value: 'خدمات رفاهی', label: 'خدمات رفاهی' },
|
||||
{ value: 'خدمات آموزشی', label: 'خدمات آموزشی' },
|
||||
]
|
||||
|
||||
const form = ref({
|
||||
category: '',
|
||||
subject: '',
|
||||
@@ -94,7 +103,7 @@ const form = ref({
|
||||
const files = ref([])
|
||||
|
||||
const schema = yup.object({
|
||||
category: yup.string().trim().required('نوع خدمت را وارد کنید'),
|
||||
category: yup.string().trim().required('نوع خدمت را انتخاب کنید'),
|
||||
subject: yup.string().trim().required('عنوان خدمت را وارد کنید'),
|
||||
message: yup
|
||||
.string()
|
||||
|
||||
Reference in New Issue
Block a user