From aecba571764147044fa6b75c74a072c74e8b64f4 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Fri, 11 Oct 2024 23:54:01 +0330 Subject: [PATCH] handle disable button if no data include in page add doctor --- components/panel/addDoctor/index.js | 3 +-- .../listMenu/generalInformation/form/index.js | 4 +++- .../listMenu/generalInformation/index.js | 2 +- .../listMenu/officeInformation/index.js | 6 ++++-- helper/index.js | 20 +++++++++++++++++++ 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/components/panel/addDoctor/index.js b/components/panel/addDoctor/index.js index 4e737c3..ca3eeb7 100644 --- a/components/panel/addDoctor/index.js +++ b/components/panel/addDoctor/index.js @@ -37,7 +37,6 @@ function AddDoctorPage() { { name: "پنج شنبه", morning_time: ["", ""], evening_time: ["", ""] }, ], }); - console.log(data); const components = [ -
{components[value]}
+
{components[value]}
); diff --git a/components/panel/addDoctor/listMenu/generalInformation/form/index.js b/components/panel/addDoctor/listMenu/generalInformation/form/index.js index d756e5f..a9b0e52 100644 --- a/components/panel/addDoctor/listMenu/generalInformation/form/index.js +++ b/components/panel/addDoctor/listMenu/generalInformation/form/index.js @@ -8,6 +8,7 @@ import EditField from "@/app/component/EditField"; import ContentText from "@/app/component/ContentText"; import ArrowLeftPA from "@/components/icons/ArrowLeftPA"; import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; +import { checkAllValues } from "@/helper"; function Form({ setValue, parent, data, setData }) { const changeData = (value, type, name) => @@ -91,8 +92,9 @@ function Form({ setValue, parent, data, setData }) {