Commit aed2015c authored by Χάρης Παπαδόπουλος's avatar Χάρης Παπαδόπουλος
Browse files

Merge branch 'component_updates' into 'develop'

Component updates

See merge request !62
parents 1bbf8690 56c4bfb5
...@@ -78,10 +78,12 @@ epal.demo_data: ...@@ -78,10 +78,12 @@ epal.demo_data:
_access: 'TRUE' _access: 'TRUE'
epal.allocation: epal.allocation:
path: '/epal/distribution' path: '/epal/distribution'
options:
_auth: [ 'basic_auth' ]
defaults: defaults:
_controller: '\Drupal\epal\Controller\Distribution::createDistribution' _controller: '\Drupal\epal\Controller\Distribution::createDistribution'
requirements: requirements:
_access: 'TRUE' _user_is_logged_in: 'TRUE'
sectorperschool: sectorperschool:
path: '/epal/sectorperSchool/{epalId}' path: '/epal/sectorperSchool/{epalId}'
options: options:
...@@ -130,3 +132,19 @@ epal.ministry.log_in_go: ...@@ -130,3 +132,19 @@ epal.ministry.log_in_go:
_controller: '\Drupal\epal\Controller\MinistryLogin::loginGo' _controller: '\Drupal\epal\Controller\MinistryLogin::loginGo'
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.log_out_go:
path: '/ministry/logout'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\MinistryLogin::logoutGo'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.general_report:
path: '/ministry/general-report'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\Distribution::makegGeneralReport'
requirements:
_user_is_logged_in: 'TRUE'
...@@ -73,15 +73,37 @@ class Distribution extends ControllerBase { ...@@ -73,15 +73,37 @@ class Distribution extends ControllerBase {
$numDistributions = 3; $numDistributions = 3;
$sizeOfBlock = 100000; $sizeOfBlock = 100000;
/* //POST method is checked
if (!$request->isMethod('POST')) { if (!$request->isMethod('POST')) {
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("Method Not Allowed") "message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED); ], Response::HTTP_METHOD_NOT_ALLOWED);
} }
*/
//user validation
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if (!$user) {
return $this->respondWithStatus([
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
//user role validation
$roles = $user->getRoles();
$validRole = false;
foreach ($roles as $role)
if ($role === "ministry") {
$validRole = true;
break;
}
if (!$validRole) {
return $this->respondWithStatus([
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
//clearDistributionResults();
$transaction = $this->connection->startTransaction(); $transaction = $this->connection->startTransaction();
...@@ -91,18 +113,18 @@ class Distribution extends ControllerBase { ...@@ -91,18 +113,18 @@ class Distribution extends ControllerBase {
$this->connection->delete('epal_student_class')->execute(); $this->connection->delete('epal_student_class')->execute();
$limitUp_class = $this->retrieveCapacityLimitUp("Α"); $limitUp_class = $this->retrieveCapacityLimitUp("Α");
print_r("<br> ΑΝΩΤΑΤΟ ΟΡΙΟ ΜΑΘΗΤΩΝ: " . $limitUp_class); //print_r("<br> ΑΝΩΤΑΤΟ ΟΡΙΟ ΜΑΘΗΤΩΝ: " . $limitUp_class);
while ($this->choice_id <= $numDistributions) { while ($this->choice_id <= $numDistributions) {
print_r("<br>ΠΕΡΑΣΜΑ: " . $this->choice_id); //print_r("<br>ΠΕΡΑΣΜΑ: " . $this->choice_id);
//υπολογισμός πλήθους non-finalized αιτήσεων για να καθοριστεί ο αριθμός των fetches που θα κάνουμε με συγκεκριμένο sizeOfBlock //υπολογισμός πλήθους non-finalized αιτήσεων για να καθοριστεί ο αριθμός των fetches που θα κάνουμε με συγκεκριμένο sizeOfBlock
if ($this->choice_id === 1) { if ($this->choice_id === 1) {
$sCon = $this->connection->select('epal_student', 'eStudent') $sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id')); ->fields('eStudent', array('id'));
$numData = $sCon->countQuery()->execute()->fetchField(); $numData = $sCon->countQuery()->execute()->fetchField();
print_r("<br>numData: " . $numData); //print_r("<br>numData: " . $numData);
} }
$j = 1; $j = 1;
...@@ -110,7 +132,7 @@ class Distribution extends ControllerBase { ...@@ -110,7 +132,7 @@ class Distribution extends ControllerBase {
if ($this->choice_id === 1) { if ($this->choice_id === 1) {
while ($num <= $numData) { while ($num <= $numData) {
print_r("<br>FETCH: " . $j); //print_r("<br>FETCH: " . $j);
$sCon = $this->connection->select('epal_student', 'eStudent') $sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id', 'name', 'currentclass', 'currentepal', 'points')) ->fields('eStudent', array('id', 'name', 'currentclass', 'currentepal', 'points'))
->condition('eStudent.id', 1+ $sizeOfBlock*($j-1), '>=') ->condition('eStudent.id', 1+ $sizeOfBlock*($j-1), '>=')
...@@ -131,9 +153,6 @@ class Distribution extends ControllerBase { ...@@ -131,9 +153,6 @@ class Distribution extends ControllerBase {
->condition('eStudent.id', $this->pendingStudents, 'IN'); ->condition('eStudent.id', $this->pendingStudents, 'IN');
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ); $epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
//foreach ($epalStudents as $x)
// print_r("<br> TEST:" . $x->id . " ");
$this->locateStudent($this->choice_id, $epalStudents); $this->locateStudent($this->choice_id, $epalStudents);
} }
else { //αν δεν υπάρχουν εκκρεμότητες, μην συνεχίζεις με άλλο πέρασμα else { //αν δεν υπάρχουν εκκρεμότητες, μην συνεχίζεις με άλλο πέρασμα
...@@ -177,6 +196,7 @@ class Distribution extends ControllerBase { ...@@ -177,6 +196,7 @@ class Distribution extends ControllerBase {
} //end while } //end while
} //end try } //end try
catch (\Exception $e) { catch (\Exception $e) {
...@@ -187,9 +207,26 @@ class Distribution extends ControllerBase { ...@@ -187,9 +207,26 @@ class Distribution extends ControllerBase {
], Response::HTTP_INTERNAL_SERVER_ERROR); ], Response::HTTP_INTERNAL_SERVER_ERROR);
} }
//return new RedirectResponse($this->redirectUrl . '?auth_token=' . $epalToken.'&auth_role=director', 302, []);
//return new RedirectResponse("../eepal/dist/#/minister/minister-view");
/*
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("Distribution has made successfully") "message" => t("Distribution has made successfully")
], Response::HTTP_OK); ], Response::HTTP_OK);
*/
$postData = null;
if ($content = $request->getContent()) {
$postData = json_decode($content);
return $this->respondWithStatus([
'message' => "Distribution has made successfu",
], Response::HTTP_OK);
}
else {
return $this->respondWithStatus([
'message' => t("post with no data"),
], Response::HTTP_BAD_REQUEST);
}
} }
...@@ -204,8 +241,8 @@ class Distribution extends ControllerBase { ...@@ -204,8 +241,8 @@ class Distribution extends ControllerBase {
try { try {
foreach ($epalStudents as $epalStudent) { foreach ($epalStudents as $epalStudent) {
print_r("<br>ΚΑΤΑΝΟΜΗ ΜΑΘΗΤΩΝ ΝΟ: " . $choice_id); //print_r("<br>ΚΑΤΑΝΟΜΗ ΜΑΘΗΤΩΝ ΝΟ: " . $choice_id);
print_r("<br>ΜΑΘΗΤΗΣ: " . $epalStudent->id); //print_r("<br>ΜΑΘΗΤΗΣ: " . $epalStudent->id);
$clCon = $this->connection->select('epal_student_epal_chosen', 'epals') $clCon = $this->connection->select('epal_student_epal_chosen', 'epals')
->fields('epals', array('student_id', 'epal_id', 'choice_no')) ->fields('epals', array('student_id', 'epal_id', 'choice_no'))
...@@ -215,7 +252,7 @@ class Distribution extends ControllerBase { ...@@ -215,7 +252,7 @@ class Distribution extends ControllerBase {
if (sizeof($epalSchoolsChosen) !== 0) { if (sizeof($epalSchoolsChosen) !== 0) {
$epalSchoolChos = reset($epalSchoolsChosen); $epalSchoolChos = reset($epalSchoolsChosen);
print_r(" SCHOOL_ID:" . $epalSchoolChos->epal_id . " STUDENT_ID " . $epalStudent->id); //print_r(" SCHOOL_ID:" . $epalSchoolChos->epal_id . " STUDENT_ID " . $epalStudent->id);
$epal_dist_id = $epalSchoolChos->epal_id; $epal_dist_id = $epalSchoolChos->epal_id;
if ($epalStudent->currentclass === "2") { if ($epalStudent->currentclass === "2") {
...@@ -316,7 +353,7 @@ class Distribution extends ControllerBase { ...@@ -316,7 +353,7 @@ class Distribution extends ControllerBase {
->condition('studentClass.specialization_id', $secCourId, '='); ->condition('studentClass.specialization_id', $secCourId, '=');
$epalStudentClass = $clCon->execute()->fetchAll(\PDO::FETCH_OBJ); $epalStudentClass = $clCon->execute()->fetchAll(\PDO::FETCH_OBJ);
print_r("<br> ΣΧΟΛΕΙΟ: " . $epalId . " ΤΑΞΗ: " . $classId . " ΤΟΜΕΑΣ/ΕΙΔΙΚΟΤΗΤΑ: " . $secCourId . " ΧΩΡΗΤΙΚΟΤΗΤΑ: " . sizeof($epalStudentClass)); //print_r("<br> ΣΧΟΛΕΙΟ: " . $epalId . " ΤΑΞΗ: " . $classId . " ΤΟΜΕΑΣ/ΕΙΔΙΚΟΤΗΤΑ: " . $secCourId . " ΧΩΡΗΤΙΚΟΤΗΤΑ: " . sizeof($epalStudentClass));
//ΕΠΙΠΛΕΟΝ ΕΠΙΠΕΔΟ ΑΣΦΑΛΕΙΑΣ: αν δεν υπάρχει ο συγκεκριμένος τομέας/ειδικότητα στο σχολείο //ΕΠΙΠΛΕΟΝ ΕΠΙΠΕΔΟ ΑΣΦΑΛΕΙΑΣ: αν δεν υπάρχει ο συγκεκριμένος τομέας/ειδικότητα στο σχολείο
//ο μαθητής που τοποθετήθηκε με την locateStudent να διαγραφεί //ο μαθητής που τοποθετήθηκε με την locateStudent να διαγραφεί
...@@ -337,7 +374,7 @@ class Distribution extends ControllerBase { ...@@ -337,7 +374,7 @@ class Distribution extends ControllerBase {
$limit = $limitup * $capacity; $limit = $limitup * $capacity;
if (sizeof($epalStudentClass) > $limit) { if (sizeof($epalStudentClass) > $limit) {
print_r("<br>ΥΠΕΡΧΕΙΛΙΣΗ!"); //print_r("<br>ΥΠΕΡΧΕΙΛΙΣΗ!");
foreach ($epalStudentClass as $epalStudCl) { foreach ($epalStudentClass as $epalStudCl) {
//Υπολογισμός μορίων του μαθητή και (πιθανή) αποθήκευσή τους //Υπολογισμός μορίων του μαθητή και (πιθανή) αποθήκευσή τους
//ΣΗΜΕΙΩΣΗ: Ο υπoλογισμός γίνεται στο front-end //ΣΗΜΕΙΩΣΗ: Ο υπoλογισμός γίνεται στο front-end
...@@ -395,7 +432,7 @@ class Distribution extends ControllerBase { ...@@ -395,7 +432,7 @@ class Distribution extends ControllerBase {
foreach($students as $student) { foreach($students as $student) {
$student->student_id; $student->student_id;
print_r("<br>STUDENT_ID:" . $student->student_id); //print_r("<br>STUDENT_ID:" . $student->student_id);
} }
//εύρεση αριθμού μαθητών που ήδη φοιτούσαν στο σχολείο //εύρεση αριθμού μαθητών που ήδη φοιτούσαν στο σχολείο
...@@ -408,11 +445,11 @@ class Distribution extends ControllerBase { ...@@ -408,11 +445,11 @@ class Distribution extends ControllerBase {
$this->removeFromPendingStudents($student->student_id); $this->removeFromPendingStudents($student->student_id);
} }
} }
print_r("<br>#ΕΓΓΡΑΦΩΝ ΠΟΥ ΟΙ ΜΑΘΗΤΕΣ ΦΟΙΤΟΥΣΑΝ ΗΔΗ:" . $cnt); //print_r("<br>#ΕΓΓΡΑΦΩΝ ΠΟΥ ΟΙ ΜΑΘΗΤΕΣ ΦΟΙΤΟΥΣΑΝ ΗΔΗ:" . $cnt);
$newlimit = $limit - $cnt; $newlimit = $limit - $cnt;
print_r("<br>ΑΝΩΤΑΤΟ ΟΡΙΟ ΜΑΘΗΤΩΝ:" . $limit); //print_r("<br>ΑΝΩΤΑΤΟ ΟΡΙΟ ΜΑΘΗΤΩΝ:" . $limit);
print_r("<br>#ΜΑΘΗΤΩΝ ΓΙΑ ΝΑ ΕΠΙΛΕΓΟΥΝ ΜΕ ΜΟΡΙΑ:" . $newlimit); //print_r("<br>#ΜΑΘΗΤΩΝ ΓΙΑ ΝΑ ΕΠΙΛΕΓΟΥΝ ΜΕ ΜΟΡΙΑ:" . $newlimit);
$points_arr = []; $points_arr = [];
foreach($students as $student) { foreach($students as $student) {
...@@ -421,17 +458,17 @@ class Distribution extends ControllerBase { ...@@ -421,17 +458,17 @@ class Distribution extends ControllerBase {
} }
rsort($points_arr); rsort($points_arr);
for ($i=0; $i < sizeof($points_arr); $i++) //for ($i=0; $i < sizeof($points_arr); $i++)
print_r("<br>ΜΟΡΙΑ ΜΕΤΑ ΤΗΝ ΤΑΞΙΝΟΜΙΣΗ: " . $points_arr[$i]); //print_r("<br>ΜΟΡΙΑ ΜΕΤΑ ΤΗΝ ΤΑΞΙΝΟΜΙΣΗ: " . $points_arr[$i]);
print_r("<br>ΟΡΙΟ ΜΟΡΙΩΝ: " . $points_arr[$newlimit-1]); //print_r("<br>ΟΡΙΟ ΜΟΡΙΩΝ: " . $points_arr[$newlimit-1]);
$transaction = $this->connection->startTransaction(); $transaction = $this->connection->startTransaction();
foreach($students as $student) { foreach($students as $student) {
if ($student->currentepal !== $student->epal_id) { if ($student->currentepal !== $student->epal_id) {
if ($student->points < $points_arr[$newlimit-1]) { if ($student->points < $points_arr[$newlimit-1]) {
print_r("<br>ΣΕ ΕΚΚΡΕΜΟΤΗΤΑ - ΔΙΑΓΡΑΦΗ: " . $student->student_id); //print_r("<br>ΣΕ ΕΚΚΡΕΜΟΤΗΤΑ - ΔΙΑΓΡΑΦΗ: " . $student->student_id);
//βάλε τον μαθητή στον πίνακα εκκρεμοτήτων και διέγραψέ τον από τον προσωρινό πίνακα αποτελεσμάτων //βάλε τον μαθητή στον πίνακα εκκρεμοτήτων και διέγραψέ τον από τον προσωρινό πίνακα αποτελεσμάτων
array_push($this->pendingStudents, $student->student_id); array_push($this->pendingStudents, $student->student_id);
try { try {
...@@ -476,4 +513,91 @@ class Distribution extends ControllerBase { ...@@ -476,4 +513,91 @@ class Distribution extends ControllerBase {
public function makegGeneralReport(Request $request) {
try {
if (!$request->isMethod('GET')) {
return $this->respondWithStatus([
"message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED);
}
//user validation
//Note: $authToken = $postData->username
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if (!$user) {
return $this->respondWithStatus([
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
//user role validation
//$user = \Drupal\user\Entity\User::load($user->id());
$roles = $user->getRoles();
$validRole = false;
foreach ($roles as $role)
if ($role === "ministry") {
$validRole = true;
break;
}
if (!$validRole) {
return $this->respondWithStatus([
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
//υπολογισμός αριθμού αιτήσεων
$sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id'));
$numTotal = $sCon->countQuery()->execute()->fetchField();
//υπολογισμός αριθμού αιτήσεων που ικανοποιήθηκαν στην i προτίμηση
$numData = array();
for ($i=0; $i < 3; $i++) {
$sCon = $this->connection->select('epal_student_class', 'eStudent')
->fields('eStudent', array('id', 'distribution_id'))
->condition('eStudent.distribution_id', $i+1, '=');
array_push($numData, $sCon->countQuery()->execute()->fetchField());
}
// υπολογισμός αριθμού αιτήσεων που ΔΕΝ ικανοποιήθηκαν
//Σημείωση: υπολογισμός με queries στη βάση
$sCon = $this->connection->select('epal_student_class', 'eStudent')
->fields('eStudent', array('id'));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$studentIds = array();
foreach ($epalStudents as $epalStudent)
array_push($studentIds, $epalStudent->id);
$sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id'))
->condition('eStudent.id', $studentIds, 'NOT IN');
$numNoAllocated = $sCon->countQuery()->execute()->fetchField();
$list[] = array(
'num_applications' => $numTotal,
'numchoice1' => $numData[0],
'numchoice2' => $numData[1],
'numchoice3' => $numData[2],
'num_noallocated' => $numNoAllocated,
);
return $this->respondWithStatus(
$list
, Response::HTTP_OK);
} //end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
return $this->respondWithStatus([
"message" => t("An unexpected problem occured during DELETE proccess in makeSelectionOfStudents Method of Distribution")
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
} }
...@@ -46,14 +46,15 @@ class MinistryLogin extends ControllerBase ...@@ -46,14 +46,15 @@ class MinistryLogin extends ControllerBase
public function loginGo(Request $request) public function loginGo(Request $request)
{ {
if (!$request->isMethod('POST')) {
return $this->respondWithStatus([
"message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED);
}
try { try {
if (!$request->isMethod('POST')) {
return $this->respondWithStatus([
"message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED);
}
//user validation //user validation
//Note: $authToken = $postData->username //Note: $authToken = $postData->username
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
...@@ -110,6 +111,65 @@ class MinistryLogin extends ControllerBase ...@@ -110,6 +111,65 @@ class MinistryLogin extends ControllerBase
} }
public function logoutGo(Request $request)
{
try {
if (!$request->isMethod('POST')) {
return $this->respondWithStatus([
"message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED);
}
//user validation
//Note: $authToken = $postData->username
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if (!$user) {
return $this->respondWithStatus([
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
//user role validation
//$user = \Drupal\user\Entity\User::load($user->id());
/*
$roles = $user->getRoles();
$validRole = false;
foreach ($roles as $role)
if ($role === "ministry") {
$validRole = true;
break;
}
if (!$validRole) {
return $this->respondWithStatus([
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
*/
session_unset();
session_destroy();
$response = new Response();
$response->setContent('logout successful');
$response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type', 'application/json');
return $response;
} //end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
$response = new Response();
$response->setContent('forbidden');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
}
}
private function respondWithStatus($arr, $s) { private function respondWithStatus($arr, $s) {
$res = new JsonResponse($arr); $res = new JsonResponse($arr);
......
export const API_ENDPOINT = 'http://eduslim2.minedu.gov.gr/drupal'; export const API_ENDPOINT = 'http://eduslim2.minedu.gov.gr/drupal-8.2.6';
// export const API_ENDPOINT = 'http://eduslim2.minedu.gov.gr/angular/eepal-front/drupal'; // export const API_ENDPOINT = 'http://eduslim2.minedu.gov.gr/angular/eepal-front/drupal';
export class AppSettings { export class AppSettings {
public static get API_ENDPOINT(): string { public static get API_ENDPOINT(): string {
return 'http://eduslim2.minedu.gov.gr/drupal'; return 'http://eduslim2.minedu.gov.gr/drupal-8.2.6';
// return 'http://eduslim2.minedu.gov.gr/angular/eepal-front/drupal'; // return 'http://eduslim2.minedu.gov.gr/angular/eepal-front/drupal';
} }
} }
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 { NgRedux, select } from 'ng2-redux';
import { IAppState } from '../../store/store';
import { Router, ActivatedRoute, Params} from '@angular/router';
import { BehaviorSubject, Subscription } from 'rxjs/Rx';
import { ILoginInfo } from '../../store/logininfo/logininfo.types';
import { LOGININFO_INITIAL_STATE } from '../../store/logininfo/logininfo.initial-state';
import {
FormBuilder,
FormGroup,
FormControl,
FormArray,
Validators,
} from '@angular/forms';
import { API_ENDPOINT } from '../../app.settings';
@Component({
selector: 'minister-reports',
template: `
<div>
<form [formGroup]="formGroup" #form>
<!--<button type="submit" class="btn-primary btn-md" (click)="form.submit()" >-->
<button type="submit" class="btn btn-default btn-block" (click)="reportGeneral()" >
Συγκεντρωτικά Αποτελέσματα Κατανομής
</button>
<div *ngFor="let generalReports$ of generalReport$ | async; let i=index">
<div *ngIf="showMessage">
<br>
Αριθμός Αιτήσεων: {{generalReports$.num_applications}}<br>
Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση: {{generalReports$.numchoice1}}<br>
Αριθμός μαθητών που τοποθετήθηκαν στη δεύτερή τους προτίμηση: {{generalReports$.numchoice2}}<br>
Αριθμός μαθητών που τοποθετήθηκαν στην τρίτη τους προτίμηση: {{generalReports$.numchoice3}}<br>
Αριθμός μαθητών που δεν τοποθετήθηκαν σε καμμία τους προτίμηση: {{generalReports$.num_noallocated}}<br>
</div>
</div>
</form>
</div>
`
})
@Injectable() export default class MinisterReports implements OnInit, OnDestroy {
public formGroup: FormGroup;
loginInfo$: BehaviorSubject<ILoginInfo>;
loginInfoSub: Subscription;
private generalReport$: BehaviorSubject<any>;
private generalReportSub: Subscription;
private apiEndPoint = API_ENDPOINT;
private minedu_userName: string;
private minedu_userPassword: string;
private distStatus = "READY";
private data: string;
private showMessage: boolean;
constructor(private fb: FormBuilder,
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService,
private activatedRoute: ActivatedRoute,