Commit e4c1c226 authored by Νίκος Κατσαούνος's avatar Νίκος Κατσαούνος

Merge branch 'develop' of https://git.minedu.gov.gr/itminedu/e-eggrafes into adminVersion

parents 6275c9cf d5598d6b
......@@ -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 {
......
......@@ -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)="setActiveSectorD(SectorNames$.id)"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="regionActiveD === SectorNames$.id" >
<div class="col-md-12">{{SectorNames$.name}}</div>
</li>
<div [hidden]="regionActiveD !== 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>
......@@ -200,9 +261,11 @@ import { FormBuilder, FormGroup } from "@angular/forms";
private CoursesforMergeSub: Subscription;
private showLoader: BehaviorSubject<boolean>;
private regionActive = <number>-1;
private regionActiveD = <number>-1;
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;
......@@ -276,9 +339,11 @@ import { FormBuilder, FormGroup } from "@angular/forms";
this.aclassActive = -1;
this.SectorActiveforBClass = -1;
this.regionActive = -1;
this.regionActiveD = -1;
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.Specialit$.next([{}]);
if (ind === this.regionActive) {
ind = -1;
......@@ -302,6 +367,41 @@ import { FormBuilder, FormGroup } from "@angular/forms";
}
setActiveSectorD(ind)
{
this.aclassActive = -1;
this.SectorActiveforBClass = -1;
this.regionActive = -1;
this.regionActiveD = -1;
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.Specialit$.next([{}]);
if (ind === this.regionActiveD) {
ind = -1;
this.regionActiveD = ind;
this.specialActive = ind;
this.courseActive = ind;
}
else {
this.regionActiveD = ind;
this.showLoader.next(true);
this.SpecialitSub = this._hds.getAllCourses(this.regionActiveD)
.subscribe(data => {
this.Specialit$.next(data);
this.showLoader.next(false);
},
error => {
console.log("Error Getting Courses");
this.showLoader.next(false);
});
}
}
......@@ -310,9 +410,12 @@ import { FormBuilder, FormGroup } from "@angular/forms";
this.aclassActive = -1;
this.SectorActiveforBClass = -1;
this.regionActive = -1;
this.regionActiveD = -1;
this.courseActive = -1;
this.specialActive = -1;
this.courseActiveforCClass = -1;
this.courseActiveforDClass = -1;
this.School$.next([{}]);
if (ind === this.SectorActiveforBClass) {
ind = -1;
......@@ -338,6 +441,7 @@ import { FormBuilder, FormGroup } from "@angular/forms";
setActiveSpecial(sector_ind, special_ind){
this.School$.next([{}]);
if (special_ind === this.courseActiveforCClass) {
special_ind = -1;
......@@ -365,6 +469,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 +531,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 +547,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();
}
......
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