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

capacity

parent eb1400cc
...@@ -37,6 +37,7 @@ export default class HeaderComponent implements OnInit, OnDestroy { ...@@ -37,6 +37,7 @@ export default class HeaderComponent implements OnInit, OnDestroy {
private TotalStudents$: BehaviorSubject<any>; private TotalStudents$: BehaviorSubject<any>;
private TotalStudentsSub: Subscription; private TotalStudentsSub: Subscription;
private showLoader: BehaviorSubject<boolean>; private showLoader: BehaviorSubject<boolean>;
private hasvalue: boolean;
constructor(private _ata: LoginInfoActions, constructor(private _ata: LoginInfoActions,
private _hds: HelperDataService, private _hds: HelperDataService,
...@@ -60,6 +61,7 @@ export default class HeaderComponent implements OnInit, OnDestroy { ...@@ -60,6 +61,7 @@ export default class HeaderComponent implements OnInit, OnDestroy {
this.modalHeader = new BehaviorSubject(""); this.modalHeader = new BehaviorSubject("");
this.TotalStudents$ = new BehaviorSubject([{}]); this.TotalStudents$ = new BehaviorSubject([{}]);
this.showLoader = new BehaviorSubject(false); this.showLoader = new BehaviorSubject(false);
this.hasvalue = false;
}; };
...@@ -74,19 +76,21 @@ export default class HeaderComponent implements OnInit, OnDestroy { ...@@ -74,19 +76,21 @@ export default class HeaderComponent implements OnInit, OnDestroy {
return loginInfoToken; return loginInfoToken;
}, {}); }, {});
if (this.hasvalue == false)
{
this.showLoader.next(true); this.showLoader.next(true);
this.TotalStudentsSub = this._hds.findTotalStudents().subscribe(x => { this.TotalStudentsSub = this._hds.findTotalStudents().subscribe(x => {
this.TotalStudents$.next(x); this.TotalStudents$.next(x);
this.showLoader.next(false); this.showLoader.next(false);
this.hasvalue = true;
}, },
error => { error => {
this.TotalStudents$.next([{}]); this.TotalStudents$.next([{}]);
console.log("Error Getting courses perSchool"); console.log("Error Getting courses perSchool");
this.showLoader.next(false); this.showLoader.next(false);
}); });
}
} }
......
...@@ -46,6 +46,11 @@ import { ...@@ -46,6 +46,11 @@ import {
[class.oddout]="isOdd" [class.oddout]="isOdd"
[class.evenout]="isEven" [class.selectedout]="regionActive === SchoolNames$.id" > [class.evenout]="isEven" [class.selectedout]="regionActive === SchoolNames$.id" >
<div [class.changelistcolor]= "SchoolNames$.status === false" class="col-md-12">{{SchoolNames$.name}}</div> <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" <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.oddin]="isOdd2" [class.evenin]="isEven2" [class.changecolor]="calccolor(CoursesNames$.size,CoursesNames$.limitdown)"
[class.changecolorbalck]="calccolor(CoursesNames$.limitdown, CoursesNames$.size)" [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