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

[tra-15669] et [tra-15400] Modales de signatures VHU (reception acceptation | traitement) #3915

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

JulianaJM
Copy link
Collaborator

Contexte

Points de vigilance pour les intégrateurs

Démo

Ticket Favro

tra-15400
tra-15669

Checklist

  • Mettre à jour la documentation
  • Mettre à jour le change log
  • Documenter les manipulations à faire lors de la mise en production (sur le ticket Favro de release)
  • Informer le data engineer de tout changement de schéma DB

@JulianaJM JulianaJM self-assigned this Jan 16, 2025
@JulianaJM JulianaJM marked this pull request as draft January 16, 2025 16:43
<p
className={classNames(
"fr-mt-5v",
error ? "fr-error-text" : "fr-info-text"
)}
>
Vous avez {state.codes.length} {type} pour ce contenant
{infoMessage.replace("%", state.codes.length)}

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of "%".

Copilot Autofix AI about 24 hours ago

To fix the problem, we need to ensure that all occurrences of the % character in the infoMessage string are replaced with the length of state.codes. This can be achieved by using a regular expression with the global flag (g). This way, every instance of % in the string will be replaced, not just the first one.

Suggested changeset 1
front/src/Apps/Forms/Components/IdentificationNumbers/IdentificationNumber.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/front/src/Apps/Forms/Components/IdentificationNumbers/IdentificationNumber.tsx b/front/src/Apps/Forms/Components/IdentificationNumbers/IdentificationNumber.tsx
--- a/front/src/Apps/Forms/Components/IdentificationNumbers/IdentificationNumber.tsx
+++ b/front/src/Apps/Forms/Components/IdentificationNumbers/IdentificationNumber.tsx
@@ -170,3 +170,3 @@
         >
-          {infoMessage.replace("%", state.codes.length)}
+          {infoMessage.replace(/%/g, state.codes.length)}
         </p>
EOF
@@ -170,3 +170,3 @@
>
{infoMessage.replace("%", state.codes.length)}
{infoMessage.replace(/%/g, state.codes.length)}
</p>
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant