refactor: update RequestCase component to use UiInput and clean up code
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import Select from 'primevue/select';
|
||||
import { ref } from 'vue';
|
||||
import ArchiveCase from './ArchiveCase.vue';
|
||||
import UiInput from '../../ui/UiInput.vue';
|
||||
|
||||
const isChooseArchive = ref(false);
|
||||
|
||||
@@ -30,7 +31,7 @@ const neuteredStatus = ref([
|
||||
{ name: 'عقیم سازی نشده', code: 'not_neutered' }
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<div class="w-full space-y-2 py-6">
|
||||
<div class="w-full h-[12px] flex items-center justify-between">
|
||||
@@ -42,47 +43,53 @@ const neuteredStatus = ref([
|
||||
</p>
|
||||
<Form ref="formRef" v-slot="$form" class="p-4 grid grid-cols-2 gap-4 !w-full">
|
||||
<FormField v-slot="$field" name="name" initialValue="" class="flex flex-col">
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="نام"
|
||||
size="large"/>
|
||||
<!-- <InputText
|
||||
type="text"
|
||||
placeholder="نام"
|
||||
size="large"/> -->
|
||||
<UiInput
|
||||
type="text"
|
||||
size="large"
|
||||
prefixStart="نام"
|
||||
direction="ltr"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="type" initialValue="" class="flex flex-col">
|
||||
<Select
|
||||
:options="types"
|
||||
optionLabel="name"
|
||||
optionValue="code"
|
||||
placeholder="نوع"
|
||||
<Select
|
||||
:options="types"
|
||||
optionLabel="name"
|
||||
optionValue="code"
|
||||
placeholder="نوع"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="breed" initialValue="" class="flex flex-col">
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="نژاد"
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="نژاد"
|
||||
size="large"/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="gender" initialValue="" class="flex flex-col">
|
||||
<Select :options="genders" optionLabel="name" optionValue="code" placeholder="جنسیت" size="small"/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="age" initialValue="" class="flex flex-col">
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="سن"
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="سن"
|
||||
size="large"
|
||||
/>
|
||||
/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="birthday" initialValue="" class="flex flex-col">
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="وزن"
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="وزن"
|
||||
size="large"
|
||||
/>
|
||||
</FormField>
|
||||
<FormField v-slot="$field" name="sterilized" initialValue="" class="flex flex-col">
|
||||
<Select
|
||||
:options="neuteredStatus"
|
||||
optionLabel="name"
|
||||
optionValue="code"
|
||||
<Select
|
||||
:options="neuteredStatus"
|
||||
optionLabel="name"
|
||||
optionValue="code"
|
||||
placeholder="وضعیت عقیم سازی"
|
||||
size="small"
|
||||
/>
|
||||
@@ -162,5 +169,4 @@ const neuteredStatus = ref([
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user