Style sur les pages et ajout d'ajout d'icônes
This commit is contained in:
@@ -12,18 +12,16 @@ import { NewDropZoneComponent } from "../new-drop-zone/new-drop-zone.component";
|
||||
@Component({
|
||||
selector: "app-list-of-dzs",
|
||||
templateUrl: "./list-of-dzs.component.html",
|
||||
styleUrls: ["./list-of-dzs.component.css"]
|
||||
styleUrls: ["./list-of-dzs.component.css"],
|
||||
})
|
||||
export class ListOfDzsComponent implements OnInit {
|
||||
public displayedColumns: Array<string> = [
|
||||
"isfavorite",
|
||||
"id",
|
||||
"name",
|
||||
"latitude",
|
||||
"longitude",
|
||||
"address",
|
||||
"email",
|
||||
"type"
|
||||
"type",
|
||||
];
|
||||
public dataSourceTable: MatTableDataSource<DropZoneResp>;
|
||||
public resultsLength = 0;
|
||||
@@ -36,7 +34,7 @@ export class ListOfDzsComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.refreshRequest.subscribe(action => {
|
||||
this.serviceComm.refreshRequest.subscribe((action) => {
|
||||
if (action === AddAction.Dropzone) {
|
||||
this.dialog.closeAll();
|
||||
this.getListOfDropZones();
|
||||
@@ -47,7 +45,7 @@ export class ListOfDzsComponent implements OnInit {
|
||||
}
|
||||
|
||||
private getListOfDropZones() {
|
||||
this.serviceApi.getListOfDropZones().subscribe(data => {
|
||||
this.serviceApi.getListOfDropZones().subscribe((data) => {
|
||||
setTimeout(() => {
|
||||
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
||||
@@ -76,7 +74,7 @@ export class ListOfDzsComponent implements OnInit {
|
||||
openDialogToAdd() {
|
||||
this.dialog.open(NewDropZoneComponent, {
|
||||
height: "400px",
|
||||
width: "600px"
|
||||
width: "600px",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user