Files

39 lines
2.0 KiB
Vue
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup>
import { useFastRequestStore } from '../../../store/FastRequest';
const fastRequestStore = useFastRequestStore();
const selectDoctor = (doctorId) => {
fastRequestStore.doctorId = doctorId;
}
</script>
<template>
<div class="w-full h-full grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2 items-center justify-between py-4">
<button
type="button"
@click="selectDoctor(null)"
class="w-full bg-white h-[134px] flex flex-col items-center justify-center rounded-[12px] cursor-pointer"
:class="fastRequestStore.doctorId === null ? 'border-[2px] border-[#576989]' : 'border-[1px] border-[#DEE3EB]'"
>
<h3 class="text-[13px] font-[600] text-[#576989]">انتخاب خودکار</h3>
<p class="max-w-[190px] px-2 text-center text-[11px] font-[600] text-[#3E4C63]">انتخاب در دسترس‌ ترین پزشک جهت بررسی سریع درخواست شما</p>
</button>
<p v-if="!fastRequestStore.doctors.length" class="sm:col-span-1 md:col-span-2 text-[11px] font-[600] text-[#7188AD] leading-6">
در حال حاضر پزشکی در شیفت نیست؛ درخواست شما به پزشک نزدیک‌ترین شیفت آینده ارجاع داده می‌شود.
</p>
<button
v-for="doctor in fastRequestStore.doctors"
:key="doctor.id"
type="button"
@click="selectDoctor(doctor.id)"
class="w-full bg-white h-[134px] flex flex-col items-center justify-center rounded-[12px] cursor-pointer"
:class="fastRequestStore.doctorId === doctor.id ? 'border-[2px] border-[#576989]' : 'border-[1px] border-[#DEE3EB]'"
>
<img :src="doctor.profile_url || '/images/profile_default.png'" :alt="doctor.fullname" class="w-[65px] h-[65px] rounded-full object-cover">
<h3 class="text-[13px] font-[600] text-[#576989]">{{ doctor.fullname }}</h3>
<p class="text-center text-[11px] font-[600] text-[#7188AD]">{{ doctor.specialty }}</p>
</button>
</div>
</template>