More webapp changes+fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, inject, signal, OnInit } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CommonModule, DatePipe } from '@angular/common';
|
||||
import { Router } from '@angular/router';
|
||||
import { NzTableModule } from 'ng-zorro-antd/table';
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
import { NzIconModule } from 'ng-zorro-antd/icon';
|
||||
@@ -17,6 +18,7 @@ import { RelativeTimePipe } from '../../../shared/pipes/relative-time.pipe';
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
DatePipe,
|
||||
NzTableModule,
|
||||
NzButtonModule,
|
||||
NzIconModule,
|
||||
@@ -32,6 +34,7 @@ import { RelativeTimePipe } from '../../../shared/pipes/relative-time.pipe';
|
||||
export class ClientListComponent implements OnInit {
|
||||
private apiService = inject(ApiService);
|
||||
private authService = inject(AuthService);
|
||||
private router = inject(Router);
|
||||
|
||||
clients = signal<Client[]>([]);
|
||||
loading = signal(false);
|
||||
@@ -70,4 +73,8 @@ export class ClientListComponent implements OnInit {
|
||||
default: return type;
|
||||
}
|
||||
}
|
||||
|
||||
openClient(clientId: string): void {
|
||||
this.router.navigate(['/clients', clientId]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user