Compare commits

..

No commits in common. '4d053c0ad9c812119ff0ce2b4f30d93dca2ffbb0' and '844bf6e782daa08d58e6f12083b5f82d72a0b6b7' have entirely different histories.

  1. 28
      src/_screens/home/detail-room-education/index.js
  2. 34
      src/_screens/home/education-department/index.js

@ -208,30 +208,18 @@ export default function DetailRoomEducation() {
} }
useEffect(() => { useEffect(() => {
const fetchData = async () => { getDataStatisticCircle()
await getDataStatisticCircle(); getListOrganization()
await getListOrganization(); }, [])
};
fetchData();
}, []);
useEffect(() => { useEffect(() => {
const fetchStudentData = async () => { getDataStudentChart()
await getDataStudentChart(); }, [dateStudentChart])
};
fetchStudentData();
}, [dateStudentChart]);
useEffect(() => { useEffect(() => {
const fetchTeacherData = async () => { getDataTeacherChart()
await getDataTeacherChart(); }, [dateTeacherChart])
};
fetchTeacherData();
}, [dateTeacherChart]);
useEffect(() => { useEffect(() => {
if (isLoadingListOrganization || isLoadingStatisticCircle || isLoadingStudentChart || isLoadingTeacherChart) { if (isLoadingListOrganization || isLoadingStatisticCircle || isLoadingStudentChart || isLoadingTeacherChart) {
$(".loading").removeClass("hide"); $(".loading").removeClass("hide");
@ -473,7 +461,7 @@ export default function DetailRoomEducation() {
<div className="detail-room-education-item" key={index} onClick={() => goToDetailSchool(item)}> <div className="detail-room-education-item" key={index} onClick={() => goToDetailSchool(item)}>
<div className="detail-room-education-item-content"> <div className="detail-room-education-item-content">
<div className="detail-room-education-avatar"> <div className="detail-room-education-avatar">
<img src={item?.avatar ? configConstants.BASE_URL + item?.avatar : "/assets/imgs/avatar_school.png"} /> <img src={configConstants.BASE_URL + item?.avatar} />
</div> </div>
<div className="detail-room-education-detail"> <div className="detail-room-education-detail">
<div className="detail-room-education-info"> <div className="detail-room-education-info">

@ -95,30 +95,18 @@ export default function EducationDepartmentHome() {
}); });
} }
useEffect(() => { useEffect(async () => {
const fetchData = async () => { await getDataOrganization()
await getDataOrganization(); await getDataStatisticCircle()
await getDataStatisticCircle(); }, [])
};
fetchData();
}, []);
useEffect(() => {
const fetchStudentData = async () => {
await getDataStudentChart();
};
fetchStudentData(); useEffect(async () => {
}, [dateStudentChart]); await getDataStudentChart()
}, [dateStudentChart])
useEffect(() => {
const fetchTeacherData = async () => {
await getDataTeacherChart();
};
fetchTeacherData(); useEffect(async () => {
}, [dateTeacherChart]); await getDataTeacherChart()
}, [dateTeacherChart])
const getDataTeacher = async () => { const getDataTeacher = async () => {
try { try {
@ -243,7 +231,7 @@ export default function EducationDepartmentHome() {
</div> </div>
} }
<div className="d-flex justify-content-center" style={{marginTop: '3rem'}}> <div className="d-flex justify-content-center" style={{marginTop: '3rem'}}>
<PrimaryButton style={{textDecoration: 'underline'}} onClick={goToOutstandingTeacher}> <PrimaryButton className="d-flex" style={{textDecoration: 'underline'}} onClick={goToOutstandingTeacher}>
Top 10 giáo viên tiêu biểu Top 10 giáo viên tiêu biểu
<div style={{marginLeft: 8, paddingBottom: 4}}>{renderIconButton()}</div> <div style={{marginLeft: 8, paddingBottom: 4}}>{renderIconButton()}</div>
</PrimaryButton> </PrimaryButton>

Loading…
Cancel
Save