diff --git a/components/clinic/components/about/ListBime.js b/components/clinic/components/about/ListBime.js
index 3577f3e..b0e2ecf 100644
--- a/components/clinic/components/about/ListBime.js
+++ b/components/clinic/components/about/ListBime.js
@@ -8,8 +8,6 @@ function ListBime({ data, loading }) {
const list = useRef();
const handleScroll = (type) => {
- console.log(list);
-
list.current.scrollBy({
left: type === "left" ? -200 : 200,
behavior: "smooth",
diff --git a/components/panel/addDoctor/index.js b/components/panel/addDoctor/index.js
index f48dc7d..2d2b006 100644
--- a/components/panel/addDoctor/index.js
+++ b/components/panel/addDoctor/index.js
@@ -9,7 +9,7 @@ import GeneralInformation from "./listMenu/generalInformation";
import Step from "./Step";
function AddDoctorPage() {
- const [value, setValue] = useState(2);
+ const [value, setValue] = useState(0);
const [data, setData] = useState({
general: {
name: { value: "احسان احمدی", isEdit: false },
@@ -93,12 +93,7 @@ function AddDoctorPage() {
setData={setData}
setValue={setValue}
/>,
- ,
+ ,
];
return (
diff --git a/components/panel/addDoctor/listMenu/workingDays/List.js b/components/panel/addDoctor/listMenu/workingDays/List.js
index 1d626b4..17fca09 100644
--- a/components/panel/addDoctor/listMenu/workingDays/List.js
+++ b/components/panel/addDoctor/listMenu/workingDays/List.js
@@ -12,7 +12,7 @@ import {
import ContentModal from "./modal";
import EditOrangeAD from "@/components/icons/EditOrangeAD";
-function List({ parent, data, setData }) {
+function List({ parent, data, setData, setIsDisable }) {
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
@@ -142,6 +142,7 @@ function List({ parent, data, setData }) {
setData={setData}
dataChange={dataChange}
handleClose={handleClose}
+ setIsDisable={setIsDisable}
/>
);
diff --git a/components/panel/addDoctor/listMenu/workingDays/index.js b/components/panel/addDoctor/listMenu/workingDays/index.js
index afba1de..27766f4 100644
--- a/components/panel/addDoctor/listMenu/workingDays/index.js
+++ b/components/panel/addDoctor/listMenu/workingDays/index.js
@@ -1,21 +1,33 @@
import { Button } from "@mui/material";
import List from "./List";
import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
+import { useState } from "react";
+
+function WorkingDays({ parent, data, setData }) {
+ const [isDisable, setIsDisable] = useState(true);
-function WorkingDays({ setValue, parent, data, setData }) {
return (
لیست روزهای کاری
-
+
);
diff --git a/components/panel/addDoctor/listMenu/workingDays/modal/index.js b/components/panel/addDoctor/listMenu/workingDays/modal/index.js
index a85c4c9..dd7b6f8 100644
--- a/components/panel/addDoctor/listMenu/workingDays/modal/index.js
+++ b/components/panel/addDoctor/listMenu/workingDays/modal/index.js
@@ -3,7 +3,8 @@ import { styleDefault } from "@/mui";
import { Box, Button, Modal } from "@mui/material";
import Radios from "./Radios";
import Form from "./Form";
-import { useEffect, useState } from "react";
+import { useState } from "react";
+import { checkTimes } from "@/helper";
function ContentModal({
open,
@@ -12,6 +13,7 @@ function ContentModal({
parent,
dataChange,
handleClose,
+ setIsDisable,
}) {
const [value, setValue] = useState(0);
const [isVacation, setIsVacation] = useState(false);
@@ -25,6 +27,8 @@ function ContentModal({
setIsVacation(valueRadio);
setValue(valueRadio);
+ const disable = checkTimes(newData).includes(false);
+ !disable && setIsDisable(disable);
};
const closeModal = () => {
@@ -51,8 +55,8 @@ function ContentModal({