61 lines
3.3 KiB
JavaScript
61 lines
3.3 KiB
JavaScript
import CircularLoading from "@/app/component/loading/Circular"
|
|
import TextLoading from "@/app/component/loading/Text"
|
|
import Image from "next/image"
|
|
|
|
function ColTable({ data, loading }) {
|
|
return (
|
|
<ul className="flex md:hidden flex-col gap-[16px]">
|
|
{data.map((item, idx) => (
|
|
<li
|
|
key={idx}
|
|
className="bg-[#FFF] p-[12px] rounded-[8px] shadow-[0px_1px_24.8px_0px_rgba(204,204,204,0.18)]"
|
|
>
|
|
<div className="flex items-center justify-between">
|
|
<div className='flex items-center justify-start gap-[8px] !text-nowrap'>
|
|
<CircularLoading width={32} height={32} loading={loading}>
|
|
<Image
|
|
src={item.image}
|
|
alt='doctor'
|
|
height={32}
|
|
width={32}
|
|
/>
|
|
</CircularLoading>
|
|
<TextLoading width={40} height={18} loading={loading}>
|
|
{item.name}
|
|
</TextLoading>
|
|
</div>
|
|
<TextLoading width={105} height={18} loading={loading}>
|
|
<p className="px-[8px] py-[4px] text-[#F17732] text-[14px] font-medium bg-[rgba(255,216,197,0.50)] rounded-[4px]">
|
|
تعداد نوبت: {item.number_of_turns}
|
|
</p>
|
|
</TextLoading>
|
|
</div>
|
|
<div className="flex flex-col mt-[16px]">
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-[#7E7E7E] text-[14px] font-normal">تخصص:</p>
|
|
<TextLoading width={90} height={18} loading={loading}>
|
|
<p className="text-[#616161] text-[14px] font-medium">{item.expertise}</p>
|
|
</TextLoading>
|
|
</div>
|
|
<span className="block h-px w-full bg-[#EFEFEF] my-[12px]"></span>
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-[#7E7E7E] text-[14px] font-normal">تاریخ نوبت:</p>
|
|
<TextLoading width={85} height={18} loading={loading}>
|
|
<p className="text-[#616161] text-[14px] font-medium">{item.date}</p>
|
|
</TextLoading>
|
|
</div>
|
|
<span className="block h-px w-full bg-[#EFEFEF] my-[12px]"></span>
|
|
<div className="flex items-center justify-between">
|
|
<p className="text-[#7E7E7E] text-[14px] font-normal">ساعت نوبت:</p>
|
|
<TextLoading width={60} height={18} loading={loading}>
|
|
<p className="text-[#616161] text-[14px] font-medium">{item.hour}</p>
|
|
</TextLoading>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
)
|
|
}
|
|
|
|
export default ColTable |