108 lines
4.7 KiB
JavaScript
108 lines
4.7 KiB
JavaScript
import TextLoading from "@/app/component/loading/Text";
|
|
import CalendarD from "@/components/icons/CalendarD";
|
|
import CallD from "@/components/icons/CallD";
|
|
import ClockClinic from "@/components/icons/ClockClinic";
|
|
import DownloadD from "@/components/icons/DownloadD";
|
|
import LocationClinic from "@/components/icons/LocationClinic";
|
|
import RoutingC from "@/components/icons/RoutingC";
|
|
import { Button } from "@mui/material";
|
|
import React from "react";
|
|
import { convertTimestampToJalali, convertTimestampToTime } from "@/helper";
|
|
|
|
function DetailLg({ appointmentData, loading }) {
|
|
|
|
return (
|
|
<div className="lg:mt-[18px] hidden md:block">
|
|
<div className="flex md:mt-[24px] lg:mt-0 items-center justify-start gap-[8px] md:gap-[12px] lg:gap-[16px]">
|
|
<div className="flex flex-col items-start justify-center gap-[20px]">
|
|
<TextLoading loading={loading} width={70} height={18}>
|
|
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-medium">
|
|
{appointmentData?.doctor?.name}
|
|
</p>
|
|
</TextLoading>
|
|
<TextLoading loading={loading} width={80} height={18}>
|
|
<p className="text-[#616161] text-[14px] md:text-[15px] lg:text-[16px] font-medium">
|
|
تخصص: {appointmentData?.doctor?.specialty?.name}
|
|
</p>
|
|
</TextLoading>
|
|
</div>
|
|
</div>
|
|
<ul className="flex mt-[16px] sm:mt-[21px] md:mt-[27px] lg:mt-[32px] mb-[24px] flex-col gap-[24px] items-start justify-start">
|
|
<li className="flex items-center justify-start flex-wrap gap-[16px] lg:gap-[56px]">
|
|
<TextLoading loading={loading} width={100} height={20}>
|
|
<div className="flex items-start justify-start gap-[4px]">
|
|
<CalendarD />
|
|
<p className="text-[#616161] text-[14px] lg:text-[20px] font-medium">
|
|
تاریخ نوبت:{" "}
|
|
<span className="text-[#2F2F2F] text-[14px] lg:text-[20px] font-bold">
|
|
{convertTimestampToJalali(appointmentData?.start_time)}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</TextLoading>
|
|
<TextLoading loading={loading} width={100} height={20}>
|
|
<div className="flex items-start justify-start gap-[4px]">
|
|
<ClockClinic />
|
|
<p className="text-[#616161] text-[14px] lg:text-[20px] font-medium">
|
|
زمان نوبت:{" "}
|
|
<span className="text-[#2F2F2F] text-[14px] lg:text-[20px] font-bold">
|
|
ساعت {appointmentData?.slot?.time}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</TextLoading>
|
|
</li>
|
|
<li className="flex flex-wrap items-center justify-start gap-y-[12px] gap-[32px]">
|
|
<TextLoading loading={loading} width={250} height={20}>
|
|
<div className="flex items-start justify-start gap-[4px]">
|
|
<LocationClinic />
|
|
<p className="text-[#616161] text-[14px] lg:text-[16px] font-normal">
|
|
آدرس:{" "}
|
|
<span className="text-[#2F2F2F] text-[14px] lg:text-[16px] font-normal">
|
|
{appointmentData?.address?.address}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</TextLoading>
|
|
<TextLoading loading={loading} width={120} height={30}>
|
|
<Button
|
|
className="!py-[8px] !px-[12px] !gap-[8px]"
|
|
variant="text"
|
|
onClick={() => appointmentData?.address?.map && window.open(appointmentData.address.map, '_blank')}
|
|
>
|
|
<RoutingC />
|
|
<p className="text-[#5559CE] text-[14px] font-medium">
|
|
مسیریابی آدرس
|
|
</p>
|
|
</Button>
|
|
</TextLoading>
|
|
</li>
|
|
<TextLoading loading={loading} width={120} height={18}>
|
|
<li className="flex items-center justify-start gap-[4px]">
|
|
<CallD />
|
|
<p className="text-[#616161] text-[14px] lg:text-[16px] font-normal">
|
|
تلفن:{" "}
|
|
<span className="text-[#2F2F2F] text-[14px] lg:text-[16px] font-normal">
|
|
{appointmentData?.address?.phone}
|
|
</span>
|
|
</p>
|
|
</li>
|
|
</TextLoading>
|
|
</ul>
|
|
<Button
|
|
className="!px-[12px] !hidden md:!flex !mt-[24px] !py-[8px] !border !border-solid !border-[#D7D7D7] !rounded-[4px] !w-fit !items-center !justify-center !gap-[4px]"
|
|
variant="outlined"
|
|
>
|
|
<TextLoading loading={loading} width={150} height={18}>
|
|
<DownloadD />
|
|
<p className="text-[#616161] text-[16px] font-medium">
|
|
دانلود اطلاعات نوبت
|
|
</p>
|
|
</TextLoading>
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default DetailLg;
|