refactor: update RequestCase component to use UiInput and clean up code

This commit is contained in:
2026-08-26 15:43:25 +03:30
parent 701a9c8f04
commit ba734679cf
2 changed files with 33 additions and 27 deletions
+1 -1
View File
@@ -141,7 +141,7 @@
@apply absolute !shadow-none bg-white overflow-y-hidden border !border-dominant-100 rounded-xl z-[9999] overflow-visible pb-1; @apply absolute !shadow-none bg-white overflow-y-hidden border !border-dominant-100 rounded-xl z-[9999] overflow-visible pb-1;
transform-origin: top center; transform-origin: top center;
width: auto !important; width: auto !important;
min-width: auto !important; /* min-width: auto !important; */
user-select: none !important; user-select: none !important;
-webkit-user-select: none !important; -webkit-user-select: none !important;
-moz-user-select: none !important; -moz-user-select: none !important;
@@ -2,6 +2,7 @@
import Select from 'primevue/select'; import Select from 'primevue/select';
import { ref } from 'vue'; import { ref } from 'vue';
import ArchiveCase from './ArchiveCase.vue'; import ArchiveCase from './ArchiveCase.vue';
import UiInput from '../../ui/UiInput.vue';
const isChooseArchive = ref(false); const isChooseArchive = ref(false);
@@ -30,7 +31,7 @@ const neuteredStatus = ref([
{ name: 'عقیم سازی نشده', code: 'not_neutered' } { name: 'عقیم سازی نشده', code: 'not_neutered' }
]); ]);
</script> </script>
<template> <template>
<div class="w-full space-y-2 py-6"> <div class="w-full space-y-2 py-6">
<div class="w-full h-[12px] flex items-center justify-between"> <div class="w-full h-[12px] flex items-center justify-between">
@@ -42,47 +43,53 @@ const neuteredStatus = ref([
</p> </p>
<Form ref="formRef" v-slot="$form" class="p-4 grid grid-cols-2 gap-4 !w-full"> <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"> <FormField v-slot="$field" name="name" initialValue="" class="flex flex-col">
<InputText <!-- <InputText
type="text" type="text"
placeholder="نام" placeholder="نام"
size="large"/> size="large"/> -->
<UiInput
type="text"
size="large"
prefixStart="نام"
direction="ltr"
/>
</FormField> </FormField>
<FormField v-slot="$field" name="type" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="type" initialValue="" class="flex flex-col">
<Select <Select
:options="types" :options="types"
optionLabel="name" optionLabel="name"
optionValue="code" optionValue="code"
placeholder="نوع" placeholder="نوع"
/> />
</FormField> </FormField>
<FormField v-slot="$field" name="breed" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="breed" initialValue="" class="flex flex-col">
<InputText <InputText
type="text" type="text"
placeholder="نژاد" placeholder="نژاد"
size="large"/> size="large"/>
</FormField> </FormField>
<FormField v-slot="$field" name="gender" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="gender" initialValue="" class="flex flex-col">
<Select :options="genders" optionLabel="name" optionValue="code" placeholder="جنسیت" size="small"/> <Select :options="genders" optionLabel="name" optionValue="code" placeholder="جنسیت" size="small"/>
</FormField> </FormField>
<FormField v-slot="$field" name="age" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="age" initialValue="" class="flex flex-col">
<InputText <InputText
type="text" type="text"
placeholder="سن" placeholder="سن"
size="large" size="large"
/> />
</FormField> </FormField>
<FormField v-slot="$field" name="birthday" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="birthday" initialValue="" class="flex flex-col">
<InputText <InputText
type="text" type="text"
placeholder="وزن" placeholder="وزن"
size="large" size="large"
/> />
</FormField> </FormField>
<FormField v-slot="$field" name="sterilized" initialValue="" class="flex flex-col"> <FormField v-slot="$field" name="sterilized" initialValue="" class="flex flex-col">
<Select <Select
:options="neuteredStatus" :options="neuteredStatus"
optionLabel="name" optionLabel="name"
optionValue="code" optionValue="code"
placeholder="وضعیت عقیم سازی" placeholder="وضعیت عقیم سازی"
size="small" size="small"
/> />
@@ -162,5 +169,4 @@ const neuteredStatus = ref([
} }
</style> </style>