Commit 720754aa authored by Kostas G's avatar Kostas G

Merge branch 'develop' of https://git.minedu.gov.gr/itminedu/e-eggrafes into period2

parents 4e297a20 b8405855
......@@ -1583,7 +1583,7 @@ public function getpde(Request $request)
'id' => $object->specialty_id->entity->id(),
'name' => 'Δ Λυκείου '.$object->specialty_id->entity->get('name')->value,
'size' => sizeof($studentPerSchool),
'size' => sizeof($studentPerSchoolConfir),
'sizeconfirm' => sizeof($studentPerSchoolConfir),
'categ' => $categ,
'classes' => 4,
'limitdown' => $limit,
......
......@@ -387,6 +387,7 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
/*
/*
$sCon = $this->connection->select('gel_student', 'gStudent');
$sCon->leftJoin('gel_school', 'eSchool', 'eSchool.registry_no = gStudent.lastschool_registrynumber');
$sCon->fields('gStudent', array('id','lastschool_registrynumber','nextclass', 'delapp','studentsurname' ,'fatherfirstname' ,'motherfirstname' ,'regionaddress' ,'regiontk' ,'regionarea','telnum' ,'guardian_name' ,'guardian_surname','guardian_fathername ','guardian_mothername', 'birthdate', 'lastschool_schoolname','lastschool_class','lastschool_schoolyear','directorconfirm', 'created' ,'am','second_period'))
......@@ -2763,6 +2764,7 @@ public function FindCoursesPerSchoolGel(Request $request)
$schoolid = $user->init->value;
//hard
//$schoolid = 361;
//$schoolid = 954;
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......@@ -3131,6 +3133,7 @@ public function getStudentPerSchoolGel(Request $request, $classId)
$gelId = $user->init->value;
//hard
//$gelId = 361;
//$gelId = 954;
//$this->logger->warning($gelId."kvdikos sxoleiou".$classId);
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $gelId));
$school = reset($schools);
......@@ -3270,12 +3273,13 @@ public function getStudentPerSchoolGel(Request $request, $classId)
$gelStudents = $this->entityTypeManager->getStorage('gel_student')->loadByProperties(array('id' => $studentId, 'myschool_promoted' => '6','nextclass'=>$classId));
$gelStudent = reset($gelStudents);
}
if (!$gelStudent) {
//$this->logger->warning($studentId."step3");
$gelStudents = $this->entityTypeManager->getStorage('gel_student')->loadByProperties(array('id' => $studentId, 'myschool_promoted' => '7','nextclass'=>$classId));
$gelStudent = reset($gelStudents);
}
}
$sCon = $this->connection->select('invalid_apps', 'invalid');
$sCon->fields('invalid', array('id'))
......
......@@ -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