Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Préavis - Immat. navire ne sont pas toujours reportés dans les PDF de débarquement #3504

Merged
merged 10 commits into from
Aug 9, 2024

Conversation

louptheron
Copy link
Collaborator

@louptheron louptheron commented Aug 8, 2024

Linked issues


  • Tests E2E (Cypress)

@louptheron louptheron marked this pull request as ready for review August 8, 2024 14:53
async (nextValues: PriorNotification.LogbookFormData) => {
if (isEqual(nextValues, initialFormValues)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est déjà couvert dans FormikEffect : https://github.com/MTES-MCT/monitor-ui/blob/main/src/formiks/FormikEffect.tsx#L20

Par contre il y a un truc à corriger dans FormikEffect au first render je pense. Il est possible que previousValues soir d'abord undefined avant que les formik context values soient hydratées.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si on fait ça dans monitor-ui, ça casse la logique actuelle : https://github.com/MTES-MCT/monitor-ui/actions/runs/10306609530/job/28530073749?pr=1310
i.e:

  it('Should update and reset the text input value with initial values', () => {
    const initialValue = 123
    const updatedValue = 1234

    mountAndWait(<Template {...commonProps} initialValue={initialValue} updatedValue={updatedValue} />)

    outputShouldBe({
      myNumberInput: initialValue
    })

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vu qu'il y a ausse des impacts sur Env, je dirais qu'on laisse comme ça pour l'instant.
On peut créer un ticket sur monitor-ui pour discuter du fonctionnement de cet effect

Copy link

sonarcloud bot commented Aug 9, 2024

@louptheron louptheron merged commit 78d5b2b into master Aug 9, 2024
26 checks passed
@louptheron louptheron deleted the loup/fix_pdf_export_landing branch August 9, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants