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

✨🏢 Improve I-CAD storage and search #599

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

sbellavoine
Copy link
Collaborator

No description provided.

@sbellavoine sbellavoine self-assigned this Jan 30, 2025
Copy link
Member

@simonrelet simonrelet left a comment

Choose a reason for hiding this comment

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

C'est la bonne approche, presque au bon endroit 😁.

@@ -119,7 +119,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
colorId: formData.data.colorId || null,
description: formData.data.description || null,
gender: formData.data.gender,
iCadNumber: formData.data.iCadNumber || null,
iCadNumber: formData.data.iCadNumber.replace(/\s+/g, "") || null,
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 la bonne manière de retirer les espaces 👌.

Comme tu peux voir, tu as dû faire le changement dans les deux fichiers (edit et new). Cette transformation peut être écrite une seule fois si elle est déplacée dans l'objet ActionFormData du fichier apps/admin/src/animals/profile/form.tsx.

ActionFormData est utilisé pour valider et transformer les données issues du formulaire de profil d'un animal (AnimalProfileForm, dans le même fichier, utilisé pour la création et édition).

En t'inspirant des transformations déjà présentes (isOkCats et isOkChildren), ta mission si tu l’acceptes (🤣), est de déplacer les .replace() dans une transformation sur iCadNumber.

Copy link
Member

@simonrelet simonrelet left a comment

Choose a reason for hiding this comment

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

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.

2 participants