diff --git a/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component.html b/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component.html index 982a56b5f01c99c6fd451fe2579e1361de22f2b9..4d7bb88c347ce810280f41d2202077cccf4e9062 100644 --- a/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component.html +++ b/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component.html @@ -1,7 +1,7 @@ <ods-list *ngIf="organisationsEinheitResources.length > 0" data-test-id="organisations-einheit-list"> <ods-list-item *ngFor="let organisationsEinheitResource of organisationsEinheitResources" - [routerLink]="organisationsEinheitResource | toResourceUri" + [path]="organisationsEinheitResource | toResourceUri" [class.text-red-500]=" organisationsEinheitResource.syncResult === AdminOrganisationsEinheitSyncResult.NOT_FOUND_IN_PVOG || organisationsEinheitResource.syncResult === AdminOrganisationsEinheitSyncResult.ORGANISATIONSEINHEIT_ID_NOT_UNIQUE diff --git a/alfa-client/libs/admin/settings/src/lib/users-roles/users-roles.component.html b/alfa-client/libs/admin/settings/src/lib/users-roles/users-roles.component.html index e22ebee9686297df2df289a14d42508c0d008ad7..09160afabe086d514782957cb31784a715e747f1 100644 --- a/alfa-client/libs/admin/settings/src/lib/users-roles/users-roles.component.html +++ b/alfa-client/libs/admin/settings/src/lib/users-roles/users-roles.component.html @@ -1,7 +1,7 @@ <h1 class="heading-1">Benutzer & Rollen</h1> <ods-button-with-spinner text="Benutzer hinzufügen" class="py-8" dataTestId="add-user-button" /> <ods-list *ngIf="users$ | async as users"> - <ods-list-item *ngFor="let user of users.resource" [routerLink]="user.username"> + <ods-list-item *ngFor="let user of users.resource" [path]="user.username"> <div class="flex-1 basis-1/2"> <div class="mb-2 flex flex-wrap items-center gap-3"> <h3 class="text-md font-semibold">{{ user | toUserName }}</h3> diff --git a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts index ecec5321cbfbc0feb43f59e6523a67612db186a3..677e8f018597262331d3857ac0f7aeba163040c5 100644 --- a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts +++ b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.spec.ts @@ -27,8 +27,8 @@ describe('ListItemComponent', () => { describe('input', () => { describe('routerLink', () => { it('should set href attribute', () => { - component.routerLink = faker.system.filePath(); - const resultingLink: string = 'http://localhost' + component.routerLink; + component.path = faker.system.filePath(); + const resultingLink: string = 'http://localhost' + component.path; const linkElement: HTMLLinkElement = getElementFromFixture(fixture, getDataTestClassOf('list-item-link')); fixture.detectChanges(); diff --git a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.ts b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.ts index 89e51332eda0375bfd8cfc77a383dca0a3f70175..e99fef42c4db3be62e2f83901fc30eb32df0017e 100644 --- a/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.ts +++ b/alfa-client/libs/design-system/src/lib/list/list-item/list-item.component.ts @@ -8,7 +8,7 @@ import { RouterLink } from '@angular/router'; imports: [CommonModule, RouterLink], template: `<li> <a - [routerLink]="routerLink" + [routerLink]="path" data-test-class="list-item-link" class="flex flex-col items-start justify-between gap-6 border-primary-600/50 px-6 py-4 hover:bg-background-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus lg:flex-row" ><ng-content @@ -17,5 +17,5 @@ import { RouterLink } from '@angular/router'; styles: [':host { @apply block w-full }'], }) export class ListItemComponent { - @Input() routerLink: string; + @Input() path: string; } diff --git a/alfa-client/libs/design-system/src/lib/list/list.stories.ts b/alfa-client/libs/design-system/src/lib/list/list.stories.ts index c3164eabfb7facd2ec68b48b1199caf8d49296fe..85aca93322bcbf330f47e08610814dc3f0fedbf7 100644 --- a/alfa-client/libs/design-system/src/lib/list/list.stories.ts +++ b/alfa-client/libs/design-system/src/lib/list/list.stories.ts @@ -34,9 +34,9 @@ export const Default: Story = { render: () => ({ template: ` <ods-list> - <ods-list-item routerLink="/pfad/1">List Item 1</ods-list-item> - <ods-list-item routerLink="/pfad/2">List Item 2</ods-list-item> - <ods-list-item routerLink="/pfad/3">List Item 3</ods-list-item> + <ods-list-item path="/pfad/1">List Item 1</ods-list-item> + <ods-list-item path="/pfad/2">List Item 2</ods-list-item> + <ods-list-item path="/pfad/3">List Item 3</ods-list-item> </ods-list>`, }), };