...
 
Commits (11)
......@@ -217,8 +217,6 @@ class ApplicationSubmit extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
//$second_period = $eggrafesConfig->activate_second_period->value;
$student = array(
'langcode' => 'el',
'user_id' => $epalUser->user_id->target_id,
......@@ -500,7 +498,6 @@ class ApplicationSubmit extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
//$second_period = $eggrafesConfig->activate_second_period->value;
$student = array(
'langcode' => 'el',
'user_id' => $epalUser->user_id->target_id,
......@@ -613,7 +610,7 @@ class ApplicationSubmit extends ControllerBase
$epalStudent->set('myschool_currentlevelname', $applicationForm[0]['level_name']);
//if ($applicationForm[0]['unittype_name'] != null)
$epalStudent->set('myschool_currentunittype', $applicationForm[0]['unittype_name']);
//$epalStudent->set('second_period', $eggrafesConfig->activate_second_period->value);
$epalStudent->set('second_period', $eggrafesConfig->activate_second_period->value);
$epalStudent->save();
}
......
......@@ -73,7 +73,8 @@ class DirectorView extends ControllerBase
$user = reset($users);
if ($user) {
$epalId = $user->init->value;
//$epalId = 191;
//hard
//$epalId = 46;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $epalId));
$school = reset($schools);
if (!$school) {
......@@ -473,7 +474,7 @@ class DirectorView extends ControllerBase
}elseif ($userRole === 'ministry') {
$SchoolCats = $this->entityTypeManager->getStorage('eepal_school')
->loadByProperties(array('id' => $schoolid));
}
}
$SchoolCat = reset($SchoolCats);
if ($SchoolCat) {
......@@ -994,7 +995,8 @@ class DirectorView extends ControllerBase
$user = reset($users);
if ($user) {
$schoolid = $user->init->value;
//$schoolid = 191;
//hard
//$schoolid = 46;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......@@ -1223,17 +1225,17 @@ public function getpde(Request $request)
$sCon = $this->connection->select('eepal_region_field_data', 'eStudent');
$sCon->fields('eStudent', array('id','name' ));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($studentPerSchool as $object) {
$list[] = array(
'id' => $object -> id,
'name' => $object -> name,
);
++$i;
}
return $this->respondWithStatus($list, Response::HTTP_OK);
} //end try
......@@ -1287,7 +1289,7 @@ public function getpde(Request $request)
$schools = $this->entityTypeManager
->getStorage('eepal_school')
->loadByProperties(array('region_edu_admin_id' => $pdeId));
if ($schools) {
......@@ -1303,7 +1305,7 @@ public function getpde(Request $request)
}
return $this->respondWithStatus($list, Response::HTTP_OK);
}
}
}//end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
......@@ -1311,7 +1313,7 @@ public function getpde(Request $request)
"message" => t("An unexpected problem occured during report")
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
......@@ -1353,7 +1355,7 @@ public function getpde(Request $request)
$SchoolCats = $this->entityTypeManager->getStorage('eepal_school')
->loadByProperties(array('id' => $schoolid));
$SchoolCat = reset($SchoolCats);
if ($SchoolCat) {
......@@ -1602,7 +1604,7 @@ public function getpde(Request $request)
}//end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
......@@ -1610,7 +1612,7 @@ public function getpde(Request $request)
"message" => t("An unexpected problem occured during report")
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
......
......@@ -211,7 +211,7 @@ public function findGroupsForMerging(Request $request,$firstid, $classId, $secto
}
else
elseif ($classId == 3)
{
$courses = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $object->id(), 'specialty_id' => $specialit));
if ($courses){
......@@ -233,6 +233,32 @@ public function findGroupsForMerging(Request $request,$firstid, $classId, $secto
}
}
else
{
if ($object -> operation_shift -> value == 'ΕΣΠΕΡΙΝΟ')
{
$courses = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $object->id(), 'specialty_id' => $specialit));
if ($courses){
foreach ($courses as $key)
{
if ($firstid != $object->id())
{
$status = $this-> findStatus($object->id(),$classId, $sector, $specialit);
$stat = intval($status);
$list[] = array(
'id' => $object->id(),
'name' => $object->name->value,
'tmhma' => $key->specialty_id-> entity->get('name')->value,
'studentcount' => $stat,
);
}
}
}
}
}
}
return $this->respondWithStatus($list, Response::HTTP_OK);
} else {
......
......@@ -523,6 +523,8 @@ class GelApplicationSubmit extends ControllerBase
$gelStudent->set('myschool_currentlevelname', $applicationForm[0]['level_name']);
$gelStudent->set('myschool_currentunittype', $applicationForm[0]['unittype_name']);
$gelStudent->set('second_period', $second_period);
$gelStudent->save();
}
$entity_storage_student->resetCache();
......
......@@ -487,7 +487,7 @@ class GelSubmittedApplications extends ControllerBase
$schoolAddress = $gelStudent->street_address;
$schoolTel = $gelStudent->phone_number;
//$this->logger->warning("Trace.." . $gelStudent->myschool_promoted . " " . $gelStudent->second_period . " " . $gelStudent->changed . " " . $dateStartInt);
//$this->logger->warning("Trace.." . $applicantsResultsDisabled . " " . $gelStudent->myschool_promoted . " " . $gelStudent->second_period . " " . $gelStudent->changed . " " . $dateStartInt);
$canedit = '0';
if ( $applicantsAppModifyDisabled == "0"
&& $eggrafesConfig->activate_second_period->value == $gelStudent->second_period
......@@ -495,16 +495,18 @@ class GelSubmittedApplications extends ControllerBase
)
$canedit = '1';
//$applicantsResultsDisabled = "0";
//if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted === "1" || $gelStudent->myschool_promoted === "2")) {
if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted != "3" && $gelStudent->myschool_promoted != "4"
&& $gelStudent->myschool_promoted != "5" && $gelStudent->myschool_promoted != "14")) {
// περιττό (?), στη Β' περίοδο οι αιτήσεις λογικά δεν έχουν ενημερωμένο το myschool_promoted ?
if ($gelStudent->second_period === "1" && $gelStudent->changed >= $dateStartInt)
if ($gelStudent->second_period == "1" && $gelStudent->changed >= $dateStartInt)
//η αίτηση είναι της β' περιόδου με ημερομηνία μεταγενέστερη της ημερομηνίας έναρξης β' περιόδου
$status = "2";
// end new piece of code
else if ($gelStudent->school_id)
if ($gelStudent->school_id)
//υπάρχει σχολείο στον πίνακα gelstudenthighschool
$status = "1";
//else if ($gelStudent->lastschool_unittypeid == 40)
......@@ -512,7 +514,7 @@ class GelSubmittedApplications extends ControllerBase
// $status = "3";
else if ($gelStudent->student_id != null && $gelStudent->school_id == null)
//υπάρχει ο μαθητής αλλά όχι το σχολείο στον πίνακα gelstudenthighschool
$status = "8";
$status = "3";
else if ($gelStudent->student_id == null) {
//ο μαθητής δεν υπάρχει στον πίνακα gelstudenthighschool, άρα πάει αυτοδίκαια στο σχολείο τρέχουσας φοίτησης
$status = "4";
......
......@@ -342,7 +342,8 @@ class SdeDistribution extends ControllerBase
$sCon->fields('gStudent', array('lastschool_registrynumber','lastschool_unittypeid', 'lastschool_class' , 'delapp','nextclass','am','regionarea','regiontk','regionaddress','id','second_period'))
->fields('gSchool', array('id', 'name','edu_admin_id', 'registry_no','extra_unitid'))
->condition('gStudent.delapp', 0, '=')
->condition('gSchool.extra_unitid',300,'=');
->condition(db_or()->condition('gSchool.extra_unitid', 300 , '=') ->condition('gSchool.extra_unitid',1300,'='));
//->condition('gSchool.extra_unitid',300,'=');
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
}
......
......@@ -66,7 +66,8 @@ import { HelperDataService } from "../../services/helper-data-service";
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === i" >
<div class="row" style="line-height: 2em;">
<div class="col-md-10" style="font-weight: bold;" >{{CoursesPerSchools$.taxi}}</div>
<div class="col-md-2" style="font-weight: bold;" ><span class="pull-right" style="text-align: right; padding-right: 2px;">{{CoursesPerSchools$.size}}</span></div>
<!--<div class="col-md-2" style="font-weight: bold;" ><span class="pull-right" style="text-align: right; padding-right: 2px;">{{CoursesPerSchools$.size}}</span></div>-->
<div *ngIf = "courseActive == i" class="col-md-2" style="font-weight: bold;" ><span class="pull-right" style="text-align: right; padding-right: 2px;">{{dynamicCount | async}}</span></div>
</div>
</li>
......@@ -290,6 +291,8 @@ import { HelperDataService } from "../../services/helper-data-service";
private sector = <number>0;
private special = <number>0;
private dynamicCount: BehaviorSubject<string>;
constructor(
private _hds: HelperDataService,
private activatedRoute: ActivatedRoute,
......@@ -301,6 +304,8 @@ import { HelperDataService } from "../../services/helper-data-service";
this.retrievedStudent = new BehaviorSubject(false);
this.SavedStudents$ = new BehaviorSubject({});
this.opened = false;
this.dynamicCount = new BehaviorSubject("");
}
public showConfirmModal(): void {
......@@ -357,12 +362,14 @@ import { HelperDataService } from "../../services/helper-data-service";
findstudent(taxi) {
this.showLoader.next(true);
this.dynamicCount.next("");
this.retrievedStudent.next(false);
this.StudentInfoSub = this._hds.getStudentPerSchoolGel(taxi)
.subscribe(data => {
this.StudentInfo$.next(data);
this.retrievedStudent.next(true);
this.showLoader.next(false);
this.dynamicCount.next(data.length);
},
error => {
this.StudentInfo$.next([{}]);
......
......@@ -69,7 +69,7 @@ import { GelStudentDataFieldsActions } from "../actions/gelstudentdatafields.act
<p style = "font-size:1.0em">
<strong>Ενημέρωση: </strong>
Ευχαριστούμε για τη συνεργασία. Θα μπορείτε να ενημερωθείτε για το αποτέλεσμα της κατανομής της αίτησής σας από τις
<strong>02/07 (για τα ΕΠΑ.Λ.)</strong> και από τις <strong>04/07 (για τα ΓΕ.Λ.)</strong> και να εκτυπώσετε την αίτησή σας μέσω της εφαρμογής e-eggrafes.
<strong>02/07 (για τα ΕΠΑ.Λ.)</strong> και από τις <strong>05/07 (για τα ΓΕ.Λ.)</strong> και να εκτυπώσετε την αίτησή σας μέσω της εφαρμογής e-eggrafes.
</p>
......
......@@ -179,6 +179,67 @@ import { FormBuilder, FormGroup } from "@angular/forms";
</div>
</div>
<br>
<br>
<div style=" font-weight: bold;">
<li class="list-group-item isclickable" >
<div class="col-md-12">Δ Λυκείου</div>
</li>
</div>
<br>
<div *ngFor="let SectorNames$ of Sectors$ | async; let i=index; let isOdd=odd; let isEven=even" style=" font-weight: bold;">
<li class="list-group-item isclickable" (click)="setActiveSector(SectorNames$.id)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="regionActive === SectorNames$.id" >
<div class="col-md-12">{{SectorNames$.name}}</div>
</li>
<div [hidden]="regionActive !== SectorNames$.id" >
<div *ngFor="let Courses$ of Specialit$ | async; let j=index; let isOdd=odd; let isEven=even" style="font-size: 0.8em; font-weight: bold;">
<li class="list-group-item isclickable" (click)="setActiveSpecialD(SectorNames$.id, Courses$.id)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === Courses$.id" >
<div class="col-md-12">{{Courses$.name}}</div>
</li>
<div [hidden]="courseActiveforDClass !== Courses$.id" >
<div *ngFor="let CoursesforMerges$ of School$ | async;
let k=index; let isOdd=odd; let isEven=even"
class="row list-group-item isclickable"
[class.oddout]="isOdd" [class.evenout]="isEven"
style="margin: 0px 2px 0px 2px; "
(click)="setActiveCourses(CoursesforMerges$.id)"
(click)="findmergingcourse(CoursesforMerges$.id,4,SectorNames$.id, Courses$.id)">
<div class="col-md-8" style=" font-weight: bold;" >{{CoursesforMerges$.name}}</div>
<div class="col-md-3" style=" font-weight: bold;" >{{CoursesforMerges$.studentcount}}</div>
<div [hidden]="courseActive !== CoursesforMerges$.id" >
<div *ngFor="let AllCourses$ of CoursesforMerge$ | async; let l=index; let isOdd=odd; let isEven=even"
class="row list-group-item"
[class.oddout]="isOdd" [class.evenout]="isEven" style="margin: 0px 2px 0px 2px;">
<div class="col-md-7" style=" font-weight: bold;" >{{AllCourses$.name}}</div>
<div class="col-md-2" style=" font-weight: bold;" >{{AllCourses$.studentcount}}</div>
<div class="col-md-3" style=" font-weight: bold;" >
<i class="fa fa-compress isclickable" (click)="mergecourses(AllCourses$.id ,CoursesforMerges$.id,AllCourses$.name, CoursesforMerges$.name, 4,SectorNames$.id, Courses$.id)"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -203,6 +264,7 @@ import { FormBuilder, FormGroup } from "@angular/forms";
private SectorActive = <number>-1;
private SectorActiveforBClass = <number>-1;
private courseActiveforCClass = <number>-1;
private courseActiveforDClass = <number>-1;
private specialActive = <number>-1;
private courseActive = <number>-1;
private aclassActive = <number>-1;
......@@ -279,6 +341,7 @@ import { FormBuilder, FormGroup } from "@angular/forms";
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.Specialit$.next([{}]);
if (ind === this.regionActive) {
ind = -1;
......@@ -313,6 +376,8 @@ import { FormBuilder, FormGroup } from "@angular/forms";
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.School$.next([{}]);
if (ind === this.SectorActiveforBClass) {
ind = -1;
......@@ -365,6 +430,36 @@ import { FormBuilder, FormGroup } from "@angular/forms";
}
setActiveSpecialD(sector_ind, special_ind){
this.School$.next([{}]);
if (special_ind === this.courseActiveforDClass) {
special_ind = -1;
this.SectorActive = sector_ind;
this.courseActiveforDClass = special_ind;
}
else {
this.SectorActive = sector_ind;
this.courseActiveforDClass = special_ind;
this.showLoader.next(true);
this.SchoolSub = this._hds.FindSmallCourses(4,sector_ind, special_ind)
.subscribe(data => {
this.School$.next(data);
this.showLoader.next(false);
},
error => {
console.log("Error Getting Courses");
this.showLoader.next(false);
});
}
}
setActiveCourses(ind){
......@@ -397,6 +492,7 @@ import { FormBuilder, FormGroup } from "@angular/forms";
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.School$.next([{}]);
if (this.aclassActive === ind)
{
......@@ -412,6 +508,7 @@ import { FormBuilder, FormGroup } from "@angular/forms";
findmergingcourse(nid, classid, sector, special){
this.showLoader.next(true);
console.log(classid,"taxi");
this.CoursesforMergeSub = this._hds.FindMergingCourses(nid, classid, sector, special).subscribe(x => {
this.CoursesforMerge$.next(x);
this.showLoader.next(false);
......
......@@ -266,6 +266,75 @@ import { HelperDataService } from "../../services/helper-data-service";
</div>
<br>
<br>
<div style=" font-weight: bold;">
<li class="list-group-item isclickable" >
<div class="col-md-12">Δ Λυκείου</div>
</li>
</div>
<br>
<div *ngFor="let SectorNames$ of Sectors$ | async; let i=index; let isOdd=odd; let isEven=even" style="font-weight: bold;">
<li class="list-group-item isclickable" (click)="setActiveSectorDClass(SectorNames$.id)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="SectorActiveforDClass === SectorNames$.id" >
<div class="col-md-12">{{SectorNames$.name}}</div>
</li>
<div [hidden]="SectorActiveforDClass !== SectorNames$.id" >
<div *ngFor="let Courses$ of Specialit$ | async; let j=index; let isOdd=odd; let isEven=even" style="font-size: 0.8em; font-weight: bold;">
<li class="list-group-item isclickable" (click)="setActiveSpecialD(Courses$.id)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === Courses$.id" >
<div class="col-md-12">{{Courses$.name}}</div>
</li>
<div [hidden]="courseActive !== Courses$.id" >
<div *ngIf="(retrievedSch | async)">
<div *ngFor="let CoursesForUndoMerges$ of CoursesForUndoMerge$ | async; let i=index;
let isOdd=odd; let isEven=even" >
<div class="list-group-item isclickable" (click)="setActive(i)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === i">
<div class="row" style="margin: 0px 2px 0px 2px; line-height: 2em;">
<div class="col-md-5" style="font-weight: bold;" >{{CoursesForUndoMerges$.name}}</div>
<div class="col-md-5" style="font-weight: bold;" >{{CoursesForUndoMerges$.namenew}}</div>
<div class="col-md-2" style="font-size: 0.8em; font-weight: bold;" >
<i class="fa fa-undo isclickable" (click)="undomergecourses(CoursesForUndoMerges$.id, CoursesForUndoMerges$.idnew,
CoursesForUndoMerges$.name, CoursesForUndoMerges$.namenew, 4,SectorNames$.id, Courses$.id)"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
`
......@@ -306,6 +375,7 @@ import { HelperDataService } from "../../services/helper-data-service";
private aclassActive = <number>-1;
private SectorActiveforBClass = <number>-1;
private SectorActiveforCClass = <number>-1;
private SectorActiveforDClass = <number>-1;
constructor(
......@@ -386,6 +456,7 @@ import { HelperDataService } from "../../services/helper-data-service";
{
this.SectorActiveforBClass = -1;
this.SectorActiveforCClass = -1;
this.SectorActiveforDClass = -1;
this.courseActive = -1;
if (this.aclassActive === ind)
{
......@@ -449,6 +520,7 @@ import { HelperDataService } from "../../services/helper-data-service";
{
this.SectorActiveforCClass = -1;
this.SectorActiveforDClass = -1;
this.courseActive = -1;
this.aclassActive =-1;
......@@ -467,6 +539,7 @@ import { HelperDataService } from "../../services/helper-data-service";
setActiveSectorCClass(ind)
{
this.SectorActiveforBClass = -1;
this.SectorActiveforDClass = -1;
this.courseActive = -1;
this.aclassActive =-1;
......@@ -490,6 +563,35 @@ import { HelperDataService } from "../../services/helper-data-service";
}
setActiveSectorDClass(ind)
{
this.SectorActiveforBClass = -1;
this.SectorActiveforCClass = -1;
this.courseActive = -1;
this.aclassActive =-1;
if (this.SectorActiveforDClass === ind){
ind = -1
}
this.SectorActiveforDClass = ind;
this.classSelected = 4;
this.sectorSelected = ind;
this.courseSelected = 0;
this.SpecialitSub = this._hds.getAllCourses(this.SectorActiveforDClass)
.subscribe(data => {
this.Specialit$.next(data);
this.showLoader.next(false);
},
error => {
console.log("Error Getting Courses");
this.showLoader.next(false);
});
}
setActiveSpecial(ind )
{
if (this.courseActive === ind){
......@@ -502,6 +604,21 @@ import { HelperDataService } from "../../services/helper-data-service";
}
setActiveSpecialD(ind )
{
if (this.courseActive === ind){
ind = -1
}
this.courseActive = ind;
this.classSelected = 4;
this.courseSelected = ind;
this.findcourses();
}
......
......@@ -57,6 +57,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<option value="0"></option>
<option *ngFor="let SchoolSelection$ of SchoolSelections$ | async; let i=index" [value] = "SchoolSelection$.epal_id"> {{SchoolSelection$.epal_name}} </option>
</select>
<br/>
</div>
<div *ngIf = "reportId === 3 || reportId === 5" >
......@@ -71,6 +72,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<option value="3" >Γ' Λυκείου</option>
<option value="4" >Δ' Λυκείου</option>
</select>
<br/>
</div>
<div class="col-md-11 offset-md-1">
<label *ngIf="(showSectorList | async) && enableCourseFilter && (classSelected === 2 || classSelected === 3 || classSelected === 4) ">Τομέας</label>
......
......@@ -276,6 +276,12 @@ export class ReportsSchema {
width: "8%",
filter: false
},
approved: {
title: "Εγκεκριμένο",
width: "8%",
filter: false
}
/*
capacity: {
title: "Χωρ/κα",
width: "8%",
......@@ -286,6 +292,7 @@ export class ReportsSchema {
width: "8%",
filter: false
}
*/
}
};
......
......@@ -83,6 +83,12 @@
</li>
</div>
<div *ngIf="(loginInfo$ | async).size > 0" class="nav-item">
<li *ngIf=" authRole=='supervisor'" class="nav-item">
<a class="nav-link" [routerLink]="['/ministry/smallclassapprovementmin']" [routerLinkActive]="['active']"><b>Εγκρίσεις Ολιγομελών </b></a>
</li>
</div>
<div *ngIf="(loginInfo$ | async).size > 0 && (userType | async) === 'epal'" class="nav-item">
<li *ngIf="authRole=='supervisor'" class="nav-item">
<a class="nav-link"><b>ΔΙΑΧΕΙΡΙΣΗ ΕΠΑΛ</b></a>
......@@ -154,14 +160,6 @@
</li>
</div>
<div *ngIf="(loginInfo$ | async).size > 0" class="nav-item">
<li *ngIf=" authRole=='supervisor'" class="nav-item">
<a class="nav-link" [routerLink]="['/ministry/smallclassapprovementmin']" [routerLinkActive]="['active']"><b>Εγκρίσεις Ολιγομελών </b></a>
</li>
</div>
<div *ngIf="(loginInfo$ | async).size > 0" class="nav-item">
<li *ngIf="authRole=='pde'" class="nav-item">
<a class="nav-link" [routerLink]="['/ministry/minister-reports']" [routerLinkActive]="['active']"><b>Αναφορές</b></a>
......