Skip to content

Commit

Permalink
[Reporting] update reporting on map when archived and attached to a m…
Browse files Browse the repository at this point in the history
…ission
  • Loading branch information
claire2212 committed Oct 13, 2023
1 parent 8128055 commit ffdd911
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export function AttachedMissionCard({

<Body>
<Details>
Mission {missionTypesToString(missionTypes)}{missionDurationText}
<div>
Mission {missionTypesToString(missionTypes)}{missionDurationText}
</div>
<MissionStatusLabel missionStatus={missionStatus} />
</Details>
<div>
Expand Down Expand Up @@ -97,7 +99,9 @@ const NoContact = styled.div`
`
const Details = styled.div`
color: ${p => p.theme.color.slateGray};
white-space: nowrap;
display: flex;
flex: 2;
flex-direction: column;
`

const Title = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function AttachMission({ setIsAttachNewMission }) {
}

const unattachMission = () => {
setFieldValue('attachedMissionId', undefined)
setFieldValue('attachedMission', undefined)
dispatch(attachMissionToReportingSliceActions.setAttachedMissionId(undefined))
dispatch(attachMissionToReportingSliceActions.setAttachedMission(undefined))
}

const createMission = async () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/features/map/layers/Reportings/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const reportingPinStyleFn = feature => {

if (feature.get('attachedMissionId')) {
if (status === ReportingStatusEnum.ARCHIVED) {
return reportingStyleFactory(THEME.color.mediumSeaGreen, 'archived_reporting_observation.svg')
return reportingStyleFactory(THEME.color.white, 'archived_reporting_with_mission_attached.svg')
}

return reportingStyleFactory(THEME.color.mediumSeaGreen)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function ReportingCard({
...(action.theme && {
themes: [
{
subThemes: action.subThemes,
subThemes: action.subThemes || [],
theme: action.theme
}
]
Expand Down

0 comments on commit ffdd911

Please sign in to comment.