Commit 18aec6b5 authored by Open Source Developer's avatar Open Source Developer

rewrite controllers

parent cf136167
......@@ -103,7 +103,7 @@ epal.confirmstudents:
requirements:
_user_is_logged_in: 'TRUE'
epal.studentperschool:
path: '/epal/studentperschool/{selectId}/{classId}/{limitdown}/{limitup}'
path: '/epal/studentperschool/{classId}/{sector}/{specialit}'
options:
_auth: [ 'basic_auth' ]
defaults:
......
......@@ -159,77 +159,84 @@ class DirectorView extends ControllerBase
}
}
public function getStudentPerSchool(Request $request, $selectId, $classId, $limitdown, $limitup)
public function getStudentPerSchool(Request $request, $classId, $sector, $specialit)
{
try {
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if ($user) {
$epalId = $user->init->value;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $epalId));
$school = reset($schools);
if (!$school) {
$this->logger->warning('no access to this school='.$user->id());
return $this->respondWithStatus([
"message" => "No access to this school"
], Response::HTTP_FORBIDDEN);
}
$authToken = $request->headers->get('PHP_AUTH_USER');
$userRoles = $user->getRoles();
$userRole = '';
foreach ($userRoles as $tmpRole) {
if ($tmpRole === 'epal') {
$userRole = $tmpRole;
}
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if ($user)
{
$epalId = $user->init->value;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $epalId));
$school = reset($schools);
if (!$school)
{
$this->logger->warning('no access to this school='.$user->id());
$response = new Response();
$response->setContent('No access to this school');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
}
$userRoles = $user->getRoles();
$userRole = '';
foreach ($userRoles as $tmpRole)
{
if ($tmpRole === 'epal')
{
$userRole = $tmpRole;
}
if ($userRole === '') {
return $this->respondWithStatus([
'error_code' => 4003,
], Response::HTTP_FORBIDDEN);
} elseif ($userRole === 'epal') {
if ($classId == 1) {
$selectId = -1;
}
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('epal_id' => $epalId, 'specialization_id' => $selectId, 'currentclass' => $classId));
if ($studentPerSchool) {
$list = array();
if ($limitdown == $limitup && $limitup == 0) {
$list = array(
'id' => sizeof($studentPerSchool),
'up' => $limitup,
'down' => $limitdown,
);
} else {
$i = 0;
foreach ($studentPerSchool as $object) {
$studentId = $object->id();
$epalStudents = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id' => $studentId));
$epalStudent = reset($epalStudents);
if ($epalStudent) {
}
if ($userRole === '')
{
return $this->respondWithStatus([
'error_code' => 4003,
], Response::HTTP_FORBIDDEN);
}
elseif ($userRole === 'epal')
{
$selectIdNew = $selectId;
if ($classId == 1)
$selectIdNew = -1;
elseif ($classId == 2)
$selectIdNew = $sector;
else
$selectIdNew = $specialit;
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('currentepal' => $epalId, 'specialization_id' => $selectIdNew, 'currentclass' => $classId));
}
$i = 0;
if ($studentPerSchool)
{
$list = array();
foreach ($studentPerSchool as $object)
{
$studentId = $object->id();
$epalStudents = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id' => $studentId));
$epalStudent = reset($epalStudents);
if ($epalStudents)
{
$studentIdNew = $epalStudent->id();
$checkstatus = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('student_id' => $studentIdNew));
$checkstudentstatus = reset($checkstatus);
if ($i >= $limitdown && $i < $limitup) {
$sectorName = '';
$courseName = '';
if ($epalStudent->currentclass->value === '2') {
$sectors = $this->entityTypeManager->getStorage('epal_student_sector_field')->loadByProperties(array('student_id' => $studentIdNew));
$sector = reset($sectors);
if ($sector) {
$sectorName = $this->entityTypeManager->getStorage('eepal_sectors')->load($sector->sectorfield_id->target_id)->name->value;
}
} elseif ($epalStudent->currentclass->value === '3' || $epalStudent->currentclass->value === '4') {
$courses = $this->entityTypeManager->getStorage('epal_student_course_field')->loadByProperties(array('student_id' => $studentIdNew));
$course = reset($courses);
if ($course) {
$courseName = $this->entityTypeManager->getStorage('eepal_specialty')->load($course->coursefield_id->target_id)->name->value;
}
}
$newstatus = $checkstudentstatus->directorconfirm->value;
$sectorName = '';
$courseName = '';
if ($epalStudent->currentclass->value === '2') {
$sectors = $this->entityTypeManager->getStorage('epal_student_sector_field')->loadByProperties(array('student_id' => $studentIdNew));
$sector = reset($sectors);
if ($sector)
$sectorName = $this->entityTypeManager->getStorage('eepal_sectors')->load($sector->sectorfield_id->target_id)->name->value;
}
else if ($epalStudent->currentclass->value === '3' || $epalStudent->currentclass->value === '4') {
$courses = $this->entityTypeManager->getStorage('epal_student_course_field')->loadByProperties(array('student_id' => $studentIdNew));
$course = reset($courses);
if ($course)
$courseName = $this->entityTypeManager->getStorage('eepal_specialty')->load($course->coursefield_id->target_id)->name->value;
}
$crypt = new Crypt();
try {
......@@ -247,20 +254,7 @@ class DirectorView extends ControllerBase
$guardian_surname_decoded = $crypt->decrypt($epalStudent->guardian_surname->value);
$guardian_fathername_decoded = $crypt->decrypt($epalStudent->guardian_fathername->value);
$guardian_mothername_decoded = $crypt->decrypt($epalStudent->guardian_mothername->value);
// $name_decoded = $epalStudent->name->value;
// $studentsurname_decoded = $epalStudent->studentsurname->value;
// $fatherfirstname_decoded = $epalStudent->fatherfirstname->value;
// $motherfirstname_decoded = $epalStudent->motherfirstname->value;
// $regionaddress_decoded = $epalStudent->regionaddress->value;
// $regiontk_decoded = $epalStudent->regiontk->value;
// $regionarea_decoded = $epalStudent->regionarea->value;
// $certificatetype_decoded = $epalStudent->certificatetype->value;
// $relationtostudent_decoded = $epalStudent->relationtostudent->value;
// $telnum_decoded = $epalStudent->telnum->value;
// $guardian_name_decoded = $epalStudent->guardian_name->value;
// $guardian_surname_decoded = $epalStudent->guardian_surname->value;
// $guardian_fathername_decoded = $epalStudent->guardian_fathername->value;
// $guardian_mothername_decoded = $epalStudent->guardian_mothername->value;
} catch (\Exception $e) {
$this->logger->warning(__METHOD__ . ' Decrypt error: ' . $e->getMessage());
return $this->respondWithStatus([
......@@ -268,82 +262,62 @@ class DirectorView extends ControllerBase
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
$list[] = array(
'i' => $i,
'id' => $epalStudent->id(),
'name' => $name_decoded,
'studentsurname' => $studentsurname_decoded,
'fatherfirstname' => $fatherfirstname_decoded,
'fathersurname' => $epalStudent->fathersurname->value,
'motherfirstname' => $motherfirstname_decoded,
'mothersurname' => $epalStudent->mothersurname->value,
'guardian_name' => $guardian_name_decoded,
'guardian_surname' => $guardian_surname_decoded,
'guardian_fathername' => $guardian_fathername_decoded,
'guardian_mothername' => $guardian_mothername_decoded,
'lastschool_schoolname' => $epalStudent->lastschool_schoolname->value,
'lastschool_schoolyear' => $epalStudent->lastschool_schoolyear->value,
'lastschool_class' => $epalStudent->currentclass->value,
'currentclass' => $epalStudent->currentclass->value,
'currentsector' => $sectorName,
'currentcourse' => $courseName,
'regionaddress' => $regionaddress_decoded,
'regiontk' => $regiontk_decoded,
'regionarea' => $regionarea_decoded,
'certificatetype' => $certificatetype_decoded,
'graduation_year' => $epalStudent->graduation_year->value,
'telnum' => $telnum_decoded,
'relationtostudent' => $relationtostudent_decoded,
//'birthdate' => substr($epalStudent->birthdate->value, 8, 10) . '/' . substr($epalStudent->birthdate->value, 6, 8) . '/' . substr($epalStudent->birthdate->value, 0, 4),
'birthdate' => date("d-m-Y", strtotime($epalStudent->birthdate->value)),
'checkstatus' => $newstatus[0][value],
'created' => date('d/m/Y H:i', $epalStudent->created->value)
);
}
++$i;
}
}
}
return $this->respondWithStatus(
$list, Response::HTTP_OK);
} else {
if ($limitdown == $limitup && $limitup == 0) {
$list = [
'id' => sizeof($studentPerSchool),
'up' => $limitup,
'down' => $limitdown,
];
} else {
$list = [];
}
return $this->respondWithStatus($list, Response::HTTP_OK);
}
} else {
if ($limitdown == $limitup && $limitup == 0) {
$list = [
'id' => sizeof($studentPerSchool),
'up' => $limitup,
'down' => $limitdown,
];
} else {
$list = [];
}
return $this->respondWithStatus($list, Response::HTTP_OK);
$list[] = array(
'id' => $epalStudent->id(),
'name' => $name_decoded,
'studentsurname' => $studentsurname_decoded,
'fatherfirstname' => $fatherfirstname_decoded,
'motherfirstname' => $motherfirstname_decoded,
'guardian_name' => $guardian_name_decoded,
'guardian_surname' => $guardian_surname_decoded,
'guardian_fathername' => $guardian_fathername_decoded,
'guardian_mothername' => $guardian_mothername_decoded,
'lastschool_schoolname' => $epalStudent->lastschool_schoolname->value,
'lastschool_schoolyear' => $epalStudent->lastschool_schoolyear->value,
'lastschool_class' => $epalStudent->lastschool_class->value,
'currentclass' =>$epalStudent -> currentclass ->value,
'currentsector' =>$sectorName,
'currentcourse' =>$courseName,
'regionaddress' => $regionaddress_decoded,
'regiontk' => $regiontk_decoded,
'regionarea' => $regionarea_decoded,
'certificatetype' => $certificatetype_decoded,
'graduation_year' => $epalStudent->graduation_year->value,
'telnum' => $telnum_decoded,
'relationtostudent' => $relationtostudent_decoded,
//'birthdate' => substr($epalStudent->birthdate->value, 8, 10) . '/' . substr($epalStudent->birthdate->value, 6, 8) . '/' . substr($epalStudent->birthdate->value, 0, 4),
'birthdate' => date("d-m-Y", strtotime($epalStudent->birthdate->value)),
'checkstatus' => $checkstudentstatus -> directorconfirm ->value,
'created' => date('d/m/Y H:i', $epalStudent -> created ->value),
);
}
++$i;
}
} else {
return $this->respondWithStatus([
'message' => t('User not found!'),
return $this->respondWithStatus(
$list, Response::HTTP_OK);
}
else
{
return $this->respondWithStatus([
'message' => t('Students not found!'),
], Response::HTTP_FORBIDDEN);
}
} catch (\Exception $e) {
$this->logger->warning($e->getMessage());
}
else
{
return $this->respondWithStatus([
'message' => t('User not found!'),
], Response::HTTP_FORBIDDEN);
}
}
catch (\Exception $e)
{
$this->logger->warning($e->getMessage());
return $this->respondWithStatus([
'message' => t('Unexpected Error'),
], Response::HTTP_FORBIDDEN);
}
}
}
public function ConfirmStudents(Request $request)
......@@ -376,28 +350,53 @@ class DirectorView extends ControllerBase
$postData = json_decode($content);
$arr = $postData->students;
$type = $postData->type;
foreach ($arr as $value) {
$valnew = intval($value);
$valnew = intval($arr);
$typen = intval($type);
$studentForConfirm = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('id' => $valnew));
$studentConfirm = reset($studentForConfirm);
if ($studentConfirm) {
if ($type == 1) {
$studentConfirm->set('directorconfirm', true);
if ($typen === 1) {
$studentConfirm->set('directorconfirm', 1);
$studentConfirm->save();
return $this->respondWithStatus([
'message' => t('saved')
,
], Response::HTTP_OK);
}
if ($type == 2) {
$studentConfirm->set('directorconfirm', false);
elseif ($typen === 2) {
$studentConfirm->set('directorconfirm', 0);
$studentConfirm->save();
return $this->respondWithStatus([
'message' => t('saved')
,
], Response::HTTP_OK);
}
if ($type == 3) {
elseif ($typen === 3) {
unset($studentConfirm->{directorconfirm});
$studentConfirm->save();
return $this->respondWithStatus([
'message' => t('saved')
,
], Response::HTTP_OK);
}
else
{
return $this->respondWithStatus([
'message' => t('Bad request'),
], Response::HTTP_FORBIDDEN);
}
$studentConfirm->save();
}
}
else
{
return $this->respondWithStatus([
'message' => t('Student not found'),
], Response::HTTP_FORBIDDEN);
}
return $this->respondWithStatus([
'message' => t('saved'),
], Response::HTTP_OK);
}
} else {
return $this->respondWithStatus([
......@@ -1027,6 +1026,7 @@ class DirectorView extends ControllerBase
return $response;
}
$operation_shift = $school -> operation_shift -> value;
$userRoles = $user->getRoles();
$userRole = '';
foreach ($userRoles as $tmpRole) {
......@@ -1039,11 +1039,19 @@ class DirectorView extends ControllerBase
'error_code' => 4003,
], Response::HTTP_FORBIDDEN);
} elseif ($userRole === 'epal') {
$categ = $school->metathesis_region->value;
$list = array();
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name' => 1, 'category' => $categ));
$limitdown = reset($limit_down);
if ($limitdown) {
$limit = $limitdown->limit_down->value;
}
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('currentepal' => $schoolid, 'specialization_id' => -1, 'currentclass' => 1));
$list[] = array(
'class' => 1,
'newsector' => 0,
......@@ -1051,13 +1059,22 @@ class DirectorView extends ControllerBase
'taxi' => 'Ά Λυκείου',
'capacity' => $classcapacity->capacity_class_a->value,
'globalindex' => $i,
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
}
++$i;
$CourseB = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid));
if ($CourseB) {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name' => 2, 'category' => $categ));
$limitdown = reset($limit_down);
if ($limitdown) {
$limit = $limitdown->limit_down->value;
}
foreach ($CourseB as $object) {
$sectorid = $object->sector_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('currentepal' => $schoolid, 'specialization_id' => $sectorid, 'currentclass' => 2));
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'sector_id' => $sectorid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
......@@ -1068,6 +1085,8 @@ class DirectorView extends ControllerBase
'taxi' => 'Β Λυκείου '.$object->sector_id->entity->get('name')->value,
'capacity' => $classcapacity->capacity_class_sector->value,
'globalindex' => $i,
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
}
++$i;
......@@ -1075,8 +1094,15 @@ class DirectorView extends ControllerBase
}
$CourseC = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid));
if ($CourseC) {
foreach ($CourseC as $object) {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name' => 3, 'category' => $categ));
$limitdown = reset($limit_down);
if ($limitdown) {
$limit = $limitdown->limit_down->value;
}
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('currentepal' => $schoolid, 'specialization_id' => $specialityid, 'currentclass' => 3));
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'specialty_id' => $specialityid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
......@@ -1087,15 +1113,24 @@ class DirectorView extends ControllerBase
'taxi' => 'Γ Λυκείου '.$object->specialty_id->entity->get('name')->value,
'capacity' => $classcapacity->capacity_class_specialty->value,
'globalindex' => $i,
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
}
++$i;
}
}
if ($CourseC) {
if ($CourseC && $operation_shift != 'ΗΜΕΡΗΣΙΟ') {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name' => 4, 'category' => $categ));
$limitdown = reset($limit_down);
if ($limitdown) {
$limit = $limitdown->limit_down->value;
}
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('currentepal' => $schoolid, 'specialization_id' => $specialityid, 'currentclass' => 4));
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'specialty_id' => $specialityid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
......@@ -1106,6 +1141,8 @@ class DirectorView extends ControllerBase
'taxi' => 'Δ Λυκείου '.$object->specialty_id->entity->get('name')->value,
'capacity' => $classcapacity->capacity_class_specialty_d->value,
'globalindex' => $i,
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
}
......
......@@ -33,7 +33,7 @@ import {
επιλέξτε τη νέα δυναμική και πατήστε το σύμβολο <i>ok</i>. Προσοχή! Κανένα τμήμα δεν πρέπει να έχει δυναμική 0.</p>
<div class="row" style="margin-top: 20px; line-height: 2em;" > <b> Οι δηλώσεις σας </b></div>
<div *ngFor="let CapacityPerCourses$ of CapacityPerCourse$ | async; let i=index; let isOdd=odd; let isEven=even" >
<li *ngIf="(!(selectiontype | async) && (CapacityPerCourses$.class < 4)) ||((selectiontype | async) && (CapacityPerCourses$.class < 5))" class="list-group-item " [class.oddout]="isOdd" [class.evenout]="isEven" >
<li class="list-group-item " [class.oddout]="isOdd" [class.evenout]="isEven" >
<div class="row">
<div class="col-md-5">
<h5 [class.changelistcolor]= "CapacityPerCourses$.capacity === null" >{{CapacityPerCourses$.taxi}}&nbsp; <b></b></h5>
......@@ -212,7 +212,7 @@ import {
error => {
std[ind].capacity = oldvalue;
this.CapacityPerCourse$.next(std);
this.showLoader.next(false);
console.log("Error Saving Capacity");
},
() =>{
......
import { Component, OnInit, OnDestroy, ElementRef, ViewChild, Renderer } from "@angular/core";
import { Component, OnInit, OnDestroy, ElementRef, ViewChild} from "@angular/core";
import { Injectable } from "@angular/core";
import { AppSettings } from '../../app.settings';
import { HelperDataService } from '../../services/helper-data-service';
import { Observable } from "rxjs/Observable";
import { Http, Headers, RequestOptions } from '@angular/http';
import {Observable} from "rxjs/Observable";
import {Http, Headers, RequestOptions} from '@angular/http';
import { NgRedux, select } from 'ng2-redux';
import { IAppState } from '../../store/store';
import { Router, ActivatedRoute, Params } from '@angular/router';
import {Router, ActivatedRoute, Params} from '@angular/router';
import { BehaviorSubject, Subscription } from 'rxjs/Rx';
import { ILoginInfo } from '../../store/logininfo/logininfo.types';
import { VALID_CAPACITY_PATTERN} from '../../constants';
import {maxValue} from '../../constants';
import {minValue} from '../../constants';
import {
FormBuilder,
......@@ -18,59 +22,52 @@ import {
Validators,
} from '@angular/forms';
@Component({
selector: 'director-view',
selector: 'director-classcapacity',
template: `
<div class = "loading" *ngIf="(showLoader | async) === true"></div>
<div style="min-height: 500px;">
<form [formGroup]="formGroup">
<form [formGroup]="formGroup">
<p style="margin-top: 20px; line-height: 2em;"> Στην παρακάτω λίστα βλέπετε τα τμήματα του σχολείου σας. Κάντε κλίκ σε κάθε τμήμα για να δείτε
τους μαθητές που κατανεμίθηκαν μετά απο ηλεκτρονική δήλωση προτίμησης τους στο σχολείο σας. Προσοχή! κάποια τμήματα τα βλέπετε με κόκκινο χρώμα. Τους μαθητές των
τμημάτων αυτών δεν μπορείτε ακόμα να τους εγγράψετε επισήμως στο σχολείο σας. Εκκρεμμεί η έγκριση λειτουργίας των τμημάτων αυτών. </p>
<div class="row" style="margin-top: 20px; line-height: 2em;" > <b> Τα τμήματα του σχολείου σας. </b></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, CoursesPerSchools$.newsector, CoursesPerSchools$.newspecialit)"
[class.changelistcolor]= "CoursesPerSchools$.size < CoursesPerSchools$.limitdown"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === i" >
<h5 >{{CoursesPerSchools$.taxi}}&nbsp; <b></b></h5>
</li>
<div [hidden]="courseActive !== i" *ngIf="(retrievedStudent | async)">
<div *ngFor="let StudentDetails$ of StudentInfo$ | async; let j=index; let isOdd=odd; let isEven=even" class="row list-group-item isclickable"
[class.selectedappout]="StudentActive === j"
[class.confirmed]="StudentDetails$.checkstatus === '1'"
[class.notconfirmed]="StudentDetails$.checkstatus === '0'"
[class.notchecked]="(StudentDetails$.checkstatus !== '1') && (StudentDetails$.checkstatus !== '0')"
[class.oddout]="isOdd" [class.evenout]="isEven" style="margin: 0px 2px 0px 2px;">
<div class="col-md-4" style="font-size: 0.8em; font-weight: bold;" (click) ="setActiveStudent(j)" >{{StudentDetails$.studentsurname}}</div>
<div class="col-md-4" style="font-size: 0.8em; font-weight: bold;" (click) ="setActiveStudent(j)">{{StudentDetails$.name}}</div>
<div [hidden]="StudentActive !== j" class="col-md-2" style="color: black;" *ngIf = "opened == true"> <span aria-hidden="true"><i class="fa fa-close" (click) ="setActiveStudentnew(j)"></i></span> </div>
<label for="taxi">Τάξη</label><br/>
<div class="form-group">
<select #txoption class="form-control" (change)="verifyclass(txoption)" formControlName="taxi">
<option value="1" >Α' Λυκείου</option>
<option value="2" >Β' Λυκείου</option>
<option value="3" >Γ' Λυκείου</option>
<option *ngIf="(selectiontype | async)" value="4" >Δ' Λυκείου</option>
</select>
</div>
<div class="form-group">
<select #tmop class="form-control" *ngIf="(selectionBClass | async)" (change)="checkbclass(tmop,txoption)" formControlName="tomeas">
<option *ngFor="let SectorSelection$ of StudentSelected$ | async; let i=index" [value] = "SectorSelection$.id"> {{SectorSelection$.sector_id}} </option>
</select>
</div>
<div class="form-group">
<select #spop class="form-control" *ngIf="(selectionCClass | async)" (change) ="checkcclass()" formControlName="specialit">
<option *ngFor="let SpecialSelection$ of StudentSelectedSpecial$ | async; let i=index" [value] = "SpecialSelection$.id"> {{SpecialSelection$.specialty_id}} </option>
</select>
</div>
<button type="button" class="btn-primary btn-sm pull-right" (click)="findstudent(txoption,1)">
Αναζήτηση
</button>
<br>
<br>
<div *ngIf="(retrievedStudent | async)">
<div *ngFor="let StudentDetails$ of StudentInfo$ | async; let i=index; let isOdd=odd; let isEven=even" class="row list-group-item isclickable" [class.oddout]="isOdd" [class.evenout]="isEven" (click)="setActiveUser(StudentDetails$.i)"
[class.selectedappout]="userActive === StudentDetails$.i" [class.confirmed]="StudentDetails$.checkstatus === '1'"
[class.notconfirmed]="StudentDetails$.checkstatus === '0'" [class.notchecked]="(StudentDetails$.checkstatus !== '1') && (StudentDetails$.checkstatus !== '0')" style="margin: 0px 2px 0px 2px;">
<div class="col-md-6" style="font-size: 0.8em; font-weight: bold;">{{StudentDetails$.studentsurname}}</div>
<div class="col-md-6" style="font-size: 0.8em; font-weight: bold;">{{StudentDetails$.name}}</div>
<div style="width: 100%; color: #000000;">
<div [hidden]="userActive !== StudentDetails$.i" style="margin: 20px 10px 10px 10px;">
<div style="width: 100%; color: #000000;">
<div [hidden]="StudentActive !== j" style="margin: 20px 10px 10px 10px;">
<p style="margin-top: 20px; line-height: 2em;"> Παρακαλούμε, αφού γίνει ο έλεγχος των στοιχείων του μαθητή επιβεβαιώστε τη δυνατότητα εγγραφής του.</p>
<div class="row" style="margin-bottom: 20px;">
<div class="col-md-6">