Added edit component

This commit is contained in:
Zakary Timson 2018-07-22 14:24:29 -04:00
parent 4c25c9b4f2
commit f403150b12
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
<td>{{c.created | date}}</td>
<td class="text-center">{{c.cost | currency}}</td>
<td>
<mat-icon class="curs-pointer">edit</mat-icon>
<mat-icon class="curs-pointer" (click)="createComponent(c)">edit</mat-icon>
</td>
<td>
<mat-icon class="curs-pointer" (click)="delete(c)">delete</mat-icon>

View File

@ -27,8 +27,8 @@ export class ViewComponents {
);
}
createComponent() {
this.dialog.open(NewComponentComponent);
createComponent(component?) {
this.dialog.open(NewComponentComponent, {data: component});
}
delete(component) {