Skip to content

Commit 2b94808

Browse files
committed
Reorganize organisation tabs
1 parent 2d62b13 commit 2b94808

File tree

9 files changed

+65
-59
lines changed

9 files changed

+65
-59
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/locales/en/translation.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
"surveyTab": "Programme questions",
553553
"organisationSurveysTab": "Programme surveys",
554554
"summaryTab": "Summary",
555-
"courseRealisationsTab": "Course realisations",
555+
"courseRealisationsTab": "Courses",
556556
"openQuestionsTab": "Open questions",
557557
"editProgrammeQuestionsDialogTitle": "Warning!",
558558
"editProgrammeQuestionsDialogContent": "You are editing the questions shared by the whole programme. These questions are visible for all the courses of the programme. Are you sure you want to edit these questions?",
@@ -585,7 +585,8 @@
585585
"showCurName": "Show course realisation names",
586586
"searchUser": "Email or name",
587587
"basedOnIam": "Managed by IAM-groups. Deletion in Norppa is only temporary, remove from IAM-group instead.",
588-
"addedInNorppa": "Added in Norppa"
588+
"addedInNorppa": "Added in Norppa",
589+
"allCourseUnitRealisations": "All course unit realisations"
589590
},
590591
"feedbackTargetView": {
591592
"feedbackDisabled": "This feedback is disabled",

public/locales/fi/translation.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
"surveyTab": "Koulutusohjelman kysymykset",
553553
"organisationSurveysTab": "Koulutusohjelman kyselyt",
554554
"summaryTab": "Yhteenveto",
555-
"courseRealisationsTab": "Kurssitoteutukset",
555+
"courseRealisationsTab": "Kurssit",
556556
"openQuestionsTab": "Avoimet kysymykset",
557557
"editProgrammeQuestionsDialogTitle": "Varoitus!",
558558
"editProgrammeQuestionsDialogContent": "Olet muokkaamassa koko koulutusohjelman yhteisiä kysymyksiä. Nämä muutokset näkyvät kaikilla koulutusohjelman kursseilla. Oletko varma, että haluat muokata näitä kysymyksiä?",
@@ -585,7 +585,8 @@
585585
"showCurName": "Näytä kurssitoteutusten nimet",
586586
"searchUser": "Sähköposti tai nimi",
587587
"basedOnIam": "Perustuu IAM-ryhmiin. Norpan kautta poisto ei ole pysyvä, poista IAM-ryhmästä.",
588-
"addedInNorppa": "Lisätty Norpassa"
588+
"addedInNorppa": "Lisätty Norpassa",
589+
"allCourseUnitRealisations": "Kaikki opintojakson toteutukset"
589590
},
590591
"feedbackTargetView": {
591592
"feedbackDisabled": "Tämä palaute ei ole käytössä",

public/locales/sv/translation.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
"startDate": "Från",
434434
"endDate": "Till",
435435
"edit": "Redigera",
436-
"remove": "Ta nort",
436+
"remove": "Ta bort",
437437
"confirmRemoveSurvey": "Är du säker på att du vill ta bort mellanrespons enkäten?",
438438
"removeSuccess": "Mellanrespons enkäten har tagits bort"
439439
},
@@ -529,7 +529,7 @@
529529
"surveyTab": "Utbildningsprogrammets frågor",
530530
"organisationSurveysTab": "Utbildningsprogrammets enkäter",
531531
"summaryTab": "Sammandrag",
532-
"courseRealisationsTab": "Hur kursen är implementerad",
532+
"courseRealisationsTab": "Kurser",
533533
"openQuestionsTab": "Öppna frågor",
534534
"editProgrammeQuestionsDialogTitle": "Varning!",
535535
"editProgrammeQuestionsDialogContent": "Du håller på att redigera hela utbildningsprogrammets gemensamma frågor. Dessa ändringar syns på alla av utbildningsprogrammets kurser. Är du säker på att du vill redigera dessa frågor?",
@@ -553,13 +553,16 @@
553553
"editMode": "Flerfaldig redigering",
554554
"calendarMode": "Ändra till kalendervy",
555555
"listMode": "Ändra till listvy",
556-
"setStudyTracks": "Markera studieinriktningarna för kursgenomförandet",
556+
"setStudyTracks": "Markera studieinriktningarna för undervisningshändelsen",
557557
"setStudyTracksForCourseUnit": "Markera kursens {{name}} ({{code}}) inriktning",
558-
"courseUnitTagSettingInfo": "Kursens studieriktningar är också synliga i alla dess implementeringar",
559-
"courseUnitTagInfo": "Kursen {{code}} har {{count}} studieinriktning(ar) som ärvs från denna implementering",
560-
"setStudyTracksForSelection": "Markera studieinriktningarna för kursgenomförandet",
558+
"courseUnitTagSettingInfo": "Kursens studieriktningar är också synliga i alla dess undervisningshändelser",
559+
"courseUnitTagInfo": "Kursen {{code}} har {{count}} studieinriktning(ar) som ärvs från denna undervisningshändelse",
560+
"setStudyTracksForSelection": "Markera studieinriktningarna för undervisningshändelsen",
561561
"noTags": "Visa endast kurser utan studieinriktning",
562-
"showCurName": "Visa namnen på kursimplementeringar"
562+
"showCurName": "Visa namnen på undervisningshändelse",
563+
"basedOnIam": "Baserat på IAM-grupper. Radering i Norppa är bara tillfällig, ta bort från IAM-gruppen i stället.",
564+
"addedInNorppa": "Tillagt i Norppa",
565+
"allCourseUnitRealisations": "Alla undervisningshändelser för studieavsnittet"
563566
},
564567
"feedbackTargetView": {
565568
"feedbackDisabled": "Denna respons är inte i bruk",

src/client/pages/Organisation/CourseSettings.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ const CourseSettings = () => {
286286

287287
return (
288288
<Box>
289-
<Typography textTransform="uppercase">{t('organisationSettings:courseSettings')}</Typography>
289+
<Typography textTransform="uppercase" style={{ marginBottom: '10px' }}>
290+
{t('organisationSettings:courseSettings')}
291+
</Typography>
290292
<CourseSettingsContainer organisation={organisation} courseUnits={courseUnits} />
291293
</Box>
292294
)

src/client/pages/Organisation/GeneralSettings.jsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
Alert,
1111
Box,
1212
Typography,
13+
Stack,
1314
} from '@mui/material'
1415

1516
import { useMutation } from '@tanstack/react-query'
@@ -98,7 +99,7 @@ const GeneralSettingsContainer = ({ organisation }) => {
9899

99100
return (
100101
<Box>
101-
<Typography mb={2} textTransform="uppercase">
102+
<Typography textTransform="uppercase" style={{ marginBottom: '10px' }}>
102103
{t('organisationSettings:generalSettings')}
103104
</Typography>
104105
<StudentListSettings organisation={organisation} />
@@ -116,23 +117,12 @@ const GeneralSettings = () => {
116117
}
117118

118119
return (
119-
<Box>
120+
<Stack spacing={6}>
121+
{ENABLE_CORRESPONDENT_MANAGEMENT && <FeedbackCorrespondent organisation={organisation} />}
120122
<GeneralSettingsContainer organisation={organisation} />
121-
<Box mb="5rem" />
122-
{ENABLE_CORRESPONDENT_MANAGEMENT && (
123-
<>
124-
<FeedbackCorrespondent organisation={organisation} />
125-
<Box mb="5rem" />
126-
</>
127-
)}
128-
{organisation.tags?.length > 0 && (
129-
<>
130-
<Tags organisation={organisation} />
131-
<Box mb="5rem" />
132-
</>
133-
)}
134123
<CourseSettings />
135-
</Box>
124+
{organisation.tags?.length > 0 && <Tags organisation={organisation} />}
125+
</Stack>
136126
)
137127
}
138128

src/client/pages/Organisation/Organisation.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ const Organisation = () => {
7777
</Box>
7878
<Box mb="2rem">
7979
<RouterTabs variant="scrollable" scrollButtons="auto">
80+
<RouterTab
81+
label={t('organisationSettings:summaryTab')}
82+
to={`${pathnameBase}/summary`}
83+
icon={<PollOutlined />}
84+
/>
85+
{SHOW_COURSES_TAB_IN_ORGANISATION_SETTINGS && (
86+
<RouterTab
87+
label={t('organisationSettings:courseRealisationsTab')}
88+
to={`${pathnameBase}/upcoming`}
89+
icon={<CalendarTodayOutlined />}
90+
/>
91+
)}
8092
{hasAdminAccess && (
8193
<RouterTab
8294
label={t('organisationSettings:settingsTab')}
@@ -98,18 +110,6 @@ const Organisation = () => {
98110
to={`${pathnameBase}/organisation-surveys`}
99111
/>
100112
)}
101-
{SHOW_COURSES_TAB_IN_ORGANISATION_SETTINGS && (
102-
<RouterTab
103-
label={t('organisationSettings:courseRealisationsTab')}
104-
to={`${pathnameBase}/upcoming`}
105-
icon={<CalendarTodayOutlined />}
106-
/>
107-
)}
108-
<RouterTab
109-
label={t('organisationSettings:summaryTab')}
110-
to={`${pathnameBase}/summary`}
111-
icon={<PollOutlined />}
112-
/>
113113
{hasAdminAccess && (
114114
<RouterTab
115115
label={t('organisationSettings:openQuestionsTab')}

src/client/pages/Organisation/SemesterOverview.jsx

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import TagSelector from './TagSelector'
3939
import useLocalStorageState from '../../hooks/useLocalStorageState'
4040
import { getYearRange } from '../../util/yearUtils'
4141
import { FeedbackTargetGrouping } from '../../util/feedbackTargetGrouping'
42+
import { getSafeCourseCode } from '../../util/courseIdentifiers'
4243

4344
const SelectionContext = React.createContext({})
4445

@@ -374,24 +375,32 @@ const FeedbackTargetButton = React.memo(({ feedbackTarget, onClick, selected, sh
374375
)
375376
})
376377

377-
const FeedbackTargetItem = ({ code, cuName, curName, tags, language, showCurName }) => (
378-
<Box m="0.3rem" display="flex" flexDirection="column" alignItems="start">
379-
<Box fontSize="16px" display="flex" alignItems="start" columnGap="0.5rem">
380-
<Typography color="textSecondary">{code}</Typography>
381-
<Typography fontWeight={400}>{getLanguageValue(cuName, language)}</Typography>
382-
<div>
383-
{tags.map(tag => (
384-
<TagChip key={tag.id} tag={tag} prefix={`${code}: `} language={language} compact />
385-
))}
386-
</div>
378+
const FeedbackTargetItem = ({ code, cuName, curName, tags, language, showCurName }) => {
379+
const { t } = useTranslation()
380+
const safeCourseCode = getSafeCourseCode({ courseCode: code })
381+
382+
return (
383+
<Box m="0.3rem" display="flex" flexDirection="column" alignItems="start">
384+
<Box fontSize="16px" display="flex" alignItems="start" columnGap="0.5rem">
385+
<Typography color="textSecondary">{code}</Typography>
386+
<Typography fontWeight={400}>{getLanguageValue(cuName, language)}</Typography>
387+
<div>
388+
{tags.map(tag => (
389+
<TagChip key={tag.id} tag={tag} prefix={`${code}: `} language={language} compact />
390+
))}
391+
</div>
392+
</Box>
393+
{showCurName && (
394+
<Typography color="textSecondary" fontSize="14px" fontWeight={400}>
395+
{getLanguageValue(curName, language)}
396+
</Typography>
397+
)}
398+
<MuiLink component={Link} to={`/course-summary/course-unit/${safeCourseCode}?option=all`}>
399+
{t('organisationSettings:allCourseUnitRealisations')}
400+
</MuiLink>
387401
</Box>
388-
{showCurName && (
389-
<Typography color="textSecondary" fontSize="14px" fontWeight={400}>
390-
{getLanguageValue(curName, language)}
391-
</Typography>
392-
)}
393-
</Box>
394-
)
402+
)
403+
}
395404

396405
const Filters = React.memo(({ onChange, value, organisation }) => {
397406
const { t, i18n } = useTranslation()

src/client/pages/Organisation/Tags.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Tags = ({ organisation }) => {
99

1010
return (
1111
<Box>
12-
<Typography textTransform="uppercase">
12+
<Typography textTransform="uppercase" style={{ marginBottom: '10px' }}>
1313
{t('common:studyTracks')} ({tags.length})
1414
</Typography>
1515
<Card>

0 commit comments

Comments
 (0)