Initial commit

This commit is contained in:
2026-07-19 13:09:04 +02:00
commit 8cf57d7878
215 changed files with 30417 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import { Component, inject, signal } from '@angular/core';
import { ApiClientService, type AuditLogDto } from '@boilerplate/api-client';
@Component({
standalone: true,
template: `
<section class="ui-grid">
@for (entry of entries(); track entry.id) {
<article class="ui-card">
<strong>{{ labels[entry.action] || entry.action }}</strong>
<span class="ui-help-text"
>{{ entry.createdAt }} · Objekt: {{ entry.targetType }} {{ entry.targetId }}</span
>
<small class="ui-meta">Request-ID: {{ entry.requestId }}</small>
</article>
}
</section>
`,
})
export class AuditPageComponent {
private readonly api = inject(ApiClientService);
readonly entries = signal<AuditLogDto[]>([]);
readonly labels: Record<string, string> = {
USER_ACTIVATED: 'Benutzer aktiviert',
USER_DEACTIVATED: 'Benutzer deaktiviert',
USER_ROLE_ASSIGNED: 'Rolle zugewiesen',
USER_ROLE_REMOVED: 'Rolle entfernt',
ROLE_CREATED: 'Rolle erstellt',
ROLE_UPDATED: 'Rolle aktualisiert',
ROLE_DELETED: 'Rolle geloescht',
ROLE_PERMISSIONS_UPDATED: 'Permissions aktualisiert',
SESSION_REVOKED: 'Session beendet',
ALL_USER_SESSIONS_REVOKED: 'Alle Sessions beendet',
};
constructor() {
this.api.audit().subscribe((page) => this.entries.set(page.items));
}
}