feat(app): animal screens, relation panels, animals on the client page

Routes /app/animals, new, :animalId, edit under one workspace gate; list with
species filter; form (D-R7, U3 birth, no default sex or role, optional first
client); page with current and former relations, end, dates, void; client page
links its animals, adds one pre-associated, links an existing one. Card now
passes aria-labelledby, which it silently dropped.
This commit is contained in:
bchanot committed 2026-10-26 17:11:28 +01:00
1 parent e22357630f
commit 930499cd25
36 files changed
+5579 -113

No files matched your search

+228
View File
@@ -629,4 +629,232 @@ export const en: Dict = {
'leave.body': 'The changes in this form will be lost.',
'leave.stay': 'Stay on the page',
'leave.confirm': 'Leave without saving',
// V1-1.6 animals and relations
'shell.nav.animals': 'Animals',
'clients.failure.duplicate_relation':
'This client already holds this role, currently, for this animal.',
'clients.failure.already_ended': 'This relation has already ended.',
'clients.detail.animal_added': 'Animal created and linked to this client.',
'clients.animals.add': 'Add an animal',
'clients.animals.add_first': 'Add a first animal',
'clients.animals.link_existing': 'Link an existing animal',
'animals.failure.not_found':
'This animal, or the chosen client, cannot be found.',
'animals.failure.archived':
'This animal, or the chosen client, is archived: restore it to continue.',
'animals.failure.conflict': 'This animal was changed in the meantime.',
'animals.failure.request_conflict':
'An earlier attempt of this creation carried other values and may already have created the animal. Check the animal list before trying again.',
'animals.failure.limit_reached':
'Your workspace has reached its maximum number of animals or relations.',
'animals.failure.rate_limited':
'Too many changes in a short time. Try again in a few minutes.',
'animals.failure.invalid_input':
'A value was not accepted. Check the fields.',
'animals.failure.duplicate_relation':
'This client already holds this role, currently, for this animal.',
'animals.failure.already_ended': 'This relation has already ended.',
'animals.failure.session_expired': 'Your session has expired. Sign in again.',
'animals.failure.network': 'No connection. Check your network, then retry.',
'animals.failure.unavailable':
'The service is not answering right now. Retry.',
'animals.sex.male': 'Male',
'animals.sex.female': 'Female',
'animals.sex.unknown': 'Unknown',
'animals.archived_badge': 'Archived',
'animals.no_owner': 'Owner not entered',
'animals.owner_archived': '{name} (archived)',
'animals.list.title': 'Animals',
'animals.list.new': 'New animal',
'animals.list.search_label': 'Search an animal',
'animals.list.search_hint': 'Name, breed or species detail',
'animals.list.species_filter': 'Species',
'animals.list.species_all': 'All species',
'animals.list.archived_toggle': 'Show archived',
'animals.list.loading': 'Loading animals…',
'animals.list.results_label': 'Animals found',
'animals.list.count_one': '1 animal shown',
'animals.list.count_other': '{count} animals shown',
'animals.list.empty': 'No animal yet.',
'animals.list.empty_hint':
'Create an animal with “New animal”, or from a client’s page.',
'animals.list.no_results': 'No animal matches this search.',
'animals.list.archived_empty': 'No archived animal.',
'animals.list.more': 'Show more',
'animals.list.loading_more': 'Loading…',
'animals.list.owner': 'Owner: {names}',
'animals.list.owners': 'Owners: {names}',
'animals.list.owners_more': 'and {count} more',
'animals.form.create_title': 'New animal',
'animals.form.edit_title': 'Edit the animal',
'animals.form.identity_title': 'Identity',
'animals.form.name': 'Name',
'animals.form.species': 'Species',
'animals.form.species_choose': 'Choose a species',
'animals.form.species_loading': 'Loading species…',
'animals.form.species_failed': 'The species list could not be loaded.',
'animals.form.species_detail': 'Species detail',
'animals.form.species_detail_hint': 'For “Other”: “Ferret”, “Llama”.',
'animals.form.sex': 'Sex',
'animals.form.sex_hint': 'Choose “Unknown” if you do not know.',
'animals.form.breed': 'Breed',
'animals.form.birth_title': 'Birth',
'animals.form.birth_year': 'Year of birth',
'animals.form.birth_year_hint': 'If you know it: 2015.',
'animals.form.birth_year_locked':
'Taken from the full date. Clear the date to change the year.',
'animals.form.birth_date': 'Full date of birth',
'animals.form.birth_date_hint':
'Only if you know the day. The year fills itself in.',
'animals.form.client_title': 'Client',
'animals.form.client_hint':
'Optional: the animal can be created without a client and linked later.',
'animals.form.client_remove': 'Remove this client',
'animals.form.origin_loading': 'Loading the client…',
'animals.form.origin_unavailable':
'The client you came from is no longer available: the animal will be created without a client unless you choose one.',
'animals.form.required': 'required',
'animals.form.optional': 'optional',
'animals.form.submit_create': 'Create the animal',
'animals.form.submit_update': 'Save',
'animals.form.saving': 'Saving…',
'animals.form.back_to_animal': 'Back to the record',
'animals.form.conflict_title': 'This animal was changed elsewhere.',
'animals.form.conflict_body':
'Your entries are kept and the saved value is shown under each field that differs. “Save” will replace the saved values with yours.',
'animals.form.conflict_take_stored': 'Take the saved values',
'animals.form.stored_value': 'Saved value: {value}',
'animals.form.stored_empty': 'Saved value: empty',
'animals.error.required': 'This field is required.',
'animals.error.too_long': '{max} characters at most.',
'animals.error.characters': 'Character not accepted (tab, line break…).',
'animals.error.species': 'Choose a species.',
'animals.error.species_detail': 'Give the species.',
'animals.error.sex': 'Choose the sex, “Unknown” included.',
'animals.error.year_format': 'Four-digit year: 2015.',
'animals.error.year_range': 'The year runs from 1900 to the current year.',
'animals.error.date_format': 'Invalid date.',
'animals.error.date_range':
'The date cannot be in the future, nor before 1900.',
'animals.error.date_year': 'The year does not match the full date.',
'animals.error.client': 'Pick one from the list.',
'animals.error.role': 'Choose the role.',
'animals.age.years_one': '1 year',
'animals.age.years_other': '{count} years',
'animals.age.months_one': '1 month',
'animals.age.months_other': '{count} months',
'animals.age.about': 'about {age}',
'animals.age.under_one': 'under a year',
'animals.detail.loading': 'Loading the animal…',
'animals.detail.back': '← Animals',
'animals.detail.identity': 'Identity',
'animals.detail.species': 'Species',
'animals.detail.sex': 'Sex',
'animals.detail.breed': 'Breed',
'animals.detail.breed_none': 'Not entered',
'animals.detail.birth': 'Birth',
'animals.detail.birth_on': 'On {date}',
'animals.detail.birth_in': 'In {year}',
'animals.detail.birth_unknown': 'Unknown',
'animals.detail.status': 'Status',
'animals.detail.status_active': 'Active',
'animals.detail.status_archived': 'Archived',
'animals.detail.edit': 'Edit',
'animals.detail.archive': 'Archive',
'animals.detail.restore': 'Restore',
'animals.detail.restoring': 'Restoring…',
'animals.detail.archived_notice':
'This animal is archived: its record and its relations are read-only. Restore it to edit them.',
'animals.detail.created': 'Animal created.',
'animals.detail.updated': 'Changes saved.',
'animals.detail.archived': 'Animal archived.',
'animals.detail.restored': 'Animal restored.',
'animals.archive.title': 'Archive this animal?',
'animals.archive.body':
'The animal will be hidden from the lists and its record, relations included, becomes read-only. Its relations are kept and no client is archived. You can restore it at any time.',
'animals.archive.confirm': 'Archive',
'animals.archive.archiving': 'Archiving…',
'animals.not_found.title': 'Animal not found',
'animals.not_found.body':
'This animal does not exist or cannot be reached from your account.',
'animals.not_found.back': 'Back to animals',
'relations.failure.not_found':
'This client, animal or relation cannot be found: it may have been removed in the meantime.',
'relations.failure.archived':
'The animal or the client is archived: restore it to change its relations.',
'relations.failure.conflict':
'This relation was changed or removed in the meantime. The record is up to date: check it before trying again.',
'relations.failure.request_conflict':
'An earlier attempt of this link carried other values and may already have created the relation. Check the record before trying again.',
'relations.failure.limit_reached':
'The maximum number of relations is reached (20 current or 200 in total for an animal).',
'relations.failure.rate_limited':
'Too many changes in a short time. Try again in a few minutes.',
'relations.failure.invalid_input':
'The change was not accepted. Check the dates: not in the future, and the end after the start.',
'relations.failure.duplicate_relation':
'This client already holds this role, currently, for this animal.',
'relations.failure.already_ended': 'This relation has already ended.',
'relations.failure.session_expired':
'Your session has expired. Sign in again.',
'relations.failure.network':
'No connection. Check your network, then retry.',
'relations.failure.unavailable':
'The service is not answering right now. Retry.',
'relations.title': 'Linked clients',
'relations.loading': 'Loading linked clients…',
'relations.none': 'No client linked to this animal.',
'relations.current': 'Current',
'relations.former': 'History',
'relations.since': 'since {date}',
'relations.until': 'until {date}',
'relations.add_client': 'Add a client',
'relations.added_client': 'Client linked to this animal.',
'relations.added_animal': 'Animal linked to this client.',
'relations.saving': 'Saving…',
'relations.date_hint': 'Optional: leave it empty if you do not know it.',
'relations.action_named': '{action}: {name}, {role}',
'relations.panel.title_client': 'Link a client to this animal',
'relations.panel.title_animal': 'Link an animal to this client',
'relations.panel.client_chosen': 'Chosen client:',
'relations.panel.animal_chosen': 'Chosen animal:',
'relations.panel.change': 'Change',
'relations.panel.role': 'Role',
'relations.panel.started_on': 'Start of the relation',
'relations.panel.save_client': 'Link this client',
'relations.panel.save_animal': 'Link this animal',
'relations.panel.saving': 'Saving…',
'relations.picker.client_label': 'Search a client',
'relations.picker.client_hint':
'Active clients: name, city, email or phone',
'relations.picker.client_results': 'Suggested clients',
'relations.picker.client_none': 'No active client matches.',
'relations.picker.animal_label': 'Search an animal',
'relations.picker.animal_hint': 'Active animals: name, breed or species detail',
'relations.picker.animal_results': 'Suggested animals',
'relations.picker.animal_none': 'No active animal matches.',
'relations.picker.loading': 'Searching…',
'relations.end.action': 'End',
'relations.end.title': 'End this relation?',
'relations.end.body':
'It moves to the history, with its end date if you know it. Nothing is deleted.',
'relations.end.ended_on': 'End date',
'relations.end.confirm': 'End the relation',
'relations.end.done': 'Relation ended.',
'relations.dates.action': 'Correct the dates',
'relations.dates.title': 'Correct the dates',
'relations.dates.body':
'The client and the role do not change. An empty date means “unknown”.',
'relations.dates.started_on': 'Start date',
'relations.dates.ended_on': 'End date',
'relations.dates.confirm': 'Save the dates',
'relations.dates.done': 'Dates saved.',
'relations.void.action': 'Entered by mistake',
'relations.void.title': 'Remove a relation entered by mistake?',
'relations.void.body':
'Only if this relation never existed: wrong client, wrong animal or wrong role. It will disappear from the records, the lists and the history without being deleted, and cannot be brought back. For a relation that really ended, use “End”.',
'relations.void.confirm': 'Remove the relation',
'relations.void.done': 'Relation removed (entered by mistake).',
'relations.error.end_before_start': 'The end cannot come before the start.',
}
+234
View File
@@ -654,4 +654,238 @@ export const fr: Dict = {
'leave.body': 'Les modifications de ce formulaire seront perdues.',
'leave.stay': 'Rester sur la page',
'leave.confirm': 'Quitter sans enregistrer',
// V1-1.6 animals and relations
'shell.nav.animals': 'Animaux',
'clients.failure.duplicate_relation':
'Ce client a déjà ce rôle, en cours, pour cet animal.',
'clients.failure.already_ended': 'Cette relation est déjà terminée.',
'clients.detail.animal_added': 'Animal créé et lié à ce client.',
'clients.animals.add': 'Ajouter un animal',
'clients.animals.add_first': 'Ajouter un premier animal',
'clients.animals.link_existing': 'Associer un animal existant',
'animals.failure.not_found':
'Cet animal, ou le client choisi, est introuvable.',
'animals.failure.archived':
'Cet animal, ou le client choisi, est archivé : restaurez-le pour continuer.',
'animals.failure.conflict': 'Cet animal a été modifié entre-temps.',
'animals.failure.request_conflict':
"Une tentative précédente de cette création portait d'autres valeurs et a peut-être déjà créé l'animal. Vérifiez la liste des animaux avant de recommencer.",
'animals.failure.limit_reached':
"Le nombre maximal d'animaux ou de relations de votre espace est atteint.",
'animals.failure.rate_limited':
"Trop d'enregistrements en peu de temps. Réessayez dans quelques minutes.",
'animals.failure.invalid_input':
"Une valeur n'a pas été acceptée. Vérifiez les champs.",
'animals.failure.duplicate_relation':
'Ce client a déjà ce rôle, en cours, pour cet animal.',
'animals.failure.already_ended': 'Cette relation est déjà terminée.',
'animals.failure.session_expired':
'Votre session a expiré. Reconnectez-vous.',
'animals.failure.network':
'Connexion impossible. Vérifiez votre réseau, puis réessayez.',
'animals.failure.unavailable':
'Le service ne répond pas pour le moment. Réessayez.',
'animals.sex.male': 'Mâle',
'animals.sex.female': 'Femelle',
'animals.sex.unknown': 'Inconnu',
'animals.archived_badge': 'Archivé',
'animals.no_owner': 'Propriétaire non renseigné',
'animals.owner_archived': '{name} (archivé)',
'animals.list.title': 'Animaux',
'animals.list.new': 'Nouvel animal',
'animals.list.search_label': 'Rechercher un animal',
'animals.list.search_hint': "Nom, race ou précision d'espèce",
'animals.list.species_filter': 'Espèce',
'animals.list.species_all': 'Toutes les espèces',
'animals.list.archived_toggle': 'Afficher les archivés',
'animals.list.loading': 'Chargement des animaux…',
'animals.list.results_label': 'Animaux trouvés',
'animals.list.count_one': '1 animal affiché',
'animals.list.count_other': '{count} animaux affichés',
'animals.list.empty': "Aucun animal pour l'instant.",
'animals.list.empty_hint':
"Créez un animal avec « Nouvel animal », ou depuis la fiche d'un client.",
'animals.list.no_results': 'Aucun animal ne correspond à cette recherche.',
'animals.list.archived_empty': 'Aucun animal archivé.',
'animals.list.more': 'Afficher plus',
'animals.list.loading_more': 'Chargement…',
'animals.list.owner': 'Propriétaire : {names}',
'animals.list.owners': 'Propriétaires : {names}',
'animals.list.owners_more': 'et {count} de plus',
'animals.form.create_title': 'Nouvel animal',
'animals.form.edit_title': "Modifier l'animal",
'animals.form.identity_title': 'Identité',
'animals.form.name': 'Nom',
'animals.form.species': 'Espèce',
'animals.form.species_choose': 'Choisir une espèce',
'animals.form.species_loading': 'Chargement des espèces…',
'animals.form.species_failed':
"La liste des espèces n'a pas pu être chargée.",
'animals.form.species_detail': "Précision de l'espèce",
'animals.form.species_detail_hint': 'Pour « Autre » : « Furet », « Lama ».',
'animals.form.sex': 'Sexe',
'animals.form.sex_hint': 'Choisissez « Inconnu » si vous ne savez pas.',
'animals.form.breed': 'Race',
'animals.form.birth_title': 'Naissance',
'animals.form.birth_year': 'Année de naissance',
'animals.form.birth_year_hint': 'Si vous la connaissez : 2015.',
'animals.form.birth_year_locked':
"Reprise de la date complète. Effacez la date pour modifier l'année.",
'animals.form.birth_date': 'Date de naissance complète',
'animals.form.birth_date_hint':
"Seulement si vous connaissez le jour. L'année se remplit d'elle-même.",
'animals.form.client_title': 'Client',
'animals.form.client_hint':
"Facultatif : l'animal peut être créé sans client et lié plus tard.",
'animals.form.client_remove': 'Retirer ce client',
'animals.form.origin_loading': 'Chargement du client…',
'animals.form.origin_unavailable':
"Le client d'origine n'est plus disponible : l'animal sera créé sans client, sauf si vous en choisissez un.",
'animals.form.required': 'obligatoire',
'animals.form.optional': 'facultatif',
'animals.form.submit_create': "Créer l'animal",
'animals.form.submit_update': 'Enregistrer',
'animals.form.saving': 'Enregistrement…',
'animals.form.back_to_animal': 'Retour à la fiche',
'animals.form.conflict_title': 'Cet animal a été modifié ailleurs.',
'animals.form.conflict_body':
'Vos saisies sont conservées et la valeur enregistrée est indiquée sous chaque champ qui diffère. « Enregistrer » remplacera les valeurs enregistrées par les vôtres.',
'animals.form.conflict_take_stored': 'Reprendre les valeurs enregistrées',
'animals.form.stored_value': 'Valeur enregistrée : {value}',
'animals.form.stored_empty': 'Valeur enregistrée : vide',
'animals.error.required': 'Ce champ est obligatoire.',
'animals.error.too_long': '{max} caractères au maximum.',
'animals.error.characters':
'Caractère non accepté (tabulation, saut de ligne…).',
'animals.error.species': 'Choisissez une espèce.',
'animals.error.species_detail': "Précisez l'espèce.",
'animals.error.sex': 'Choisissez le sexe, « Inconnu » compris.',
'animals.error.year_format': 'Année sur quatre chiffres : 2015.',
'animals.error.year_range': "L'année va de 1900 à l'année en cours.",
'animals.error.date_format': 'Date invalide.',
'animals.error.date_range':
'La date ne peut pas être dans le futur, ni avant 1900.',
'animals.error.date_year': "L'année ne correspond pas à la date complète.",
'animals.error.client': 'Faites un choix dans la liste.',
'animals.error.role': 'Choisissez le rôle.',
'animals.age.years_one': '1 an',
'animals.age.years_other': '{count} ans',
'animals.age.months_one': '1 mois',
'animals.age.months_other': '{count} mois',
'animals.age.about': 'environ {age}',
'animals.age.under_one': "moins d'un an",
'animals.detail.loading': "Chargement de l'animal…",
'animals.detail.back': '← Animaux',
'animals.detail.identity': 'Identité',
'animals.detail.species': 'Espèce',
'animals.detail.sex': 'Sexe',
'animals.detail.breed': 'Race',
'animals.detail.breed_none': 'Non renseignée',
'animals.detail.birth': 'Naissance',
'animals.detail.birth_on': 'Le {date}',
'animals.detail.birth_in': 'En {year}',
'animals.detail.birth_unknown': 'Inconnue',
'animals.detail.status': 'Statut',
'animals.detail.status_active': 'Actif',
'animals.detail.status_archived': 'Archivé',
'animals.detail.edit': 'Modifier',
'animals.detail.archive': 'Archiver',
'animals.detail.restore': 'Restaurer',
'animals.detail.restoring': 'Restauration…',
'animals.detail.archived_notice':
'Cet animal est archivé : sa fiche et ses relations sont en lecture seule. Restaurez-le pour les modifier.',
'animals.detail.created': 'Animal créé.',
'animals.detail.updated': 'Modifications enregistrées.',
'animals.detail.archived': 'Animal archivé.',
'animals.detail.restored': 'Animal restauré.',
'animals.archive.title': 'Archiver cet animal ?',
'animals.archive.body':
"L'animal sera masqué des listes et sa fiche passera en lecture seule, relations comprises. Ses relations sont conservées et aucun client n'est archivé. Vous pourrez le restaurer à tout moment.",
'animals.archive.confirm': 'Archiver',
'animals.archive.archiving': 'Archivage…',
'animals.not_found.title': 'Animal introuvable',
'animals.not_found.body':
"Cet animal n'existe pas ou n'est pas accessible depuis votre compte.",
'animals.not_found.back': 'Retour aux animaux',
'relations.failure.not_found':
'Ce client, cet animal ou cette relation est introuvable : il a peut-être été retiré entre-temps.',
'relations.failure.archived':
"L'animal ou le client est archivé : restaurez-le pour modifier ses relations.",
'relations.failure.conflict':
'Cette relation a été modifiée ou retirée entre-temps. La fiche est à jour : vérifiez-la avant de recommencer.',
'relations.failure.request_conflict':
"Une tentative précédente de cet ajout portait d'autres valeurs et a peut-être déjà créé la relation. Vérifiez la fiche avant de recommencer.",
'relations.failure.limit_reached':
'Le nombre maximal de relations est atteint (20 en cours ou 200 au total pour un animal).',
'relations.failure.rate_limited':
"Trop d'enregistrements en peu de temps. Réessayez dans quelques minutes.",
'relations.failure.invalid_input':
"La modification n'a pas été acceptée. Vérifiez les dates : pas dans le futur, et la fin après le début.",
'relations.failure.duplicate_relation':
'Ce client a déjà ce rôle, en cours, pour cet animal.',
'relations.failure.already_ended': 'Cette relation est déjà terminée.',
'relations.failure.session_expired':
'Votre session a expiré. Reconnectez-vous.',
'relations.failure.network':
'Connexion impossible. Vérifiez votre réseau, puis réessayez.',
'relations.failure.unavailable':
'Le service ne répond pas pour le moment. Réessayez.',
'relations.title': 'Clients liés',
'relations.loading': 'Chargement des clients liés…',
'relations.none': 'Aucun client lié à cet animal.',
'relations.current': 'Actuels',
'relations.former': 'Historique',
'relations.since': 'depuis le {date}',
'relations.until': "jusqu'au {date}",
'relations.add_client': 'Ajouter un client',
'relations.added_client': 'Client lié à cet animal.',
'relations.added_animal': 'Animal associé à ce client.',
'relations.saving': 'Enregistrement…',
'relations.date_hint':
'Facultative : laissez vide si vous ne la connaissez pas.',
'relations.action_named': '{action} : {name}, {role}',
'relations.panel.title_client': 'Lier un client à cet animal',
'relations.panel.title_animal': 'Associer un animal à ce client',
'relations.panel.client_chosen': 'Client choisi :',
'relations.panel.animal_chosen': 'Animal choisi :',
'relations.panel.change': 'Changer',
'relations.panel.role': 'Rôle',
'relations.panel.started_on': 'Début de la relation',
'relations.panel.save_client': 'Lier ce client',
'relations.panel.save_animal': 'Associer cet animal',
'relations.panel.saving': 'Enregistrement…',
'relations.picker.client_label': 'Rechercher un client',
'relations.picker.client_hint':
'Clients actifs : nom, ville, e-mail ou téléphone',
'relations.picker.client_results': 'Clients proposés',
'relations.picker.client_none': 'Aucun client actif ne correspond.',
'relations.picker.animal_label': 'Rechercher un animal',
'relations.picker.animal_hint':
"Animaux actifs : nom, race ou précision d'espèce",
'relations.picker.animal_results': 'Animaux proposés',
'relations.picker.animal_none': 'Aucun animal actif ne correspond.',
'relations.picker.loading': 'Recherche…',
'relations.end.action': 'Terminer',
'relations.end.title': 'Terminer cette relation ?',
'relations.end.body':
"Elle passera dans l'historique, avec sa date de fin si vous la connaissez. Rien n'est supprimé.",
'relations.end.ended_on': 'Date de fin',
'relations.end.confirm': 'Terminer la relation',
'relations.end.done': 'Relation terminée.',
'relations.dates.action': 'Corriger les dates',
'relations.dates.title': 'Corriger les dates',
'relations.dates.body':
'Le client et le rôle ne changent pas. Une date vide veut dire « inconnue ».',
'relations.dates.started_on': 'Date de début',
'relations.dates.ended_on': 'Date de fin',
'relations.dates.confirm': 'Enregistrer les dates',
'relations.dates.done': 'Dates enregistrées.',
'relations.void.action': 'Erreur de saisie',
'relations.void.title': 'Retirer une relation saisie par erreur ?',
'relations.void.body':
"Seulement si cette relation n'a jamais existé : mauvais client, mauvais animal ou mauvais rôle. Elle disparaîtra des fiches, des listes et de l'historique sans être supprimée, et ne pourra pas être rétablie. Pour une relation qui a réellement pris fin, utilisez « Terminer ».",
'relations.void.confirm': 'Retirer la relation',
'relations.void.done': 'Relation retirée (erreur de saisie).',
'relations.error.end_before_start': 'La fin ne peut pas précéder le début.',
}