...
 
Commits (18)
......@@ -249,7 +249,7 @@ class Client
if ($testmode) {
$obj = array(
'message' => 'Επιτυχία',
'promotion' => 1
'promotion' => 6
);
return $obj;
}
......
......@@ -886,7 +886,7 @@ class ApplicationSubmit extends ControllerBase
if ($student["myschool_id"] && $student["lastschool_schoolyear"] < self::LIMIT_SCHOOL_YEAR) {
return 1024;
}
if ($wsEnabled === 1 && !$student["myschool_id"] && $student["lastschool_schoolyear"] >= self::LIMIT_SCHOOL_YEAR) {
if ($wsEnabled === 1 && !$student["myschool_id"] && $student["lastschool_schoolyear"] >= self::LIMIT_SCHOOL_YEAR && $student["lastschool_unittypeid"] != 40) {
return 1025;
}
......
......@@ -73,6 +73,7 @@ class WSConsumer extends ControllerBase
public function getStudentEpalInfo($bypass_guardian, $guardian_enabled, $cu_surname, $app_prom, $didactic_year, $lastname, $firstname, $father_firstname, $mother_firstname, $birthdate, $registry_no, $registration_no)
{
$testmode = true;
$this->logger->warning("Test.. " . $didactic_year);
$didactic_year_id=$this->getdidacticyear($didactic_year);
if ($testmode) {
......@@ -81,10 +82,10 @@ class WSConsumer extends ControllerBase
'message' => 'Επιτυχία',
'data' => array(
//'id' => '15800',
'studentId' => 12340000,
'studentId' => 9990000,
'lastname' => 'ΚΑΤΣΑΟΥΝΟΣ',
'firstname' => 'ΓΕΛ ΑΠΟ ΕΣΠΕΡΙΝΟ',
'custodianLastName' => 'Γεωργούλας',
'firstname' => 'ΝΙΚΟΣ',
'custodianLastName' => 'ΚΑΤΣΑΟΥΝΟΣ',
'custodianFirstName' => 'ΑΝΑΣΤΑΣΙΟΣ',
'birthDate' => '1997-01-04T00:00:00',
'addressStreet' => 'ΧΑΤΖΗ Β. 16',
......@@ -93,7 +94,7 @@ class WSConsumer extends ControllerBase
'unitTypeDescription' => 'Εσπερινό ΕΠΑΛ',
'levelName' => 'Α',
'sectionName' => 'Τεχνικός Μηχανοσυνθέτης',
'promoted' => 6
'promoted' => 1
)
//return null
......
......@@ -118,6 +118,102 @@ gel.getstudents:
_controller: '\Drupal\gel\Controller\GelDistribution::getStudentPerSchoolGel'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.general_report:
path: '/ministry/general-report'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeGeneralReport'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-completeness:
path: '/ministry/report-completeness/{regionId}/{adminId}/{schId}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportCompleteness'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-no-capacity:
path: '/ministry/report-no-capacity/{capacityEnabled}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportNoCapacity'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.retrieve-registry-id:
path: '/ministry/retrieve-registry-id'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::retrieveUserRegistryNo'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-merged-classes:
path: '/ministry/report-merged-classes/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportMergedClasses'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-applications:
path: '/ministry/report-applications/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportApplications'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-user-applications:
path: '/ministry/report-user-applications/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportUserApplications'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-gel-students:
path: '/ministry/report-gel-students/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportGelStudents'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-students-num:
path: '/ministry/report-students-num/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportStudentsNum'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-small-classest:
path: '/ministry/report-small-classes/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportSmallClasses'
requirements:
_user_is_logged_in: 'TRUE'
epal.school.report-capacity:
path: '/school/report-capacity'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportEpalCapacity'
requirements:
_user_is_logged_in: 'TRUE'
epal.school.report-applications:
path: '/school/report-epal-applications'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportEpalApplications'
requirements:
_user_is_logged_in: 'TRUE'
gel.getschools:
path: '/gel/schoolsgel-per-perf'
options:
......@@ -252,6 +348,14 @@ gel.updatepromotionepal:
_controller: '\Drupal\gel\Controller\GelDistribution::UpdatePromotionEpal'
requirements:
_user_is_logged_in: 'TRUE'
gel.ministry.report-users-gel:
path: '/ministry/report-users-gel'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\ReportsCreator::makeReportUsers'
requirements:
_user_is_logged_in: 'TRUE'
gel.schoolgel.report-gel-applications:
path: '/school/report-gel-applications'
options:
......@@ -300,4 +404,4 @@ gel.changeDDE:
_controller: '\Drupal\gel\Controller\GelDistribution::ChangeDDE'
requirements:
_user_is_logged_in: 'TRUE'
gel.gethighschoolperstudent:
\ No newline at end of file
gel.gethighschoolperstudent:
......@@ -488,6 +488,7 @@ class GelApplicationSubmit extends ControllerBase
}
$crypt = new Crypt();
try {
$name_encoded = $crypt->encrypt($applicationForm[0]['name']);
$studentsurname_encoded = $crypt->encrypt($applicationForm[0]['studentsurname']);
......@@ -522,7 +523,10 @@ class GelApplicationSubmit extends ControllerBase
unset($crypt);
$transaction = $this->connection->startTransaction();
try {
//insert records in entity: gel_student
$authToken = $request->headers->get('PHP_AUTH_USER');
$applicantUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
......@@ -539,6 +543,7 @@ class GelApplicationSubmit extends ControllerBase
$validation_type = $this->calcValidationType($applicationForm["lastschool_schoolyear"], $applicationForm[0]['app_prom'], $applicationForm[0]['promoted'], $second_period);
//απόφαση: αυτοδίκαια ή μέσω ΔΔΕ τοποθέτηση
;
list ($gelId, $gelDde, $gelLastSchoolExtraType) = $this->getSchoolIdFromRegNo($applicationForm[0]['lastschool_registrynumber']);
//η πληροφορία αίτησης για αλλαγή τύπου σχολείου βρίσκεται σε νέο πεδίο στη φόρμα αίτησης, $applicationForm[0]['special_type'],με τιμές ΑΛΛΟ / ΓΕΛ
$distrType = $this->calcDistributionType(
......@@ -891,7 +896,8 @@ class GelApplicationSubmit extends ControllerBase
if ($student["myschool_id"] && $student["lastschool_schoolyear"] < self::LIMIT_SCHOOL_YEAR) {
return 1024;
}
if (!$student["myschool_id"] && $student["lastschool_schoolyear"] >= self::LIMIT_SCHOOL_YEAR) {
$this->logger->warning("Trace " . $student["lastschool_unittypeid"]);
if (!$student["myschool_id"] && $student["lastschool_schoolyear"] >= self::LIMIT_SCHOOL_YEAR && $student["lastschool_unittypeid"] != 40) {
return 1025;
}
......@@ -1063,7 +1069,7 @@ class GelApplicationSubmit extends ControllerBase
return 1;
//πάνε στην Β' ΓΕΛ όσοι προάχθηκαν από Α' ΕΠΑΛ,
//και όσοι απορρίφθηκαν από Β'/Γ'/Δ' ΕΠΑΛ
//και όσοι προάχθηκαν ή απορρίφθηκαν από Β'/Γ'/Δ' ΕΠΑΛ
else if (
($last_class == "1" || $last_class == "2" || $last_class == "4" || $last_class == "5" || $last_class == "6")
&& ($next_class == 2 || $next_class == 5 )
......@@ -1072,7 +1078,7 @@ class GelApplicationSubmit extends ControllerBase
)
return 1;
else if (
($last_class == "2" || $last_class == "3" || $last_class == "6" || $last_class == "7")
($last_class == "2" || $last_class == "3" || $last_class == "5" || $last_class == "6" || $last_class == "7")
&& ($next_class == 2 || $next_class == 5 )
&& ($last_sch_type == "5")
&& $validation_type == "SAMECLASS"
......
......@@ -491,7 +491,7 @@ public function SaveHighSchoolSelection(Request $request, $studentid, $schoolid)
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
$eggrafesConfigs = $this->entityTypeManager->getStorage('eggrafes_config')->loadByProperties(array('name' => 'eggrafes_config_gel'));
$eggrafesConfig = reset($eggrafesConfigs);
if (!$eggrafesConfig) {
......@@ -563,7 +563,111 @@ public function gethighschoolperstudent($id){
}
public function FindCoursesPerSchoolGel(Request $request/*, $appstatus*/) {
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if ($user) {
$schoolid = $user->init->value;
//hard
//$schoolid = 1562;
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $schoolid));
$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;
}
$operation_shift = $school->operation_shift->value;
$userRoles = $user->getRoles();
$userRole = '';
foreach ($userRoles as $tmpRole) {
if ($tmpRole == 'gel' ||$tmpRole == 'gymlt') {
$userRole = $tmpRole;
}
}
if ($userRole === '') {
return $this->respondWithStatus([
'error_code' => 4003111,
], Response::HTTP_FORBIDDEN);
}
elseif ($userRole == 'gel' || $tmpRole == 'gymlt') {
$this->logger->warning("test " . $operation_shift);
/*
if ($userRole == 'gymlt' && $appstatus == 'pending')
$list[] = array(
'class' => 33,
'taxi' => 'Γ\' Γυμνασίου',
);
*/
$classIdStart = 1; $classIdEnd = 3;
if ($operation_shift == 'ΕΣΠΕΡΙΝΟ') {
$classIdStart = 4; $classIdEnd = 7;
}
$classNames = array('Α\' Λυκείου', 'Β\' Λυκείου', 'Γ\' Λυκείου', 'Δ\' Λυκείου');
for ($i=0; $i < $classIdEnd-$classIdStart+1; $i++) {
$list[] = array(
'class' => $classIdStart + $i,
'taxi' => $classNames[$i],
);
}
/*
$list[] = array(
'class' => 1,
'taxi' => 'Α\' Λυκείου',
);
$list[] = array(
'class' => 2,
'taxi' => 'Β\' Λυκείου',
);
$list[] = array(
'class' => 3,
'taxi' => 'Γ\' Λυκείου',
);
if ($operation_shift == 'ΕΣΠΕΡΙΝΟ')
$list[] = array(
'class' => 4,
'taxi' => 'Δ\' Λυκείου',
);
*/
/*
$tmp_list = array(
'applicationId' => $epalStudent->id(),
'am' => $am_decoded,
'name' => $name_decoded,
'studentsurname' => $studentsurname_decoded,
'lastschool_schoolyear' => $epalStudent->lastschool_schoolyear->value,
'myschool_promoted' => $epalStudent->myschool_promoted->value,
'epal_distributed'=> $epalDistrName,
);
array_push($list, $tmp_list);
*/
return $this->respondWithStatus($list, Response::HTTP_OK);
}
else
{
return $this->respondWithStatus([
'message' => t('school user role not found'),
], Response::HTTP_FORBIDDEN);
}
}
}
/*
public function FindCoursesPerSchoolGel(Request $request)
{
$i = 0;
......@@ -622,18 +726,7 @@ public function FindCoursesPerSchoolGel(Request $request)
->condition('gStudent.delapp', '0' , '=');
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
/*
$sCon = $this->connection->select('gel_student', 'gStudent');
$sCon->leftJoin('gel_school', 'gSchool', 'gSchool.registry_no = gStudent.lastschool_registrynumber');
$sCon->fields('gStudent', array('id','lastschool_registrynumber','nextclass', 'delapp','name','studentsurname' ,'fatherfirstname' ,'motherfirstname' ,'regionaddress' ,'regiontk' ,'regionarea','telnum' ,'guardian_name' ,'guardian_surname','guardian_fathername ','guardian_mothername', 'birthdate', 'lastschool_schoolname','lastschool_class','lastschool_schoolyear','directorconfirm', 'created' ))
->fields('gSchool', array('id','registry_no'))
->condition('gSchool.id', $schoolid , '=')
->condition('gStudent.nextclass', '1' , '=')
->condition('gStudent.delapp', '0' , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$existingstudentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ); */
$list[] = array(
'class' => 1,
......@@ -899,6 +992,8 @@ public function FindCoursesPerSchoolGel(Request $request)
}
}
*/
public function getStudentPerSchoolGel(Request $request, $classId, $appStatus)
{
try {
......@@ -2204,7 +2299,10 @@ public function FindStudentsTranscribed(Request $request)
}
if ($gelStudentClass->app_status->value == 'FINAL') {
if ($gelStudentClass->gel_id->getString() == $school->id() )
//αν είναι απόφοιτος Γ' Γυμνασίου, είναι νέα εγγραφή, ακόμα και αν είναι ΓΥΜ-ΛΤ
if ($gelStudent->lastschool_class->value == '33')
$appstatus = "ΝΕΑ ΕΓΓΡΑΦΗ";
else if ($gelStudentClass->gel_id->getString() == $school->id() )
$appstatus = "ΑΝΑΝΕΩΣΗ ΕΓΓΡΑΦΗΣ";
elseif ($gelStudentClass->gel_id->getString() != null && $gelStudentClass->gel_id->getString() != $school->id())
$appstatus = "ΜΕΤΕΓΓΡΑΦΗ";
......@@ -3741,12 +3839,12 @@ public function Initializationbperiod(Request $request)
public function ChangeDDE(Request $request, $studentid, $dide_id){
if (!$request->isMethod('GET')) {
return $this->respondWithStatus([
'message' => t('Method Not Allowed'),
], Response::HTTP_METHOD_NOT_ALLOWED);
}
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
......@@ -3755,7 +3853,7 @@ public function Initializationbperiod(Request $request)
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
$roles = $user->getRoles();
$validRole = false;
foreach ($roles as $role)
......@@ -3763,13 +3861,13 @@ public function Initializationbperiod(Request $request)
$validRole = true;
break;
}
if (!$validRole) {
return $this->respondWithStatus([
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
$eggrafesConfigs = $this->entityTypeManager->getStorage('eggrafes_config')->loadByProperties(array('name' => 'eggrafes_config_gel'));
$eggrafesConfig = reset($eggrafesConfigs);
if (!$eggrafesConfig) {
......@@ -3780,37 +3878,37 @@ public function Initializationbperiod(Request $request)
else{
$second_period = $eggrafesConfig -> activate_second_period -> value ;
}
$chunks = explode(",", $studentid);
foreach ($chunks as $studId =>$value ){
$this->logger->warning("schoolid=".$dide_id);
$this->logger->warning("studentid=".$value);
$transaction = $this->connection->startTransaction();
try {
$sCon = $this->connection->update('gel_student_class')
->fields([
'dide'=> $dide_id,
])
->condition('student_id',$value,'=')
->execute();
} catch (\Exception $e) {
$this->logger->warning($e->getMessage());
$transaction->rollback();
return $this->respondWithStatus([
"error_code" => 5001
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
return $this->respondWithStatus('ok', Response::HTTP_OK);
}
......
......@@ -497,7 +497,7 @@ class GelSubmittedApplications extends ControllerBase
} else {
$sCon = $this->connection
->select('gel_school', 'eSchool')
->fields('eSchool', array('operation_shift', 'extra_unitid'))
->fields('eSchool', array('operation_shift', 'extra_unitid','registry_no'))
->condition('eSchool.registry_no', $gelStudent->lastschool_registrynumber, '=');
}
$lastschoolDetails = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -623,12 +623,13 @@ class GelSubmittedApplications extends ControllerBase
'guardian_surname' => ($role === "applicant")?$guardian_surname_decoded:'',
'guardian_fathername' => ($role === "applicant")?$guardian_fathername_decoded:'',
'guardian_mothername' => ($role === "applicant")?$guardian_mothername_decoded:'',
'lastschool_schoolname' => $gelStudent->lastschool_schoolname,
'lastschool_unittypeid' => $gelStudent->lastschool_unittypeid,
'lastschool_schoolyear' => $gelStudent->lastschool_schoolyear,
'lastschool_schoolyear' => ($role === "applicant")?$gelStudent->lastschool_schoolyear:'',
'lastschool_schoolname' => ($role === "applicant")?$gelStudent->lastschool_schoolname:'',
'lastschool_unittypeid' => ($role === "applicant")?$gelStudent->lastschool_unittypeid:'',
'lastschool_operation_shift' => ($role === "applicant")?$lastschoolDetails->operation_shift:'',
'lastschool_extra_unitid' => ($role === "applicant")?$lastschoolDetails->extra_unitid:'',
'lastschool_class' => $gelStudent->lastschool_class,
'lastschool_registrynumber' => ($role === "applicant")?$lastschoolDetails->registry_no:'',
'lastschool_class' => ($role === "applicant")?$gelStudent->lastschool_class:'',
'nextclass' => $gelStudent->nextclass,
'regionaddress' => ($role === "applicant")?$regionaddress_decoded:'',
'regiontk' => ($role === "applicant")?$regiontk_decoded:'',
......
......@@ -25,7 +25,7 @@ import {
<p *ngIf = "( appStatus | async) == 'invalid'" align = "justify" style="margin-top: 20px; line-height: 2em;">
H παρακάτω λίστα εμφανίζει τις αιτήσεις για ΓΕΛ των μαθητών του σχολείου σας που <strong>ΔΕΝ είναι έγκυρες</strong>,
διότι αναφέρονται σε μη έγκυρη τάξη εγγραφής λόγω του αποτελέσματος προαγωγής.
Παρακαλώ να ενημερώσετε τους αντίστοιχους μαθητές ώστε <strong>να υποβάλλουν νέα αίτηση</strong> στην επόμενη φάση αιτήσεων,
Παρακαλώ να ενημερώσετε τους αντίστοιχους μαθητές Λυκείου <strong>να υποβάλλουν νέα αίτηση</strong> στην επόμενη φάση αιτήσεων,
αφού πρώτα διαγράψουν την τρέχουσα αίτησή τους.</p>
<p *ngIf = "( appStatus | async) == 'pending'" align = "justify" style="margin-top: 20px; line-height: 2em;">
H παρακάτω λίστα εμφανίζει τις αιτήσεις για ΓΕΛ των μαθητών του σχολείου σας που βρίσκονται <strong>ΣΕ ΑΝΑΜΟΝΗ</strong>. Στην κατηγορία αυτή ανήκουν
......@@ -602,6 +602,13 @@ import {
(<any>$("#updatedstatus")).appendTo("body");
(<any>$("#errorupdatedstatus")).appendTo("body");
this.activatedRoute.params.subscribe(params => {
this.appStatus.next(params["appstatus"]);
//console.log("Trace " + this.appStatus.getValue());
//αρχικοποίηση τάξεων - κλείνουν τυχόν ανοικτές λίστες από φόρτωμα του ίδιου component με άλλες παραμέτρους
this.courseActive = -1;
});
this.loginInfoSub = this._ngRedux.select("loginInfo")
.map(loginInfo => <ILoginInfoRecords>loginInfo)
.subscribe(loginInfo => {
......@@ -617,27 +624,16 @@ import {
}
});
this.showLoader.next(true);
this.CoursesPerSchoolSub = this._hds.FindCoursesPerSchoolGel().subscribe(x => {
this.CoursesPerSchool$.next(x);
this.showLoader.next(false);
},
error => {
this.CoursesPerSchool$.next([{}]);
console.log("Error Getting courses perSchool");
this.showLoader.next(true);
this.CoursesPerSchoolSub = this._hds.FindCoursesPerSchoolGel(/*this.appStatus.getValue()*/).subscribe(x => {
this.CoursesPerSchool$.next(x);
this.showLoader.next(false);
});
this.activatedRoute.params.subscribe(params => {
this.appStatus.next(params["appstatus"]);
//console.log("Trace " + this.appStatus.getValue());
//αρχικοποίηση τάξεων - κλείνουν τυχόν ανοικτές λίστες από φόρτωμα του ίδιου component με άλλες παραμέτρους
this.courseActive = -1;
});
},
error => {
this.CoursesPerSchool$.next([{}]);
console.log("Error Getting courses perSchool");
this.showLoader.next(false);
});
}
......@@ -745,7 +741,7 @@ import {
this.showLoader.next(false);
this.StudentActive = -1;
this.CoursesPerSchoolSub = this._hds.FindCoursesPerSchoolGel().subscribe(x => {
this.CoursesPerSchoolSub = this._hds.FindCoursesPerSchoolGel(/*this.appStatus.getValue()*/).subscribe(x => {
this.CoursesPerSchool$.next(x);
this.showLoader.next(false);
......
......@@ -548,8 +548,11 @@ import {IOrientationGroupObj} from "../../store/orientationgroup";
break;
}
case "director": {
if (schooltype === 'epal') this.get_epal(schoolid, true);
if (schooltype === 'gel') this.get_gel(this.GelSubmittedDetails$.getValue()[0].delapp_gelname);
this.get_epal(schoolid, true);
break;
}
case "director_gel": {
this.get_gel(this.GelSubmittedDetails$.getValue()[0].delapp_gelname);
break;
}
}
......
import { NgRedux } from "@angular-redux/store";
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Injectable } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { BehaviorSubject, Subscription } from "rxjs/Rx";
import { API_ENDPOINT } from "../../app.settings";
import { DIDE_ROLE, MINISTRY_ROLE, PDE_ROLE } from "../../constants";
import { HelperDataService } from "../../services/helper-data-service";
import { LOGININFO_INITIAL_STATE } from "../../store/logininfo/logininfo.initial-state";
import { ILoginInfoRecords } from "../../store/logininfo/logininfo.types";
import { IAppState } from "../../store/store";
@Component({
selector: "minister-reports-gel",
// encapsulation: ViewEncapsulation.None,
template: `
<div class="reports-container">
<h5>Επιλογή Αναφοράς ΓΕΛ</h5>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(0)"><i class="fa fa-file-text"></i> Αριθμός Αιτήσεων / Εγγεγραμμένων Χρηστών</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(1)" ><i class="fa fa-file-text"></i> Κατανομή Μαθητών με Βάση τη Σειρά Προτίμησης</button>
</div>
<!--
<div *ngIf = "minedu_userName != ''" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(2)"><i class="fa fa-file-text"></i> Συνολική Πληρότητα σχολικών μονάδων ΕΠΑΛ ανά τάξη</button>
</div>
-->
<div *ngIf = "minedu_userName != ''" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(3)"><i class="fa fa-file-text"></i> Αριθμός Μαθητών και Πληρότητα σχολικών μονάδων ΓΕΛ</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(4)"><i class="fa fa-file-text"></i> Σχολικές μονάδες που δεν έχουν δηλώσει Χωρητικότητα τμημάτων</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(5)"><i class="fa fa-file-text"></i> Ολιγομελή τμήματα (Προσωρινά τοποθετημένοι μαθητές)</button>
</div>
<div *ngIf = "minedu_userName != ''">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(6)"><i class="fa fa-file-text"></i> Συγχωνεύσεις Ολιγομελών Τμημάτων</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(7)"><i class="fa fa-file-text"></i> Αριθμός Αιτήσεων ανά σχολική μονάδα ΓΕΛ</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(8)"><i class="fa fa-file-text"></i> Αριθμός Αιτήσεων ανά Αιτούντα</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(9)"><i class="fa fa-file-text"></i> Αριθμός Αιτούντων Μαθητών προερχόμενων απο ΕΠΑΛ</button>
</div>
</div>
`
})
@Injectable() export default class MinisterReportsGel implements OnInit, OnDestroy {
private loginInfo$: BehaviorSubject<ILoginInfoRecords>;
private loginInfoSub: Subscription;
private apiEndPoint = API_ENDPOINT;
private minedu_userName: string;
private minedu_userPassword: string;
private distStatus = "READY";
private userRole: string;
constructor(
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService,
private activatedRoute: ActivatedRoute,
private router: Router
) {
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.minedu_userName = "";
this.userRole = MINISTRY_ROLE;
}
ngOnInit() {
this.loginInfoSub = this._ngRedux.select("loginInfo")
.map(loginInfo => <ILoginInfoRecords>loginInfo)
.subscribe(loginInfo => {
if (loginInfo.size > 0) {
loginInfo.reduce(({}, loginInfoObj) => {
this.minedu_userName = loginInfoObj.minedu_username;
this.minedu_userPassword = loginInfoObj.minedu_userpassword;
if (loginInfoObj.auth_role === PDE_ROLE || loginInfoObj.auth_role === DIDE_ROLE) {
this.userRole = loginInfoObj.auth_role;
this.minedu_userName = loginInfoObj.auth_token;
this.minedu_userPassword = loginInfoObj.auth_token;
}
return loginInfoObj;
}, {});
}
this.loginInfo$.next(loginInfo);
}, error => console.log("error selecting loginInfo"));
}
ngOnDestroy() {
if (this.loginInfoSub) {
this.loginInfoSub.unsubscribe();
}
}
nav_to_reportpath(repId) {
if (repId === 0) {
this.router.navigate(["/ministry/report-users-gel", repId]);
} else if (repId === 1) {
this.router.navigate(["/ministry/report-general"]);
} else if (repId === 2 || repId === 3 || repId === 5) {
this.router.navigate(["/ministry/report-all-stat", repId]);
} else if (repId === 4) {
this.router.navigate(["/ministry/report-no-capacity", repId]);
} else if(repId === 6){
this.router.navigate(["/ministry/report-merged-classes"]);
} else if(repId === 7){
this.router.navigate(["/ministry/report-applications-gel"]);
}else if(repId === 8){
this.router.navigate(["/ministry/report-user-applications"]);
}else if(repId === 9){
this.router.navigate(["/ministry/report-gel-students"]);
}
}
}
This diff is collapsed.
import { NgRedux } from "@angular-redux/store";
import { Injectable } from "@angular/core";
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { LocalDataSource } from "ng2-smart-table";
import { BehaviorSubject, Subscription } from "rxjs/Rx";
import { API_ENDPOINT } from "../../app.settings";
import { HelperDataService } from "../../services/helper-data-service";
import { LOGININFO_INITIAL_STATE } from "../../store/logininfo/logininfo.initial-state";
import { ILoginInfoRecords } from "../../store/logininfo/logininfo.types";
import { IAppState } from "../../store/store";
import { CsvCreator } from "./csv-creator";
import { ReportsSchema, TableColumn } from "./reports-schema";
@Component({
selector: "report-users-gel",
template: `
<div class="reports-container">
<div class = "loading" *ngIf="validCreator == 0"></div>
<h5>Αριθμός Αιτήσεων / Εγγεγραμμένων Χρηστών</h5>
<h6>Επιλογή Φίλτρων: Δεν υπάρχουν διαθέσιμα φίλτρα</h6>
<button type="submit" class="btn btn-alert" (click)="createReport()" [hidden]="minedu_userName == ''"><i class="fa fa-file-text"></i> Δημιουργία Αναφοράς</button>
<button type="submit" class="btn btn-alert pull-right" (click)="navigateBack()" [hidden]="minedu_userName == ''" >Επιστροφή</button>
<div *ngIf="validCreator == 1 ">
<input #search class="search" type="text" placeholder="Αναζήτηση..." (keydown.enter)="onSearch(search.value)">
<div class="smart-table-container table table-hover table-striped" reportScroll>
<ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table>
</div>
</div>
<button type="button" class="alert alert-info pull-right" (click)="export2Csv()" [hidden]="validCreator != 1">
<i class="fa fa-download"></i> Εξαγωγή σε csv</button>
</div>
`
})
@Injectable() export default class ReportUsersGel implements OnInit, OnDestroy {
loginInfo$: BehaviorSubject<ILoginInfoRecords>;
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;
private validCreator: number;
private routerSub: any;
private source: LocalDataSource;
columnMap: Map<string, TableColumn> = new Map<string, TableColumn>();
@Input() settings: any;
private reportSchema = new ReportsSchema();
private csvObj = new CsvCreator();
constructor(
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService,
private activatedRoute: ActivatedRoute,
private router: Router
) {
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.generalReport$ = new BehaviorSubject([{}]);
this.minedu_userName = "";
this.validCreator = -1;
}
ngOnInit() {
this.loginInfoSub = this._ngRedux.select("loginInfo")
.map(loginInfo => <ILoginInfoRecords>loginInfo)
.subscribe(loginInfo => {
if (loginInfo.size > 0) {
loginInfo.reduce(({}, loginInfoObj) => {
this.minedu_userName = loginInfoObj.minedu_username;
this.minedu_userPassword = loginInfoObj.minedu_userpassword;
return loginInfoObj;
}, {});
}
this.loginInfo$.next(loginInfo);
}, error => console.log("error selecting loginInfo"));
}
ngOnDestroy() {
if (this.loginInfoSub)
this.loginInfoSub.unsubscribe();
if (this.generalReportSub)
this.generalReportSub.unsubscribe();
}
createReport() {
this.validCreator = 0;
let route = "/ministry/report-users-gel/";
//original: drupal/modules/epal/epal.routing.yml
//original: \Drupal\epal\Controller\ReportsCreator::makeReportUsers
this.settings = this.reportSchema.ReportUsersGelSchema;
this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, route, 0, 0, 0, 0, 0, 0, 0)
.subscribe(data => {
this.generalReport$.next(data);
this.data = data;
this.validCreator = 1;
this.source = new LocalDataSource(this.data);
this.columnMap = new Map<string, TableColumn>();
this.csvObj.columnMap = this.columnMap;
this.csvObj.source = this.source;
this.csvObj.settings = this.settings;
this.csvObj.prepareColumnMap();
},
error => {
this.generalReport$.next([{}]);
this.validCreator = -1;
console.log("Error Getting ReportUsersGel");
});
}
navigateBack() {
this.router.navigate(["/ministry/minister-reports-gel"]);
}
onSearch(query: string = "") {
this.csvObj.onSearch(query);
}
export2Csv() {
this.csvObj.export2Csv();
}
}
......@@ -26,6 +26,22 @@ export class ReportsSchema {
}
};
ReportUsersGelSchema = {
actions: false,
fileName: "e-ΓΕΛ Αριθμός Αιτήσεων - Εγγεγραμμένων Χρηστών",
noDataMessage: "Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης",
columns: {
name: {
title: "Περιγραφή",
filter: false
},
numStudents: {
title: "Αριθμός",
filter: false
}
}
};
genReportSchema = {
actions: false,
fileName: "e-ΕΠΑΛ Κατανομή Μαθητών με Βάση τη Σειρά Προτίμησης",
......@@ -373,6 +389,43 @@ export class ReportsSchema {
}
};
reportApplicationsGelSchema = {
actions: false,
fileName: "e-ΕΓΓΡΑΦΕΣ Αριθμός αιτήσεων σχολική μονάδα ΓΕΛ",
pager: {
display: true,
perPage: 10
},
noDataMessage: "Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης",
columns: {
name: {
title: "Σχολείο",
width: "20%",
filter: false
},
region: {
title: "Περιφερειακή Διεύθυνση",
width: "20%",
filter: false
},
admin: {
title: "Διεύθυνση Εκπαίδευσης",
width: "20%",
filter: false
},
section: {
title: "Τάξη/Τομέας/Ειδικότητα",
width: "30%",
filter: false
},
num: {
title: "Αριθμός Αιτήσεων",
width: "8%",
filter: false
}
}
};
reportgelStudentsSchema = {
actions: false,
fileName: "e-ΕΠΑΛ Αριθμός Μαθητών προερχόμενων από Γενικά Λύκεια",
......
......@@ -139,13 +139,13 @@
<a class="nav-link" [routerLink]="['/ministry/minister-updatepromotion']" [routerLinkActive]="['active']"><b>Ενημέρωση Προαγωγής</b></a>
</li>
</div>
<!--
<div *ngIf="(loginInfo$ | async).size > 0" class="nav-item">
<!-- reports were commented out, uncommented by agio -->
<div *ngIf="(loginInfo$ | async).size > 0 && (userType | async) === 'gel'" class="nav-item">
<li *ngIf="authRole=='supervisor'" class="nav-item">
<a class="nav-link" [routerLink]="['/ministry/minister-reports']" [routerLinkActive]="['active']"><b>Αναφορές</b></a>
<a class="nav-link" [routerLink]="['/ministry/minister-reports-gel']" [routerLinkActive]="['active']"><b>Αναφορές</b></a>
</li>
</div>
-->
<!-- -->
<div *ngIf="(loginInfo$ | async).size > 0 && (userType | async) === 'gel'" class="nav-item">
<li *ngIf="authRole=='supervisor'" class="nav-item">
<a class="nav-link"><b>ΔΙΑΧΕΙΡΙΣΗ ΓΕΛ</b></a>
......
......@@ -789,12 +789,12 @@ import {
break;
case 1024:
mTitle = "Αποτυχία Υποβολής Δήλωσης Προτίμησης";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Ύπαρξη επιστρεφόμενου μοναδικού αριθμόυ μαθητή για σχολικό έτος < " + SCHOOL_YEAR_LIMIT + ".";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Ύπαρξη επιστρεφόμενου μοναδικού αριθμού μαθητή για σχολικό έτος < " + SCHOOL_YEAR_LIMIT + ".";
mHeader = "modal-header-danger";
break;
case 1025:
mTitle = "Αποτυχία Υποβολής Δήλωσης Προτίμησης";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Μη ύπαρξη επιστρεφόμενου μοναδικού αριθμόυ μαθητή για σχολικό έτος >= " + SCHOOL_YEAR_LIMIT + ".";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Μη ύπαρξη επιστρεφόμενου μοναδικού αριθμού μαθητή για σχολικό έτος >= " + SCHOOL_YEAR_LIMIT + ".";
mHeader = "modal-header-danger";
break;
case 3002:
......
......@@ -324,7 +324,7 @@
<select class="form-control" formControlName="relationtostudent">
<option value="">Παρακαλώ επιλέξτε...</option>
<option *ngIf = "((numAppChildren | async) + (numAppRepresent | async)) < (numChildren | async) " value="Γονέα/Κηδεμόνα">Γονέα/Κηδεμόνα </option>
<option *ngIf = "!(numAppSelf | async)" value="Μαθητή">Μαθητή</option>
<option *ngIf = "(numAppSelf | async) < 1" value="Μαθητή">Μαθητή</option>
<option *ngIf = "(representativeRole | async) && ((numAppChildren | async) + (numAppRepresent | async)) < (numChildren | async) " value="Εξουσιοδοτημένο">Εξουσιοδοτημένο Διευθυντή Σχολικής Μονάδας</option>
<!--
<option *ngIf = "((numAppChildren | async) + (numAppRepresent | async)) < (numChildren | async) " value="Γονέα/Κηδεμόνα">ΓΟΝΕΑ/ΚΗΔΕΜΟΝΑ</option>
......
......@@ -37,6 +37,7 @@ import { StudentGelCourseChosen } from "../students/student";
import {
SCHOOL_YEAR_LIMIT,
SCHOOL_NO_DDE,
} from "../../constants";
@Component({
......@@ -94,7 +95,7 @@ import {
</div>
<div><label for="lastschool_schoolyear">Σχολικό έτος τελευταίας φοίτησης</label> <p class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("lastschool_schoolyear")}} </p></div>
<div><label for="lastschool_schoolname">Σχολείο τελευταίας φοίτησης</label> <p class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("lastschool_schoolname").name}} </p></div>
<div *ngIf="gelstudentDataField$.get('lastschool_schoolyear') < SCHOOL_YEAR_LIMIT || gelstudentDataField$.get('lastschool_schoolname').unit_type_id == SCHOOL_NO_DDE">
<div *ngIf="gelstudentDataField$.get('lastschool_schoolyear') < limitSchoolYear || gelstudentDataField$.get('lastschool_schoolname').unit_type_id == schNoDDE">
<label for="lastschool_class">Τάξη τελευταίας φοίτησης</label>
<div *ngIf="gelstudentDataField$.get('lastschool_class') === '1'"><p class="form-control" style="border:1px solid #eceeef;">Α’ Λυκείου (ΗΜΕΡΗΣΙΟ)</p></div>
<div *ngIf="gelstudentDataField$.get('lastschool_class') === '2'"><p class="form-control" style="border:1px solid #eceeef;">Β’ Λυκείου (ΗΜΕΡΗΣΙΟ)</p></div>
......@@ -122,10 +123,11 @@ import {
<div class="col-md-12" style="font-size: 1.5em; font-weight: bold; text-align: center;">Προσωπικά Στοιχεία μαθητή</div>
</div>
<div>
<label *ngIf="gelstudentDataField$.get('lastschool_schoolyear') >= SCHOOL_YEAR_LIMIT && gelstudentDataField$.get('lastschool_schoolname').unit_type_id != SCHOOL_NO_DDE" for="am">Αριθμός Μητρώου Μαθητη</label>
<p *ngIf="gelstudentDataField$.get('lastschool_schoolyear') >= SCHOOL_YEAR_LIMIT && gelstudentDataField$.get('lastschool_schoolname').unit_type_id != SCHOOL_NO_DDE" class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("am")}} </p>
<label *ngIf="gelstudentDataField$.get('lastschool_schoolyear') >= limitSchoolYear && gelstudentDataField$.get('lastschool_schoolname').unit_type_id != schNoDDE" for="am">Αριθμός Μητρώου Μαθητη</label>
<p *ngIf="gelstudentDataField$.get('lastschool_schoolyear') >= limitSchoolYear && gelstudentDataField$.get('lastschool_schoolname').unit_type_id != schNoDDE" class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("am")}} </p>
</div>
<div *ngIf = "gelstudentDataField$.get('lastschool_schoolyear') < SCHOOL_YEAR_LIMIT && gelstudentDataField$.get('lastschool_schoolyear') != '' ">
<div *ngIf = " (gelstudentDataField$.get('lastschool_schoolyear') < limitSchoolYear && gelstudentDataField$.get('lastschool_schoolyear') != '')
|| (gelstudentDataField$.get('lastschool_schoolname').unit_type_id == schNoDDE)">
<label for="sex" >Φύλο μαθητή</label>
<div *ngIf="gelstudentDataField$.get('sex') === 'Άρρεν'"> <p class="form-control" style="border:1px solid #eceeef;">Αγόρι/Άνδρας</p></div>
<div *ngIf="gelstudentDataField$.get('sex') === 'Θήλυ'"><p class="form-control" style="border:1px solid #eceeef;">Κορίτσι/Γυναίκα</p></div>
......@@ -148,7 +150,7 @@ import {
<div class="row evenin" style="margin: 20px 2px 10px 2px; line-height: 2em;">
<div class="col-md-12" style="font-size: 1.5em; font-weight: bold; text-align: center;">Στοιχεία Επικοινωνίας μαθητή</div>
</div>
<table class="col-md-12" align="left" *ngIf="gelstudentDataField$.get('lastschool_schoolyear') < SCHOOL_YEAR_LIMIT || gelstudentDataField$.get('lastschool_schoolname').unit_type_id == SCHOOL_NO_DDE">
<table class="col-md-12" align="left" *ngIf="gelstudentDataField$.get('lastschool_schoolyear') < limitSchoolYear || gelstudentDataField$.get('lastschool_schoolname').unit_type_id == schNoDDE">
<tr>
<td>
<div><label for="regionaddress">Διεύθυνση Κατοικίας μαθητή</label></div>
......@@ -172,7 +174,7 @@ import {
</td>
</tr>
</table>
<div class="form-group" *ngIf="gelstudentDataField$.get('lastschool_schoolname').unit_type_id == SCHOOL_NO_DDE">
<div class="form-group" *ngIf="gelstudentDataField$.get('lastschool_schoolname').unit_type_id == schNoDDE">
<label for="assigned_dde">Δ/νση Δ/θμιας Εκπ/σης (ΔΔΕ) στην οποία ανήκει η διεύθυνση κατοικίας σας</label> <p class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("assigned_dde").name}} </p>
</div>
<div><label for="relationtostudent">Η δήλωση προτίμησης γίνεται από</label> <p class="form-control" style="border:1px solid #eceeef;"> {{gelstudentDataField$.get("relationtostudent")}} </p></div>
......@@ -260,6 +262,9 @@ import {
private father1: string;
private father2:string;
private bypassGuardianVer: number;
private limitSchoolYear: string;
private schNoDDE: number;
constructor(
private _hds: HelperDataService,
......@@ -295,7 +300,8 @@ import {
this.guardianEnabled = new BehaviorSubject(-1);
this.birtdateFormView = new BehaviorSubject("");
this.hasright = 1;
//this.limitSchoolYear = "2013-2014";
this.limitSchoolYear = SCHOOL_YEAR_LIMIT;
this.schNoDDE = SCHOOL_NO_DDE;
this.bypassGuardianVer = 0;
......@@ -858,12 +864,12 @@ import {
break;
case 1024:
mTitle = "Αποτυχία Υποβολής Δήλωσης Προτίμησης";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Ύπαρξη επιστρεφόμενου μοναδικού αριθμόυ μαθητή για σχολικό έτος < " + SCHOOL_YEAR_LIMIT + ".";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Ύπαρξη επιστρεφόμενου μοναδικού αριθμού μαθητή για σχολικό έτος < " + SCHOOL_YEAR_LIMIT + ".";
mHeader = "modal-header-danger";
break;
case 1025:
mTitle = "Αποτυχία Υποβολής Δήλωσης Προτίμησης";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Μη ύπαρξη επιστρεφόμενου μοναδικού αριθμόυ μαθητή για σχολικό έτος >= " + SCHOOL_YEAR_LIMIT + ".";
mText = "Παρακαλούμε ελέγξτε τα στοιχεία που υποβάλλετε. Μη ύπαρξη επιστρεφόμενου μοναδικού αριθμού μαθητή για σχολικό έτος >= " + SCHOOL_YEAR_LIMIT + ".";
mHeader = "modal-header-danger";
break;
case 1026:
......
......@@ -17,6 +17,7 @@ import Breadcrumbs from "../components/main/breadcrumbs";
import InformStudents from "../components/minister/minister-informstudents";
import UpdatePromotion from "../components/minister/minister-updatepromotion";
import MinisterReports from "../components/minister/minister-reports";
import MinisterReportsGel from "../components/minister/minister-reports-gel";
import MinisterSettings from "../components/minister/minister-settings";
import GelMinisterSettings from "../components/minister/gel-minister-settings";
import AdminMinisterAuthorize from "../components/minister/admin-minister-authorize";
......@@ -26,6 +27,8 @@ import ReportAllStat from "../components/minister/report-all-stat";
import ReportGeneral from "../components/minister/report-general";
import ReportNoCapacity from "../components/minister/report-no-capacity";
import ReportUsers from "../components/minister/report-users";
//
import ReportUsersGel from "../components/minister/report-users-gel";
import MinistryHome from "../components/ministry.home";
import SchoolHome from "../components/school.home";
import AfterSubmit from "../components/student-application-form/after.submit";
......@@ -64,6 +67,7 @@ import { CamelCasePipe } from "../pipes/camelcase";
import { RemoveSpaces } from "../pipes/removespaces";
import ReportMergedClasses from "../components/minister/report-merged-classes";
import ReportApplications from "../components/minister/report-applications";
import ReportApplicationsGel from "../components/minister/report-applications-gel";
import ReportUserApplications from "../components/minister/report-user-applications";
import ReportGelStudents from "../components/minister/report-gel-students";
import ElectiveCourseFieldsSelect from "../components/student-application-form/electivecourse.fields.select";
......@@ -132,9 +136,12 @@ export const MainRoutes: Routes = [
{ path: "ministry/minister-view", component: MinisterView, canActivate: [MinistryAuthGuard] },
{ path: "school/school-type-selection", component: SchoolTypeSelectionDde, canActivate: [EduAdminAuthGuard] },
{ path: "ministry/minister-reports", component: MinisterReports, canActivate: [ReportsAuthGuard] },
{ path: "ministry/minister-reports-gel", component: MinisterReportsGel, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-all-stat/:reportId", component: ReportAllStat, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-general", component: ReportGeneral, canActivate: [MinistryAuthGuard] },
{ path: "ministry/report-users/:reportId", component: ReportUsers, canActivate: [MinistryAuthGuard] },
//
{ path: "ministry/report-users-gel/:reportId", component: ReportUsersGel, canActivate: [MinistryAuthGuard] },
{ path: "ministry/report-no-capacity/:reportId", component: ReportNoCapacity, canActivate: [MinistryAuthGuard] },
{ path: "ministry/minister-informstudents", component: InformStudents, canActivate: [MinistryAuthGuard] },
{ path: "ministry/minister-updatepromotion", component: UpdatePromotion, canActivate: [MinistryAuthGuard] },
......@@ -151,6 +158,7 @@ export const MainRoutes: Routes = [
{ path: "help-desk", component: HelpDesk, canActivate: [StudentAuthGuard] },
{ path: "ministry/report-merged-classes", component: ReportMergedClasses, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-applications", component: ReportApplications, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-applications-gel", component: ReportApplicationsGel, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-user-applications", component: ReportUserApplications, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-gel-students", component: ReportGelStudents, canActivate: [ReportsAuthGuard] },
{ path: "orientation-group-select", component: OrientationGroup, canActivate: [StudentAuthGuard, StudentGelLockGuard]},
......@@ -199,9 +207,12 @@ export const MainDeclarations = [
DirectorGelReports,
MinisterView,
MinisterReports,
MinisterReportsGel,
ReportAllStat,
ReportGeneral,
ReportUsers,
//
ReportUsersGel,
ReportNoCapacity,
ReportCapacity,
ReportEpalApplications,
......@@ -226,6 +237,7 @@ export const MainDeclarations = [
SmallClassApprovementMin,
ReportMergedClasses,
ReportApplications,
ReportApplicationsGel,
ReportUserApplications,
ReportGelStudents,
OrientationGroup,
......
......@@ -742,6 +742,10 @@ export class HelperDataService implements OnInit, OnDestroy {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath, options)
.map(response => response.json());
}
if (routepath === "/ministry/report-users-gel/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath, options)
.map(response => response.json());
}
else if (routepath === "/ministry/general-report/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath, options)
.map(response => response.json());
......@@ -777,6 +781,11 @@ export class HelperDataService implements OnInit, OnDestroy {
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
.map(response => response.json());
}
else if (routepath === "/ministry/report-applications-gel/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel + "/" +
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
.map(response => response.json());
}
else if (routepath === "/ministry/report-user-applications/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel + "/" +
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
......@@ -1816,7 +1825,7 @@ getHighSchoolSelection(id)
}
FindCoursesPerSchoolGel() {
FindCoursesPerSchoolGel(/*appstatus*/) {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
......@@ -1827,7 +1836,7 @@ FindCoursesPerSchoolGel() {
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/findcoursesperschoolgel/`, options)
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/findcoursesperschoolgel/` /*+ appstatus*/, options)
.map(response => response.json());
......
......@@ -26,6 +26,8 @@ export interface IGelStudentDataField {
myschool_level_name: string;
myschool_section_name:string;
myschool_promoted: string;
is_authenticated: string;
}
export interface IGelStudentDataFieldRecord extends TypedRecord<IGelStudentDataFieldRecord>, IGelStudentDataField { };
......