feat: add withdraw request functionality and UI components

This commit is contained in:
2026-08-27 02:39:57 +03:30
parent aeef95339d
commit 4ce663c669
115 changed files with 4064 additions and 315 deletions
@@ -54,41 +54,38 @@ onUnmounted(() => {
<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 gap-1">
<label>نام کیس</label>
<InputText type="text" :class="[
'placeholder:!text-sm',
petStore.errorsCreateForm?.name && !petStore.createForm.name ? 'p-invalid' : ''
]" v-model="petStore.createForm.name" placeholder="نام کیس خود را وارد کنید" />
<InputText type="text" :class="petStore.errorsCreateForm?.name && !petStore.createForm.name ? 'p-invalid' : ''" v-model="petStore.createForm.name" placeholder="نام کیس خود را وارد کنید" />
<Message v-if="petStore.errorsCreateForm?.name"
severity="error" size="small" variant="simple">{{ petStore.errorsCreateForm?.name[0] }}</Message>
</FormField>
<FormField v-slot="$field" name="email" initialValue="" class="flex flex-col gap-1">
<label>نوع کیس</label>
<Select class="!text-xs !h-full" placeholder="انتخاب نوع کیس" v-model="petStore.createForm.type" :options="petStore.typeOptions" optionValue="value" optionLabel="label" :pt="{ option : '!text-sm' , placeholder : '!text-sm' , label : '!pt-3' }" />
<Select placeholder="انتخاب نوع کیس" v-model="petStore.createForm.type" :options="petStore.typeOptions" optionValue="value" optionLabel="label" />
<Message v-if="petStore.errorsCreateForm?.type" severity="error" size="small" variant="simple">{{ petStore.errorsCreateForm?.type[0] }}</Message>
</FormField>
<FormField v-slot="$field" name="breed" initialValue="" class="flex flex-col gap-1">
<label>نژاد</label>
<InputText type="text" class="placeholder:!text-sm" v-model="petStore.createForm.breed" placeholder="نژاد را وارد کنید" />
<InputText type="text" v-model="petStore.createForm.breed" placeholder="نژاد را وارد کنید" />
</FormField>
<FormField v-slot="$field" name="weight" initialValue="" class="flex flex-col gap-1">
<label>وزن</label>
<InputText type="text" class="placeholder:!text-sm" v-model="petStore.createForm.weight" placeholder="وزن را وارد کنید" />
<InputText type="text" v-model="petStore.createForm.weight" placeholder="وزن را وارد کنید" />
<Message v-if="$field?.invalid" severity="error" size="small" variant="simple">{{ $field.error?.message }}</Message>
</FormField>
<FormField v-slot="$field" name="sterilized" initialValue="" class="flex flex-col gap-1">
<label>عقیم سازی</label>
<Select class="!text-xs !h-full" placeholder="انتخاب عقیم سازی" v-model="petStore.createForm.sterilized" optionLabel="label" optionValue="value" :options="petStore.sterilizedOptions" :pt="{ option : '!text-sm' , placeholder : '!text-sm' , label : '!pt-3' }" />
<Select placeholder="انتخاب عقیم سازی" v-model="petStore.createForm.sterilized" optionLabel="label" optionValue="value" :options="petStore.sterilizedOptions" />
<Message v-if="petStore.errorsCreateForm?.sterilized"
severity="error" size="small" variant="simple">{{ petStore.errorsCreateForm?.sterilized[0] }}</Message>
</FormField>
<FormField v-slot="$field" name="gender" initialValue="" class="flex flex-col gap-1">
<label>جنسیت</label>
<Select class="!text-xs !h-full" placeholder="انتخاب جنسیت" v-model="petStore.createForm.gender" optionLabel="label" optionValue="value" :options="petStore.genderOptions" :pt="{ option : '!text-sm' , placeholder : '!text-sm' , label : '!pt-3' }" />
<Select placeholder="انتخاب جنسیت" v-model="petStore.createForm.gender" optionLabel="label" optionValue="value" :options="petStore.genderOptions" />
<Message v-if="petStore.errorsCreateForm?.gender" severity="error" size="small" variant="simple">{{ petStore.errorsCreateForm?.gender[0] }}</Message>
</FormField>
<FormField v-slot="$field" name="birthday" initialValue="" class="flex flex-col gap-1">
<label>تاریخ تولد</label>
<CustomDatePicker v-model="petStore.createForm.birthday" class="!text-xs mt-2" type="datetime" compact-time></CustomDatePicker>
<CustomDatePicker v-model="petStore.createForm.birthday" type="datetime" compact-time></CustomDatePicker>
<Message v-if="petStore.errorsCreateForm?.birthday" severity="error" size="small" variant="simple">{{ petStore.errorsCreateForm?.birthday[0] }}</Message>
</FormField>
</Form>
@@ -105,7 +102,7 @@ onUnmounted(() => {
<div class="p-4 grid grid-cols-1 gap-4 rounded-2xl">
<div class="grid grid-cols-1 justify-between items-center">
<span>زمان انتشار:</span>
<CustomDatePicker v-model="petStore.createForm.datetime" class="!text-xs mt-2" type="datetime" compact-time></CustomDatePicker>
<CustomDatePicker v-model="petStore.createForm.datetime" class="mt-2" type="datetime" compact-time></CustomDatePicker>
</div>
<div class="grid grid-cols-1 justify-start">
<Button :loading="petStore.loaderCreateForm" @click="petStore.update_and_store" type="button" severity="secondary" :label="petStore.buttonLabel" />
@@ -116,29 +113,3 @@ onUnmounted(() => {
</section>
</master>
</template>
<style>
.p-multiselect {
height: auto;
min-height: 40px;
}
.p-multiselect-label {
line-height: 24px;
}
.p-multiselect .p-multiselect-header {
line-height: 24px;
}
.p-multiselect .p-multiselect-filter {
max-height: calc(100px);
overflow-y: auto;
}
.p-multiselect .p-multiselect-item {
font-size: 0.875rem;
line-height: 44px;
}
</style>