diff --git a/src/_components/renderIcon/index.js b/src/_components/renderIcon/index.js index ec7d34a..2529d78 100644 --- a/src/_components/renderIcon/index.js +++ b/src/_components/renderIcon/index.js @@ -173,4 +173,20 @@ export const renderIconDate = () => ( d="M5.673 0a.7.7 0 0 1 .7.7v1.309h7.517v-1.3a.7.7 0 0 1 1.4 0v1.3H18a2 2 0 0 1 2 1.999v13.993A2 2 0 0 1 18 20H2a2 2 0 0 1-2-1.999V4.008a2 2 0 0 1 2-1.999h2.973V.699a.7.7 0 0 1 .7-.699M1.4 7.742v10.259a.6.6 0 0 0 .6.6h16a.6.6 0 0 0 .6-.6V7.756zm5.267 6.877v1.666H5v-1.666zm4.166 0v1.666H9.167v-1.666zm4.167 0v1.666h-1.667v-1.666zm-8.333-3.977v1.666H5v-1.666zm4.166 0v1.666H9.167v-1.666zm4.167 0v1.666h-1.667v-1.666zM4.973 3.408H2a.6.6 0 0 0-.6.6v2.335l17.2.014V4.008a.6.6 0 0 0-.6-.6h-2.71v.929a.7.7 0 0 1-1.4 0v-.929H6.373v.92a.7.7 0 0 1-1.4 0z" /> -) \ No newline at end of file +) +export const renderIconBook = () => { + return ( + + + + ); +}; \ No newline at end of file diff --git a/src/_screens/home/detail-room-education/index.js b/src/_screens/home/detail-room-education/index.js index 41e6376..04bac74 100644 --- a/src/_screens/home/detail-room-education/index.js +++ b/src/_screens/home/detail-room-education/index.js @@ -11,7 +11,7 @@ import './detailRoomEducation.style.scss' import BoxDoughnutChart from "../../../_components/boxChart/BoxDoughnutChar"; import BoxDoughnutBarChart from "../../../_components/boxChart/BoxDoughnutBarChart"; import { apiCaller, history } from "../../../_helpers"; -import { replacePathParams } from "../../../_helpers/utils"; +import { exportExcel, replacePathParams } from "../../../_helpers/utils"; import $ from "jquery"; import { useLocation, useParams } from "react-router-dom"; @@ -292,7 +292,7 @@ export default function DetailRoomEducation() { 'Stt', 'Tên trường', 'Tiêu chí giao bài', - 'Tiêu chú tỷ lệ học sinh làm bài', + 'Tiêu chí tỷ lệ học sinh làm bài', 'Mức độ hoàn thành tiêu chí', 'Huyện', 'Tỉnh' diff --git a/src/_screens/home/education-department/index.js b/src/_screens/home/education-department/index.js index b0d262b..b3b46e5 100644 --- a/src/_screens/home/education-department/index.js +++ b/src/_screens/home/education-department/index.js @@ -2,6 +2,7 @@ import { useEffect, useState } from "react"; import InputText from "../../../_components/Auth/InputText"; import Header from "../../../_components/Header"; import { + renderIconBook, renderIconButton, renderIconHome, renderIconSearchInput, @@ -105,23 +106,6 @@ export default function EducationDepartmentHome() { getDataTeacherChart() }, [dateTeacherChart]) - const renderIconBook = () => { - return ( - - - - ); - }; - const handleSubmit = ()=>{ } diff --git a/src/_screens/home/headmaster/index.js b/src/_screens/home/headmaster/index.js index bcdab99..521529c 100644 --- a/src/_screens/home/headmaster/index.js +++ b/src/_screens/home/headmaster/index.js @@ -116,13 +116,15 @@ export default function HeadmasterHome() { }; const handleClickTeacherItem = (item) => { - history.push( - replacePathParams(PATH.home.detailTeacher, { - teacherId: item?.teacher_id, - }) + - "?teacher_name=" + - encodeURIComponent(item?.teacher_name), - ); + const teacherId = item?.teacher_id; + const teacherName = encodeURIComponent(item?.teacher_name); + const detailPath = replacePathParams(PATH.home.detailTeacher, { teacherId }); + + history.push({ + pathname: detailPath, + search: `?teacher_name=${teacherName}`, + state: { isBack: true }, + }); } const handleClickGradeItem = (item) => { diff --git a/src/_screens/home/teacher/index.js b/src/_screens/home/teacher/index.js index 49247ba..9319e21 100644 --- a/src/_screens/home/teacher/index.js +++ b/src/_screens/home/teacher/index.js @@ -19,13 +19,15 @@ import { useEffect, useState,useRef } from "react"; import { apiCaller, history } from "../../../_helpers"; import { configConstants } from "../../../_constants"; import { exportExcel } from "../../../_helpers/utils"; -import { useParams } from "react-router-dom"; +import { useLocation, useParams } from "react-router-dom"; export default function TeacherHome() { const search = history?.location?.search; const params = new URLSearchParams(search); const teacher_name = params.get("teacher_name"); const { teacherId } = useParams(); + const location = useLocation(); + const isBack = location.state?.isBack; const authentication = useSelector((state) => state.authentication); const [schoolYear, setSchoolYear] = useState( defaultMonthYearSemester.schoolYear, @@ -226,6 +228,7 @@ export default function TeacherHome() {