Commit 1a7ce5e7 authored by Open Source Developer's avatar Open Source Developer
Browse files

Merge branch 'develop' of https://git.minedu.gov.gr/itminedu/e-epal into pde-dde-views

parents b639a502 ec0f9657
...@@ -17,13 +17,6 @@ class SubmitedApplications extends ControllerBase ...@@ -17,13 +17,6 @@ class SubmitedApplications extends ControllerBase
protected $entityTypeManager; protected $entityTypeManager;
protected $logger; protected $logger;
protected $connection; protected $connection;
/*
public function __construct(EntityTypeManagerInterface $entityTypeManager)
{
$this->entityTypeManager = $entityTypeManager;
}
*/
public function __construct( public function __construct(
EntityTypeManagerInterface $entityTypeManager, EntityTypeManagerInterface $entityTypeManager,
...@@ -245,23 +238,15 @@ class SubmitedApplications extends ControllerBase ...@@ -245,23 +238,15 @@ class SubmitedApplications extends ControllerBase
$list[] = array( $list[] = array(
'applicationId' => $object->id(), 'applicationId' => $object->id(),
//'name' => $object -> name ->value,
'name' => $name_decoded, 'name' => $name_decoded,
//'studentsurname' => $object -> studentsurname ->value,
'studentsurname' => $studentsurname_decoded, 'studentsurname' => $studentsurname_decoded,
//'fatherfirstname' => $object -> fatherfirstname ->value,
'fatherfirstname' => $fatherfirstname_decoded, 'fatherfirstname' => $fatherfirstname_decoded,
'fathersurname' => $object->fathersurname->value, 'fathersurname' => $object->fathersurname->value,
//'motherfirstname' => $object -> motherfirstname ->value,
'motherfirstname' => $motherfirstname_decoded, 'motherfirstname' => $motherfirstname_decoded,
'mothersurname' => $object->mothersurname->value, 'mothersurname' => $object->mothersurname->value,
//'guardian_name' =>$object -> guardian_name ->value,
'guardian_name' => $guardian_name_decoded, 'guardian_name' => $guardian_name_decoded,
//'guardian_surname' =>$object -> guardian_surname ->value,
'guardian_surname' => $guardian_surname_decoded, 'guardian_surname' => $guardian_surname_decoded,
//'guardian_fathername' =>$object -> guardian_fathername ->value,
'guardian_fathername' => $guardian_fathername_decoded, 'guardian_fathername' => $guardian_fathername_decoded,
//'guardian_mothername' =>$object -> guardian_mothername ->value,
'guardian_mothername' => $guardian_mothername_decoded, 'guardian_mothername' => $guardian_mothername_decoded,
'lastschool_schoolname' => $object->lastschool_schoolname->value, 'lastschool_schoolname' => $object->lastschool_schoolname->value,
'lastschool_schoolyear' => $object->lastschool_schoolyear->value, 'lastschool_schoolyear' => $object->lastschool_schoolyear->value,
...@@ -269,16 +254,10 @@ class SubmitedApplications extends ControllerBase ...@@ -269,16 +254,10 @@ class SubmitedApplications extends ControllerBase
'currentclass' => $object->currentclass->value, 'currentclass' => $object->currentclass->value,
'currentsector' => $sectorName, 'currentsector' => $sectorName,
'currentcourse' => $courseName, 'currentcourse' => $courseName,
//'regionaddress' =>$object -> regionaddress ->value,
'regionaddress' => $regionaddress_decoded, 'regionaddress' => $regionaddress_decoded,
//'regiontk' =>$object -> regiontk ->value,
'regiontk' => $regiontk_decoded, 'regiontk' => $regiontk_decoded,
//'regionarea' =>$object -> regionarea ->value,
'regionarea' => $regionarea_decoded, 'regionarea' => $regionarea_decoded,
//'certificatetype' =>$object -> certificatetype ->value,
//'telnum' =>$object -> telnum ->value,
'telnum' => $telnum_decoded, 'telnum' => $telnum_decoded,
//'relationtostudent' =>$object -> relationtostudent ->value,
'relationtostudent' => $relationtostudent_decoded, 'relationtostudent' => $relationtostudent_decoded,
'birthdate' => substr($object->birthdate->value, 8, 2).'/'.substr($object->birthdate->value, 5, 2).'/'.substr($object->birthdate->value, 0, 4), 'birthdate' => substr($object->birthdate->value, 8, 2).'/'.substr($object->birthdate->value, 5, 2).'/'.substr($object->birthdate->value, 0, 4),
'created' => date('d/m/Y H:i', $object->created->value), 'created' => date('d/m/Y H:i', $object->created->value),
...@@ -427,31 +406,25 @@ class SubmitedApplications extends ControllerBase ...@@ -427,31 +406,25 @@ class SubmitedApplications extends ControllerBase
if ($applicantsResultsDisabled === "0") { if ($applicantsResultsDisabled === "0") {
$sCon = $this->connection->select('epal_student_class', 'eStudent') $escQuery = $this->connection->select('epal_student_class', 'esc')
->fields('eStudent', array('student_id', 'epal_id', 'finalized')) ->fields('esc', array('student_id', 'epal_id', 'finalized'))
->condition('eStudent.student_id', intval($studentId), '='); ->fields('esch', array('id', 'name', 'street_address','phone_number'));
$escQuery->addJoin('inner', 'eepal_school_field_data', 'esch', 'esc.epal_id=esch.id');
$escQuery->condition('esc.student_id', intval($studentId), '=');
//->condition('eStudent.finalized', "1" , '='); //->condition('eStudent.finalized', "1" , '=');
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ); $epalStudentClasses = $escQuery->execute()->fetchAll(\PDO::FETCH_OBJ);
if (sizeof($epalStudents) === 1) { if (sizeof($epalStudentClasses) === 1) {
$epalStudent = reset($epalStudents); $epalStudentClass = reset($epalStudentClasses);
$sCon = $this->connection->select('eepal_school_field_data', 'eSchool') if ($epalStudentClass->finalized === "1") {
->fields('eSchool', array('id', 'name', 'street_address','phone_number'))
->condition('eSchool.id', $epalStudent->epal_id, '=');
$epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
//status: 0: δεν τοποθετήθηκε, 1: τοποθετήθηκε, 2: τοποθετήθηκε "προσωρινά" σε ολιγομελές
if (sizeof($epalSchools) === 1) {
$epalSchool = reset($epalSchools);
if ($epalStudent->finalized === "1") {
$status = "1"; $status = "1";
$schoolName = $epalSchool->name; $schoolName = $epalStudentClass->name;
$schoolAddress = $epalSchool->street_address; $schoolAddress = $epalStudentClass->street_address;
$schoolTel = $epalSchool->phone_number; $schoolTel = $epalStudentClass->phone_number;
} }
else { else {
$status = "2"; $status = "2";
} }
}
} }
else { else {
$status = "0"; $status = "0";
...@@ -478,9 +451,6 @@ class SubmitedApplications extends ControllerBase ...@@ -478,9 +451,6 @@ class SubmitedApplications extends ControllerBase
} }
} }
} }
private function respondWithStatus($arr, $s) private function respondWithStatus($arr, $s)
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
<div class="col-md-4"> <div class="col-md-4">
<span *ngIf="loginInfoRow$.auth_role===studentRole" class="signout" style="color:#CC3300;"> <span *ngIf="loginInfoRow$.auth_role===studentRole" class="signout" style="color:#CC3300;">
<div *ngFor="let TotalStudent$ of TotalStudents$ | async;"> <div *ngFor="let TotalStudent$ of TotalStudents$ | async;">
Σύνολο Αιτήσεων:{{TotalStudent$.numStudents}} Σύνολο Δηλώσεων: {{TotalStudent$.numStudents}}
</div> </div>
</span> </span>
</div> </div>
<div class="col-md-4" style="text-align: right"> <div class="col-md-4" style="text-align: right">
......
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