refactor(dashboard): rename column and update button label

This commit is contained in:
Jan Gleytenhoover 2025-01-21 11:12:34 +01:00
parent 6a19671fb4
commit 50fa637a35
Signed by: jank
GPG key ID: 50620ADD22CD330B
2 changed files with 6 additions and 5 deletions

View file

@ -15,7 +15,6 @@
<th mat-header-cell *matHeaderCellDef> ID </th> <th mat-header-cell *matHeaderCellDef> ID </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
{{element.id}} {{element.id}}
<button mat-flat-button class="my-3" (click)="copyLink(element.id)">Copy short url</button>
</td> </td>
</ng-container> </ng-container>
@ -32,9 +31,11 @@
</ng-container> </ng-container>
<!-- Symbol Column --> <!-- Symbol Column -->
<ng-container matColumnDef="symbol"> <ng-container matColumnDef="shortLink">
<th mat-header-cell *matHeaderCellDef> Short Url </th> <th mat-header-cell *matHeaderCellDef> Short link </th>
<td mat-cell *matCellDef="let element"> ndy </td> <td mat-cell *matCellDef="let element">
<button mat-flat-button class="my-3" (click)="copyLink(element.id)">Copy short link</button>
</td>
</ng-container> </ng-container>
<ng-container matColumnDef="actions"> <ng-container matColumnDef="actions">

View file

@ -16,7 +16,7 @@ import { MatButtonModule } from '@angular/material/button';
}) })
export class DashboardComponent { export class DashboardComponent {
public links: Link[] = []; public links: Link[] = [];
displayedColumns: string[] = ['id', 'name', 'link', 'symbol', 'actions']; displayedColumns: string[] = ['id', 'name', 'link', 'shortLink', 'actions'];
constructor(private linkService: LinkService, private router: Router) { }; constructor(private linkService: LinkService, private router: Router) { };