Ajout des formulaires de création de
"Aircraft", "JumpType", "Gear" et "DZ".
This commit is contained in:
@@ -20,9 +20,10 @@ export class ListOfGearsComponent implements OnInit {
|
||||
'email',
|
||||
'type'
|
||||
];
|
||||
public dataSourceTable;
|
||||
public dataSourceTable: MatTableDataSource<GearResp>;
|
||||
public resultsLength = 0;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
public showAddForm: boolean;
|
||||
|
||||
constructor(
|
||||
private serviceApi: ServiceApiGet,
|
||||
@@ -36,10 +37,14 @@ export class ListOfGearsComponent implements OnInit {
|
||||
|
||||
getListOfGears() {
|
||||
this.serviceApi.getListOfGears().subscribe(data => {
|
||||
//data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||
// data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||
this.dataSourceTable = new MatTableDataSource<GearResp>(data);
|
||||
this.dataSourceTable.paginator = this.paginator;
|
||||
this.resultsLength = data.length;
|
||||
});
|
||||
}
|
||||
|
||||
public add() {
|
||||
this.showAddForm = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user