add prettier formatter to all file
This commit is contained in:
@@ -1,60 +1,61 @@
|
||||
import CircularLoading from '@/app/component/loading/Circular'
|
||||
import TextLoading from '@/app/component/loading/Text'
|
||||
import ArrowLeftD from '@/components/icons/ArrowLeftD'
|
||||
import GreenCalendarTurn from '@/components/icons/GreenCalendarTurn'
|
||||
import { Button } from '@mui/material'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import CircularLoading from "@/app/component/loading/Circular";
|
||||
import TextLoading from "@/app/component/loading/Text";
|
||||
import ArrowLeftD from "@/components/icons/ArrowLeftD";
|
||||
import GreenCalendarTurn from "@/components/icons/GreenCalendarTurn";
|
||||
import { Button } from "@mui/material";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
|
||||
function ItemAppointment({ turn, doctor, loading }) {
|
||||
return (
|
||||
<li
|
||||
key={turn.id}
|
||||
className='py-4 w-full px-6 bg-[#FFF] border border-solid border-[#EFEFEF] rounded-lg'
|
||||
>
|
||||
<p className='text-[#3B3B3B] text-[20px] font-bold'>نوبت دهی</p>
|
||||
<span className='block w-full h-px bg-[#EFEFEF] my-4'></span>
|
||||
<div className='flex items-center justify-start gap-3'>
|
||||
<CircularLoading width={56} height={56} loading={loading}>
|
||||
<Image
|
||||
src={doctor.img}
|
||||
width={56}
|
||||
height={56}
|
||||
alt='doctor'
|
||||
/>
|
||||
</CircularLoading>
|
||||
<div className='flex flex-col items-start justify-center gap-2'>
|
||||
<TextLoading width={60} height={15} loading={loading}>
|
||||
<p className='text-[#3B3B3B] text-[14px] font-bold'>{doctor.name}</p>
|
||||
</TextLoading>
|
||||
<TextLoading width={65} height={15} loading={loading}>
|
||||
<p className="text-[#525252] text-[14px] font-medium">تخصص: {doctor.expertise}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
return (
|
||||
<li
|
||||
key={turn.id}
|
||||
className="py-4 w-full px-6 bg-[#FFF] border border-solid border-[#EFEFEF] rounded-lg"
|
||||
>
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">نوبت دهی</p>
|
||||
<span className="block w-full h-px bg-[#EFEFEF] my-4"></span>
|
||||
<div className="flex items-center justify-start gap-3">
|
||||
<CircularLoading width={56} height={56} loading={loading}>
|
||||
<Image src={doctor.img} width={56} height={56} alt="doctor" />
|
||||
</CircularLoading>
|
||||
<div className="flex flex-col items-start justify-center gap-2">
|
||||
<TextLoading width={60} height={15} loading={loading}>
|
||||
<p className="text-[#3B3B3B] text-[14px] font-bold">
|
||||
{doctor.name}
|
||||
</p>
|
||||
</TextLoading>
|
||||
<TextLoading width={65} height={15} loading={loading}>
|
||||
<p className="text-[#525252] text-[14px] font-medium">
|
||||
تخصص: {doctor.expertise}
|
||||
</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex mt-5 gap-2 items-center justify-between">
|
||||
<div className="flex items-start justify-start gap-1">
|
||||
<GreenCalendarTurn />
|
||||
<TextLoading width={100} height={15} loading={loading}>
|
||||
<p className="text-[#05BA58] text-[12px] font-medium">
|
||||
اولین نوبت آزاد: {turn.first_free_turn}
|
||||
</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<Link href={loading ? "#" : `/booking/${turn.id}`}>
|
||||
<Button
|
||||
variant="contained"
|
||||
className="!py-2 !px-3 xl:!px-6 gap-1"
|
||||
disabled={loading}
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className="w-[20px] h-[20px]">
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
<div className='flex mt-5 gap-2 items-center justify-between'>
|
||||
<div className='flex items-start justify-start gap-1'>
|
||||
<GreenCalendarTurn />
|
||||
<TextLoading width={100} height={15} loading={loading}>
|
||||
<p className='text-[#05BA58] text-[12px] font-medium'>اولین نوبت آزاد: {turn.first_free_turn}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
<Link href={loading ? '#' : `/booking/${turn.id}`}>
|
||||
<Button
|
||||
variant='contained'
|
||||
className='!py-2 !px-3 xl:!px-6 gap-1'
|
||||
disabled={loading}
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className='w-[20px] h-[20px]'>
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default ItemAppointment
|
||||
export default ItemAppointment;
|
||||
|
||||
@@ -1,46 +1,47 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import turns from '@/data/turns.json';
|
||||
import { Button } from '@mui/material';
|
||||
import ItemAppointment from './ItemAppointment';
|
||||
import ArrowLeftD from '@/components/icons/ArrowLeftD';
|
||||
import Link from 'next/link';
|
||||
import turns from "@/data/turns.json";
|
||||
import { Button } from "@mui/material";
|
||||
import ItemAppointment from "./ItemAppointment";
|
||||
import ArrowLeftD from "@/components/icons/ArrowLeftD";
|
||||
import Link from "next/link";
|
||||
|
||||
function AppointmentList({ doctor, loading }) {
|
||||
const itemActive = turns[0];
|
||||
|
||||
const itemActive = turns[0];
|
||||
|
||||
return (
|
||||
<>
|
||||
<ul className="hidden lg:flex w-[38%] flex-col justify-start items-center gap-8">
|
||||
{[turns[0]].map(item => (
|
||||
<ItemAppointment
|
||||
turn={item}
|
||||
key={item.id}
|
||||
doctor={doctor}
|
||||
loading={loading}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<div className='fixed lg:hidden bg-[#FFF] border-t border-transparent border-t-[#D7D7D7]
|
||||
border-solid bottom-0 right-0 w-full p-4 flex items-center justify-between'>
|
||||
<p className='text-[#05BA58] text-[11px] font-normal'>اولین نوبت آزاد: {itemActive.first_free_turn}</p>
|
||||
<Link
|
||||
href={`/booking/${itemActive.id}`}
|
||||
>
|
||||
<Button
|
||||
variant='contained'
|
||||
className='!py-2 !px-4 gap-1 !text-[14px] !font-medium'
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className='w-[20px] h-[20px]'>
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
return (
|
||||
<>
|
||||
<ul className="hidden lg:flex w-[38%] flex-col justify-start items-center gap-8">
|
||||
{[turns[0]].map((item) => (
|
||||
<ItemAppointment
|
||||
turn={item}
|
||||
key={item.id}
|
||||
doctor={doctor}
|
||||
loading={loading}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
<div
|
||||
className="fixed lg:hidden bg-[#FFF] border-t border-transparent border-t-[#D7D7D7]
|
||||
border-solid bottom-0 right-0 w-full p-4 flex items-center justify-between"
|
||||
>
|
||||
<p className="text-[#05BA58] text-[11px] font-normal">
|
||||
اولین نوبت آزاد: {itemActive.first_free_turn}
|
||||
</p>
|
||||
<Link href={`/booking/${itemActive.id}`}>
|
||||
<Button
|
||||
variant="contained"
|
||||
className="!py-2 !px-4 gap-1 !text-[14px] !font-medium"
|
||||
>
|
||||
دریافت نوبت
|
||||
<div className="w-[20px] h-[20px]">
|
||||
<ArrowLeftD />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default AppointmentList
|
||||
export default AppointmentList;
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
import { Box, Modal } from "@mui/material"
|
||||
import { styleDefault } from "@/mui"
|
||||
import DatePicker from "@/app/component/date/datePicker"
|
||||
import CloseModalD from "@/components/icons/CloseModalD"
|
||||
import DateTime from "@/app/component/date/dateTime"
|
||||
import { Box, Modal } from "@mui/material";
|
||||
import { styleDefault } from "@/mui";
|
||||
import DatePicker from "@/app/component/date/datePicker";
|
||||
import CloseModalD from "@/components/icons/CloseModalD";
|
||||
import DateTime from "@/app/component/date/dateTime";
|
||||
|
||||
function ModalDatePicker({ open, handleClose }) {
|
||||
return (
|
||||
<Modal
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
>
|
||||
<Box sx={styleDefault} className="!py-[24px] !px-[40px]">
|
||||
<div className="flex justify-between items-center">
|
||||
<span></span>
|
||||
<p className="text-[#3B3B3B] text-[20px] font-medium">دریافت نوبت از دکتر مهران امینی</p>
|
||||
<div className="cursor-pointer" onClick={handleClose}>
|
||||
<CloseModalD />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col items-start justify-start gap-[16px] mt-[24px]">
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">انتخاب روز</p>
|
||||
<div className="py-[24px] px-[32px] border border-solid border-[#E9ECEF] rounded-[16px] bg-[#FFF] flex items-center">
|
||||
<DatePicker />
|
||||
<DatePicker />
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-[24px]">
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">انتخاب ساعت</p>
|
||||
<DateTime />
|
||||
</div>
|
||||
</Box>
|
||||
</Modal>
|
||||
)
|
||||
return (
|
||||
<Modal open={open} onClose={handleClose}>
|
||||
<Box sx={styleDefault} className="!py-[24px] !px-[40px]">
|
||||
<div className="flex justify-between items-center">
|
||||
<span></span>
|
||||
<p className="text-[#3B3B3B] text-[20px] font-medium">
|
||||
دریافت نوبت از دکتر مهران امینی
|
||||
</p>
|
||||
<div className="cursor-pointer" onClick={handleClose}>
|
||||
<CloseModalD />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col items-start justify-start gap-[16px] mt-[24px]">
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">انتخاب روز</p>
|
||||
<div className="py-[24px] px-[32px] border border-solid border-[#E9ECEF] rounded-[16px] bg-[#FFF] flex items-center">
|
||||
<DatePicker />
|
||||
<DatePicker />
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-[24px]">
|
||||
<p className="text-[#3B3B3B] text-[20px] font-bold">انتخاب ساعت</p>
|
||||
<DateTime />
|
||||
</div>
|
||||
</Box>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default ModalDatePicker
|
||||
export default ModalDatePicker;
|
||||
|
||||
Reference in New Issue
Block a user