Skip to content

Commit

Permalink
Fix beacon malfunction action list
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Sep 13, 2024
1 parent 50651aa commit b263f42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ export function SendNotification({ beaconMalfunction }) {
const selectMenuRef = useRef<HTMLDivElement>()
const [isSendingNotification, setIsSendingNotification] = useState<string | null>('')
const [isShowingForeignFmcList, setIsShowingForeignFmcList] = useState<boolean>(false)
const notificationTypes = Object.keys(NOTIFICATION_TYPE)
/* eslint-enable sort-keys-fix/sort-keys-fix */
const notificationTypes: Array<keyof typeof NOTIFICATION_TYPE> = [
'MALFUNCTION_AT_PORT_INITIAL_NOTIFICATION',
'MALFUNCTION_AT_PORT_REMINDER',
'MALFUNCTION_AT_SEA_INITIAL_NOTIFICATION',
'MALFUNCTION_AT_SEA_REMINDER',
'MALFUNCTION_NOTIFICATION_TO_FOREIGN_FMC'
]
/* eslint-disable sort-keys-fix/sort-keys-fix */

const foreignFmcsAsOptions: Option[] = useMemo(() => {
if (!getForeignFmcsApiQuery.data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ export function EquipmentResume({ setIsCurrentBeaconMalfunctionDetails }: Beacon
value: beaconType
},
{
key: 'Date de loggage',
key: 'Date loggage',
value:
!!selectedVessel?.beacon?.loggingDatetimeUtc &&
getDateTime(selectedVessel.beacon.loggingDatetimeUtc)
}
]}
valueEllipsisedForWidth={100}
valueEllipsisedForWidth={110}
/>
<StyledFlatKeyValue
column={[
Expand All @@ -95,15 +95,15 @@ export function EquipmentResume({ setIsCurrentBeaconMalfunctionDetails }: Beacon
value: selectedVessel?.logbookSoftware ?? '-'
},
{
key: 'Équipé e-Sacapt',
key: 'E-Sacapt',
value: selectedVessel?.hasLogbookEsacapt ? 'Oui' : 'Non'
},
{
key: 'Équipé VisioCaptures',
key: 'VisioCaptures',
value: selectedVessel?.hasVisioCaptures ? 'Oui' : 'Non'
}
]}
valueEllipsisedForWidth={70}
valueEllipsisedForWidth={110}
/>
</Columns>
{isSuperUser && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const TableBody = styled.tbody``
const Zone = styled.div`
background: ${p => p.theme.color.white};
display: flex;
flex-direction: column;
`

const Fields = styled.table<{
Expand Down

0 comments on commit b263f42

Please sign in to comment.