Simple Managment webapp [LLM]

This commit is contained in:
2025-12-03 17:20:50 +01:00
parent b521f74951
commit e7f613b5dc
76 changed files with 20009 additions and 1 deletions

View File

@@ -0,0 +1,51 @@
import { Component, inject, signal, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzEmptyModule } from 'ng-zorro-antd/empty';
import { NzCardModule } from 'ng-zorro-antd/card';
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { ApiService } from '../../../core/services/api.service';
import { SenderNameStatistics } from '../../../core/models';
import { RelativeTimePipe } from '../../../shared/pipes/relative-time.pipe';
@Component({
selector: 'app-sender-list',
standalone: true,
imports: [
CommonModule,
NzTableModule,
NzButtonModule,
NzIconModule,
NzEmptyModule,
NzCardModule,
NzToolTipModule,
RelativeTimePipe,
],
templateUrl: './sender-list.component.html',
styleUrl: './sender-list.component.scss'
})
export class SenderListComponent implements OnInit {
private apiService = inject(ApiService);
senders = signal<SenderNameStatistics[]>([]);
loading = signal(false);
ngOnInit(): void {
this.loadSenders();
}
loadSenders(): void {
this.loading.set(true);
this.apiService.getSenderNames().subscribe({
next: (response) => {
this.senders.set(response.senders);
this.loading.set(false);
},
error: () => {
this.loading.set(false);
}
});
}
}