From 46c33c6eb939d4d4f68d571f37a07e46aa55d4d1 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Sun, 20 Oct 2024 01:00:34 +0330 Subject: [PATCH] add field number in step 3 --- app/component/EditField.js | 23 +++++++++++-------- app/globals.css | 2 +- components/panel/addDoctor/index.js | 2 +- .../listMenu/generalInformation/form/index.js | 6 ++--- .../listMenu/workingDays/modal/Form.js | 19 +++++++++++---- .../workingDays/modal/listSelector.js | 14 ++++++++--- 6 files changed, 45 insertions(+), 21 deletions(-) diff --git a/app/component/EditField.js b/app/component/EditField.js index 85016ca..a59e6c1 100644 --- a/app/component/EditField.js +++ b/app/component/EditField.js @@ -12,16 +12,19 @@ function EditField({ iconGray, isTransparent, noDisable, + type, + props, }) { return (
- + onClick={() => { + changeData(!data.isEdit, "isEdit", name); + }} + > + {icon ? icon : iconGray ? : } + + )}
); } diff --git a/app/globals.css b/app/globals.css index a37e384..07d6edf 100644 --- a/app/globals.css +++ b/app/globals.css @@ -647,7 +647,7 @@ html { } .dark .panel-jalaali .days-body .day.hovered:not(.weekend-day) span { - color: #A1A1A1 !important; + color: #a1a1a1 !important; } .dark .panel-jalaali .days-body .day.hovered.today:not(.weekend-day) span { diff --git a/components/panel/addDoctor/index.js b/components/panel/addDoctor/index.js index cdfd35e..cdc34dc 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(1); + const [value, setValue] = useState(0); const [data, setData] = useState({ general: { name: { value: "", placeholder: "احسان احمدی", isEdit: true }, diff --git a/components/panel/addDoctor/listMenu/generalInformation/form/index.js b/components/panel/addDoctor/listMenu/generalInformation/form/index.js index 985d726..6a1ea9b 100644 --- a/components/panel/addDoctor/listMenu/generalInformation/form/index.js +++ b/components/panel/addDoctor/listMenu/generalInformation/form/index.js @@ -27,8 +27,8 @@ function Form({ setValue, parent, data, setData }) { }); return ( -
-
+ <> +
-
+ ); } diff --git a/components/panel/addDoctor/listMenu/workingDays/modal/Form.js b/components/panel/addDoctor/listMenu/workingDays/modal/Form.js index bbb0e62..9e3f37a 100644 --- a/components/panel/addDoctor/listMenu/workingDays/modal/Form.js +++ b/components/panel/addDoctor/listMenu/workingDays/modal/Form.js @@ -3,6 +3,7 @@ import ContentText from "@/app/component/ContentText"; import TimePickerField from "@/app/component/TimePickerField"; import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; import { numberTurns, turnTime, workplace } from "./listSelector"; +import EditField from "@/app/component/EditField"; function Form({ handleClose, @@ -24,11 +25,21 @@ function Form({
- diff --git a/components/panel/addDoctor/listMenu/workingDays/modal/listSelector.js b/components/panel/addDoctor/listMenu/workingDays/modal/listSelector.js index fe41eb4..b6127e9 100644 --- a/components/panel/addDoctor/listMenu/workingDays/modal/listSelector.js +++ b/components/panel/addDoctor/listMenu/workingDays/modal/listSelector.js @@ -5,9 +5,17 @@ const numberTurns = [ ]; const turnTime = [ - { id: "1", label: "10:00" }, - { id: "2", label: "11:00" }, - { id: "3", label: "12:00" }, + { id: 1, label: "00:05" }, + { id: 2, label: "00:10" }, + { id: 3, label: "00:15" }, + { id: 4, label: "00:20" }, + { id: 5, label: "00:25" }, + { id: 6, label: "00:30" }, + { id: 7, label: "00:40" }, + { id: 8, label: "00:50" }, + { id: 9, label: "01:00" }, + { id: 10, label: "01:15" }, + { id: 11, label: "01:30" }, ]; const workplace = [