2-3 changements d'affichage dans les tableaux
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
<ng-container matColumnDef="isfavorite">
|
||||
<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="Favorite" *ngIf="element.isFavorite === true"
|
||||
(click)="removeToFavorite(element)" color="primary" style="cursor: pointer;">favorite</mat-icon>
|
||||
<mat-icon aria-hidden="false" aria-label="Not favorite" *ngIf="element.isFavorite === false"
|
||||
(click)="setToFavorite(element)">favorite_border</mat-icon>
|
||||
(click)="setToFavorite(element)" style="cursor: pointer;">favorite_border</mat-icon>
|
||||
|
||||
<a href='http://{{element.website}}' target="_blank">
|
||||
<mat-icon aria-hidden="false" aria-label="URL to the DZ website">link</mat-icon>
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
<div class="content">
|
||||
<div *ngIf="dataSourceTable != null else loading">
|
||||
<table mat-table [dataSource]="dataSourceTable">
|
||||
<ng-container matColumnDef="infos">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element" style="text-align: left; cursor: pointer;">
|
||||
<mat-icon aria-hidden="false" aria-label="All informations of the jump">info</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef>ID</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.id}}</td>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import { Component, OnInit, ViewChild } from "@angular/core";
|
||||
import { MatPaginator } from "@angular/material/paginator";
|
||||
import { MatTableDataSource } from "@angular/material/table";
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
import { Observable } from "rxjs";
|
||||
import { JumpResp } from "../../models/jump";
|
||||
import { JumpService } from "../../services/jump.service";
|
||||
import { ServiceComm } from "../../services/service-comm.service";
|
||||
import { Observable } from 'rxjs';
|
||||
import { JumpResp } from '../../models/jump';
|
||||
import { JumpService } from '../../services/jump.service';
|
||||
import { ServiceComm } from '../../services/service-comm.service';
|
||||
|
||||
@Component({
|
||||
selector: "app-list-of-jumps",
|
||||
templateUrl: "./list-of-jumps.component.html",
|
||||
styleUrls: ["./list-of-jumps.component.css"]
|
||||
selector: 'app-list-of-jumps',
|
||||
templateUrl: './list-of-jumps.component.html',
|
||||
styleUrls: ['./list-of-jumps.component.css']
|
||||
})
|
||||
export class ListOfJumpsComponent implements OnInit {
|
||||
public listOfJumps: Observable<Array<JumpResp>>;
|
||||
public displayedColumns: Array<string> = [
|
||||
"id",
|
||||
"jumpDate",
|
||||
"jumpType",
|
||||
"aircraft",
|
||||
"dropZone",
|
||||
"gear"
|
||||
'infos',
|
||||
'id',
|
||||
'jumpDate',
|
||||
'jumpType',
|
||||
'aircraft',
|
||||
'dropZone'
|
||||
];
|
||||
public dataSourceTable;
|
||||
public resultsLength = 0;
|
||||
@@ -29,10 +29,10 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
constructor(
|
||||
private serviceApi: JumpService,
|
||||
private serviceComm: ServiceComm
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.UpdatedComponentTitle("List of jumps");
|
||||
this.serviceComm.UpdatedComponentTitle('List of jumps');
|
||||
this.getListOfJumps();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
<mat-autocomplete #autoDropZone="matAutocomplete" [displayWith]="displayFn">
|
||||
<mat-option *ngFor="let dropZone of listOfFilteredDropZone" [value]="dropZone">
|
||||
{{dropZone.name}}
|
||||
<img src="../../assets/img/favorite.png" alt="favorite DZ" *ngIf="dropZone.isFavorite === true"
|
||||
style="width: 16px;">
|
||||
<mat-icon aria-hidden="false" aria-label="Favorite" *ngIf="dropZone.isFavorite === true" color="primary">
|
||||
favorite</mat-icon>
|
||||
</mat-option>
|
||||
</mat-autocomplete>
|
||||
<button mat-button *ngIf="selectedDz" matSuffix mat-icon-button aria-label="Clear" (click)="selectedDz=undefined">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: "https://divelog.sebastienandre.com",
|
||||
apiUrl: 'https://divelog.sebastienandre.com',
|
||||
debugMode: false,
|
||||
version: "0.6.0",
|
||||
version: '0.7.0',
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: "http://localhost:5000",
|
||||
apiUrl: 'http://localhost:5000',
|
||||
debugMode: false,
|
||||
version: "0.6.0",
|
||||
version: '0.7.0',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user