Skip to content
Snippets Groups Projects
Commit 7f819789 authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'refs/heads/master' into OZG-6720-nacharbeiten

# Conflicts:
#	alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-list/organisationseinheit-list.component.html
parents 2c228c30 83c6f2ba
Branches
Tags
No related merge requests found
<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
......
<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>
......
......@@ -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();
......
......@@ -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;
}
......@@ -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>`,
}),
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment