-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- supports section managers creating teams - redirects to new page on successful team creation - includes a link to the PR that is created
- Loading branch information
Showing
6 changed files
with
102 additions
and
86 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import styles from './createTeamForm.module.scss' | ||
import { Dialog } from '@statisticsnorway/ssb-component-library' | ||
import { Option as O } from 'effect' | ||
import { CircularProgress } from '@mui/material' | ||
|
||
export interface FormSubmissionErrorProps { | ||
formSubmissionError: O.Option<string> | ||
} | ||
|
||
const FormSubmissionError = ({ formSubmissionError }: FormSubmissionErrorProps) => | ||
O.match(formSubmissionError, { | ||
onNone: () => ( | ||
<div className={styles.center}> | ||
<CircularProgress /> | ||
</div> | ||
), | ||
onSome: (errorMessage) => ( | ||
<Dialog className={styles.warning} type='warning' title='Feil oppstod ved innsending av skjema'> | ||
{errorMessage} | ||
</Dialog> | ||
), | ||
}) | ||
|
||
export default FormSubmissionError |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
import { Dialog, Link } from '@statisticsnorway/ssb-component-library' | ||
import { useLocation } from 'react-router-dom' | ||
|
||
import PageLayout from '../../components/PageLayout/PageLayout' | ||
import styles from './createTeamForm.module.scss' | ||
|
||
export interface TeamCreatedProps { | ||
kubenPullRequestUrl: string | ||
} | ||
|
||
const TeamCreated = () => { | ||
const { state }: { state: TeamCreatedProps } = useLocation() | ||
const renderContent = () => ( | ||
<Dialog className={styles.warning} type={'info'} title={'Skjema ble innsendt'}> | ||
<span>{`Opprettelse av team ble registert. Prosessen kan følges `}</span> | ||
<Link href={state.kubenPullRequestUrl}>her</Link> | ||
</Dialog> | ||
) | ||
|
||
return <PageLayout title='Opprett Team' content={renderContent()} /> | ||
} | ||
|
||
export default TeamCreated |
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