[Students by starting year] perform column span alignment

This commit is contained in:
joonas-a
2026-07-27 14:43:00 +03:00
parent 206226590d
commit 8851c68fc0
3 changed files with 5 additions and 3 deletions
@@ -114,6 +114,7 @@ export const FacultyStudentDataTable = ({
titles: string[]
years: string[]
}) => {
'use memo'
const [yearsVisible, setVisible] = useState(new Array<boolean>(years.length).fill(false))
const { getTextIn } = useLanguage()
const toggleVisibility = (yearIndex: number) => {
@@ -130,7 +131,7 @@ export const FacultyStudentDataTable = ({
<TableHead>
<TableRow key="FirstHeader">
<TableCell colSpan={!showPercentages ? 3 : 4} />
<TableCell colSpan={!showPercentages ? 5 : 10}>Current status</TableCell>
<TableCell colSpan={!showPercentages ? 6 : 12}>Current status</TableCell>
<TableCell colSpan={!showPercentages ? 3 : 6}>Gender</TableCell>
<TableCell colSpan={!showPercentages ? 2 : 4}>
<Stack direction="row" gap={1}>
@@ -29,6 +29,7 @@ export const StudentsByStartingYearTab = ({
setSpecialGroups: (value: boolean) => void
specialGroups: boolean
}) => {
'use memo'
const { getTextIn } = useLanguage()
const [showPercentages, setShowPercentages] = useState(false)
@@ -118,8 +118,8 @@ export const StudyTrackDataTable = ({
<TableCell
colSpan={
!showPercentages
? getSpanValue(combinedProgramme, 5, showPercentages)
: getSpanValue(combinedProgramme, 10, showPercentages)
? getSpanValue(combinedProgramme, 6, showPercentages)
: getSpanValue(combinedProgramme, 12, showPercentages)
}
>
Current status