-
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.
[Mission] display detached reportings in mission form
- Loading branch information
1 parent
6f0c8fa
commit f3289ea
Showing
10 changed files
with
141 additions
and
64 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
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
28 changes: 28 additions & 0 deletions
28
frontend/src/features/missions/MissionForm/ActionCards/ReportingHistory.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,28 @@ | ||
import { Icon, THEME } from '@mtes-mct/monitor-ui' | ||
import styled from 'styled-components' | ||
|
||
import type { DetachedReportingForTimeline } from '../../../../domain/entities/reporting' | ||
|
||
export function ReportingHistory({ action }: { action: DetachedReportingForTimeline }) { | ||
if (action.action === 'attach') { | ||
return ( | ||
<> | ||
<Icon.Link color={THEME.color.charcoal} /> | ||
<ReportingHistoryContainer>Signalement {action.reportingId} lié de la mission</ReportingHistoryContainer> | ||
</> | ||
) | ||
} | ||
|
||
return ( | ||
<> | ||
<Icon.Unlink color={THEME.color.charcoal} /> | ||
<ReportingHistoryContainer>Signalement {action.reportingId} désaffecté de la mission</ReportingHistoryContainer> | ||
</> | ||
) | ||
} | ||
|
||
const ReportingHistoryContainer = styled.div` | ||
color: ${p => p.theme.color.gunMetal}; | ||
font-weight: bold; | ||
margin-left: 10px; | ||
` |
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
Oops, something went wrong.