Skip to content

Commit

Permalink
Alertes – Modification de termes : remplacer "ignorer l'alerte" par "…
Browse files Browse the repository at this point in the history
…suspendre l'alerte" (#4022)

## Linked issues

- Resolve #4018

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron authored Jan 16, 2025
2 parents 5b2cc6b + e2a0c37 commit af5b49c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api/alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {

export const ALERTS_ERROR_MESSAGE = "Nous n'avons pas pu récupérer les alertes opérationelles"
export const VALIDATE_ALERT_ERROR_MESSAGE = "Nous n'avons pas pu valider l'alerte opérationelle"
export const SILENCE_ALERT_ERROR_MESSAGE = "Nous n'avons pas pu ignorer l'alerte opérationelle"
export const SILENCE_ALERT_ERROR_MESSAGE = "Nous n'avons pas pu suspendre l'alerte opérationelle"
export const DELETE_SILENCED_ALERT_ERROR_MESSAGE = "Nous n'avons pas pu réactiver l'alerte opérationelle"
export const CREATE_SILENCED_ALERT_ERROR_MESSAGE = "Nous n'avons pas pu suspendre l'alerte opérationelle"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useMainAppDispatch } from '@hooks/useMainAppDispatch'
import { useMainAppSelector } from '@hooks/useMainAppSelector'
import countries from 'i18n-iso-countries'
import { useEffect, useMemo, useRef } from 'react'
import { batch } from 'react-redux'
import { FlexboxGrid, List } from 'rsuite'
import styled from 'styled-components'
import * as timeago from 'timeago.js'
Expand All @@ -18,7 +17,6 @@ import type { LEGACY_PendingAlert } from '../../../types'
import type { MutableRefObject, CSSProperties } from 'react'
import type { Promisable } from 'type-fest'

// TODO Type these props.
export type PendingAlertRowProps = {
alert: LEGACY_PendingAlert
index: number
Expand Down Expand Up @@ -70,7 +68,7 @@ export function PendingAlertRow({
)}
{silencedAlertsQueueMatch && (
<AlertTransition data-cy="side-window-alerts-is-silenced-transition" style={alertSilencedTransition}>
L’alerte sera ignorée {getSilencedAlertPeriodText(silencedAlertsQueueMatch.silencedAlertPeriodRequest)}
L’alerte sera suspendue {getSilencedAlertPeriodText(silencedAlertsQueueMatch.silencedAlertPeriodRequest)}
</AlertTransition>
)}
{!alert.isValidated && (
Expand Down Expand Up @@ -120,13 +118,11 @@ export function PendingAlertRow({
</FlexboxGrid.Item>
<FlexboxGrid.Item style={iconStyle}>
<Icon
alt="Ignorer"
alt="Suspendre"
data-cy="side-window-alerts-silence-alert"
onClick={() => {
batch(() => {
setShowSilencedAlertForIndex(index + 1)
setSilencedAlertId(alert.id)
})
setShowSilencedAlertForIndex(index + 1)
setSilencedAlertId(alert.id)
}}
onMouseOut={e => {
if (showSilencedAlertForIndex !== index + 1) {
Expand All @@ -142,7 +138,7 @@ export function PendingAlertRow({
: `${baseUrl}/Icone_ignorer_alerte.png`
}
style={silenceAlertStyle}
title="Ignorer l'alerte"
title="Suspendre l'alerte"
/>
</FlexboxGrid.Item>
</FlexboxGrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function SilenceAlertMenu({
style={silenceMenuStyle(showSilencedAlertForIndex, scrollableContainer?.current.scrollTop || 0)}
>
<>
<MenuLink style={menuLinkStyle(true, false)}>Ignorer l’alerte pour...</MenuLink>
<MenuLink style={menuLinkStyle(true, false)}>Suspendre l’alerte pour...</MenuLink>
<MenuLink
onClick={() => silenceAlert(silenceAlertRequestFromMenu(SilencedAlertPeriod.THIS_OCCURRENCE), id)}
onMouseOut={e => setBackgroundAsNotHovered(e)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function SilencedAlerts() {
<VesselName>Navire</VesselName>
<AlertType colspan={7}>Titre</AlertType>
<Natinf>NATINF</Natinf>
<DateColumn>Ignorée pour...</DateColumn>
<DateColumn>Suspendue pour...</DateColumn>
<DateColumn>Reprise le...</DateColumn>
</FlexboxGrid>
</Row>
Expand Down

0 comments on commit af5b49c

Please sign in to comment.