Commit b639a502 authored by Open Source Developer's avatar Open Source Developer

capacity

parent eb1400cc
......@@ -37,6 +37,7 @@ export default class HeaderComponent implements OnInit, OnDestroy {
private TotalStudents$: BehaviorSubject<any>;
private TotalStudentsSub: Subscription;
private showLoader: BehaviorSubject<boolean>;
private hasvalue: boolean;
constructor(private _ata: LoginInfoActions,
private _hds: HelperDataService,
......@@ -60,6 +61,7 @@ export default class HeaderComponent implements OnInit, OnDestroy {
this.modalHeader = new BehaviorSubject("");
this.TotalStudents$ = new BehaviorSubject([{}]);
this.showLoader = new BehaviorSubject(false);
this.hasvalue = false;
};
......@@ -74,19 +76,21 @@ export default class HeaderComponent implements OnInit, OnDestroy {
return loginInfoToken;
}, {});
if (this.hasvalue == false)
{
this.showLoader.next(true);
this.TotalStudentsSub = this._hds.findTotalStudents().subscribe(x => {
this.TotalStudents$.next(x);
this.showLoader.next(false);
},
this.hasvalue = true;
},
error => {
this.TotalStudents$.next([{}]);
console.log("Error Getting courses perSchool");
this.showLoader.next(false);
});
}
}
......
......@@ -46,6 +46,11 @@ import {
[class.oddout]="isOdd"
[class.evenout]="isEven" [class.selectedout]="regionActive === SchoolNames$.id" >
<div [class.changelistcolor]= "SchoolNames$.status === false" class="col-md-12">{{SchoolNames$.name}}</div>
<div class = "row" [hidden]="SchoolNames$.id !== regionActive" style="margin: 0px 2px 0px 2px;">
<div class="col-md-8">Τμήματα</div>
<div class="col-md-2">Επιλεχθέντες</div>
<div class="col-md-2">Χωρητικότητα</div>
</div>
<div class = "row" *ngFor="let CoursesNames$ of CoursesPerPerf$ | async; let j=index; let isOdd2=odd; let isEven2=even"
[class.oddin]="isOdd2" [class.evenin]="isEven2" [class.changecolor]="calccolor(CoursesNames$.size,CoursesNames$.limitdown)"
[class.changecolorbalck]="calccolor(CoursesNames$.limitdown, CoursesNames$.size)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment