-
Notifications
You must be signed in to change notification settings - Fork 3
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 #912 from digitalfabrik/move-responsive-components…
…-into-separate-folder Create directory for responsive components
- Loading branch information
Showing
87 changed files
with
205 additions
and
148 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Administration (Digitale Druckerei) | ||
|
||
The administration project contains the React frontends for three audiences: | ||
|
||
- Applicants can apply for an entitlementcard | ||
- Organizations can verify or reject application details | ||
- Administrators can manage applications, cards, and regions. | ||
|
||
# Folder Structure | ||
|
||
The administration frontend relies on [Blueprint](https://blueprintjs.com) and the [Material UI](https://mui.com) library. The latter is used for sites that need to be responsive, i.e. sites targeting applicants and organizations. | ||
To keep the usage of the libraries separated (to keep a unified look and feel) the folder structure looks as follows: | ||
|
||
- src | ||
- bp-modules | ||
- module A | ||
- hooks \* | ||
- util \* | ||
- ...components | ||
- module B | ||
- hooks \* | ||
- util \* | ||
- ...components | ||
- hooks \* | ||
- util \* | ||
- ...general components | ||
- mui-modules | ||
- module A | ||
- hooks \* | ||
- util \* | ||
- ...components | ||
- module B | ||
- hooks \* | ||
- util \* | ||
- ...components | ||
- hooks \* | ||
- util \* | ||
- ...general components | ||
- ...global modules | ||
- ...global components | ||
|
||
(the \* refers to optional compontents) |
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 |
---|---|---|
@@ -1,26 +1,29 @@ | ||
import React from 'react' | ||
import AuthProvider from './AuthProvider' | ||
import { ProjectConfigProvider } from './project-configs/ProjectConfigContext' | ||
import MetaTagsManager from './components/MetaTagsManager' | ||
import { AppToasterProvider } from './components/AppToaster' | ||
import { AppToasterProvider } from './bp-modules/AppToaster' | ||
import AppApolloProvider from './AppApolloProvider' | ||
import Router from './Router' | ||
import useMetaTags from './hooks/useMetaTags' | ||
|
||
if (!process.env.REACT_APP_API_BASE_URL) { | ||
throw new Error('REACT_APP_API_BASE_URL is not set!') | ||
} | ||
|
||
const App = () => ( | ||
<ProjectConfigProvider> | ||
<MetaTagsManager /> | ||
<AppToasterProvider> | ||
<AuthProvider> | ||
<AppApolloProvider> | ||
<Router /> | ||
</AppApolloProvider> | ||
</AuthProvider> | ||
</AppToasterProvider> | ||
</ProjectConfigProvider> | ||
) | ||
const App = () => { | ||
useMetaTags() | ||
|
||
return ( | ||
<ProjectConfigProvider> | ||
<AppToasterProvider> | ||
<AuthProvider> | ||
<AppApolloProvider> | ||
<Router /> | ||
</AppApolloProvider> | ||
</AuthProvider> | ||
</AppToasterProvider> | ||
</ProjectConfigProvider> | ||
) | ||
} | ||
|
||
export default App |
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
File renamed without changes.
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 React, { ReactElement } from 'react' | ||
import { Button, NonIdealState } from '@blueprintjs/core' | ||
|
||
type ErrorHandlerProps = { | ||
title?: string | ||
description?: string | ReactElement | ||
refetch: () => void | ||
} | ||
|
||
const ErrorHandler = ({ | ||
refetch, | ||
title = 'Ein Fehler ist aufgetreten.', | ||
description, | ||
}: ErrorHandlerProps): ReactElement => ( | ||
<NonIdealState | ||
icon={'error'} | ||
title={title} | ||
description={description} | ||
action={<Button onClick={() => refetch()}>Erneut Versuchen</Button>} | ||
/> | ||
) | ||
|
||
export default ErrorHandler |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...tion/src/components/DataPrivacyPolicy.tsx → .../bp-modules/regions/DataPrivacyPolicy.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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
4 changes: 2 additions & 2 deletions
4
...tration/src/components/RegionSelector.tsx → ...n/src/bp-modules/users/RegionSelector.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ents/errors/getMessageFromApolloError.tsx → .../src/errors/getMessageFromApolloError.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
4 changes: 2 additions & 2 deletions
4
administration/src/ErrorHandler.tsx → ...stration/src/mui-modules/ErrorHandler.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
4 changes: 2 additions & 2 deletions
4
...ations/ApplicationApplicantController.tsx → ...cation/ApplicationApplicantController.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
8 changes: 4 additions & 4 deletions
8
...applications/ApplicationApplicantView.tsx → ...verification/ApplicationApplicantView.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
Oops, something went wrong.