updated ministry components with popup messages

parent 48e6fffe
......@@ -141,7 +141,7 @@ epal.ministry.log_out_go:
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.general_report:
path: '/ministry/general-report'
path: '/ministry/general-report/{regionId}/{adminId}/{schId}'
options:
_auth: [ 'basic_auth' ]
defaults:
......@@ -149,7 +149,7 @@ epal.ministry.general_report:
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-completeness:
path: '/ministry/report-completeness'
path: '/ministry/report-completeness/{regionId}/{adminId}/{schId}'
options:
_auth: [ 'basic_auth' ]
defaults:
......@@ -157,7 +157,7 @@ epal.ministry.report-completeness:
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-all-stat:
path: '/ministry/report-all-stat'
path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}'
options:
_auth: [ 'basic_auth' ]
defaults:
......
......@@ -72,12 +72,14 @@ class CreateDemoData extends ControllerBase {
$epaluserid = \Drupal::currentUser()->id();
for ($i = 1; $i <= 500; $i++) {
for ($i = 1; $i <= 1000; $i++) {
//srand($this->make_seed());
$curclass = rand(1,3);
//$curclass = 2;
$currentepal = rand(137,165);
//$currentepal = rand(137,165);
$currentepal = rand(5,399);
$student = array(
//'epaluser_id' => $aitisi[0][epaluser_id],
......@@ -146,8 +148,8 @@ class CreateDemoData extends ControllerBase {
$ids = $eepalSpecialtiesInEpal_storage->getQuery()
->condition('specialty_id', $coursefield_id, "=")
->condition('epal_id', 137, ">=")
->condition('epal_id', 165, "<=")
//->condition('epal_id', 137, ">=")
//->condition('epal_id', 165, "<=")
->execute();
$eepalSpecialtiesInEpal = $eepalSpecialtiesInEpal_storage->loadMultiple($ids);
......@@ -185,8 +187,8 @@ class CreateDemoData extends ControllerBase {
$ids = $eepalSectorsInEpal_storage->getQuery()
->condition('sector_id', $sectorfield_id, "=")
->condition('epal_id', 137, ">=")
->condition('epal_id', 165, "<=")
//->condition('epal_id', 137, ">=")
//->condition('epal_id', 165, "<=")
->execute();
$eepalSectorsInEpal = $eepalSectorsInEpal_storage->loadMultiple($ids);
......@@ -206,8 +208,10 @@ class CreateDemoData extends ControllerBase {
else if ($curclass === 1) {
print_r("<br> CLASS A: ");
$school_id_start = 137;
for ($l=0; $l < 29; $l++)
//$school_id_start = 137;
$school_id_start = 5;
//for ($l=0; $l < 29; $l++)
for ($l=0; $l < 395; $l++)
array_push($availableSchools, $school_id_start + $l);
}
......
......@@ -56,7 +56,7 @@ class ReportsCreator extends ControllerBase {
}
public function makegGeneralReport(Request $request) {
public function makegGeneralReport(Request $request, $regionId, $adminId, $schId) {
try {
if (!$request->isMethod('GET')) {
......@@ -116,22 +116,8 @@ class ReportsCreator extends ControllerBase {
->condition('eStudent.id', $studentIds, 'NOT IN');
$numNoAllocated = $sCon->countQuery()->execute()->fetchField();
/*
$list[] = array(
'num_applications' => $numTotal,
'numchoice1' => $numData[0],
'numchoice2' => $numData[1],
'numchoice3' => $numData[2],
'num_noallocated' => $numNoAllocated,
);
*/
$list = array();
//$record = new generalReportSchema;
//$record->name = "nikos";
//$record->numStudents = 20;
array_push($list,(object) array('name' => "Αριθμός Αιτήσεων", 'numStudents' => $numTotal));
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση", 'numStudents' => $numData[0]));
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην δεύτερή τους προτίμηση", 'numStudents' => $numData[1]));
......@@ -153,7 +139,7 @@ class ReportsCreator extends ControllerBase {
}
public function makeReportCompleteness(Request $request) {
public function makeReportCompleteness(Request $request, $regionId, $adminId, $schId) {
//$this->checkAuthorization($request);
......@@ -191,10 +177,17 @@ class ReportsCreator extends ControllerBase {
$list = array();
//βρες όλα τα σχολεία
//βρες όλα τα σχολεία που πληρούν τα κριτήρια / φίλτρα
$sCon = $this->connection->select('eepal_school_field_data', 'eSchool')
->fields('eSchool', array('id', 'name', 'capacity_class_a'));
->fields('eSchool', array('id', 'name', 'capacity_class_a', 'region_edu_admin_id', 'edu_admin_id'));
if ($regionId != 0)
$sCon->condition('eSchool.region_edu_admin_id', $regionId, '=');
if ($adminId != 0)
$sCon->condition('eSchool.edu_admin_id', $adminId, '=');
if ($schId != 0)
$sCon->condition('eSchool.id', $schId, '=');
$epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
//βρες ανώτατο επιτρεπόμενο όριο μαθητών
$sCon = $this->connection->select('epal_class_limits', 'eSchool')
->fields('eSchool', array('name', 'limit_up'))
......@@ -245,7 +238,8 @@ class ReportsCreator extends ControllerBase {
$percTotal = number_format (array_sum($num) / array_sum($capacity) * 100, 1) . "%";
//αποστολή αποτελεσμάτων / στατιστικών
if ($num[0] !== "0" || $num[1] !== "0" || $num[2] !== "0")
//if ($num[0] !== "0" || $num[1] !== "0" || $num[2] !== "0")
/*
array_push($list,(object) array(
......@@ -282,7 +276,7 @@ class ReportsCreator extends ControllerBase {
public function makeReportAllStat(Request $request) {
public function makeReportAllStat(Request $request, $regionId, $adminId, $schId) {
try {
......@@ -316,12 +310,18 @@ class ReportsCreator extends ControllerBase {
], Response::HTTP_FORBIDDEN);
}
$list = array();
//βρες όλα τα σχολεία
//βρες όλα τα σχολεία που πληρούν τα κριτήρια / φίλτρα
$sCon = $this->connection->select('eepal_school_field_data', 'eSchool')
->fields('eSchool', array('id', 'name', 'capacity_class_a', 'region_edu_admin_id', 'edu_admin_id'));
//->condition('eSchool.region_edu_admin_id', $regionId, '=');
if ($regionId != 0)
$sCon->condition('eSchool.region_edu_admin_id', $regionId, '=');
if ($adminId != 0)
$sCon->condition('eSchool.edu_admin_id', $adminId, '=');
if ($schId != 0)
$sCon->condition('eSchool.id', $schId, '=');
$epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalSchools as $epalSchool) { //για κάθε σχολείο
......@@ -332,14 +332,14 @@ class ReportsCreator extends ControllerBase {
$adminColumn = array();
$regionColumn = array();
//εύρεση ΠΔΕ που ανήκει το σχολείο
//εύρεση ονόματος ΠΔΕ που ανήκει το σχολείο
$sCon = $this->connection->select('eepal_region_field_data', 'eRegion')
->fields('eRegion', array('id','name'))
->condition('eRegion.id', $epalSchool->region_edu_admin_id, '=');
$epalRegions = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$epalRegion = reset($epalRegions);
//εύρεση ΔΙΔΕ που ανήκει το σχολείο
//εύρεση ονόματος ΔΙΔΕ που ανήκει το σχολείο
$sCon = $this->connection->select('eepal_admin_area_field_data', 'eAdmin')
->fields('eAdmin', array('id','name'))
->condition('eAdmin.id', $epalSchool->edu_admin_id, '=');
......
......@@ -28,6 +28,57 @@ import { API_ENDPOINT } from '../../app.settings';
<div
class = "loading" *ngIf="successSending == -2" >
</div>
<div id="mailSuccessNotice" (onHidden)="onHidden('#mailSuccessNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#mailSuccessNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Έγινε αποστολή {{numSuccessMails}} e-mails!</p>
</div>
</div>
</div>
</div>
<div id="mailFailureNotice" (onHidden)="onHidden('#mailFailureNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#mailFailureNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Αποτυχία αποστολής e-mails!</p>
</div>
</div>
</div>
</div>
<div id="mailNonSendingNotice" (onHidden)="onHidden('#mailNonSendingNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#mailNonSendingNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Κάποια e-mail δεν έχουν σταλεί.
Δεν ήταν δυνατή η αποστολή {{numFailMails}} e-mails!</p>
</div>
</div>
</div>
</div>
<!--
<div class="alert alert-success" *ngIf="successSending == 1 ">
Έγινε αποστολή {{numSuccessMails}} e-mails!
</div>
......@@ -38,15 +89,18 @@ import { API_ENDPOINT } from '../../app.settings';
Κάποια e-mail δεν έχουν σταλεί.
Δεν ήταν δυνατή η αποστολή {{numFailMails}} e-mails!
</div>
-->
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn-primary btn-md" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents()" >
<br><br>
<div class="col-md-12">
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents()" >
Μαζική αποστολή e-mail στους μαθητές που δεν τοποθετήθηκαν<span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
`
})
......@@ -78,15 +132,12 @@ import { API_ENDPOINT } from '../../app.settings';
}
ngOnDestroy() {
if (this.loginInfoSub) this.loginInfoSub.unsubscribe();
this.loginInfo$.unsubscribe();
}
ngOnInit() {
(<any>$('#mailSuccessNotice')).appendTo("body");
(<any>$('#mailFailureNotice')).appendTo("body");
(<any>$('#mailNonSendingNotice')).appendTo("body");
this.loginInfoSub = this._ngRedux.select(state => {
if (state.loginInfo.size > 0) {
state.loginInfo.reduce(({}, loginInfoToken) => {
......@@ -104,6 +155,32 @@ import { API_ENDPOINT } from '../../app.settings';
}
ngOnDestroy() {
(<any>$('#mailSuccessNotice')).remove();
(<any>$('#mailFailureNotice')).remove();
(<any>$('#mailNonSendingNotice')).remove();
if (this.loginInfoSub) this.loginInfoSub.unsubscribe();
this.loginInfo$.unsubscribe();
}
public showModal(popupMsgId):void {
console.log("about to show modal");
//(<any>$('#distributionWaitingNotice')).modal('show');
(<any>$(popupMsgId)).modal('show');
}
public hideModal(popupMsgId):void {
//(<any>$('#distributionWaitingNotice')).modal('hide');
(<any>$(popupMsgId)).modal('hide');
}
public onHidden(popupMsgId):void {
}
informUnlocatedStudents() {
/*
......@@ -129,11 +206,14 @@ import { API_ENDPOINT } from '../../app.settings';
error => {
console.log("Error");
this.successSending = 0;
this.showModal("#mailFailureNotice");
},
() => {
console.log("Success");
this.successSending = 1;
//this.validCreator = true;
this.showModal("#mailSuccessNotice");
if (this.numFailMails != 0)
this.showModal("#mailNonSendingNotice");
}
)
......
......@@ -33,8 +33,60 @@ import { API_ENDPOINT } from '../../app.settings';
class = "loading" *ngIf=" distStatus === 'STARTED'" >
</div>
<div id="distributionCompletedNotice" (onHidden)="onHidden('#distributionCompletedNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#distributionCompletedNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Η κατανομή ολοκληρώθηκε με επιτυχία!</p>
</div>
</div>
</div>
</div>
<div id="distributionWaitingNotice" (onHidden)="onHidden('#distributionWaitingNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#distributionWaitingNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Παρακαλώ περιμένετε...Η εκτέλεση της κατανομής ενδέχεται να διαρκέσει μερικά λεπτά.
Παρακαλώ μην εκτελείτε οποιαδήποτε ενέργεια μετακίνησης στον φυλλομετρητή σας, μέχρι να ολοκληρωθεί η κατανομή.
Αν διαβάσατε αυτό το μήνυμα, μπορείτε να το κλείσετε οποιαδήποτε στιγμή.</p>
</div>
</div>
</div>
</div>
<div id="distributionFailureNotice" (onHidden)="onHidden('#distributionFailureNotice')" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Κατανομή μαθητών</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideModal('#distributionFailureNotice')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Αποτυχία κατανομής. Παρακαλώ προσπαθήστε ξανά.
Σε περίπτωση που το πρόβλημα παραμένει, παρακαλώ απευθυνθείτε στο διαχειριστή του συστήματος.</p>
</div>
</div>
</div>
</div>
<!--
<div class="alert alert-info" *ngIf="distStatus === 'STARTED'">
Παρακαλώ περιμένετε...Η εκτέλεση της κατανομής ενδέχεται να διαρκέσει μερικά λεπτά. Παρακαλώ μην εκτελείται οποιαδήποτε ενέργεια μετακίνησης στον φυλλομετρητή σας, μέχρι να ολοκληρωθεί η κατανομή.
Παρακαλώ περιμένετε...Η εκτέλεση της κατανομής ενδέχεται να διαρκέσει μερικά λεπτά. Παρακαλώ μην εκτελείτε οποιαδήποτε ενέργεια μετακίνησης στον φυλλομετρητή σας, μέχρι να ολοκληρωθεί η κατανομή.
</div>
<div class="alert alert-success" *ngIf="distStatus === 'FINISHED'">
Η κατανομή ολοκληρώθηκε με επιτυχία!
......@@ -42,26 +94,20 @@ import { API_ENDPOINT } from '../../app.settings';
<div class="alert alert-warning" *ngIf="distStatus === 'ERROR'">
Αποτυχία κατανομής!
</div>
-->
<br><br>
<div>
<form [formGroup]="formGroup" #form>
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn-primary btn-md" *ngIf="(loginInfo$ | async).size !== 0" (click)="runDistribution()" >
Εκτέλεση Κατανομής Μαθητών<span class="glyphicon glyphicon-menu-right"></span>
<div class="col-md-6">
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="runDistribution()" >
Εκτέλεση Κατανομής Μαθητών<span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
</form>
<!--
<button type="button" class="btn-primary btn-md" (click)="testModal()" >
Test Modal
</button>
-->
</div>
`
})
......@@ -70,8 +116,8 @@ import { API_ENDPOINT } from '../../app.settings';
public formGroup: FormGroup;
loginInfo$: BehaviorSubject<ILoginInfo>;
loginInfoSub: Subscription;
public isModalShown: BehaviorSubject<boolean>;
public isModalShownMy: boolean;
//public isModalShownWaiting: BehaviorSubject<boolean>;
//public isModalShownCompleted: BehaviorSubject<boolean>;
private apiEndPoint = API_ENDPOINT;
private minedu_userName: string;
private minedu_userPassword: string;
......@@ -90,47 +136,51 @@ import { API_ENDPOINT } from '../../app.settings';
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.isModalShown = new BehaviorSubject(false);
//this.isModalShownWaiting = new BehaviorSubject(false);
//this.isModalShownCompleted = new BehaviorSubject(false);
}
/*
public showModal():void {
public showModal(popupMsgId):void {
console.log("about to show modal");
this.isModalShown.next(true);
this.isModalShownMy = true;
}
public hideModal():void {
this.autoShownModal.hide();
//(<any>$('#distributionWaitingNotice')).modal('show');
(<any>$(popupMsgId)).modal('show');
}
public onHidden():void {
this.isModalShown.next(false);
this.isModalShownMy = false;
public hideModal(popupMsgId):void {
//(<any>$('#distributionWaitingNotice')).modal('hide');
(<any>$(popupMsgId)).modal('hide');
}
*/
showModal(){
// this.bootstrapModal.show();
public onHidden(popupMsgId):void {
/*
if (popupMsgId == "#distributionWaitingNotice")
this.isModalShownWaiting.next(false);
else if (popupMsgId == "#distributionCompletedNotice")
this.isModalShownCompleted.next(false);
*/
//this.isModalShownWaiting.next(false);
}
closeModal(){
// this.bootstrapModal.hide();
}
ngOnDestroy() {
if (this.loginInfoSub) this.loginInfoSub.unsubscribe();
this.loginInfo$.unsubscribe();
(<any>$('#distributionWaitingNotice')).remove();
(<any>$('#distributionCompletedNotice')).remove();
(<any>$('#distributionFailureNotice')).remove();
if (this.loginInfoSub)
this.loginInfoSub.unsubscribe();
//this.loginInfo$.unsubscribe();
}
ngOnInit() {
(<any>$('#distributionWaitingNotice')).appendTo("body");
(<any>$('#distributionCompletedNotice')).appendTo("body");
(<any>$('#distributionFailureNotice')).appendTo("body");
this.loginInfoSub = this._ngRedux.select(state => {
if (state.loginInfo.size > 0) {
state.loginInfo.reduce(({}, loginInfoToken) => {
......@@ -149,19 +199,20 @@ import { API_ENDPOINT } from '../../app.settings';
runDistribution() {
this.distStatus = "STARTED";
this.showModal("#distributionWaitingNotice");
this._hds.makeDistribution(this.minedu_userName, this.minedu_userPassword)
.catch(err => {console.log(err); this.distStatus = "ERROR"; })
.then(msg => {
console.log("KATANOMH TELEIOSE");
//this.showModal();
this.showModal("#distributionCompletedNotice");
if (this.distStatus !== "ERROR")
this.distStatus = "FINISHED";
});
}
testModal() {
this.showModal();
}
......
......@@ -40,27 +40,32 @@ import { API_ENDPOINT } from '../../app.settings';
<form [formGroup]="formGroup" #form>
<h5> >Επιλογή Φίλτρων <br><br></h5>
<!--<h5> >Επιλογή Φίλτρων <br><br></h5>-->
<br>
<button type="button" class="btn-link" (click)="toggleRegionFilter()" >
> Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου
</button>
<div class="form-group">
<label>Περιφερειακή Διεύθυνση</label>
<select #regsel class="form-control" (change)="checkregion(regsel)" formControlName="region">
<option *ngFor="let RegionSelection$ of RegionSelections$ | async; let i=index" [value] = "RegionSelection$.id"> {{RegionSelection$.name}} </option>
<label *ngIf = "enableRegionFilter"> Περιφερειακή Διεύθυνση </label>
<select #regsel class="form-control" (change)="checkregion(regsel)" *ngIf = "enableRegionFilter" formControlName="region">
<option *ngFor="let RegionSelection$ of RegionSelections$ | async; let i=index" [value] = "RegionSelection$.id"> {{RegionSelection$.name}} </option>
</select>
</div>
<div class="form-group">
<label *ngIf="showAdminList | async">Διεύθυνση Εκπαίδευσης</label>
<select #admsel class="form-control" *ngIf="showAdminList | async" (change)="checkadminarea(admsel)" formControlName="adminarea">
<label *ngIf="(showAdminList | async) && enableRegionFilter">Διεύθυνση Εκπαίδευσης</label>
<select #admsel class="form-control" *ngIf="(showAdminList | async) && enableRegionFilter" (change)="checkadminarea(admsel)" formControlName="adminarea">
<option *ngFor="let AdminAreaSelection$ of AdminAreaSelections$ | async; let i=index" [value] = "AdminAreaSelection$.id"> {{AdminAreaSelection$.name}}</option>
</select>
</div>
<div class="form-group">
<label *ngIf="showAdminList | async">Σχολείο</label>
<select #schsel class="form-control" *ngIf="showAdminList | async" (change)="checkschool(schsel)" formControlName="schoollist">
<label *ngIf="(showAdminList | async) && enableRegionFilter">Σχολείο</label>
<select #schsel class="form-control" *ngIf="(showAdminList | async) && enableRegionFilter" (change)="checkschool(schsel)" formControlName="schoollist">
<option *ngFor="let SchoolSelection$ of SchoolSelections$ | async; let i=index" [value] = "SchoolSelection$.epal_id"> {{SchoolSelection$.epal_name}} </option>
</select>
</div>
<br>
<button type="submit" class="btn btn-alert" (click)="createReport(regsel)" [hidden]="minedu_userName == ''" >
<i class="fa fa-file-text"></i>
Δημιουργία Αναφοράς
......@@ -111,8 +116,10 @@ import { API_ENDPOINT } from '../../app.settings';
private reportId: number;
private source: LocalDataSource;
private showAdminList: BehaviorSubject<boolean>;
private regionSelected: number;
private adminAreaSelected: number;
private schSelected: number;
private enableRegionFilter: boolean;
columnMap: Map<string,TableColumn> = new Map<string,TableColumn>();
@Input() settings: any;
......@@ -146,8 +153,10 @@ import { API_ENDPOINT } from '../../app.settings';
//this.createGraph = false;
//this.reportId = 0;
this.showAdminList = new BehaviorSubject(false);
this.regionSelected = 0;
this.adminAreaSelected = 0;
this.schSelected = 0;
this.enableRegionFilter = true;
//this.source = new LocalDataSource(this.data);
......@@ -222,12 +231,17 @@ createReport(regionSel) {
//console.log("Testing2..");
//console.log(route);
let regSel = 0;
if (regionSel.value != 0)
regSel = regionSel.value;
let regSel = 0, admSel = 0, schSel = 0;
if (this.enableRegionFilter) {
//if (regionSel.value != 0)
//regSel = regionSel.value;
regSel = this.regionSelected;
admSel = this.adminAreaSelected;
schSel = this.schSelected;
}
//this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, routePath, regSel, this.adminAreaSelected, this.schSelected).subscribe(data => {
this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, route, regSel, this.adminAreaSelected, this.schSelected).subscribe(data => {
this.generalReportSub = this._hds.makeReport(this.minedu_userName, this.minedu_userPassword, route, regSel, admSel, schSel).subscribe(data => {
this.generalReport$.next(data);
this.data = data;
//console.log("Let see..");
......@@ -270,8 +284,15 @@ showFilters() {
}
toggleRegionFilter() {
this.enableRegionFilter = !this.enableRegionFilter;