diff --git a/Front/skydivelogs-app/src/app/app.component.css b/Front/skydivelogs-app/src/app/app.component.css index adb9cc8..667ef05 100644 --- a/Front/skydivelogs-app/src/app/app.component.css +++ b/Front/skydivelogs-app/src/app/app.component.css @@ -1,8 +1,11 @@ +body { + margin: 10px; +} + .hamburger__icon { position: relative; z-index: 50; height: 1rem; - /*padding: 0.5rem 1.5rem;*/ margin-right: 1rem; cursor: pointer; fill: #ffff; diff --git a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html index a3ecb3e..9e9b53f 100644 --- a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html +++ b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.html @@ -1,10 +1,15 @@ -

- list-of-aircrafts works! -

+ + + + + -
ID{{element.id}}
- - - - + + + + + + +
{{ aircraft.id }}{{ aircraft.name }}
Name{{element.name}}
+ diff --git a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts index 56d35b2..5198550 100644 --- a/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-aircrafts/list-of-aircrafts.component.ts @@ -1,4 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; + import { AircraftResp } from '../../models/aircraft'; import { ServiceApi } from '../../services/serviceApi'; import { ServiceComm } from '../../services/serviceComm'; @@ -10,6 +13,9 @@ import { ServiceComm } from '../../services/serviceComm'; }) export class ListOfAircraftsComponent implements OnInit { public listOfAircrafts: Array = new Array(); + public displayedColumns: Array = ['id', 'name']; + public dataSourceTable = new MatTableDataSource(); + @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; constructor(private serviceApi: ServiceApi, private serviceComm: ServiceComm) { } @@ -21,6 +27,10 @@ export class ListOfAircraftsComponent implements OnInit { getListOfAircrafts() { this.serviceApi.getListOfAircrafts() - .subscribe(data => this.listOfAircrafts = data); + .subscribe(data => { + this.listOfAircrafts = data; + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + }); } } diff --git a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html index 5ec4837..3762698 100644 --- a/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html +++ b/Front/skydivelogs-app/src/app/list-of-dzs/list-of-dzs.component.html @@ -1,7 +1,3 @@ -

- list-of-dzs works! -

- diff --git a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html index a56ff26..9e9b53f 100644 --- a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html +++ b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.html @@ -1,10 +1,15 @@ -

- list-of-jump-types works! -

+
ID
+ + + + -
ID{{element.id}}
- - - - + + + + + + +
{{ jumpType.id }}{{ jumpType.name }}
Name{{element.name}}
+ diff --git a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts index 9680885..8e7ab02 100644 --- a/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-jump-types/list-of-jump-types.component.ts @@ -1,4 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; + import { JumpTypeResp } from '../../models/jumpType'; import { ServiceApi } from '../../services/serviceApi'; import { ServiceComm } from '../../services/serviceComm'; @@ -10,6 +13,9 @@ import { ServiceComm } from '../../services/serviceComm'; }) export class ListOfJumpTypesComponent implements OnInit { public listOfJumpTypes: Array = new Array(); + public displayedColumns: Array = ['id', 'name']; + public dataSourceTable = new MatTableDataSource(); + @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; constructor(private serviceApi: ServiceApi, private serviceComm: ServiceComm) { } @@ -21,6 +27,10 @@ export class ListOfJumpTypesComponent implements OnInit { getListOfJumpTypes() { this.serviceApi.getListOfJumpTypes() - .subscribe(data => this.listOfJumpTypes = data); + .subscribe(data => { + this.listOfJumpTypes = data; + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + }); } } diff --git a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html index 4731ee7..ec937cb 100644 --- a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html +++ b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.html @@ -1,10 +1,10 @@ -

- list-of-jumps works! -

+ + + + + - -
ID{{element.id}}
- - - + +
{{ jump.id }}
+ diff --git a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts index 2828785..56efa16 100644 --- a/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts +++ b/Front/skydivelogs-app/src/app/list-of-jumps/list-of-jumps.component.ts @@ -1,4 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +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 { ServiceApi } from '../../services/serviceApi'; @@ -12,6 +15,9 @@ import { ServiceComm } from '../../services/serviceComm'; }) export class ListOfJumpsComponent implements OnInit { public listOfJumps: Observable>; + public displayedColumns: Array = ['id']; + public dataSourceTable; + @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; constructor(private serviceApi: ServiceApi, private serviceComm: ServiceComm) { } @@ -23,5 +29,9 @@ export class ListOfJumpsComponent implements OnInit { getListOfJumps() { this.listOfJumps = this.serviceApi.getListOfJumps(); + this.listOfJumps.subscribe(data => { + this.dataSourceTable = new MatTableDataSource(data); + this.dataSourceTable.paginator = this.paginator; + }); } }