From dee7f1ec27e0a3bd579d5fdcb4409a5a42f21ccf Mon Sep 17 00:00:00 2001 From: Ehsan Date: Wed, 16 Oct 2024 20:59:11 +0330 Subject: [PATCH] dark mode page add-doctor & user account --- app/component/SwitchTable.js | 2 +- app/globals.css | 8 ++++++++ components/icons/UserEdit.js | 4 +++- components/layoutPanel/sidebar/index.js | 2 +- components/panel/addDoctor/Step.js | 7 ++++--- components/panel/addDoctor/index.js | 2 +- .../listMenu/generalInformation/form/index.js | 3 ++- .../listMenu/officeInformation/index.js | 3 ++- .../listMenu/workingDays/modal/index.js | 15 ++++++++++----- components/panel/userAccount/bank/List.js | 18 +++++++++--------- .../panel/userAccount/bank/head/index.js | 4 +++- .../panel/userAccount/bank/head/modal/index.js | 7 ++++--- components/panel/userAccount/bank/index.js | 6 +++--- components/panel/userAccount/index.js | 13 ++++++++++--- 14 files changed, 61 insertions(+), 33 deletions(-) diff --git a/app/component/SwitchTable.js b/app/component/SwitchTable.js index c16314f..2e77206 100644 --- a/app/component/SwitchTable.js +++ b/app/component/SwitchTable.js @@ -50,7 +50,7 @@ const MaterialUISwitch = styled(Switch)(({ theme }) => ({ function SwitchTable({ value }) { return ( - + } /> diff --git a/app/globals.css b/app/globals.css index e262ec9..cc8e694 100644 --- a/app/globals.css +++ b/app/globals.css @@ -600,6 +600,14 @@ html { border-radius: 20px; } +.dark .custom-switch .MuiSwitch-track { + border: 1px solid #343645 !important; +} + +.dark .custom-switch .MuiSwitch-thumb::before { + background: #d7d8ed; +} + /* End Of Dark Style */ /* Dark Date Picker */ diff --git a/components/icons/UserEdit.js b/components/icons/UserEdit.js index 7bb4638..841fc7d 100644 --- a/components/icons/UserEdit.js +++ b/components/icons/UserEdit.js @@ -14,7 +14,9 @@ function UserEdit({ active }) { strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" - className={active ? "stroke-[#FAFAFA] delay-500" : ""} + className={ + active ? "stroke-[#FAFAFA] delay-500" : "" + } />
diff --git a/components/panel/addDoctor/Step.js b/components/panel/addDoctor/Step.js index fef81da..a502132 100644 --- a/components/panel/addDoctor/Step.js +++ b/components/panel/addDoctor/Step.js @@ -18,7 +18,7 @@ function Step({ value }) { className={`flex items-center bg-[#F6F6F6] justify-center p-[18px] w-[32px] h-[32px] sm:w-[46px] sm:h-[46px] md:w-[60px] md:h-[60px] lg:w-[75px] lg:h-[75px] rounded-full relative overflow-hidden before:delay-500 before:transition-all before:duration-500 - before:absolute before:w-full before:h-full before:bg-[#5559CE] + before:absolute before:w-full before:h-full before:bg-[#5559CE] dark:bg-[#D7D8ED] ${value >= idx ? "before:right-0" : "before:-right-full"}`} >
{item.icon}
@@ -28,7 +28,7 @@ function Step({ value }) { ${ value >= idx ? "font-bold text-[#5559CE]" - : "font-normal text-[#616161]" + : "font-normal text-[#616161] dark:text-[#a1a1a1]" }`} > {item.name} @@ -36,7 +36,8 @@ function Step({ value }) {
{list.length > idx + 1 && (
@@ -27,23 +27,23 @@ function List({ data, loading }) { - + {row.card_number} - + {row.shaba_number} @@ -51,12 +51,12 @@ function List({ data, loading }) {
-

+

{row.status ? "فعال" : "غیر فعال"}

@@ -64,7 +64,7 @@ function List({ data, loading }) {
diff --git a/components/panel/userAccount/bank/head/index.js b/components/panel/userAccount/bank/head/index.js index ed3b9dc..13f6c95 100644 --- a/components/panel/userAccount/bank/head/index.js +++ b/components/panel/userAccount/bank/head/index.js @@ -3,7 +3,9 @@ import ModalAddCard from "./modal"; function Head() { return (
-

کارت های بانکی شما

+

+ کارت های بانکی شما +

); diff --git a/components/panel/userAccount/bank/head/modal/index.js b/components/panel/userAccount/bank/head/modal/index.js index e96a8ba..fd7701a 100644 --- a/components/panel/userAccount/bank/head/modal/index.js +++ b/components/panel/userAccount/bank/head/modal/index.js @@ -33,10 +33,10 @@ function ModalAddCard() {
-

+

اضافه کردن شماره کارت

diff --git a/components/panel/userAccount/bank/index.js b/components/panel/userAccount/bank/index.js index c94bc80..a955fd6 100644 --- a/components/panel/userAccount/bank/index.js +++ b/components/panel/userAccount/bank/index.js @@ -2,12 +2,12 @@ import Cards from "./cards"; import Head from "./head"; import List from "./List"; -function Bank({ data }) { +function Bank({ data, loading }) { return (
- - + +
); } diff --git a/components/panel/userAccount/index.js b/components/panel/userAccount/index.js index 51abe1c..cbf8e20 100644 --- a/components/panel/userAccount/index.js +++ b/components/panel/userAccount/index.js @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import Account from "./account"; import Bank from "./bank"; import Tab from "./Tab"; @@ -8,11 +8,18 @@ import Tab from "./Tab"; const listTab = ["حساب کاربری", "حساب بانکی"]; function UserAccountPage({ data }) { - const [value, setValue] = useState(1); + const [value, setValue] = useState(0); + const [loading, setLoading] = useState(true); + + useEffect(() => { + setTimeout(() => { + setLoading(false); + }, 2000); + }, []); const handleChange = (event, newValue) => setValue(newValue); - const components = [, ]; + const components = [, ]; return (