Bug fix +
Meilleur chargement du cache après login
This commit is contained in:
@@ -5,7 +5,7 @@ import { MatDialog } from "@angular/material/dialog";
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AddAction } from '../../models/add-action.enum';
|
||||
import { JumpResp } from '../../models/jump';
|
||||
import { Jump } from '../../models/jump';
|
||||
import { JumpService } from '../../services/jump.service';
|
||||
import { ServiceComm } from '../../services/service-comm.service';
|
||||
import { JumpInfosComponent } from "../jump-infos/jump-infos.component";
|
||||
@@ -16,7 +16,7 @@ import { JumpInfosComponent } from "../jump-infos/jump-infos.component";
|
||||
styleUrls: ['./list-of-jumps.component.css']
|
||||
})
|
||||
export class ListOfJumpsComponent implements OnInit {
|
||||
public listOfJumps: Observable<Array<JumpResp>>;
|
||||
public listOfJumps: Observable<Array<Jump>>;
|
||||
public displayedColumns: Array<string> = [
|
||||
'infos',
|
||||
'id',
|
||||
@@ -56,7 +56,7 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
return b.jumpDate > a.jumpDate ? 1 : -1;
|
||||
});
|
||||
|
||||
this.dataSourceTable = new MatTableDataSource<JumpResp>(data);
|
||||
this.dataSourceTable = new MatTableDataSource<Jump>(data);
|
||||
this.dataSourceTable.paginator = this.paginator;
|
||||
this.paginator.pageSize
|
||||
this.resultsLength = data.length;
|
||||
@@ -64,7 +64,7 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
openDialog(item: JumpResp, editMode: boolean) {
|
||||
openDialog(item: Jump, editMode: boolean) {
|
||||
this.dialog.open(JumpInfosComponent,
|
||||
{ data: { "jump": item, "editMode": editMode},
|
||||
maxHeight: "400px",
|
||||
@@ -72,8 +72,8 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
delete(item: JumpResp) {
|
||||
let data : Array<JumpResp> = this.dataSourceTable.data;
|
||||
delete(item: Jump) {
|
||||
let data : Array<Jump> = this.dataSourceTable.data;
|
||||
data = data.filter(d => d.id !== item.id);
|
||||
|
||||
this.dataSourceTable.data = data;
|
||||
|
||||
Reference in New Issue
Block a user