Un de syle sur la liste des DZs

This commit is contained in:
Sébastien André
2020-07-29 13:22:19 +02:00
parent a755d5f362
commit 1e3e728fdd
4 changed files with 29 additions and 32 deletions

View File

@@ -4,8 +4,8 @@
<table mat-table [dataSource]="dataSourceTable">
<ng-container matColumnDef="isfavorite">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element" style="text-align: center;">
<th mat-header-cell *matHeaderCellDef style="min-width: 144px;"></th>
<td mat-cell *matCellDef="let element" style="text-align: left;">
<mat-icon aria-hidden="false" aria-label="Favorit" *ngIf="element.isFavorite === true"
(click)="removeToFavorite(element)">favorite</mat-icon>
<mat-icon aria-hidden="false" aria-label="Not favorite" *ngIf="element.isFavorite === false"
@@ -18,6 +18,9 @@
target="_blank">
<mat-icon aria-hidden="false" aria-label="Location of the DZ">map</mat-icon>
</a>
<a href="mailto:{{element.email}}" *ngIf="element.email">
<mat-icon aria-hidden="false" aria-label="Contact mail of the DZ">mail_outline</mat-icon>
</a>
</td>
</ng-container>
@@ -39,10 +42,7 @@
<span class="spanWithBreakWord" [innerHTML]="element.address"></span>
</td>
</ng-container>
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef>E-mail</th>
<td mat-cell *matCellDef="let element">{{element.email}}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef>Type</th>
<td mat-cell *matCellDef="let element">{{element.type}}</td>

View File

@@ -1,27 +1,26 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from "@angular/material/paginator";
import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from "@angular/material/dialog";
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table';
import { MatDialog } from '@angular/material/dialog';
import { AddAction } from "../../models/add-action.enum";
import { DropZoneResp } from "../../models/dropzone";
import { DropzoneService } from "../../services/dropzone.service";
import { ServiceComm } from "../../services/service-comm.service";
import { NewDropZoneComponent } from "../new-drop-zone/new-drop-zone.component";
import { AddAction } from '../../models/add-action.enum';
import { DropZoneResp } from '../../models/dropzone';
import { DropzoneService } from '../../services/dropzone.service';
import { ServiceComm } from '../../services/service-comm.service';
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"],
selector: 'app-list-of-dzs',
templateUrl: './list-of-dzs.component.html',
styleUrls: ['./list-of-dzs.component.css'],
})
export class ListOfDzsComponent implements OnInit {
public displayedColumns: Array<string> = [
"isfavorite",
"id",
"name",
"address",
"email",
"type",
'isfavorite',
'id',
'name',
'address',
'type',
];
public dataSourceTable: MatTableDataSource<DropZoneResp>;
public resultsLength = 0;
@@ -31,7 +30,7 @@ export class ListOfDzsComponent implements OnInit {
private serviceApi: DropzoneService,
private serviceComm: ServiceComm,
public dialog: MatDialog
) {}
) { }
ngOnInit() {
this.serviceComm.refreshRequest.subscribe((action) => {
@@ -40,7 +39,7 @@ export class ListOfDzsComponent implements OnInit {
this.getListOfDropZones();
}
});
this.serviceComm.UpdatedComponentTitle("List of DZs");
this.serviceComm.UpdatedComponentTitle('List of DZs');
this.getListOfDropZones();
}
@@ -73,8 +72,8 @@ export class ListOfDzsComponent implements OnInit {
openDialogToAdd() {
this.dialog.open(NewDropZoneComponent, {
height: "400px",
width: "600px",
height: '400px',
width: '600px',
});
}
}

View File

@@ -5,10 +5,10 @@
</mat-card-header>
<mat-card-content>
<mat-tab-group mat-align-tabs="center" animationDuration="0ms">
<mat-tab label="Login with a user">
<mat-tab label="Login with a user" tabIndex="-1">
<app-login-user></app-login-user>
</mat-tab>
<mat-tab label="Create and login a user">
<mat-tab label="Create and login a user" tabIndex="-1">
<app-create-user></app-create-user>
</mat-tab>
</mat-tab-group>

View File

@@ -1,5 +1,3 @@
/* @import 'bootstrap-4.3.1.min.css'; */
html,
body {
min-height: 100vh;