55 lines
1.3 KiB
JavaScript
55 lines
1.3 KiB
JavaScript
'use client';
|
|
|
|
import { useState } from "react";
|
|
import Tabs from "../../Tabs";
|
|
import Hours from "./Hours";
|
|
import { Button } from "@mui/material";
|
|
import ArrowLeftB from "@/components/icons/ArrowLeftB";
|
|
import Link from "next/link";
|
|
|
|
const listTab = ['صبح', 'بعد از ظهر'];
|
|
const nameHours = ['hours_morning', 'hours_afternoon']
|
|
|
|
function DateTime({ doctor }) {
|
|
|
|
const [value, setValue] = useState(0);
|
|
const [hour, setHour] = useState(0);
|
|
|
|
const handleChange = (event, newValue) => setValue(newValue);
|
|
|
|
return (
|
|
<div className="w-full">
|
|
<Tabs
|
|
isSm={true}
|
|
value={value}
|
|
listTab={listTab}
|
|
handleChange={handleChange}
|
|
/>
|
|
<Hours
|
|
hour={hour}
|
|
value={value}
|
|
doctor={doctor}
|
|
setHour={setHour}
|
|
nameHours={nameHours}
|
|
/>
|
|
<div className="w-full flex justify-end">
|
|
<Link
|
|
href='/login-verify'
|
|
>
|
|
<Button
|
|
className="!gap-[4px] !px-[12px] !py-[8px] !min-w-[157px]"
|
|
onClick={() =>
|
|
localStorage.setItem('doctor-id', doctor?.id)
|
|
}
|
|
variant="contained"
|
|
>
|
|
<p className="text-[#EFEFEF] text-[16px] font-medium">تایید نوبت</p>
|
|
<ArrowLeftB />
|
|
</Button>
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default DateTime |