diff --git a/front-public/src/app/pages/api-detail/api-detail.component.html b/front-public/src/app/pages/api-detail/api-detail.component.html
new file mode 100644
index 0000000..1e1a89f
--- /dev/null
+++ b/front-public/src/app/pages/api-detail/api-detail.component.html
@@ -0,0 +1,369 @@
+
+
+
+ @if (loading()) {
+
+ }
+
+ @if (error()) {
+
+
Erreur
+
{{ error() }}
+
+ }
+
+ @if (api(); as entry) {
+
+
Retour
+
+
+
+
+
+
{{ entry.title }}
+ @if (versions().length <= 1) {
+ v{{ entry.version }}
+ } @else {
+
+ }
+
+
+
+
+ Voir la documentation
+
+
+
+ @if (actionsOpen()) {
+
+
+
+ Télécharger YAML
+
+ @if (entry.status !== 'GENERATED') {
+
+ }
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+ @if (activeTab() === 'info') {
+ @if (!editingInfo()) {
+
+
+
+
+
+
- Version
+ -
+ {{ entry.version }}
+ @if (!entry.isCurrent) {
+
+ }
+
+
+
+
- Type
+ - {{ entry.type }}
+
+
+
- Statut
+
-
+ {{ statusLabel(entry.status) }}
+ @if (entry.status === 'ERROR' && entry.errorMessage) {
+
{{ entry.errorMessage }}
+ }
+
+
+
+
- Fournisseur
+ - {{ entry.provider }}
+
+ @if (entry.description) {
+
+
- Description
+ - {{ entry.description }}
+
+ }
+
+
- Créé le
+ - {{ entry.createdAt | date:'dd/MM/yyyy HH:mm' }}
+
+
+
- Mis à jour le
+ - {{ entry.updatedAt | date:'dd/MM/yyyy HH:mm' }}
+
+
+
+
+
+
+
+
+ }
+
+ @if (editingInfo()) {
+
+ }
+ }
+
+
+ @if (activeTab() === 'contacts') {
+ @if (!editingContacts()) {
+
+
+
+
+
+
Contact métier
+
{{ entry.contactFunctionalName }}
+
{{ entry.contactFunctionalEntity }}
+
{{ entry.contactFunctionalEmail }}
+
+
+
Contact technique
+
{{ entry.contactTechnicalName }}
+
{{ entry.contactTechnicalEntity }}
+
{{ entry.contactTechnicalEmail }}
+
+
+
+
+
+
+
+
+ }
+
+ @if (editingContacts()) {
+
+ }
+ }
+
+ }
+
diff --git a/front-public/src/app/pages/api-detail/api-detail.component.ts b/front-public/src/app/pages/api-detail/api-detail.component.ts
index d0bd0c0..fffd128 100644
--- a/front-public/src/app/pages/api-detail/api-detail.component.ts
+++ b/front-public/src/app/pages/api-detail/api-detail.component.ts
@@ -22,377 +22,7 @@ import { ApiEntry, ApiEntryListItem, Category } from '@datacat/shared';
standalone: true,
imports: [CommonModule, RouterLink, ReactiveFormsModule, BreadcrumbComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
- template: `
-
-
-
- @if (loading()) {
-
- }
-
- @if (error()) {
-
-
Erreur
-
{{ error() }}
-
- }
-
- @if (api(); as entry) {
-
-
Retour
-
-
-
-
-
-
{{ entry.title }}
- @if (versions().length <= 1) {
- v{{ entry.version }}
- } @else {
-
- }
-
-
-
-
- Voir la documentation
-
-
-
- @if (actionsOpen()) {
-
-
-
- Télécharger YAML
-
- @if (entry.status !== 'GENERATED') {
-
- }
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
- @if (activeTab() === 'info') {
- @if (!editingInfo()) {
-
-
-
-
-
-
- Version
- -
- {{ entry.version }}
- @if (!entry.isCurrent) {
-
- }
-
-
-
-
- Type
- - {{ entry.type }}
-
-
-
- Statut
-
-
- {{ statusLabel(entry.status) }}
- @if (entry.status === 'ERROR' && entry.errorMessage) {
-
{{ entry.errorMessage }}
- }
-
-
-
-
- Fournisseur
- - {{ entry.provider }}
-
- @if (entry.description) {
-
-
- Description
- - {{ entry.description }}
-
- }
-
-
- Créé le
- - {{ entry.createdAt | date:'dd/MM/yyyy HH:mm' }}
-
-
-
- Mis à jour le
- - {{ entry.updatedAt | date:'dd/MM/yyyy HH:mm' }}
-
-
-
-
-
-
-
-
- }
-
- @if (editingInfo()) {
-
- }
- }
-
-
- @if (activeTab() === 'contacts') {
- @if (!editingContacts()) {
-
-
-
-
-
-
Contact métier
-
{{ entry.contactFunctionalName }}
-
{{ entry.contactFunctionalEntity }}
-
{{ entry.contactFunctionalEmail }}
-
-
-
Contact technique
-
{{ entry.contactTechnicalName }}
-
{{ entry.contactTechnicalEntity }}
-
{{ entry.contactTechnicalEmail }}
-
-
-
-
-
-
-
-
- }
-
- @if (editingContacts()) {
-
- }
- }
-
- }
-
- `,
+ templateUrl: "./api-detail.component.html",
})
export class ApiDetailComponent implements OnInit, OnDestroy {
private route = inject(ActivatedRoute);
diff --git a/front-public/src/app/pages/upload/upload.component.html b/front-public/src/app/pages/upload/upload.component.html
new file mode 100644
index 0000000..df817ed
--- /dev/null
+++ b/front-public/src/app/pages/upload/upload.component.html
@@ -0,0 +1,472 @@
+
+
+
+
Importer une API
+
+
+
+ @for (title of stepTitles; track $index) {
+
+
$index + 1 ? '#1f8d49' : step() === $index + 1 ? '#000091' : '#e5e5e5'"
+ [style.color]="step() >= $index + 1 ? 'white' : '#666'"
+ style="width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.875rem;transition:background 0.2s;">
+ @if (step() > $index + 1) {
+
+ } @else {
+ {{ $index + 1 }}
+ }
+
+
$index + 1 ? '#1f8d49' : '#666'">
+ {{ title }}
+
+
+ @if ($index < stepTitles.length - 1) {
+
$index + 1 ? '#1f8d49' : '#e5e5e5'">
+
+ }
+ }
+
+
+
+ @if (step() === 1) {
+
+
+
+
+
+ @if (fileError()) {
+
+ }
+
+ @if (selectedFiles().length > 0) {
+
+ @for (file of selectedFiles(); track file.name) {
+
+
+ {{ file.name }}
+ ({{ (file.size / 1024).toFixed(1) }} Ko)
+
+ @if (file.name === detectedMainFilename()) {
+ Principal
+ } @else if (selectedFiles().length > 1) {
+ Secondaire
+ }
+
+ }
+
+
+ @if (validating()) {
+
+
Validation en cours...
+
+ } @else if (validationDone()) {
+ @if (validationErrors().length > 0) {
+
+
Fichier(s) invalide(s)
+ @for (err of validationErrors(); track err.file) {
+
{{ err.file ? err.file + ' : ' : '' }}{{ err.message }}
+ }
+
+ } @else {
+
+
Fichier(s) valide(s)
+
Le fichier a été validé avec succès.
+
+ }
+ }
+ }
+
+
+ }
+
+
+ @if (step() === 2) {
+
+ @if (fromApi(); as origin) {
+
+
+ Nouvelle version de : {{ origin.title }} (v{{ origin.version }})
+ — le nom et la convention sont verrouillés.
+
+
+ }
+
+
+ }
+
+
+ @if (step() === 3) {
+
+ }
+
+
+ @if (step() === 4) {
+
+
+
+
Récapitulatif
+
+
+
- Fichier{{ selectedFiles().length > 1 ? 's' : '' }}
+
-
+ @if (selectedFiles().length === 0) {
+ Aucun fichier
+ } @else if (selectedFiles().length === 1) {
+ {{ selectedFiles()[0].name }}
+ } @else {
+ @for (f of selectedFiles(); track f.name) {
+
+ {{ f.name }}
+ @if (f.name === detectedMainFilename()) {
+ Principal
+ }
+
+ }
+ }
+
+
+
+
- Type
+ - {{ displayType() }}
+
+
+
- Titre
+ - {{ previewTitle() }}
+
+
+
- Version
+ - {{ metaForm.value.versionMajor }}.{{ metaForm.value.versionMinor }}.{{ metaForm.value.versionPatch }}
+
+
+
- Fournisseur
+ - {{ metaForm.value.provider }}
+
+ @if (metaForm.value.categoryId) {
+
+
- Catégorie
+ - {{ selectedCategoryName() }}
+
+ }
+ @if (metaForm.value.description) {
+
+
- Description
+ - {{ metaForm.value.description }}
+
+ }
+
+
- Contact métier
+ -
+ {{ metaForm.value.contactFunctionalName }}
+ {{ metaForm.value.contactFunctionalEntity }}
+ {{ metaForm.value.contactFunctionalEmail }}
+
+
+
+
- Contact technique
+ -
+ {{ metaForm.value.contactTechnicalName }}
+ {{ metaForm.value.contactTechnicalEntity }}
+ {{ metaForm.value.contactTechnicalEmail }}
+
+
+
+
+
+
+
+ @if (uploadError()) {
+
+
Erreur lors de l'import
+
{{ uploadError() }}
+
+ }
+
+
+
+
+
+ }
+
diff --git a/front-public/src/app/pages/upload/upload.component.ts b/front-public/src/app/pages/upload/upload.component.ts
index e1b7eb1..5f717dc 100644
--- a/front-public/src/app/pages/upload/upload.component.ts
+++ b/front-public/src/app/pages/upload/upload.component.ts
@@ -21,480 +21,7 @@ import { ApiEntry, ApiEntryListItem, Category, API_CONVENTION_LABELS, ApiConvent
standalone: true,
imports: [CommonModule, ReactiveFormsModule, RouterLink, BreadcrumbComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
- template: `
-
-
-
-
Importer une API
-
-
-
- @for (title of stepTitles; track $index) {
-
-
$index + 1 ? '#1f8d49' : step() === $index + 1 ? '#000091' : '#e5e5e5'"
- [style.color]="step() >= $index + 1 ? 'white' : '#666'"
- style="width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:0.875rem;transition:background 0.2s;">
- @if (step() > $index + 1) {
-
- } @else {
- {{ $index + 1 }}
- }
-
-
$index + 1 ? '#1f8d49' : '#666'">
- {{ title }}
-
-
- @if ($index < stepTitles.length - 1) {
-
$index + 1 ? '#1f8d49' : '#e5e5e5'">
-
- }
- }
-
-
-
- @if (step() === 1) {
-
-
-
-
-
- @if (fileError()) {
-
- }
-
- @if (selectedFiles().length > 0) {
-
- @for (file of selectedFiles(); track file.name) {
-
-
- {{ file.name }}
- ({{ (file.size / 1024).toFixed(1) }} Ko)
-
- @if (file.name === detectedMainFilename()) {
- Principal
- } @else if (selectedFiles().length > 1) {
- Secondaire
- }
-
- }
-
-
- @if (validating()) {
-
-
Validation en cours...
-
- } @else if (validationDone()) {
- @if (validationErrors().length > 0) {
-
-
Fichier(s) invalide(s)
- @for (err of validationErrors(); track err.file) {
-
{{ err.file ? err.file + ' : ' : '' }}{{ err.message }}
- }
-
- } @else {
-
-
Fichier(s) valide(s)
-
Le fichier a été validé avec succès.
-
- }
- }
- }
-
-
- }
-
-
- @if (step() === 2) {
-
- @if (fromApi(); as origin) {
-
-
- Nouvelle version de : {{ origin.title }} (v{{ origin.version }})
- — le nom et la convention sont verrouillés.
-
-
- }
-
-
- }
-
-
- @if (step() === 3) {
-
- }
-
-
- @if (step() === 4) {
-
-
-
-
Récapitulatif
-
-
-
- Fichier{{ selectedFiles().length > 1 ? 's' : '' }}
-
-
- @if (selectedFiles().length === 0) {
- Aucun fichier
- } @else if (selectedFiles().length === 1) {
- {{ selectedFiles()[0].name }}
- } @else {
- @for (f of selectedFiles(); track f.name) {
-
- {{ f.name }}
- @if (f.name === detectedMainFilename()) {
- Principal
- }
-
- }
- }
-
-
-
-
- Type
- - {{ displayType() }}
-
-
-
- Titre
- - {{ previewTitle() }}
-
-
-
- Version
- - {{ metaForm.value.versionMajor }}.{{ metaForm.value.versionMinor }}.{{ metaForm.value.versionPatch }}
-
-
-
- Fournisseur
- - {{ metaForm.value.provider }}
-
- @if (metaForm.value.categoryId) {
-
-
- Catégorie
- - {{ selectedCategoryName() }}
-
- }
- @if (metaForm.value.description) {
-
-
- Description
- - {{ metaForm.value.description }}
-
- }
-
-
- Contact métier
- -
- {{ metaForm.value.contactFunctionalName }}
- {{ metaForm.value.contactFunctionalEntity }}
- {{ metaForm.value.contactFunctionalEmail }}
-
-
-
-
- Contact technique
- -
- {{ metaForm.value.contactTechnicalName }}
- {{ metaForm.value.contactTechnicalEntity }}
- {{ metaForm.value.contactTechnicalEmail }}
-
-
-
-
-
-
-
- @if (uploadError()) {
-
-
Erreur lors de l'import
-
{{ uploadError() }}
-
- }
-
-
-
-
-
- }
-
- `,
+ templateUrl: "./upload.component.html",
})
export class UploadComponent implements OnInit {
private fb = inject(FormBuilder);