Skip to content

Commit

Permalink
fix mission page
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Sep 28, 2023
1 parent 573c602 commit 5dd56b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pam/mission/mission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export default function Mission() {
const { missionId } = useParams()

const apolloClient = useApolloClient()

debugger
let navigate = useNavigate()
const [selectedAction, setSelectedAction] = useState<Action | undefined>(undefined)
const [showControlTypesModal, setShowControlTypesModal] = useState<boolean>(false)

const { loading, error, data, refetch, updateQuery } = useQuery(GET_MISSION_BY_ID, {
variables: { missionId },
fetchPolicy: 'cache-only'
variables: { missionId }
// fetchPolicy: 'cache-only'
})
// const [queryRef] = useBackgroundQuery(GET_ACTIONS_BY_MISSION_ID, { variables: { missionId } })
// debugger
Expand Down
28 changes: 7 additions & 21 deletions frontend/src/pam/mission/panel-general-info.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { FlexboxGrid, Panel, Stack } from 'rsuite'
import { THEME, DatePicker } from '@mtes-mct/monitor-ui'
import { THEME, DateRangePicker } from '@mtes-mct/monitor-ui'
import Title from '../../ui/title'

interface MissionGeneralInfoPanelProps {
Expand All @@ -22,27 +22,13 @@ const MissionGeneralInfoPanel: React.FC<MissionGeneralInfoPanelProps> = ({ start
<FlexboxGrid>
<FlexboxGrid.Item>
<Stack direction="column" alignItems="flex-start">
<Stack.Item style={{ paddingBottom: '0.5rem' }}>
<Title as="h3" color={THEME.color.slateGray}>
Dates du rapport
</Title>
</Stack.Item>
<Stack.Item>
<Stack direction="row">
<Stack.Item>
<DatePicker
defaultValue={startDate}
error=""
onChange={function noRefCheck() {}}
withTime
isCompact
/>
</Stack.Item>
<Stack.Item style={{ paddingLeft: '0.5rem' }}>au</Stack.Item>
<Stack.Item style={{ paddingLeft: '0.5rem' }}>
<DatePicker defaultValue={endDate} error="" onChange={function noRefCheck() {}} withTime isCompact />
</Stack.Item>
</Stack>
<DateRangePicker
defaultValue={[startDate || new Date(), endDate || new Date()]}
label="Dates du rapport"
withTime={true}
isCompact={true}
/>
</Stack.Item>
</Stack>
</FlexboxGrid.Item>
Expand Down

0 comments on commit 5dd56b6

Please sign in to comment.