Commit 9c72b1c7 authored by Kostas G's avatar Kostas G

New Reports Implemented

parent 93d91035
......@@ -174,14 +174,6 @@ epal.ministry.report-completeness:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportCompleteness'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-all-stat:
path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportAllStat'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-no-capacity:
path: '/ministry/report-no-capacity/{capacityEnabled}'
options:
......@@ -418,5 +410,21 @@ epal.ministry.report-gel-students:
_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'
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -92,5 +92,5 @@ class MyLocalization extends NgLocalization {
})
class AppModule { }
//enableProdMode();
// enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);
......@@ -26,9 +26,11 @@ import { IAppState } from "../../store/store";
<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>
......
......@@ -297,13 +297,13 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.settings = this.reportSchema.reportCompletenessSchema;
}
else if (this.reportId === 3) {
route = "/ministry/report-all-stat/";
route = "/ministry/report-students-num/";
this.distribFinalized = 1;
this.settings = this.reportSchema.reportAllStatSchema;
this.settings.fileName = "e-ΕΠΑΛ Αριθμός Μαθητών και Πληρότητα σχολικών μονάδων ΕΠΑΛ";
}
else if (this.reportId === 5) {
route = "/ministry/report-all-stat/";
route = "/ministry/report-small-classes/";
this.distribFinalized = 0;
this.settings = this.reportSchema.reportSmallClassesSchema;
this.settings.fileName = "e-ΕΠΑΛ Ολιγομελή τμήματα - Προσωρινά τοποθετημένοι μαθητές";
......
import { NgRedux } from "@angular-redux/store";
import { Injectable } from "@angular/core";
//import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { ActivatedRoute, Router } from "@angular/router";
......@@ -25,7 +24,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<div class = "loading" *ngIf="validCreator === 0" ></div>
<form [formGroup]="formGroup" #form>
<h5>Συγχωνεύσεις Τμημάτων</h5>
<h5>Αριθμός Αιτήσεων ανά Σχολική Μονάδα ΕΠΑΛ</h5>
<h6>Επιλογή Φίλτρων</h6>
<button type="button" class="btn btn-sm" (click)="toggleRegionFilter()" >
<div *ngIf = "userLoggedIn === 'supervisor'">Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου</div>
......@@ -209,7 +208,6 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.minedu_userName = loginInfoObj.minedu_username;
this.minedu_userPassword = loginInfoObj.minedu_userpassword;
this.userLoggedIn = loginInfoObj.auth_role;
return loginInfoObj;
}, {});
}
......@@ -245,8 +243,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
let route = "/ministry/report-applications/";
this.distribFinalized = 1;
this.settings = this.reportSchema.reportApplicationsSchema;
this.settings.fileName = "e-ΕΠΑΛ Αριθμός Αιτήσεων ανά ΕΠΑΛ";
this.settings.fileName = "e-ΕΠΑΛ Αριθμός Αιτήσεων ανά Σχολική Μονάδα ΕΠΑΛ";
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
......
import { NgRedux } from "@angular-redux/store";
import { Injectable } from "@angular/core";
//import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { ActivatedRoute, Router } from "@angular/router";
......@@ -25,7 +24,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<div class = "loading" *ngIf="validCreator === 0" ></div>
<form [formGroup]="formGroup" #form>
<h5>Συγχωνεύσεις Τμημάτων</h5>
<h5>Αριθμός Μαθητών προερχόμενων από Γενικά Λύκεια</h5>
<h6>Επιλογή Φίλτρων</h6>
<button type="button" class="btn btn-sm" (click)="toggleRegionFilter()" >
<div *ngIf = "userLoggedIn === 'supervisor'">Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου</div>
......@@ -209,7 +208,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.minedu_userName = loginInfoObj.minedu_username;
this.minedu_userPassword = loginInfoObj.minedu_userpassword;
this.userLoggedIn = loginInfoObj.auth_role;
return loginInfoObj;
}, {});
}
......@@ -244,9 +243,9 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.validCreator = 0;
let route = "/ministry/report-gel-students/";
this.distribFinalized = 1;
this.settings = this.reportSchema.reportMergedClassesSchema;
this.settings = this.reportSchema.reportgelStudentsSchema;
this.settings.fileName = "e-ΕΠΑΛ Αριθμός Μαθητών προερχόμενων από Γενικά Λύκεια";
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
......
......@@ -285,7 +285,6 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.distribFinalized = 0;
this.settings = this.reportSchema.reportMergedClassesSchema;
this.settings.fileName = "e-ΕΠΑΛ Συγχωνέυσεις Τμημάτων";
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
// if (regionSel.value !== 0)
......
import { NgRedux } from "@angular-redux/store";
import { Injectable } from "@angular/core";
//import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { ActivatedRoute, Router } from "@angular/router";
......@@ -22,87 +21,22 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
template: `
<div class="reports-container">
<div class = "loading" *ngIf="validCreator === 0" ></div>
<form [formGroup]="formGroup" #form>
<h5>Αριθμός Αιτήσεων ανά Αιτούντα</h5>
<h6>Επιλογή Φίλτρων</h6>
<button type="button" class="btn btn-sm" (click)="toggleRegionFilter()" >
<div *ngIf = "userLoggedIn === 'supervisor'">Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου</div>
<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">
<option value="0"></option>
<option *ngFor="let RegionSelection$ of RegionSelections$ | async; let i=index" [value] = "RegionSelection$.id"> {{RegionSelection$.name}} </option>
</select>
</div>
<div class="col-md-11 offset-md-1">
<label *ngIf="(showAdminList | async) && enableRegionFilter && userLoggedIn !== 'dide'">Διεύθυνση Εκπαίδευσης</label>
<select #admsel class="form-control" *ngIf="(showAdminList | async) && enableRegionFilter" (change)="checkadminarea(admsel)" [hidden] = "userLoggedIn === 'dide'" formControlName="adminarea">
<option value="0"></option>
<option *ngFor="let AdminAreaSelection$ of AdminAreaSelections$ | async; let i=index" [value] = "AdminAreaSelection$.id"> {{AdminAreaSelection$.name}}</option>
</select>
</div>
<div class="col-md-11 offset-md-1">
<label *ngIf="(showAdminList | async) && enableRegionFilter">Σχολείο</label>
<select #schsel class="form-control" *ngIf="(showAdminList | async) && enableRegionFilter" (change)="checkschool(schsel)" formControlName="schoollist">
<option value="0"></option>
<option *ngFor="let SchoolSelection$ of SchoolSelections$ | async; let i=index" [value] = "SchoolSelection$.epal_id"> {{SchoolSelection$.epal_name}} </option>
</select>
</div>
<div class = "loading" *ngIf="validCreator === 0" ></div>
<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" >
<option value="0" ></option>
<option value="1" >Α Λυκείου</option>
<option value="2" >Β Λυκείου</option>
<option value="3" >Γ Λυκείου</option>
<option value="4" >Δ Λυκείου</option>
</select>
</div>
<div class="col-md-11 offset-md-1">
<label *ngIf="(showSectorList | async) && enableCourseFilter && (classSelected === 2 || classSelected === 3 || classSelected === 4) ">Τομέας</label>
<select #secsel class="form-control" *ngIf="(showSectorList | async) && enableCourseFilter && (classSelected === 2 || classSelected === 3 || classSelected === 4)"
(change)="checksector(secsel)" formControlName="sector">
<option value="0"></option>
<option *ngFor="let SectorSelection$ of SectorSelections$ | async; let i=index" [value] = "SectorSelection$.id"> {{SectorSelection$.name}}</option>
</select>
</div>
<div class="col-md-11 offset-md-1">
<label *ngIf="(showCourseList | async) && enableCourseFilter && (classSelected === 3 || classSelected === 4)">Ειδικότητα</label>
<select #coursel class="form-control" *ngIf="(showCourseList | async) && enableCourseFilter && (classSelected === 3 || classSelected === 4)"
(change)="checkcourse(coursel)" formControlName="course">
<option value="0"></option>
<option *ngFor="let CourseSelection$ of CourseSelections$ | async; let i=index" [value] = "CourseSelection$.id"> {{CourseSelection$.name}}</option>
</select>
</div>
<h5>Αριθμός Αιτήσεων ανά Αιτούντα</h5>
<h6>Επιλογή Φίλτρων: Δεν υπάρχουν διαθέσιμα φίλτρα</h6>
<button type="submit" class="btn btn-alert" (click)="createReport(regsel)" [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>
</form>
<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">
<ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table>
<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">
<ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table>
</div>
</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-right" (click)="export2Csv()" [hidden]="validCreator != 1"><i class="fa fa-download"></i> Εξαγωγή σε csv</button>
</div>
`
})
......@@ -209,7 +143,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.minedu_userName = loginInfoObj.minedu_username;
this.minedu_userPassword = loginInfoObj.minedu_userpassword;
this.userLoggedIn = loginInfoObj.auth_role;
return loginInfoObj;
}, {});
}
......@@ -246,7 +180,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
this.distribFinalized = 1;
this.settings = this.reportSchema.reportUserApplicationsSchema;
this.settings.fileName = "e-ΕΠΑΛ Αριθμός Αιτήσεων ανά Αιτούντα";
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
......
......@@ -232,7 +232,7 @@ export class ReportsSchema {
width: "5%",
filter: false
}
}
}
};
......@@ -349,6 +349,43 @@ export class ReportsSchema {
}
};
reportgelStudentsSchema = {
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
}
}
};
constructor() { }
}
......@@ -4,7 +4,6 @@ import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from "@angular/co
import { Injectable } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { BehaviorSubject, Subscription } from "rxjs/Rx";
//import { EpalClassesActions } from "../../actions/epalclass.actions";
import { DataModeActions } from "../../actions/datamode.actions";
import { DATAMODE_INITIAL_STATE } from "../../store/datamode/datamode.initial-state";
import { IDataModeRecords } from "../../store/datamode/datamode.types";
......@@ -287,7 +286,7 @@ import { IAppState } from "../../store/store";
private router: Router,
private loc: Location
) {
//this.datamode$ = new BehaviorSubject(DATAMODE_INITIAL_STATE);
// this.datamode$ = new BehaviorSubject(DATAMODE_INITIAL_STATE);
this.SubmitedApplic$ = new BehaviorSubject([{}]);
this.SubmitedDetails$ = new BehaviorSubject([{}]);
this.showLoader$ = new BehaviorSubject(false);
......@@ -301,8 +300,8 @@ import { IAppState } from "../../store/store";
this.SubmitedUsersSub.unsubscribe();
if (this.SubmitedDetailsSub)
this.SubmitedDetailsSub.unsubscribe();
//if (this.datamodeSub)
// this.datamodeSub.unsubscribe();
// if (this.datamodeSub)
// this.datamodeSub.unsubscribe();
}
ngOnInit() {
......@@ -358,13 +357,13 @@ import { IAppState } from "../../store/store";
this.applicationId = appId;
this.router.navigate(["/epal-class-select"]);
//this.router.navigate(["/intro-statement"]);
// this.router.navigate(["/intro-statement"]);
this._sfa.initSectorFields();
this._rsa.initRegionSchools();
this._csa.initSectorCourses();
//this._cfa.saveEpalClassesSelected({name: this.SubmitedDetails$.getValue()[0].currentclass, appmode: "edit", studentfirsttname: this.SubmitedDetails$.getValue()[0].name});
// this._cfa.saveEpalClassesSelected({name: this.SubmitedDetails$.getValue()[0].currentclass, appmode: "edit", studentfirsttname: this.SubmitedDetails$.getValue()[0].name});
this._cfa.saveDataModeSelected({edit: true, edit_class: true, app_update: true, currentclass: this.SubmitedDetails$.getValue()[0].currentclass,
appid: this.SubmitedDetails$.getValue()[0].applicationId, studentfirstname: this.SubmitedDetails$.getValue()[0].name,
studentsurname: this.SubmitedDetails$.getValue()[0].studentsurname, fatherfirstname: this.SubmitedDetails$.getValue()[0].fatherfirstname,
......
......@@ -39,7 +39,7 @@ export default class Main {
rootReducer,
{},
[],
//_devTools.enhancer(),
// _devTools.enhancer(),
storeEnhancers);
// middleware,
// tools ? [ ...enhancers, tools ] : enhancers);
......
......@@ -606,7 +606,12 @@ export class HelperDataService implements OnInit, OnDestroy {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel, options)
.map(response => response.json());
}
else if (routepath === "/ministry/report-all-stat/") {
else if (routepath === "/ministry/report-students-num/") {
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-small-classes/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel + "/" +
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
.map(response => response.json());
......@@ -938,7 +943,7 @@ export class HelperDataService implements OnInit, OnDestroy {
let options = new RequestOptions({ headers: headers, responseType: ResponseContentType.Blob });
let headerIdStr = headerid.toString();
return this.http.get(`${AppSettings.API_ENDPOINT}/epal/pdf-application/` + headerIdStr + '/' + status, options)
return this.http.get(`${AppSettings.API_ENDPOINT}/epal/pdf-application/` + headerIdStr + "/" + status, options)
.map((res) => {
return new Blob([res["_body"]], { type: "application/octet-stream" });
})
......@@ -1042,9 +1047,8 @@ export class HelperDataService implements OnInit, OnDestroy {
return this.http.get(`${AppSettings.API_ENDPOINT}/coursefields/list/?sector_id=` + sectorid, options)
.map(response => response.json());
}
FindSmallCourses(classId,sector,specialit){
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
......@@ -1059,9 +1063,7 @@ export class HelperDataService implements OnInit, OnDestroy {
.map(response => response.json());
}
FindMergingCourses(id,classId,sector,specialit){
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
......@@ -1104,8 +1106,8 @@ export class HelperDataService implements OnInit, OnDestroy {
FindSmallCoursesforUdoMerging(classId,sector,specialit){
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
......@@ -1114,7 +1116,6 @@ export class HelperDataService implements OnInit, OnDestroy {
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/epal/getmergingsmallgroupsforundo/` + classId + "/" + sector + "/" + specialit, options)
.map(response => response.json());
}
......
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