* maintenance year selector
This commit is contained in:
parent
3ad9cc8b9e
commit
0ddd7c719d
@ -1,5 +1,9 @@
|
|||||||
<div class="ui main container">
|
<div class="ui main container">
|
||||||
<h1 class="ui dividing header">Éves karbantartási feladatok</h1>
|
<h1 class="ui dividing header">Éves karbantartási feladatok</h1>
|
||||||
|
<div class="ui two item stackable tabs menu">
|
||||||
|
<a class="item" [class.active]="year==2018" [routerLink]="['/karbantartas/teljes-lista/2018']">2018</a>
|
||||||
|
<a class="item" [class.active]="year==2019" [routerLink]="['/karbantartas/teljes-lista/2019']">2019</a>
|
||||||
|
</div>
|
||||||
<div class="ui raised segments">
|
<div class="ui raised segments">
|
||||||
<div class="ui segment" *ngFor="let group of maintenances">
|
<div class="ui segment" *ngFor="let group of maintenances">
|
||||||
<table class="ui celled striped selectable table">
|
<table class="ui celled striped selectable table">
|
||||||
@ -13,7 +17,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr *ngFor="let device of group.devices">
|
<tr *ngFor="let device of group.devices">
|
||||||
<td class="collapsing">{{device.name}}</td>
|
<td class="collapsing-off">{{device.name}}</td>
|
||||||
<td>{{device.workDescription}}</td>
|
<td>{{device.workDescription}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="date-card-holder">
|
<div class="date-card-holder">
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { RoleGuardService } from "../../auth/role-guard.service";
|
|||||||
})
|
})
|
||||||
export class ListAllMaintenancesComponent implements OnInit {
|
export class ListAllMaintenancesComponent implements OnInit {
|
||||||
|
|
||||||
|
public year: number = 2018;
|
||||||
private today: string = "";
|
private today: string = "";
|
||||||
|
|
||||||
constructor(private maintenanceManager: MaintenanceManagerService,
|
constructor(private maintenanceManager: MaintenanceManagerService,
|
||||||
@ -26,6 +27,11 @@ export class ListAllMaintenancesComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Webnapló : Éves karbantartási feladatok');
|
this.titleService.setTitle('Webnapló : Éves karbantartási feladatok');
|
||||||
|
this.route.params.subscribe((params: {
|
||||||
|
year: number
|
||||||
|
}) => {
|
||||||
|
this.year = params.year ? params.year : new Date().getFullYear();
|
||||||
|
});
|
||||||
this.route.data.subscribe((data: {
|
this.route.data.subscribe((data: {
|
||||||
maintenances: Array<DeviceGroup>,
|
maintenances: Array<DeviceGroup>,
|
||||||
}) => {
|
}) => {
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
<div class="ui main container">
|
<div class="ui main container">
|
||||||
<h1 class="ui dividing header">Karbantartási naptár</h1>
|
<h1 class="ui dividing header">Karbantartási naptár</h1>
|
||||||
|
<div class="ui two item stackable tabs menu">
|
||||||
|
<a class="item" [class.active]="year==2018" [routerLink]="['/karbantartas/naptar/2018']">2018</a>
|
||||||
|
<a class="item" [class.active]="year==2019" [routerLink]="['/karbantartas/naptar/2019']">2019</a>
|
||||||
|
</div>
|
||||||
<div class="ui raised segments">
|
<div class="ui raised segments">
|
||||||
<div class="ui segment" *ngFor="let data of maintenances">
|
<div class="ui segment" *ngFor="let data of maintenances">
|
||||||
<app-calendar [year]="year" [month]="data[0].month" [data]="data"></app-calendar>
|
<app-calendar [year]="year" [month]="data[0].month" [data]="data"></app-calendar>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user