-
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.
Refactor/fix/test homepage ULAM + PAM
- Loading branch information
Showing
34 changed files
with
971 additions
and
563 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
13 changes: 8 additions & 5 deletions
13
frontend/src/v2/features/common/components/elements/export-file-button.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
88 changes: 88 additions & 0 deletions
88
frontend/src/v2/features/common/components/layout/mission-list-page-content-wrapper.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,88 @@ | ||
import React, { FC, ReactNode } from 'react' | ||
import { Col, FlexboxGrid, Loader, Stack } from 'rsuite' | ||
import { Icon } from '@mtes-mct/monitor-ui' | ||
import Text from '@common/components/ui/text.tsx' | ||
|
||
interface MissionListContentWrapperProps { | ||
hasMissions: boolean | ||
title: string | ||
subtitle?: string | ||
filter?: JSX.Element | ||
actions?: JSX.Element | ||
list: ReactNode | ||
loading: boolean | ||
} | ||
|
||
const MissionListPageContentWrapper: FC<MissionListContentWrapperProps> = ({ | ||
title, | ||
subtitle, | ||
filters, | ||
actions, | ||
list, | ||
loading, | ||
hasMissions | ||
}) => { | ||
return ( | ||
<Stack direction={'column'} style={{ width: '100%' }}> | ||
<Stack.Item style={{ width: '100%' }}> | ||
<Stack | ||
direction={'row'} | ||
spacing={'0.5rem'} | ||
alignItems={'center'} | ||
style={{ padding: '0 15rem', marginTop: '5rem' }} | ||
> | ||
<Stack.Item alignSelf={'baseline'}> | ||
<Icon.MissionAction size={32} style={{ marginTop: '8px' }} /> | ||
</Stack.Item> | ||
<Stack.Item> | ||
<Text as={'h1'} style={{ fontSize: '32px' }}> | ||
{title} | ||
</Text> | ||
</Stack.Item> | ||
</Stack> | ||
</Stack.Item> | ||
{subtitle && ( | ||
<Stack.Item style={{ width: '100%', padding: '0 15rem', marginTop: '5rem' }}> | ||
<Text as={'h1'}>{subtitle}</Text> | ||
</Stack.Item> | ||
)} | ||
<Stack.Item style={{ width: '100%' }}> | ||
<Stack direction="column" alignItems="flex-start" spacing="0.2rem" style={{ width: '100%' }}> | ||
<Stack.Item style={{ width: '100%', height: '100%' }}> | ||
<FlexboxGrid justify="center" style={{ padding: '2rem 2rem 4rem 2rem', display: 'flex', flex: 1 }}> | ||
<FlexboxGrid.Item as={Col} colspan={24} xxl={20}> | ||
{filters} | ||
</FlexboxGrid.Item> | ||
<FlexboxGrid.Item as={Col} colspan={24} xxl={20}> | ||
{loading ? ( | ||
<div style={{ marginTop: '25rem' }}> | ||
<Loader | ||
center={true} | ||
size={'md'} | ||
vertical={true} | ||
content={<Text as={'h3'}>Missions en cours de chargement</Text>} | ||
/> | ||
</div> | ||
) : !hasMissions ? ( | ||
<div style={{ marginTop: '10rem' }}> | ||
<Text as={'h3'} style={{ textAlign: 'center' }}> | ||
Aucune mission pour cette période de temps. | ||
</Text> | ||
</div> | ||
) : ( | ||
<> | ||
{actions} | ||
|
||
{list} | ||
</> | ||
)} | ||
</FlexboxGrid.Item> | ||
</FlexboxGrid> | ||
</Stack.Item> | ||
</Stack> | ||
</Stack.Item> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default MissionListPageContentWrapper |
7 changes: 7 additions & 0 deletions
7
frontend/src/v2/features/common/components/layout/mission-list-page-title.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,7 @@ | ||
import React from 'react' | ||
|
||
const MissionListPageTitle: React.FC = () => { | ||
return <h4>Rapport Nav</h4> | ||
} | ||
|
||
export default MissionListPageTitle |
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.