-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#12 Rework all pages and add label block
- Loading branch information
1 parent
70e81c6
commit 182fdc7
Showing
16 changed files
with
343 additions
and
214 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
24 changes: 24 additions & 0 deletions
24
...eat-analyse/reportbytag/graph/reportby-label/label-progress/label-progress.component.html
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,24 @@ | ||
<div class="dd-handle" (click)="toggleChildren(label)"> | ||
<i class="fa fa-folder text-warning mr-1"></i> <span class="badge badge-primary" | ||
[style.backgroundColor]="label.label.color"> {{label.label.value}}</span> <i *ngIf="label.children" class="si" | ||
[ngClass]="{'si-arrow-right': label.expand, 'si-arrow-down': !label.expand}"></i> | ||
</div> | ||
<div class="progress"> | ||
<div class="progress-bar bg-succes" role="progressbar" [style.width]="label.values.OK+'%'" | ||
[attr.aria-valuenow]="label.values.OK" aria-valuemin="0" aria-valuemax="100"></div> | ||
<div class="progress-bar bg-danger" role="progressbar" [style.width]="label.values.KO+'%'" | ||
[attr.aria-valuenow]="label.values.KO" aria-valuemin="0" aria-valuemax="100"></div> | ||
<div class="progress-bar bg-warning" role="progressbar" [style.width]="label.values.FA+'%'" | ||
[attr.aria-valuenow]="label.values.FA" aria-valuemin="0" aria-valuemax="100"></div> | ||
<div class="progress-bar bg-warning" role="progressbar" [style.width]="label.values.NA+'%'" | ||
[attr.aria-valuenow]="label.values.NA" aria-valuemin="0" aria-valuemax="100"></div> | ||
<div class="progress-bar bg-info" role="progressbar" [style.width]="label.values.NE+'%'" | ||
[attr.aria-valuenow]="label.values.NE" aria-valuemin="0" aria-valuemax="100"></div> | ||
<div class="progress-bar bg-secondary" role="progressbar" [style.width]="label.values.CA+'%'" | ||
[attr.aria-valuenow]="label.values.CA" aria-valuemin="0" aria-valuemax="100"></div> | ||
</div> | ||
<ol class="dd-list" *ngIf="label.children && label.expand"> | ||
<li class="dd-item" data-id="23" *ngFor="let childLabel of label.children"> | ||
<app-label-progress [label]="childLabel"></app-label-progress> | ||
</li> | ||
</ol> |
Empty file.
25 changes: 25 additions & 0 deletions
25
...-analyse/reportbytag/graph/reportby-label/label-progress/label-progress.component.spec.ts
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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LabelProgressComponent } from './label-progress.component'; | ||
|
||
describe('LabelProgressComponent', () => { | ||
let component: LabelProgressComponent; | ||
let fixture: ComponentFixture<LabelProgressComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ LabelProgressComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(LabelProgressComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
24 changes: 24 additions & 0 deletions
24
.../feat-analyse/reportbytag/graph/reportby-label/label-progress/label-progress.component.ts
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,24 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-label-progress', | ||
templateUrl: './label-progress.component.html', | ||
styleUrls: ['./label-progress.component.scss'] | ||
}) | ||
export class LabelProgressComponent implements OnInit { | ||
@Input() label: any; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
/** toggleChildren | ||
* * open are collapse selected parent label | ||
* @param label label to toggle | ||
*/ | ||
toggleChildren(label) { | ||
label.expand = !((label.expand)? true : false); | ||
} | ||
|
||
} |
Oops, something went wrong.