-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from ls1intum/70-implement-submit-application…
…-page Implement new Thesis Application Flow
- Loading branch information
Showing
52 changed files
with
1,736 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ name: Build and Deploy to Dev | |
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build-dev-container: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
client/src/components/TopicAccordionItem/TopicAccordionItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Accordion } from '@mantine/core' | ||
import TopicData from '../TopicData/TopicData' | ||
import React, { PropsWithChildren } from 'react' | ||
import { ITopic } from '../../requests/responses/topic' | ||
|
||
interface ITopicAccordionItemProps { | ||
topic: ITopic | ||
} | ||
|
||
const TopicAccordionItem = (props: PropsWithChildren<ITopicAccordionItemProps>) => { | ||
const { topic, children } = props | ||
|
||
return ( | ||
<Accordion.Item key={topic.topicId} value={topic.topicId}> | ||
<Accordion.Control>{topic.title}</Accordion.Control> | ||
<Accordion.Panel> | ||
<TopicData topic={topic} /> | ||
{children} | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
) | ||
} | ||
|
||
export default TopicAccordionItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { ITopic } from '../../requests/responses/topic' | ||
import { Grid, Stack } from '@mantine/core' | ||
import LabeledItem from '../LabeledItem/LabeledItem' | ||
import { formatDate, formatUser } from '../../utils/format' | ||
import { GLOBAL_CONFIG } from '../../config/global' | ||
import DocumentEditor from '../DocumentEditor/DocumentEditor' | ||
import React from 'react' | ||
|
||
interface ITopicDataProps { | ||
topic: ITopic | ||
} | ||
|
||
const TopicData = (props: ITopicDataProps) => { | ||
const { topic } = props | ||
|
||
return ( | ||
<Stack gap='md'> | ||
<Grid> | ||
<Grid.Col span={{ md: 3 }}> | ||
<LabeledItem | ||
label='Supervisor' | ||
value={topic.supervisors | ||
.map((user) => formatUser(user, { withUniversityId: false })) | ||
.join(', ')} | ||
/> | ||
</Grid.Col> | ||
<Grid.Col span={{ md: 3 }}> | ||
<LabeledItem | ||
label='Advisor' | ||
value={topic.advisors | ||
.map((user) => formatUser(user, { withUniversityId: false })) | ||
.join(', ')} | ||
/> | ||
</Grid.Col> | ||
<Grid.Col span={{ md: 3 }}> | ||
<LabeledItem | ||
label='Type' | ||
value={topic.type ? (GLOBAL_CONFIG.thesis_types[topic.type] ?? topic.type) : 'Any'} | ||
/> | ||
</Grid.Col> | ||
<Grid.Col span={{ md: 3 }}> | ||
<LabeledItem | ||
label='Published At' | ||
value={formatDate(topic.createdAt, { withTime: false })} | ||
/> | ||
</Grid.Col> | ||
</Grid> | ||
<DocumentEditor label='Problem Statement' value={topic.problemStatement} /> | ||
{topic.goals && <DocumentEditor label='Goals' value={topic.goals} />} | ||
{topic.references && <DocumentEditor label='References' value={topic.references} />} | ||
</Stack> | ||
) | ||
} | ||
|
||
export default TopicData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.