feat(app): clients list, page, create, edit, archive and restore

Routes /app/clients, /new, /:clientId, /:clientId/edit behind a workspace
gate that remounts per workspace; debounced POST search, archived toggle and
« Afficher plus » pages; form on field-limits (D-R7) with the phone entry
rule and ISO countries; request id per creation intent; conflict shows the
saved values; archive confirmation with the sole-owner preview; animals
read-only; leave guard on in-app links; Clients entry after the dashboard.
This commit is contained in:
bchanot committed 2026-10-26 01:59:25 +01:00
1 parent ff028ec071
commit b38e62770e
25 files changed
+2744 -5

No files matched your search

+140
View File
@@ -362,6 +362,7 @@ export const en: Dict = {
'shell.close_menu': 'Close menu',
'shell.nav.dashboard': 'Dashboard',
'shell.nav.account': 'My account',
'shell.nav.clients': 'Clients',
'shell.nav.local_tool': 'Report tool',
'shell.nav.local_tool_hint': 'No account, PDF export',
'shell.sign_out': 'Sign out',
@@ -489,4 +490,143 @@ export const en: Dict = {
'Photo refused: between 64 and 4096 pixels per side.',
'account.avatar.rejected.processing_error':
'Photo refused: processing failed. Try another image.',
// V1-1.5 clients, workspace, leave guard
'common.retry': 'Retry',
'workspace.loading': 'Loading your workspace…',
'workspace.inactive':
'Your account is deactivated: your records are not accessible. Contact Faunosteo support.',
'workspace.unconfirmed': 'Confirm your email address to access your records.',
'workspace.missing':
'Your workspace does not answer. Retry; if it persists, contact Faunosteo support.',
'workspace.error': 'Your workspace could not be loaded.',
'clients.failure.not_found': 'This client cannot be found.',
'clients.failure.archived': 'This client is archived: restore it to edit it.',
'clients.failure.conflict': 'This client was changed in the meantime.',
'clients.failure.request_conflict':
'An earlier attempt of this creation carried other values and may already have created the client. Check the client list before trying again.',
'clients.failure.limit_reached':
'Your workspace has reached its maximum number of clients.',
'clients.failure.rate_limited':
'Too many changes in a short time. Try again in a few minutes.',
'clients.failure.invalid_input':
'A value was not accepted. Check the fields.',
'clients.failure.session_expired': 'Your session has expired. Sign in again.',
'clients.failure.network': 'No connection. Check your network, then retry.',
'clients.failure.unavailable':
'The service is not answering right now. Retry.',
'clients.kind.person': 'Person',
'clients.kind.organization': 'Organization',
'clients.archived_badge': 'Archived',
'clients.list.title': 'Clients',
'clients.list.new': 'New client',
'clients.list.search_label': 'Search clients',
'clients.list.search_hint': 'Name, city, email or phone',
'clients.list.archived_toggle': 'Show archived',
'clients.list.loading': 'Loading clients…',
'clients.list.results_label': 'Clients found',
'clients.list.count_one': '1 client shown',
'clients.list.count_other': '{count} clients shown',
'clients.list.empty': 'No clients yet.',
'clients.list.empty_hint': 'Create your first client with “New client”.',
'clients.list.no_results': 'No client matches this search.',
'clients.list.archived_empty': 'No archived clients.',
'clients.list.more': 'Show more',
'clients.list.loading_more': 'Loading…',
'clients.list.animals_none': 'No animals',
'clients.list.animals_one': '1 animal',
'clients.list.animals_other': '{count} animals',
'clients.form.create_title': 'New client',
'clients.form.edit_title': 'Edit client',
'clients.form.kind_legend': 'Client type',
'clients.form.display_name.person': 'Display name',
'clients.form.display_name.organization': 'Organization name',
'clients.form.display_name_hint.person':
'As you say it: “Marie Dupont”, “Mrs Dupont”.',
'clients.form.display_name_hint.organization':
'The name of the organization: “Écurie du Lac”.',
'clients.form.required': 'required',
'clients.form.optional': 'optional',
'clients.form.contact_title': 'Contact details',
'clients.form.address_title': 'Address',
'clients.form.email': 'Email',
'clients.form.phone': 'Phone',
'clients.form.phone_hint':
'With its country code (+32…); a French number (06…) is converted to +33.',
'clients.form.address_line1': 'Address',
'clients.form.address_line2': 'Address line 2',
'clients.form.postal_code': 'Postal code',
'clients.form.city': 'City',
'clients.form.country': 'Country',
'clients.form.country_none': 'Not given',
'clients.form.submit_create': 'Create client',
'clients.form.submit_update': 'Save',
'clients.form.saving': 'Saving…',
'clients.form.back_to_client': 'Back to the client',
'clients.form.conflict_title': 'This client was changed elsewhere.',
'clients.form.conflict_body':
'What you typed is kept and the saved value is shown under each field that differs. “Save” will replace the saved values with yours.',
'clients.form.conflict_take_stored': 'Use the saved values',
'clients.form.stored_value': 'Saved value: {value}',
'clients.form.stored_empty': 'Saved value: empty',
'clients.error.required': 'This field is required.',
'clients.error.too_long': '{max} characters at most.',
'clients.error.characters': 'Character not accepted (tab, line break…).',
'clients.error.email_format': 'Invalid email address.',
'clients.error.phone_format':
'Invalid number: +33 6 12 34 56 78 or 06 12 34 56 78.',
'clients.error.phone_country_code':
'Enter the number with its country code (+32…).',
'clients.error.country': 'Unknown country.',
'clients.detail.loading': 'Loading client…',
'clients.detail.back': '← Clients',
'clients.detail.contact': 'Contact details',
'clients.detail.no_contact': 'No contact details given.',
'clients.detail.phone': 'Phone',
'clients.detail.email': 'Email',
'clients.detail.address': 'Address',
'clients.detail.country': 'Country',
'clients.detail.edit': 'Edit',
'clients.detail.archive': 'Archive',
'clients.detail.restore': 'Restore',
'clients.detail.restoring': 'Restoring…',
'clients.detail.archived_notice':
'This client is archived: the record is read-only. Restore it to edit it.',
'clients.detail.created': 'Client created.',
'clients.detail.updated': 'Changes saved.',
'clients.detail.archived': 'Client archived.',
'clients.detail.restored': 'Client restored.',
'clients.animals.title': 'Animals',
'clients.animals.loading': 'Loading animals…',
'clients.animals.none': 'No animal linked to this client.',
'clients.animals.current': 'Current',
'clients.animals.former': 'Former',
'clients.animals.since': 'since {date}',
'clients.animals.until': 'until {date}',
'clients.role.owner': 'Owner',
'clients.role.keeper': 'Keeper',
'clients.role.contact': 'Contact',
'clients.role.former_owner': 'Former owner',
'clients.role.former_keeper': 'Former keeper',
'clients.role.former_contact': 'Former contact',
'clients.archive.title': 'Archive this client?',
'clients.archive.body':
'The client will be hidden from the lists and the record becomes read-only. Its animals are not archived and its relations are kept. You can restore it at any time.',
'clients.archive.preview_loading': 'Checking linked animals…',
'clients.archive.preview_failed': 'Linked animals could not be checked.',
'clients.archive.sole_owner_one':
'It is the only current owner of this active animal:',
'clients.archive.sole_owner_other':
'It is the only current owner of these {count} active animals:',
'clients.archive.others': 'and {count} more.',
'clients.archive.confirm': 'Archive',
'clients.archive.archiving': 'Archiving…',
'clients.not_found.title': 'Client not found',
'clients.not_found.body':
'This client does not exist or is not available to your account.',
'clients.not_found.back': 'Back to clients',
'leave.title': 'Leave without saving?',
'leave.body': 'The changes in this form will be lost.',
'leave.stay': 'Stay on the page',
'leave.confirm': 'Leave without saving',
}
+147
View File
@@ -378,6 +378,7 @@ export const fr: Dict = {
'shell.close_menu': 'Fermer le menu',
'shell.nav.dashboard': 'Tableau de bord',
'shell.nav.account': 'Mon compte',
'shell.nav.clients': 'Clients',
'shell.nav.local_tool': 'Outil de bilan',
'shell.nav.local_tool_hint': 'Sans compte, export PDF',
'shell.sign_out': 'Se déconnecter',
@@ -507,4 +508,150 @@ export const fr: Dict = {
'Photo refusée : entre 64 et 4096 pixels de côté.',
'account.avatar.rejected.processing_error':
'Photo refusée : le traitement a échoué. Réessayez avec une autre image.',
// V1-1.5 clients, workspace, leave guard
'common.retry': 'Réessayer',
'workspace.loading': 'Chargement de votre espace…',
'workspace.inactive':
'Votre compte est désactivé : vos dossiers ne sont pas accessibles. Contactez le support Faunosteo.',
'workspace.unconfirmed':
'Confirmez votre adresse e-mail pour accéder à vos dossiers.',
'workspace.missing':
'Votre espace de travail ne répond pas. Réessayez ; si cela persiste, contactez le support Faunosteo.',
'workspace.error': "Votre espace de travail n'a pas pu être chargé.",
'clients.failure.not_found': 'Ce client est introuvable.',
'clients.failure.archived':
'Ce client est archivé : restaurez-le pour le modifier.',
'clients.failure.conflict': 'Ce client a été modifié entre-temps.',
'clients.failure.request_conflict':
"Une tentative précédente de cette création portait d'autres valeurs et a peut-être déjà créé le client. Vérifiez la liste des clients avant de recommencer.",
'clients.failure.limit_reached':
'Le nombre maximal de clients de votre espace est atteint.',
'clients.failure.rate_limited':
"Trop d'enregistrements en peu de temps. Réessayez dans quelques minutes.",
'clients.failure.invalid_input':
"Une valeur n'a pas été acceptée. Vérifiez les champs.",
'clients.failure.session_expired':
'Votre session a expiré. Reconnectez-vous.',
'clients.failure.network':
'Connexion impossible. Vérifiez votre réseau, puis réessayez.',
'clients.failure.unavailable':
'Le service ne répond pas pour le moment. Réessayez.',
'clients.kind.person': 'Personne',
'clients.kind.organization': 'Structure',
'clients.archived_badge': 'Archivé',
'clients.list.title': 'Clients',
'clients.list.new': 'Nouveau client',
'clients.list.search_label': 'Rechercher un client',
'clients.list.search_hint': 'Nom, ville, e-mail ou téléphone',
'clients.list.archived_toggle': 'Afficher les archivés',
'clients.list.loading': 'Chargement des clients…',
'clients.list.results_label': 'Clients trouvés',
'clients.list.count_one': '1 client affiché',
'clients.list.count_other': '{count} clients affichés',
'clients.list.empty': "Aucun client pour l'instant.",
'clients.list.empty_hint':
'Créez votre premier client avec « Nouveau client ».',
'clients.list.no_results': 'Aucun client ne correspond à cette recherche.',
'clients.list.archived_empty': 'Aucun client archivé.',
'clients.list.more': 'Afficher plus',
'clients.list.loading_more': 'Chargement…',
'clients.list.animals_none': 'Aucun animal',
'clients.list.animals_one': '1 animal',
'clients.list.animals_other': '{count} animaux',
'clients.form.create_title': 'Nouveau client',
'clients.form.edit_title': 'Modifier le client',
'clients.form.kind_legend': 'Type de client',
'clients.form.display_name.person': 'Nom affiché',
'clients.form.display_name.organization': 'Dénomination',
'clients.form.display_name_hint.person':
'Tel que vous le dites : « Marie Dupont », « Mme Dupont ».',
'clients.form.display_name_hint.organization':
'Le nom de la structure : « Écurie du Lac ».',
'clients.form.required': 'obligatoire',
'clients.form.optional': 'facultatif',
'clients.form.contact_title': 'Coordonnées',
'clients.form.address_title': 'Adresse',
'clients.form.email': 'E-mail',
'clients.form.phone': 'Téléphone',
'clients.form.phone_hint':
'Avec son indicatif (+32…) ; un numéro français (06…) est converti en +33.',
'clients.form.address_line1': 'Adresse',
'clients.form.address_line2': "Complément d'adresse",
'clients.form.postal_code': 'Code postal',
'clients.form.city': 'Ville',
'clients.form.country': 'Pays',
'clients.form.country_none': 'Non renseigné',
'clients.form.submit_create': 'Créer le client',
'clients.form.submit_update': 'Enregistrer',
'clients.form.saving': 'Enregistrement…',
'clients.form.back_to_client': 'Retour à la fiche',
'clients.form.conflict_title': 'Ce client a été modifié ailleurs.',
'clients.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.',
'clients.form.conflict_take_stored': 'Reprendre les valeurs enregistrées',
'clients.form.stored_value': 'Valeur enregistrée : {value}',
'clients.form.stored_empty': 'Valeur enregistrée : vide',
'clients.error.required': 'Ce champ est obligatoire.',
'clients.error.too_long': '{max} caractères au maximum.',
'clients.error.characters':
'Caractère non accepté (tabulation, saut de ligne…).',
'clients.error.email_format': 'Adresse e-mail invalide.',
'clients.error.phone_format':
'Numéro invalide : +33 6 12 34 56 78 ou 06 12 34 56 78.',
'clients.error.phone_country_code':
'Indiquez le numéro avec son indicatif (+32…).',
'clients.error.country': 'Pays inconnu.',
'clients.detail.loading': 'Chargement du client…',
'clients.detail.back': '← Clients',
'clients.detail.contact': 'Coordonnées',
'clients.detail.no_contact': 'Aucune coordonnée renseignée.',
'clients.detail.phone': 'Téléphone',
'clients.detail.email': 'E-mail',
'clients.detail.address': 'Adresse',
'clients.detail.country': 'Pays',
'clients.detail.edit': 'Modifier',
'clients.detail.archive': 'Archiver',
'clients.detail.restore': 'Restaurer',
'clients.detail.restoring': 'Restauration…',
'clients.detail.archived_notice':
'Ce client est archivé : sa fiche est en lecture seule. Restaurez-le pour la modifier.',
'clients.detail.created': 'Client créé.',
'clients.detail.updated': 'Modifications enregistrées.',
'clients.detail.archived': 'Client archivé.',
'clients.detail.restored': 'Client restauré.',
'clients.animals.title': 'Animaux',
'clients.animals.loading': 'Chargement des animaux…',
'clients.animals.none': 'Aucun animal lié à ce client.',
'clients.animals.current': 'Actuels',
'clients.animals.former': 'Anciens',
'clients.animals.since': 'depuis le {date}',
'clients.animals.until': "jusqu'au {date}",
'clients.role.owner': 'Propriétaire',
'clients.role.keeper': 'Détenteur',
'clients.role.contact': 'Contact',
'clients.role.former_owner': 'Ancien propriétaire',
'clients.role.former_keeper': 'Ancien détenteur',
'clients.role.former_contact': 'Ancien contact',
'clients.archive.title': 'Archiver ce client ?',
'clients.archive.body':
'Le client sera masqué des listes et sa fiche passera en lecture seule. Ses animaux ne sont pas archivés et ses relations sont conservées. Vous pourrez le restaurer à tout moment.',
'clients.archive.preview_loading': 'Vérification des animaux liés…',
'clients.archive.preview_failed':
"Les animaux liés n'ont pas pu être vérifiés.",
'clients.archive.sole_owner_one':
"C'est le seul propriétaire actuel de cet animal actif :",
'clients.archive.sole_owner_other':
"C'est le seul propriétaire actuel de ces {count} animaux actifs :",
'clients.archive.others': 'et {count} de plus.',
'clients.archive.confirm': 'Archiver',
'clients.archive.archiving': 'Archivage…',
'clients.not_found.title': 'Client introuvable',
'clients.not_found.body':
"Ce client n'existe pas ou n'est pas accessible depuis votre compte.",
'clients.not_found.back': 'Retour aux clients',
'leave.title': 'Quitter sans enregistrer ?',
'leave.body': 'Les modifications de ce formulaire seront perdues.',
'leave.stay': 'Rester sur la page',
'leave.confirm': 'Quitter sans enregistrer',
}