Skip to content

Commit

Permalink
fixes to form 8 table ui, tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ranven committed Oct 23, 2024
1 parent cb5cfc5 commit d9fc783
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,75 +1,78 @@
.filter-row {
.menu-item-header {
$base-cell-size: min(5vw, 80px);

@mixin cell-scaling {
width: $base-cell-size;
min-width: $base-cell-size;
height: $base-cell-size;
}

.monitoring-overview {
width: 100%;

.filter-row .menu-item-header {
padding-left: 0;

h2 {
max-width: 16em;
font-size: 1.5em;
}
}
}

.flex-container {
display: flex;
flex-direction: column;
align-self: flex-start;
margin-left: 15px;
}

.monitoring-overview {
width: 100%;

.monitoring-table {
border-collapse: separate;
border-spacing: 0;
width: 100%;
table-layout: fixed;
}

.table-header-cell {
padding: 8px !important;
margin-top: 10px !important;
text-align: left;
min-width: 7vw;
max-width: 7vw;
word-wrap: break-word;

&:first-child {
width: 10vw;
}

&:not(:first-child) {
width: $base-cell-size;
}

.faculty-header {
vertical-align: top !important;
font-size: 13px;
width: 100%;
font-size: 1em;
display: block;
}
}

.pie-chart-cell,
.square-cell {
width: 80px;
height: 80px;
@include cell-scaling;
padding: 5px;
vertical-align: middle;
}

.pie-chart-container,
.square-container {
width: 80px;
height: 80px;
@include cell-scaling;
margin: 0 auto;
}

.ui.table td {
padding: 0.7em;
vertical-align: middle;
}

.accordion-header {
h5.accordion-header {
cursor: pointer;
margin: 15px 0 !important;
width: 210px;
overflow: visible;
word-wrap: break-word;
hyphens: auto;
margin: 15px 0 !important;
font-size: 1.2em !important;
line-height: 1.2;

&:hover {
text-decoration: underline;
}
}

.question-text {
padding: 5px 0;
font-size: 1em;
word-wrap: break-word;
hyphens: auto;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const MonitoringOverview = ({ t, lang, faculties }) => {

const filteredFaculties = useMemo(
() =>
faculties
(faculties || [])
.filter(f => f.code !== 'HTEST')
.map(f => ({
key: f.code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const FacultyMonitoringOverview = () => {
const user = useSelector(state => state.currentUser.data)

const hasReadRights = (faculties, user) => {
const readRights = faculties.some(faculty => user.access[faculty.code]?.read)
const readRights = faculties?.some(faculty => user.access[faculty.code]?.read)
return readRights || user.specialGroup?.evaluationFaculty || isAdmin(user)
}

Expand Down
5 changes: 3 additions & 2 deletions client/components/Generic/Square.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ const squareStyles = {
justifyContent: 'center',
alignItems: 'center',
cursor: 'pointer',
width: '80px',
height: '80px',
width: '100%',
height: '100%',
transition: 'filter 0.3s',
position: 'relative',
margin: 0,
}

const colors = {
Expand Down

0 comments on commit d9fc783

Please sign in to comment.