Skip to content

Commit

Permalink
fix: display full name of cnfs in chips filter
Browse files Browse the repository at this point in the history
  • Loading branch information
abelkhay committed Aug 30, 2023
1 parent e1f5522 commit 5fb63e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*ngFor="let labelNational of filter.labels_nationaux"
class="btn btn-chip btn-chip-trim btn-sm btn-tertiary text-primary me-2 mb-2"
(click)="resetForm(labelNational, 'labels_nationaux')">
× {{ labelNational }}
× {{ getLabelFromCNFS(labelNational) }}
</button>
<button
*ngFor="let labelAutre of filter.labels_autres"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FormGroup } from '@angular/forms';
import { FilterFormPresentation } from '../../../core/presenters';
import conditionAcces from '../../pages/accessibilite/condition-acces.json';
import publicSpecifiqueAcceuilli from '../../pages/accessibilite/public-specifique-accueilli.json';
import { LabelNational } from '@gouvfr-anct/lieux-de-mediation-numerique';

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down Expand Up @@ -41,4 +42,8 @@ export class SelectedFiltersComponent {
})?.label ?? ''
);
}

public getLabelFromCNFS(value: string): string {
return value === LabelNational.CNFS ? 'Conseillers num茅riques' : value;
}
}

0 comments on commit 5fb63e0

Please sign in to comment.