-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TSK-843: replaced table tag with div table and refactored styles
- Loading branch information
1 parent
ced5929
commit 91392c9
Showing
19 changed files
with
216 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
<div class="row report" *ngIf="reportData"> | ||
<div class="col-sm-12" style="margin-bottom: 10px"> | ||
<table class="table table-responsive table-condensed table-striped"> | ||
<thead> | ||
<tr> | ||
<th>{{reportData.meta.rowDesc}}</th> | ||
<th class="align-center" *ngFor="let header of reportData.meta.header"> | ||
{{header}}</th> | ||
<th class="align-center">{{reportData.meta.totalDesc}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let row of reportData.rows | mapToIterable | orderBy:['key']"> | ||
<td>{{row.key}}</td> | ||
<td *ngFor="let header of reportData.meta.header" class="align-center">{{row.val.cells[header]}}</td> | ||
<th class="align-center">{{row.val.total}}</th> | ||
</tr> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th>{{reportData.meta.totalDesc}}</th> | ||
<th *ngFor="let header of reportData.meta.header" class="align-center">{{reportData.sumRow.cells[header]}}</th> | ||
<th class="align-center">{{reportData.sumRow.total}}</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
<div *ngIf="reportData" class="report table table-striped"> | ||
<div class="table-header"> | ||
<div class="table-row"> | ||
<div class="table-cell--bold table-cell--justify">{{reportData.meta.rowDesc}}</div> | ||
<div *ngFor="let header of reportData.meta.header" class="table-cell--bold">{{header}}</div> | ||
<div class="table-cell--bold">{{reportData.meta.totalDesc}}</div> | ||
</div> | ||
</div> | ||
<div class="table-body"> | ||
<div *ngFor="let row of reportData.rows | mapToIterable | orderBy:['key']" [headers]="reportData.meta.header" | ||
[row]="row" class="table-row" monitor-report-row> | ||
</div> | ||
</div> | ||
<div class="table-footer"> | ||
<div class="table-row"> | ||
<div class="table-cell--bold table-cell--justify"> | ||
{{reportData.meta.totalDesc}} | ||
</div> | ||
<div *ngFor="let header of reportData.meta.header" class="table-cell--bold"> | ||
{{reportData.sumRow.cells[header]}} | ||
</div> | ||
<div class="table-cell--bold"> | ||
{{reportData.sumRow.total}} | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.report{ | ||
padding-top: 20px; | ||
} | ||
.report { | ||
margin-top: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<ng-container *ngIf="headers && row"> | ||
<div (click)="toggleFold()" class="table-cell table-cell--justify"> | ||
{{row.key}} | ||
</div> | ||
<div *ngFor="let header of headers" class="table-cell"> | ||
{{row.val.cells[header]}} | ||
</div> | ||
<div class="table-cell--bold"> | ||
{{row.val.total}} | ||
</div> | ||
</ng-container> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; | ||
import {ReportInfoDataIterable} from "../../models/report-info-data"; | ||
|
||
@Component({ | ||
selector: '[monitor-report-row]', | ||
templateUrl: './row.component.html', | ||
styleUrls: ['./row.component.scss'] | ||
}) | ||
export class ReportRowComponent implements OnInit { | ||
|
||
@Output() | ||
expand: EventEmitter<boolean> = new EventEmitter<boolean>(); | ||
@Input() | ||
headers: Array<string>; | ||
expanded = false; | ||
foldable: boolean; | ||
|
||
constructor() { | ||
} | ||
|
||
private _row: ReportInfoDataIterable; | ||
|
||
get row(): ReportInfoDataIterable { | ||
return this._row; | ||
} | ||
|
||
@Input() set row(row: ReportInfoDataIterable) { | ||
this._row = row; | ||
this.foldable = !!row.val.foldableRows; | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
toggleFold() { | ||
if (this.foldable) { | ||
this.expanded = !this.expanded; | ||
this.expand.emit(this.expanded); | ||
} | ||
} | ||
} |
Oops, something went wrong.