Skip to content

Commit 18cd3d8

Browse files
committed
Merge branch 'develop' into feature/major-dependency-updates
2 parents fe2b16b + 30a9cf3 commit 18cd3d8

File tree

49 files changed

+4220
-453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4220
-453
lines changed

README.md

Lines changed: 116 additions & 51 deletions
Large diffs are not rendered by default.

client/package-lock.json

Lines changed: 33 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thesis-management",
3-
"version": "4.8.0",
3+
"version": "4.9.0",
44
"description": "Management of the Thesis Lifecycle in Universities",
55
"private": true,
66
"license": "MIT",
@@ -44,8 +44,10 @@
4444
"@tiptap/extension-subscript": "3.4.1",
4545
"@tiptap/extension-superscript": "3.4.1",
4646
"@tiptap/extension-text-align": "3.4.1",
47+
"@tiptap/extension-text-style": "3.4.1",
4748
"@tiptap/extension-underline": "3.4.1",
4849
"@tiptap/starter-kit": "3.4.1",
50+
"dompurify": "3.3.1",
4951
"embla-carousel": "^8.6.0",
5052
"embla-carousel-react": "^8.6.0",
5153
"i18n-iso-countries": "7.14.0",

client/src/app/Routes.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const PresentationOverviewPage = lazy(
2222
const ResearchGroupSettingPage = lazy(
2323
() => import('../pages/ResearchGroupSettingPage/ResearchGroupSettingPage'),
2424
)
25+
const EmailTemplateEditPage = lazy(
26+
() => import('../pages/ResearchGroupSettingPage/components/EmailTemplateSettings/EmailTemplateEditPage'),
27+
)
2528
const BrowseThesesPage = lazy(() => import('../pages/BrowseThesesPage/BrowseThesesPage'))
2629
const DashboardPage = lazy(() => import('../pages/DashboardPage/DashboardPage'))
2730
const LogoutPage = lazy(() => import('../pages/LogoutPage/LogoutPage'))
@@ -193,6 +196,14 @@ const AppRoutes = () => {
193196
</AuthenticatedArea>
194197
}
195198
/>
199+
<Route
200+
path='/research-groups/:researchGroupId/email-templates/:templateCase/edit'
201+
element={
202+
<AuthenticatedArea requiredGroups={['admin', 'group-admin']}>
203+
<EmailTemplateEditPage />
204+
</AuthenticatedArea>
205+
}
206+
/>
196207
<Route
197208
path='/interviews'
198209
element={

client/src/components/TopicsTable/TopicsTable.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { DataTable, DataTableColumn } from 'mantine-datatable'
22
import { formatDate } from '../../utils/format'
33
import { useTopicsContext } from '../../providers/TopicsProvider/hooks'
44
import { ITopic, TopicState } from '../../requests/responses/topic'
5-
import { useNavigate } from 'react-router'
6-
import { Badge, Center, Stack, Text } from '@mantine/core'
5+
import { Link, useNavigate } from 'react-router'
6+
import { Badge, Box, Center, Stack, Text } from '@mantine/core'
77
import AvatarUserList from '../AvatarUserList/AvatarUserList'
88
import ThesisTypeBadge from '../../pages/LandingPage/components/ThesisTypBadge/ThesisTypBadge'
99

@@ -65,6 +65,15 @@ const TopicsTable = (props: ITopicsTableProps) => {
6565
accessor: 'title',
6666
title: 'Title',
6767
cellsStyle: () => ({ minWidth: 200 }),
68+
render: (record) => (
69+
<Box
70+
component={Link}
71+
to={`/topics/${record.topicId}`}
72+
style={{ textDecoration: 'none', color: 'inherit' }}
73+
>
74+
<Box w={'100%'}>{record.title}</Box>
75+
</Box>
76+
),
6877
},
6978
types: {
7079
accessor: 'thesisTypes',

client/src/pages/InterviewBookingPage/InterviewBookingPage.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
Button,
33
Divider,
44
Flex,
5-
Group,
65
ScrollArea,
76
Stack,
87
Title,
@@ -271,8 +270,15 @@ const InterviewBookingPage = () => {
271270
return (
272271
<InterviewProcessProvider excludeBookedSlots={true} autoFetchInterviewees={false}>
273272
{myBooking ? (
274-
<Center style={{ height: '100%' }}>
275-
<Stack align='center' gap={'2rem'}>
273+
<ScrollArea h={'100%'} w={'100%'} type={isSmaller ? 'never' : 'hover'} offsetScrollbars>
274+
<Stack
275+
align='center'
276+
gap={'2rem'}
277+
px={isSmaller ? 0 : 'sm'}
278+
py={isSmaller ? 'sm' : 'xl'}
279+
justify='center'
280+
mih={'100%'}
281+
>
276282
<Stack gap={'0.5rem'} align='center'>
277283
<ClockIcon size={60} color='green' />
278284
<Title order={2}>Interview Scheduled</Title>
@@ -310,7 +316,7 @@ const InterviewBookingPage = () => {
310316
}}
311317
/>
312318
</Stack>
313-
</Center>
319+
</ScrollArea>
314320
) : (
315321
<Stack gap={'2rem'} h={'100%'}>
316322
<Title>Select your Interview Slot</Title>

client/src/pages/LandingPage/components/TopicCardGrid/TopicCard/TopicCard.tsx

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Card, Flex, Text, Group, Stack, Button, Tooltip, Anchor } from '@mantine/core'
1+
import { Card, Flex, Text, Group, Stack, Button, Tooltip, Anchor, Box } from '@mantine/core'
22
import { ITopic } from '../../../../../requests/responses/topic'
33
import { useHover, useMediaQuery } from '@mantine/hooks'
44
import { DownloadSimple, Users } from '@phosphor-icons/react'
@@ -51,66 +51,72 @@ const TopicCard = ({ topic, setOpenTopic }: ITopicCardProps) => {
5151
style={{ cursor: 'pointer' }}
5252
ref={ref}
5353
onClick={() => {
54-
if (!isPublished) {
55-
navigate(`/topics/${topicId}`)
56-
} else if (setOpenTopic) {
54+
if (isPublished && setOpenTopic) {
5755
setOpenTopic(topic as IPublishedThesis)
5856
}
5957
}}
6058
>
61-
<Card.Section withBorder inheritPadding p='1rem'>
62-
<Stack gap={'0.25rem'}>
63-
<Flex
64-
justify={'space-between'}
65-
align={'center'}
66-
gap={5}
67-
style={{
68-
minHeight: '3.5rem',
69-
}}
70-
pb={'0.25rem'}
71-
>
72-
<Flex wrap='wrap' gap={5}>
73-
{thesisTypes?.length ? (
74-
thesisTypes.map((type) => <ThesisTypeBadge type={type}></ThesisTypeBadge>)
75-
) : (
76-
<ThesisTypeBadge type='Any' key={'any'} />
77-
)}
78-
</Flex>
79-
</Flex>
80-
<Tooltip openDelay={500} label={topic.title} withArrow>
59+
<Box
60+
component={isPublished ? undefined : Link}
61+
to={isPublished ? '' : `/topics/${topicId}`}
62+
style={{ textDecoration: 'none', color: 'inherit' }}
63+
>
64+
<Card.Section withBorder inheritPadding p='1rem'>
65+
<Stack gap={'0.25rem'}>
8166
<Flex
67+
justify={'space-between'}
68+
align={'center'}
69+
gap={5}
8270
style={{
83-
minHeight: largerThanXs ? '4rem' : undefined,
71+
minHeight: '3.5rem',
8472
}}
85-
align={'flex-start'}
73+
pb={'0.25rem'}
8674
>
87-
<Text fw={500} lineClamp={2} size='lg'>
88-
{topic.title}
89-
</Text>
75+
<Flex wrap='wrap' gap={5}>
76+
{thesisTypes?.length ? (
77+
thesisTypes.map((type) => (
78+
<ThesisTypeBadge type={type} key={`${topicId}-${type}`}></ThesisTypeBadge>
79+
))
80+
) : (
81+
<ThesisTypeBadge type='Any' key={'any'} />
82+
)}
83+
</Flex>
9084
</Flex>
91-
</Tooltip>
85+
<Tooltip openDelay={500} label={topic.title} withArrow>
86+
<Flex
87+
style={{
88+
minHeight: largerThanXs ? '4rem' : undefined,
89+
}}
90+
align={'flex-start'}
91+
>
92+
<Text fw={500} lineClamp={2} size='lg'>
93+
{topic.title}
94+
</Text>
95+
</Flex>
96+
</Tooltip>
9297

93-
<Text c='dimmed'>{topic.researchGroup.name}</Text>
94-
</Stack>
95-
</Card.Section>
98+
<Text c='dimmed'>{topic.researchGroup.name}</Text>
99+
</Stack>
100+
</Card.Section>
96101

97-
<Stack gap='xs' pt='1rem' flex={1}>
98-
<Group gap={'xs'} c='dimmed'>
99-
<Users></Users>
100-
<Text size='sm'>Advisor(s)</Text>
101-
</Group>
102-
<AvatarUserList users={topic.advisors} />
103-
</Stack>
104-
105-
{students.length > 0 && (
106-
<Stack gap={5} pt={15} flex={1}>
107-
<Group gap={3} c='dimmed'>
102+
<Stack gap='xs' pt='1rem' flex={1}>
103+
<Group gap={'xs'} c='dimmed'>
108104
<Users></Users>
109-
<Text size='sm'>Student(s)</Text>
105+
<Text size='sm'>Advisor(s)</Text>
110106
</Group>
111-
<AvatarUserList users={students} />
107+
<AvatarUserList users={topic.advisors} />
112108
</Stack>
113-
)}
109+
110+
{students.length > 0 && (
111+
<Stack gap={5} pt={15} flex={1}>
112+
<Group gap={3} c='dimmed'>
113+
<Users></Users>
114+
<Text size='sm'>Student(s)</Text>
115+
</Group>
116+
<AvatarUserList users={students} />
117+
</Stack>
118+
)}
119+
</Box>
114120

115121
{isPublished ? (
116122
<Group gap={5} mt='md' w={'100%'} align='center'>

client/src/pages/ResearchGroupSettingPage/ResearchGroupSettingPage.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { showSimpleError } from '../../utils/notification'
66
import { getApiResponseErrorMessage } from '../../requests/handler'
77
import { Center, Loader, Stack, Tabs, Title } from '@mantine/core'
88
import GeneralResearchGroupSettings from './components/GeneralResearchGroupSettings'
9-
import ResearchGroupMembers from './components/ResearchGroupMembers'
9+
import ResearchGroupMembers from './components/MemberSettings/ResearchGroupMembers'
10+
import EmailTemplatesOverview from './components/EmailTemplateSettings/EmailTemplatesOverview'
1011
import { useUser } from '../../hooks/authentication'
1112
import ApplicationPhaseSettingsCard from './components/ApplicationPhaseSettingsCard'
1213
import { IResearchGroupSettings } from '../../requests/responses/researchGroupSettings'
@@ -17,14 +18,14 @@ import EmailSettingsCard from './components/EmailSettingsCard'
1718
const ResearchGroupSettingPage = () => {
1819
const { researchGroupId } = useParams<{ researchGroupId: string }>()
1920

21+
const user = useUser()
22+
2023
const [loading, setLoading] = useState(true)
2124
const [researchGroupData, setResearchGroupData] = useState<IResearchGroup | undefined>(undefined)
2225
const [researchGroupSettings, setResearchGroupSettings] = useState<
2326
IResearchGroupSettings | undefined
2427
>(undefined)
2528

26-
const user = useUser()
27-
2829
const [searchParams, setSearchParams] = useSearchParams()
2930
const [selectedTab, setSelectedTab] = useState(searchParams.get('setting') ?? 'general')
3031

@@ -107,8 +108,8 @@ const ResearchGroupSettingPage = () => {
107108
<Tabs.List>
108109
<Tabs.Tab value='general'>General</Tabs.Tab>
109110
<Tabs.Tab value='members'>Members</Tabs.Tab>
111+
<Tabs.Tab value='email-templates'>Email Templates</Tabs.Tab>
110112
</Tabs.List>
111-
112113
<Tabs.Panel value='general' pt='md'>
113114
<Stack>
114115
<GeneralResearchGroupSettings
@@ -202,6 +203,9 @@ const ResearchGroupSettingPage = () => {
202203
<Tabs.Panel value='members' pt='md'>
203204
<ResearchGroupMembers researchGroupData={researchGroupData} />
204205
</Tabs.Panel>
206+
<Tabs.Panel value='email-templates' pt='md'>
207+
<EmailTemplatesOverview />
208+
</Tabs.Panel>
205209
</Tabs>
206210
</Stack>
207211
)}

0 commit comments

Comments
 (0)