refactor: fix bugs et réduire duplication + extraire modales BrowseComponent

- fix(dto): ajouter @IsEmail() sur contactFunctionalEmail/TechnicalEmail dans UpdateApiEntryDto
- fix(docs): corriger stringify des erreurs (String(error) → error.message)
- refactor(mapper): extraire toApiEntryListItem() dans api-entry.mapper.ts partagé
- refactor(categories): supprimer CONVENTION_LABELS et toApiEntryListItem locaux dupliqués
- refactor(browse): extraire CategoryFormModalComponent et CategoryDeleteModalComponent
- refactor(api-detail): convertir editPreviewTitle() en computed()

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
z3n
2026-06-11 15:10:38 +00:00
parent e939d592f8
commit 1adb6820dd
9 changed files with 317 additions and 276 deletions

View File

@@ -1,6 +1,7 @@
import {
Component,
signal,
computed,
inject,
OnInit,
OnDestroy,
@@ -381,10 +382,10 @@ export class ApiDetailComponent implements OnInit, OnDestroy {
editContactTechnicalEntity = signal('');
editContactTechnicalEmail = signal('');
editPreviewTitle() {
editPreviewTitle = computed(() => {
const labels: Record<ApiConvention, string> = { CONSULTER: 'Consulter', ENREGISTRER: 'Enregistrer', ETRE_NOTIFIE: 'Être notifié' };
return `${labels[this.editConvention()]} ${this.editName()}`.trim();
}
});
private pollInterval: ReturnType<typeof setInterval> | null = null;
private id = '';