Renamed groups to roles in the frontend
Working: Account Cost Centre Employee Product Group Product Role User Client
This commit is contained in:
31
overlord/src/app/role/role-list/role-list.component.ts
Normal file
31
overlord/src/app/role/role-list/role-list.component.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import {RoleListDatasource} from './role-list-datasource';
|
||||
import {Role} from '../role';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-role-list',
|
||||
templateUrl: './role-list.component.html',
|
||||
styleUrls: ['./role-list.component.css']
|
||||
})
|
||||
export class RoleListComponent implements OnInit {
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
dataSource: RoleListDatasource;
|
||||
list: Role[];
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'permissions'];
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { list: Role[] }) => {
|
||||
this.list = data.list;
|
||||
});
|
||||
this.dataSource = new RoleListDatasource(this.paginator, this.sort, this.list);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user