Commit dca51a09 authored by Kostas G's avatar Kostas G

Report for Merged Classes (Beta)

parent 735c252c
......@@ -31,7 +31,6 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<div *ngIf = "userLoggedIn === 'dide'">Φίλτρο Επιλογής Σχολείου</div>
<div *ngIf = "userLoggedIn === 'pde'">Φίλτρο Επιλογής Δ/νσης Εκπ/σης - Σχολείου</div>
</button>
<div class="col-md-11 offset-md-1">
<label *ngIf = "enableRegionFilter && userLoggedIn === 'supervisor'"> Περιφερειακή Διεύθυνση </label>
<select #regsel class="form-control" (change)="checkregion(regsel)" *ngIf = "enableRegionFilter" [value] = "regionSelected" [hidden] = "userLoggedIn !== 'supervisor'" formControlName="region">
......@@ -54,8 +53,8 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
</select>
</div>
<button type="button" class="btn btn-sm" (click)="toggleCourseFilter()" >Φίλτρο Επιλογής Τομέα / Ειδικότητας</button>
<button type="button" class="btn btn-sm" (click)="toggleCourseFilter()" >Φίλτρο Επιλογής Τομέα / Ειδικότητας</button>
<div class="col-md-11 offset-md-1">
<label for="classid" *ngIf = "enableCourseFilter" >Τάξη</label>
<select #class_sel class="form-control" (change)="checkclass(class_sel)" *ngIf = "enableCourseFilter" formControlName="classid" >
......@@ -100,11 +99,11 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
</div>
</div>
<!--
<button type="button" class="alert alert-info pull-right" (click)="export2Csv()" [hidden]="validCreator !== 1"><i class="fa fa-download"></i> Εξαγωγή σε csv</button>
<button type="button" class="alert alert-info pull-left" (click)="createDiagram()" [hidden]="validCreator !== 1 || schSelected === 0 || (reportId !== 2 ) "><i class="fa fa-bar-chart"></i> Διάγραμμα</button>
<div class="d3-chart" *ngIf = "validCreator === 1" #chart></div>
-->
</div>
`
})
......@@ -285,7 +284,8 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
let route = "/ministry/report-merged-classes/";
this.distribFinalized = 0;
this.settings = this.reportSchema.reportMergedClassesSchema;
this.settings.fileName = "e-ΕΠΑΛ Ολιγομελή τμήματα - Προσωρινά τοποθετημένοι μαθητές";
this.settings.fileName = "e-ΕΠΑΛ Συγχωνέυσεις Τμημάτων";
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
// if (regionSel.value !== 0)
......@@ -312,25 +312,6 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, route, regSel, admSel, schSel, clSel, secSel, courSel, this.distribFinalized).subscribe(data => {
this.generalReport$.next(data);
this.data = data;
for (let i = 0; i < this.data.length; i++) {
this.data[i].num = Number(data[i].num);
this.data[i].percentage = Number(data[i].percentage);
this.data[i].percTotal = Number(data[i].percTotal);
this.data[i].percA = Number(data[i].percA);
if (Number.isNaN(this.data[i].percA)) {
this.data[i].percA = "-";
}
this.data[i].percB = Number(data[i].percB);
if (Number.isNaN(this.data[i].percB)) {
this.data[i].percB = "-";
}
this.data[i].percC = Number(data[i].percC);
if (Number.isNaN(this.data[i].percC)) {
this.data[i].percC = "-";
}
}
this.validCreator = 1;
this.source = new LocalDataSource(this.data);
this.columnMap = new Map<string, TableColumn>();
......
......@@ -175,35 +175,59 @@ export class ReportsSchema {
};
reportMergedClassesSchema = {
actions: false,
fileName: "e-ΕΠΑΛ Συγχωνέυσεις",
actions: false,fileName: "e-ΕΠΑΛ Συγχωνέυσεις Τμημάτων",
pager: {
display: true,
perPage: 10
},
noDataMessage: "Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης",
columns: {
school1: {
title: "Προς Συγχώνευση Σχολείο",
width: "35%",
nameΑ: {
title: "Σχολείο προς Συγχώνευση",
width: "6%",
filter: false
},
mathites1: {
title: "Μαθητες προς Συγχώνευση Σχολείου",
width: "15%",
regionΑ: {
title: "Π.Δ.Ε.",
width: "6%",
filter: false
},
adminΑ: {
title: "ΔΙ.Δ.Ε.",
width: "6%",
filter: false
},
school2: {
sectionΑ: {
title: "Τάξη/ Τομέας/ Ειδικότητα",
width: "6%",
filter: false
},
numΑ: {
title: "Αριθμός Μαθητών",
width: "3%",
filter: false
},
nameΒ: {
title: "Σχολείο Υποδοχής",
width: "35%",
width: "6%",
filter: false
},
mathites2: {
title: "Συνολο Μαθητών",
width: "15%",
regionΒ: {
title: "Π.Δ.Ε. 2",
width: "6%",
filter: false
},
adminΒ: {
title: "ΔΙ.Δ.Ε. 2",
width: "6%",
filter: false
},
numΒ: {
title: "Συνολικός Αριθμός Μαθητών",
width: "3%",
filter: false
}
}
}
};
constructor() { }
......
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