Skip to content

Commit

Permalink
Préavis – Correction des étiquettes des status (#3453)
Browse files Browse the repository at this point in the history
## Linked issues

- #3436

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
ivangabriele authored Jul 31, 2024
2 parents 7434cbf + fd06332 commit cf13836
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ enum class PriorNotificationState {
/** "Envoi auto. demandé". */
AUTO_SEND_REQUESTED,

/** "En cours d'envoi auto". */
/** "En cours d'envoi auto.". */
AUTO_SEND_IN_PROGRESS,

/** "Envoi auto. fait". */
Expand All @@ -13,7 +13,7 @@ enum class PriorNotificationState {
/** "Échec de diffusion". */
FAILED_SEND,

/** "Hors vér". */
/** "Hors vérification". */
OUT_OF_VERIFICATION_SCOPE,

/** "En cours de d'envoi auto". */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class ComputeManualPriorNotification(

val isInVerificationScope = ManualPriorNotificationComputedValues
.isInVerificationScope(vesselFlagCountryCode, vesselRiskFactor)
val isPartOfControlUnitSubscriptions = pnoPortSubscriptionRepository.has(portLocode)
|| pnoVesselSubscriptionRepository.has(vesselId)
|| pnoSegmentSubscriptionRepository.has(portLocode, tripSegments.map { it.segment })
val isPartOfControlUnitSubscriptions = pnoPortSubscriptionRepository.has(portLocode) ||
pnoVesselSubscriptionRepository.has(vesselId) ||
pnoSegmentSubscriptionRepository.has(portLocode, tripSegments.map { it.segment })
val nextState = PriorNotification.getNextState(isInVerificationScope, isPartOfControlUnitSubscriptions)

return ManualPriorNotificationComputedValues(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class CreateOrUpdateManualPriorNotification(
vesselId,
)

val isPartOfControlUnitSubscriptions = pnoPortSubscriptionRepository.has(portLocode)
|| pnoVesselSubscriptionRepository.has(vesselId)
|| pnoSegmentSubscriptionRepository.has(portLocode, computedValues.tripSegments.map { it.segment })
val isPartOfControlUnitSubscriptions = pnoPortSubscriptionRepository.has(portLocode) ||
pnoVesselSubscriptionRepository.has(vesselId) ||
pnoSegmentSubscriptionRepository.has(portLocode, computedValues.tripSegments.map { it.segment })

val fishingCatchesWithFaoArea = fishingCatches.map { it.copy(faoZone = faoArea) }
val tripGears = getTripGears(tripGearCodes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ context('Side Window > Prior Notification Form > Form', () => {
state: PriorNotification.State.OUT_OF_VERIFICATION_SCOPE
})

cy.get('.Element-Tag').contains('Hors diffusion').should('exist')
cy.get('.Element-Tag').contains('Hors vérification').should('exist')

// -----------------------------------------------------------------------
// Verify and send
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ export namespace PriorNotification {
export enum State {
/** "Envoi auto. fait". */
AUTO_SEND_DONE = 'AUTO_SEND_DONE',
/** "En cours d'envoi auto". */
/** "En cours d'envoi auto.". */
AUTO_SEND_IN_PROGRESS = 'AUTO_SEND_IN_PROGRESS',
/** "Envoi auto. demandé". */
AUTO_SEND_REQUESTED = 'AUTO_SEND_REQUESTED',
/** "Échec de diffusion". */
FAILED_SEND = 'FAILED_SEND',
/** "Hors diffusion". */
/** "Hors vérification". */
OUT_OF_VERIFICATION_SCOPE = 'OUT_OF_VERIFICATION_SCOPE',
/** "En cours de d'envoi auto". */
PENDING_AUTO_SEND = 'PENDING_AUTO_SEND',
Expand All @@ -172,10 +172,10 @@ export namespace PriorNotification {
}
export const STATE_LABEL: Record<State, string> = {
AUTO_SEND_DONE: 'Envoi auto. fait',
AUTO_SEND_IN_PROGRESS: "En cours d'envoi auto",
AUTO_SEND_IN_PROGRESS: "En cours d'envoi auto.",
AUTO_SEND_REQUESTED: 'Envoi auto. demandé',
FAILED_SEND: 'Échec de diffusion',
OUT_OF_VERIFICATION_SCOPE: 'Hors diffusion',
OUT_OF_VERIFICATION_SCOPE: 'Hors vérification',
PENDING_AUTO_SEND: "En cours de d'envoi auto",
PENDING_SEND: 'En cours de diffusion',
PENDING_VERIFICATION: 'À vérifier (CNSP)',
Expand Down

0 comments on commit cf13836

Please sign in to comment.