Commit b8405855 authored by Νίκος Κατσαούνος's avatar Νίκος Κατσαούνος

Merge branch 'adminVersion' into 'develop'

Admin version

See merge request !148
parents 041fa4ee b7f4a05f
......@@ -61,7 +61,7 @@ import { HelperDataService } from "../../services/helper-data-service";
</div>
<div *ngFor="let CoursesPerSchools$ of CoursesPerSchool$ | async; let i=index; let isOdd=odd; let isEven=even" >
<li class="list-group-item isclickable" (click)="setActive(i)"
(click)="findstudent(CoursesPerSchools$.class)"
(click)="findstudent(CoursesPerSchools$.class, courseActive, i)"
[class.changelistcolor]= "CoursesPerSchools$.size < CoursesPerSchools$.limitdown"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === i" >
<div class="row" style="line-height: 2em;">
......@@ -360,27 +360,31 @@ import { HelperDataService } from "../../services/helper-data-service";
});
}
findstudent(taxi) {
findstudent(taxi, courseActive, i) {
this.showLoader.next(true);
this.dynamicCount.next("");
this.retrievedStudent.next(false);
this.StudentInfoSub = this._hds.getStudentPerSchoolGel(taxi)
.subscribe(data => {
this.StudentInfo$.next(data);
this.retrievedStudent.next(true);
this.showLoader.next(false);
this.dynamicCount.next(data.length);
},
error => {
this.StudentInfo$.next([{}]);
console.log("Error Getting Students");
this.showLoader.next(false);
if (error.status === 404) {
this.showModal("#emptyselection");
} else {
this.showModal("#errorselection");
}
});
if (courseActive == i) {
this.StudentInfoSub = this._hds.getStudentPerSchoolGel(taxi)
.subscribe(data => {
this.StudentInfo$.next(data);
this.retrievedStudent.next(true);
this.showLoader.next(false);
this.dynamicCount.next(data.length);
},
error => {
this.StudentInfo$.next([{}]);
console.log("Error Getting Students");
this.showLoader.next(false);
if (error.status === 404) {
this.showModal("#emptyselection");
} else {
this.showModal("#errorselection");
}
});
}
else
this.showLoader.next(false);
}
......
......@@ -29,7 +29,7 @@ import { IAppState } from "../../store/store";
</div>
</div>
<div style="min-height: 500px;">
<form>
......@@ -40,7 +40,7 @@ import { IAppState } from "../../store/store";
<div class="col-md-12">{{PdeNames$.name}}!</div>
</li>
<div *ngFor="let SchoolNames$ of SchoolsPerPerf$ | async; let i=index; let isOdd=odd; let isEven=even" style="font-size: 0.8em; font-weight: bold;" [hidden]="PdeNames$.id !== pdeActive">
<li class="list-group-item isclickable" (click)="setActiveRegion(SchoolNames$.id)"
[class.oddout]="isOdd"
......@@ -84,10 +84,10 @@ import { IAppState } from "../../store/store";
</form>
</div>
......@@ -115,13 +115,13 @@ import { IAppState } from "../../store/store";
private loginInfoSub: Subscription;
private Pde$: BehaviorSubject<any>;
private PdeSub: Subscription;
constructor(
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService,
private activatedRoute: ActivatedRoute,
private router: Router)
private router: Router)
{
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.SchoolsPerPerf$ = new BehaviorSubject([{}]);
......@@ -139,7 +139,7 @@ import { IAppState } from "../../store/store";
}
ngOnInit() {
(<any>$("#informationfeedback")).appendTo("body");
this.loginInfoSub = this._ngRedux.select("loginInfo")
......@@ -180,10 +180,10 @@ import { IAppState } from "../../store/store";
(<any>$("#informationfeedback")).appendTo("body");
if (ind === this.pdeActive) {
ind = -1;
}
this.pdeActive = ind;
this.showLoader.next(true);
this.SchoolPerPerfSub = this._hds.getSchoolsMinistry(ind, this.minedu_userName, this.minedu_userPassword)
.subscribe(data => {
......@@ -203,7 +203,7 @@ import { IAppState } from "../../store/store";
calccolor(size, limit) {
console.log(size, limit, "oria");
//console.log(size, limit, "oria");
if (size < limit)
return true;
else
......
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