|
|
@ -38,6 +38,7 @@ export default function DetailRoomEducation() { |
|
|
|
const [isLoadingStatisticCircle, setIsLoadingStatisticCircle] = useState(false); |
|
|
|
const [isLoadingStatisticCircle, setIsLoadingStatisticCircle] = useState(false); |
|
|
|
const [isLoadingStudentChart, setIsLoadingStudentChart] = useState(false); |
|
|
|
const [isLoadingStudentChart, setIsLoadingStudentChart] = useState(false); |
|
|
|
const [isLoadingTeacherChart, setIsLoadingTeacherChart] = useState(false); |
|
|
|
const [isLoadingTeacherChart, setIsLoadingTeacherChart] = useState(false); |
|
|
|
|
|
|
|
const [isFilterChanged, setIsFilterChanged] = useState(false); |
|
|
|
const [isLoadMoreOnline, setLoadMoreOnline] = useState(true); |
|
|
|
const [isLoadMoreOnline, setLoadMoreOnline] = useState(true); |
|
|
|
const [limitOnline] = useState(10); |
|
|
|
const [limitOnline] = useState(10); |
|
|
|
const [offsetOnline, setOffsetOnline] = useState(0); |
|
|
|
const [offsetOnline, setOffsetOnline] = useState(0); |
|
|
@ -45,6 +46,8 @@ export default function DetailRoomEducation() { |
|
|
|
const [isLoading, setIsLoading] = useState(false); |
|
|
|
const [isLoading, setIsLoading] = useState(false); |
|
|
|
const [searchText, setSearchText] = useState(''); |
|
|
|
const [searchText, setSearchText] = useState(''); |
|
|
|
const dispatch = useDispatch(); |
|
|
|
const dispatch = useDispatch(); |
|
|
|
|
|
|
|
const isSGD = authentication?.user?.organization_name?.toLowerCase().includes('sở'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getListOrganization = async () => { |
|
|
|
const getListOrganization = async () => { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -358,7 +361,7 @@ export default function DetailRoomEducation() { |
|
|
|
<div className="flex-1"> |
|
|
|
<div className="flex-1"> |
|
|
|
<Header |
|
|
|
<Header |
|
|
|
icon={renderIconHome({ color: "#4D4D4D" })} |
|
|
|
icon={renderIconHome({ color: "#4D4D4D" })} |
|
|
|
title={"Phòng giáo dục " + authentication.user.province} |
|
|
|
title={"Phòng giáo dục " + (isSGD ? `${authentication.user.province}` : `${authentication.user.district}`)} |
|
|
|
manager={true} |
|
|
|
manager={true} |
|
|
|
isBack={isBack} |
|
|
|
isBack={isBack} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -429,12 +432,12 @@ export default function DetailRoomEducation() { |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<PrimaryButton |
|
|
|
<PrimaryButton |
|
|
|
isDisabled={false} |
|
|
|
isDisabled={searchText.length === 0} |
|
|
|
onClick={handleSubmit} |
|
|
|
onClick={handleSubmit} |
|
|
|
> |
|
|
|
> |
|
|
|
{"Tìm kiếm"} |
|
|
|
{"Tìm kiếm"} |
|
|
|
</PrimaryButton> |
|
|
|
</PrimaryButton> |
|
|
|
<PrimaryButton onClick={handleExport}> |
|
|
|
<PrimaryButton isDisabled={listOrganization.length === 0} onClick={handleExport}> |
|
|
|
Xuất excel |
|
|
|
Xuất excel |
|
|
|
</PrimaryButton> |
|
|
|
</PrimaryButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -443,22 +446,34 @@ export default function DetailRoomEducation() { |
|
|
|
<RootSelect |
|
|
|
<RootSelect |
|
|
|
data={LIST_SCHOOL_YEAR} |
|
|
|
data={LIST_SCHOOL_YEAR} |
|
|
|
value={schoolYear} |
|
|
|
value={schoolYear} |
|
|
|
setValue={setSchoolYear} |
|
|
|
setValue={(value) => { |
|
|
|
|
|
|
|
setSchoolYear(value); |
|
|
|
|
|
|
|
setIsFilterChanged(true); |
|
|
|
|
|
|
|
}} |
|
|
|
style={{flex: 1, minWidth: '200px', padding:'0 10px'}} |
|
|
|
style={{flex: 1, minWidth: '200px', padding:'0 10px'}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<RootSelect |
|
|
|
<RootSelect |
|
|
|
data={LIST_SEMESTER} |
|
|
|
data={LIST_SEMESTER} |
|
|
|
value={semester} |
|
|
|
value={semester} |
|
|
|
setValue={changeSemester} |
|
|
|
setValue={(value) => { |
|
|
|
|
|
|
|
changeSemester(value); |
|
|
|
|
|
|
|
setIsFilterChanged(true); |
|
|
|
|
|
|
|
}} |
|
|
|
style={{flex: 0.5, minWidth: '151px', padding:'0 10px'}} |
|
|
|
style={{flex: 0.5, minWidth: '151px', padding:'0 10px'}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<RootSelect |
|
|
|
<RootSelect |
|
|
|
data={getListMonthBySemester(semester.value)} |
|
|
|
data={getListMonthBySemester(semester.value)} |
|
|
|
value={month} |
|
|
|
value={month} |
|
|
|
setValue={setMonth} |
|
|
|
setValue={(value) => { |
|
|
|
|
|
|
|
setMonth(value); |
|
|
|
|
|
|
|
setIsFilterChanged(true); |
|
|
|
|
|
|
|
}} |
|
|
|
style={{flex: 0.5, minWidth: '150px', padding:'0 10px'}} |
|
|
|
style={{flex: 0.5, minWidth: '150px', padding:'0 10px'}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<PrimaryButton onClick={handleFilter}> |
|
|
|
<PrimaryButton isDisabled={!isFilterChanged} onClick={() => { |
|
|
|
|
|
|
|
handleFilter(); |
|
|
|
|
|
|
|
setIsFilterChanged(false); |
|
|
|
|
|
|
|
}}> |
|
|
|
Áp dụng |
|
|
|
Áp dụng |
|
|
|
</PrimaryButton> |
|
|
|
</PrimaryButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|