From 1ab9f80b98b27a429afd0668a797bc34d76ea7a4 Mon Sep 17 00:00:00 2001 From: Quy_FE Date: Tue, 13 May 2025 08:22:58 +0700 Subject: [PATCH] =?UTF-8?q?Refactor=20:=20t=C3=A1ch=20bi=E1=BB=87t=20SGD?= =?UTF-8?q?=20v=C3=A0=20PGD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_components/Header/header.style.scss | 19 +++++++++++++++++++ src/_components/Header/index.js | 5 ++--- src/_components/boxChart/BoxDoughnutChar.js | 8 ++++---- src/_components/chart/RDoughnutChart.js | 2 ++ .../home/detail-room-education/index.js | 10 ++++++---- .../home/education-department/index.js | 4 +++- .../home/outstanding-teacher/index.js | 15 +++++++++------ .../outstandingTeacher.style.scss | 3 ++- 8 files changed, 47 insertions(+), 19 deletions(-) diff --git a/src/_components/Header/header.style.scss b/src/_components/Header/header.style.scss index 83c039f..7d49277 100644 --- a/src/_components/Header/header.style.scss +++ b/src/_components/Header/header.style.scss @@ -16,6 +16,25 @@ font-weight: 700; color: #4d4d4d; } + + .header-back-button { + height: 40px; + border-radius: 20px; + border: none; + font-size: 16px; + color: #fff; + font-family: 'Myriadpro-SemiBold'; + background-color: var(--button-bg-color); + display: flex; + justify-content: center; + align-items: center; + min-width: 64px; + white-space: nowrap; + } + + .header-back-button:hover { + background-color: #c07a05; + } } .header-right-side { diff --git a/src/_components/Header/index.js b/src/_components/Header/index.js index d3aafe1..a096c58 100644 --- a/src/_components/Header/index.js +++ b/src/_components/Header/index.js @@ -28,12 +28,11 @@ export default function Header({ icon, title, subtitles = [], manager = false, i
{isBack && (
- { +
)} {icon} diff --git a/src/_components/boxChart/BoxDoughnutChar.js b/src/_components/boxChart/BoxDoughnutChar.js index da02c47..464e2ee 100644 --- a/src/_components/boxChart/BoxDoughnutChar.js +++ b/src/_components/boxChart/BoxDoughnutChar.js @@ -18,12 +18,12 @@ export default function BoxDoughnutChart({data = [], title, propsContainer}) { return (
-

{title}

-
-
+

{title}

+
+
-
+
{renderStats()}
diff --git a/src/_components/chart/RDoughnutChart.js b/src/_components/chart/RDoughnutChart.js index 0cd9456..d3a6bda 100644 --- a/src/_components/chart/RDoughnutChart.js +++ b/src/_components/chart/RDoughnutChart.js @@ -46,6 +46,8 @@ export default function RDoughnutChart({data = [], ...other}) { return `${label}: ${value}`; }, }, + position: 'nearest', + z: 1000, }, legend: false, } diff --git a/src/_screens/home/detail-room-education/index.js b/src/_screens/home/detail-room-education/index.js index 8eb53b7..71212bd 100644 --- a/src/_screens/home/detail-room-education/index.js +++ b/src/_screens/home/detail-room-education/index.js @@ -45,6 +45,8 @@ export default function DetailRoomEducation() { const [isLoading, setIsLoading] = useState(false); const [searchText, setSearchText] = useState(''); const dispatch = useDispatch(); + const isSGD = authentication?.user?.organization_name?.toLowerCase().includes('sở'); + const getListOrganization = async () => { try { @@ -358,7 +360,7 @@ export default function DetailRoomEducation() {
@@ -444,19 +446,19 @@ export default function DetailRoomEducation() { data={LIST_SCHOOL_YEAR} value={schoolYear} setValue={setSchoolYear} - style={{flex: 1,maxWidth: '260px'}} + style={{flex: 1,minWidth: '100px'}} /> Áp dụng diff --git a/src/_screens/home/education-department/index.js b/src/_screens/home/education-department/index.js index 73bb546..3c715a8 100644 --- a/src/_screens/home/education-department/index.js +++ b/src/_screens/home/education-department/index.js @@ -34,6 +34,8 @@ export default function EducationDepartmentHome() { const [isEndOnlineClasses, setIsEndOnlineClasses] = useState(false); const [isLoading, setIsLoading] = useState(false); const dispatch = useDispatch(); + const isSGD = authentication?.user?.organization_name?.toLowerCase().includes('sở'); + const getDataOrganization = async () => { try { @@ -200,7 +202,7 @@ export default function EducationDepartmentHome() {
diff --git a/src/_screens/home/outstanding-teacher/index.js b/src/_screens/home/outstanding-teacher/index.js index 2ae3dd5..4607f3f 100644 --- a/src/_screens/home/outstanding-teacher/index.js +++ b/src/_screens/home/outstanding-teacher/index.js @@ -25,6 +25,8 @@ export default function OutstandingTeacher() { const [firstTeacher, setFirstTeacher] = useState(); const [listTeacher, setListTeacher] = useState([]); const [isLoading, setIsLoading] = useState(false); + const isSGD = authentication?.user?.organization_name?.toLowerCase().includes('sở'); + const getData = async () => { setIsLoading(true) @@ -72,8 +74,9 @@ export default function OutstandingTeacher() {
@@ -102,14 +105,14 @@ export default function OutstandingTeacher() {
{!!firstTeacher &&
-
handleClickTeacherItem(firstTeacher)}> +
- - + + handleClickTeacherItem(firstTeacher)} />
- {firstTeacher?.teacher_name} + handleClickTeacherItem(firstTeacher)}>{firstTeacher?.teacher_name}
{firstTeacher?.district_name}
{firstTeacher?.school_name}
@@ -144,7 +147,7 @@ export default function OutstandingTeacher() {
{!isLoading && !listTeacher?.length && (

- Không còn GV nào để hiển thị + Không còn giáo viên nào để hiển thị

)} {listTeacher.map((item, index) => { diff --git a/src/_screens/home/outstanding-teacher/outstandingTeacher.style.scss b/src/_screens/home/outstanding-teacher/outstandingTeacher.style.scss index ed5218a..9392bad 100644 --- a/src/_screens/home/outstanding-teacher/outstandingTeacher.style.scss +++ b/src/_screens/home/outstanding-teacher/outstandingTeacher.style.scss @@ -40,7 +40,6 @@ align-items: center; justify-content: center; max-height: 290px; - cursor: pointer; .outstanding-teacher-best-avatar-box { height: 90%; @@ -64,6 +63,7 @@ object-fit: cover; border-radius: 50%; box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px; + cursor: pointer; } } @@ -80,6 +80,7 @@ font-size: 2.4rem; font-weight: 700; align-self: center; + cursor: pointer; } .outstanding-teacher-best-address {