feat: Implement Fast Request feature with file upload and request management
This commit is contained in:
@@ -1,45 +1,43 @@
|
||||
<script setup>
|
||||
import Dialog from 'primevue/dialog';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import UiButton from '../../ui/UiButton.vue';
|
||||
import { ref } from 'vue';
|
||||
import { useFastRequestStore } from '../../../store/FastRequest';
|
||||
|
||||
const visible = defineModel('visible');
|
||||
const emit = defineEmits(['selected']);
|
||||
const fastRequestStore = useFastRequestStore();
|
||||
|
||||
const caseNumber = ref(null);
|
||||
|
||||
const confirmCaseNumber = () => {
|
||||
if (!caseNumber.value) return;
|
||||
fastRequestStore.selectArchivePet(Number(caseNumber.value));
|
||||
caseNumber.value = null;
|
||||
visible.value = false;
|
||||
emit('selected');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<Dialog :modal="true" :closable="true" :dismissableMask="true" :maximizable="false" :style="{ width: '408px' , minHeight: '210px' }">
|
||||
<Dialog v-model:visible="visible" :modal="true" :closable="true" :dismissableMask="true" :maximizable="false" :style="{ width: '408px' , minHeight: '210px' }" class="fast-request-dialog">
|
||||
<template #header>
|
||||
<h3>افزودن کیس از طریق شناسه مرجع</h3>
|
||||
</template>
|
||||
<div class="w-full py-2 flex flex-col items-start justify-center border-t border-[#EBEBEB] text-[11px] font-[600]">
|
||||
<p>لطفا شناسه کیس که از پزشک و یا سرپرست کیس دریافت کردهاید را وارد نمایید.</p>
|
||||
</div>
|
||||
<Form ref="formRef" v-slot="$form" class="p-4 grid grid-cols-1 !w-full">
|
||||
<FormField v-slot="$field" name="name" initialValue="" class="flex flex-col">
|
||||
<InputText
|
||||
type="text"
|
||||
placeholder="شناسه کیس"
|
||||
size="large"/>
|
||||
</FormField>
|
||||
</Form>
|
||||
<form class="p-4 grid grid-cols-1 w-full" @submit.prevent="confirmCaseNumber">
|
||||
<InputText
|
||||
v-model="caseNumber"
|
||||
type="number"
|
||||
placeholder="شناسه کیس"
|
||||
size="large"
|
||||
/>
|
||||
</form>
|
||||
<div class="w-full pt-3 flex items-center justify-end gap-2 border-t border-[#EBEBEB]">
|
||||
<ui-button label="تایید و افزودن" severity="success" size="small"/>
|
||||
<ui-button label="تایید و افزودن" severity="success" size="small" :disabled="!caseNumber" @click="confirmCaseNumber"/>
|
||||
</div>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.p-inputtext::placeholder) {
|
||||
color: #6E91C9;
|
||||
}
|
||||
|
||||
:deep(.p-inputtext) {
|
||||
border: 1px solid #DEE3EB !important;
|
||||
border-radius: 8px !important;
|
||||
font-size: 13px !important;
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user