updated ministry components with popup messages

parent 48e6fffe
...@@ -141,7 +141,7 @@ epal.ministry.log_out_go: ...@@ -141,7 +141,7 @@ epal.ministry.log_out_go:
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.general_report: epal.ministry.general_report:
path: '/ministry/general-report' path: '/ministry/general-report/{regionId}/{adminId}/{schId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
defaults: defaults:
...@@ -149,7 +149,7 @@ epal.ministry.general_report: ...@@ -149,7 +149,7 @@ epal.ministry.general_report:
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.report-completeness: epal.ministry.report-completeness:
path: '/ministry/report-completeness' path: '/ministry/report-completeness/{regionId}/{adminId}/{schId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
defaults: defaults:
...@@ -157,7 +157,7 @@ epal.ministry.report-completeness: ...@@ -157,7 +157,7 @@ epal.ministry.report-completeness:
requirements: requirements:
_user_is_logged_in: 'TRUE' _user_is_logged_in: 'TRUE'
epal.ministry.report-all-stat: epal.ministry.report-all-stat:
path: '/ministry/report-all-stat' path: '/ministry/report-all-stat/{regionId}/{adminId}/{schId}'
options: options:
_auth: [ 'basic_auth' ] _auth: [ 'basic_auth' ]
defaults: defaults:
......
...@@ -72,12 +72,14 @@ class CreateDemoData extends ControllerBase { ...@@ -72,12 +72,14 @@ class CreateDemoData extends ControllerBase {
$epaluserid = \Drupal::currentUser()->id(); $epaluserid = \Drupal::currentUser()->id();
for ($i = 1; $i <= 500; $i++) { for ($i = 1; $i <= 1000; $i++) {
//srand($this->make_seed()); //srand($this->make_seed());
$curclass = rand(1,3); $curclass = rand(1,3);
//$curclass = 2; //$curclass = 2;
$currentepal = rand(137,165);
//$currentepal = rand(137,165);
$currentepal = rand(5,399);
$student = array( $student = array(
//'epaluser_id' => $aitisi[0][epaluser_id], //'epaluser_id' => $aitisi[0][epaluser_id],
...@@ -146,8 +148,8 @@ class CreateDemoData extends ControllerBase { ...@@ -146,8 +148,8 @@ class CreateDemoData extends ControllerBase {
$ids = $eepalSpecialtiesInEpal_storage->getQuery() $ids = $eepalSpecialtiesInEpal_storage->getQuery()
->condition('specialty_id', $coursefield_id, "=") ->condition('specialty_id', $coursefield_id, "=")
->condition('epal_id', 137, ">=") //->condition('epal_id', 137, ">=")
->condition('epal_id', 165, "<=") //->condition('epal_id', 165, "<=")
->execute(); ->execute();
$eepalSpecialtiesInEpal = $eepalSpecialtiesInEpal_storage->loadMultiple($ids); $eepalSpecialtiesInEpal = $eepalSpecialtiesInEpal_storage->loadMultiple($ids);
...@@ -185,8 +187,8 @@ class CreateDemoData extends ControllerBase { ...@@ -185,8 +187,8 @@ class CreateDemoData extends ControllerBase {
$ids = $eepalSectorsInEpal_storage->getQuery() $ids = $eepalSectorsInEpal_storage->getQuery()
->condition('sector_id', $sectorfield_id, "=") ->condition('sector_id', $sectorfield_id, "=")
->condition('epal_id', 137, ">=") //->condition('epal_id', 137, ">=")
->condition('epal_id', 165, "<=") //->condition('epal_id', 165, "<=")
->execute(); ->execute();
$eepalSectorsInEpal = $eepalSectorsInEpal_storage->loadMultiple($ids); $eepalSectorsInEpal = $eepalSectorsInEpal_storage->loadMultiple($ids);
...@@ -206,8 +208,10 @@ class CreateDemoData extends ControllerBase { ...@@ -206,8 +208,10 @@ class CreateDemoData extends ControllerBase {
else if ($curclass === 1) { else if ($curclass === 1) {
print_r("<br> CLASS A: "); print_r("<br> CLASS A: ");
$school_id_start = 137; //$school_id_start = 137;
for ($l=0; $l < 29; $l++) $school_id_start = 5;
//for ($l=0; $l < 29; $l++)
for ($l=0; $l < 395; $l++)
array_push($availableSchools, $school_id_start + $l); array_push($availableSchools, $school_id_start + $l);
} }
......
...@@ -56,7 +56,7 @@ class ReportsCreator extends ControllerBase { ...@@ -56,7 +56,7 @@ class ReportsCreator extends ControllerBase {
} }
public function makegGeneralReport(Request $request) { public function makegGeneralReport(Request $request, $regionId, $adminId, $schId) {
try { try {
if (!$request->isMethod('GET')) { if (!$request->isMethod('GET')) {
...@@ -116,22 +116,8 @@ class ReportsCreator extends ControllerBase { ...@@ -116,22 +116,8 @@ class ReportsCreator extends ControllerBase {
->condition('eStudent.id', $studentIds, 'NOT IN'); ->condition('eStudent.id', $studentIds, 'NOT IN');
$numNoAllocated = $sCon->countQuery()->execute()->fetchField(); $numNoAllocated = $sCon->countQuery()->execute()->fetchField();
/*
$list[] = array(
'num_applications' => $numTotal,
'numchoice1' => $numData[0],
'numchoice2' => $numData[1],
'numchoice3' => $numData[2],
'num_noallocated' => $numNoAllocated,
);
*/
$list = array(); $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' => $numTotal));
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση", 'numStudents' => $numData[0])); array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση", 'numStudents' => $numData[0]));
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην δεύτερή τους προτίμηση", 'numStudents' => $numData[1])); array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην δεύτερή τους προτίμηση", 'numStudents' => $numData[1]));
...@@ -153,7 +139,7 @@ class ReportsCreator extends ControllerBase { ...@@ -153,7 +139,7 @@ class ReportsCreator extends ControllerBase {
} }
public function makeReportCompleteness(Request $request) { public function makeReportCompleteness(Request $request, $regionId, $adminId, $schId) {
//$this->checkAuthorization($request); //$this->checkAuthorization($request);
...@@ -191,10 +177,17 @@ class ReportsCreator extends ControllerBase { ...@@ -191,10 +177,17 @@ class ReportsCreator extends ControllerBase {
$list = array(); $list = array();
//βρες όλα τα σχολεία //βρες όλα τα σχολεία που πληρούν τα κριτήρια / φίλτρα
$sCon = $this->connection->select('eepal_school_field_data', 'eSchool') $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); $epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
//βρες ανώτατο επιτρεπόμενο όριο μαθητών //βρες ανώτατο επιτρεπόμενο όριο μαθητών
$sCon = $this->connection->select('epal_class_limits', 'eSchool') $sCon = $this->connection->select('epal_class_limits', 'eSchool')
->fields('eSchool', array('name', 'limit_up')) ->fields('eSchool', array('name', 'limit_up'))
...@@ -245,7 +238,8 @@ class ReportsCreator extends ControllerBase { ...@@ -245,7 +238,8 @@ class ReportsCreator extends ControllerBase {
$percTotal = number_format (array_sum($num) / array_sum($capacity) * 100, 1) . "%"; $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( array_push($list,(object) array(
...@@ -282,7 +276,7 @@ class ReportsCreator extends ControllerBase { ...@@ -282,7 +276,7 @@ class ReportsCreator extends ControllerBase {
public function makeReportAllStat(Request $request) { public function makeReportAllStat(Request $request, $regionId, $adminId, $schId) {
try { try {
...@@ -316,12 +310,18 @@ class ReportsCreator extends ControllerBase { ...@@ -316,12 +310,18 @@ class ReportsCreator extends ControllerBase {
], Response::HTTP_FORBIDDEN); ], Response::HTTP_FORBIDDEN);
} }
$list = array(); $list = array();
//βρες όλα τα σχολεία //βρες όλα τα σχολεία που πληρούν τα κριτήρια / φίλτρα
$sCon = $this->connection->select('eepal_school_field_data', 'eSchool') $sCon = $this->connection->select('eepal_school_field_data', 'eSchool')
->fields('eSchool', array('id', 'name', 'capacity_class_a', 'region_edu_admin_id', 'edu_admin_id')); ->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); $epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalSchools as $epalSchool) { //για κάθε σχολείο foreach ($epalSchools as $epalSchool) { //για κάθε σχολείο
...@@ -332,14 +332,14 @@ class ReportsCreator extends ControllerBase { ...@@ -332,14 +332,14 @@ class ReportsCreator extends ControllerBase {
$adminColumn = array(); $adminColumn = array();
$regionColumn = array(); $regionColumn = array();
//εύρεση ΠΔΕ που ανήκει το σχολείο //εύρεση ονόματος ΠΔΕ που ανήκει το σχολείο
$sCon = $this->connection->select('eepal_region_field_data', 'eRegion') $sCon = $this->connection->select('eepal_region_field_data', 'eRegion')
->fields('eRegion', array('id','name')) ->fields('eRegion', array('id','name'))
->condition('eRegion.id', $epalSchool->region_edu_admin_id, '='); ->condition('eRegion.id', $epalSchool->region_edu_admin_id, '=');
$epalRegions = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ); $epalRegions = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$epalRegion = reset($epalRegions); $epalRegion = reset($epalRegions);
//εύρεση ΔΙΔΕ που ανήκει το σχολείο //εύρεση ονόματος ΔΙΔΕ που ανήκει το σχολείο
$sCon = $this->connection->select('eepal_admin_area_field_data', 'eAdmin') $sCon = $this->connection->select('eepal_admin_area_field_data', 'eAdmin')
->fields('eAdmin', array('id','name')) ->fields('eAdmin', array('id','name'))
->condition('eAdmin.id', $epalSchool->edu_admin_id, '='); ->condition('eAdmin.id', $epalSchool->edu_admin_id, '=');
......
...@@ -28,6 +28,57 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -28,6 +28,57 @@ import { API_ENDPOINT } from '../../app.settings';
<div <div
class = "loading" *ngIf="successSending == -2" > class = "loading" *ngIf="successSending == -2" >
</div> </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 "> <div class="alert alert-success" *ngIf="successSending == 1 ">
Έγινε αποστολή {{numSuccessMails}} e-mails! Έγινε αποστολή {{numSuccessMails}} e-mails!
</div> </div>
...@@ -38,15 +89,18 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -38,15 +89,18 @@ import { API_ENDPOINT } from '../../app.settings';
Κάποια e-mail δεν έχουν σταλεί. Κάποια e-mail δεν έχουν σταλεί.
Δεν ήταν δυνατή η αποστολή {{numFailMails}} e-mails! Δεν ήταν δυνατή η αποστολή {{numFailMails}} e-mails!
</div> </div>
-->
<div class="col-md-8 offset-md-4"> <br><br>
<button type="submit" class="btn-primary btn-md" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents()" > <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> Μαζική αποστολή e-mail στους μαθητές που δεν τοποθετήθηκαν<span class="glyphicon glyphicon-menu-right"></span>
</button> </button>
</div> </div>
` `
}) })
...@@ -78,15 +132,12 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -78,15 +132,12 @@ import { API_ENDPOINT } from '../../app.settings';
} }
ngOnDestroy() {
if (this.loginInfoSub) this.loginInfoSub.unsubscribe();
this.loginInfo$.unsubscribe();
}
ngOnInit() { ngOnInit() {
(<any>$('#mailSuccessNotice')).appendTo("body");
(<any>$('#mailFailureNotice')).appendTo("body");
(<any>$('#mailNonSendingNotice')).appendTo("body");
this.loginInfoSub = this._ngRedux.select(state => { this.loginInfoSub = this._ngRedux.select(state => {
if (state.loginInfo.size > 0) { if (state.loginInfo.size > 0) {
state.loginInfo.reduce(({}, loginInfoToken) => { state.loginInfo.reduce(({}, loginInfoToken) => {
...@@ -104,6 +155,32 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -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() { informUnlocatedStudents() {
/* /*
...@@ -129,11 +206,14 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -129,11 +206,14 @@ import { API_ENDPOINT } from '../../app.settings';
error => { error => {
console.log("Error"); console.log("Error");
this.successSending = 0; this.successSending = 0;
this.showModal("#mailFailureNotice");
}, },
() => { () => {
console.log("Success"); console.log("Success");
this.successSending = 1; 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'; ...@@ -33,8 +33,60 @@ import { API_ENDPOINT } from '../../app.settings';
class = "loading" *ngIf=" distStatus === 'STARTED'" > class = "loading" *ngIf=" distStatus === 'STARTED'" >
</div> </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 class="alert alert-info" *ngIf="distStatus === 'STARTED'">
Παρακαλώ περιμένετε...Η εκτέλεση της κατανομής ενδέχεται να διαρκέσει μερικά λεπτά. Παρακαλώ μην εκτελείται οποιαδήποτε ενέργεια μετακίνησης στον φυλλομετρητή σας, μέχρι να ολοκληρωθεί η κατανομή. Παρακαλώ περιμένετε...Η εκτέλεση της κατανομής ενδέχεται να διαρκέσει μερικά λεπτά. Παρακαλώ μην εκτελείτε οποιαδήποτε ενέργεια μετακίνησης στον φυλλομετρητή σας, μέχρι να ολοκληρωθεί η κατανομή.
</div> </div>
<div class="alert alert-success" *ngIf="distStatus === 'FINISHED'"> <div class="alert alert-success" *ngIf="distStatus === 'FINISHED'">
Η κατανομή ολοκληρώθηκε με επιτυχία! Η κατανομή ολοκληρώθηκε με επιτυχία!
...@@ -42,26 +94,20 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -42,26 +94,20 @@ import { API_ENDPOINT } from '../../app.settings';
<div class="alert alert-warning" *ngIf="distStatus === 'ERROR'"> <div class="alert alert-warning" *ngIf="distStatus === 'ERROR'">
Αποτυχία κατανομής! Αποτυχία κατανομής!
</div> </div>
-->
<br><br>
<div> <div>
<form [formGroup]="formGroup" #form> <form [formGroup]="formGroup" #form>
<div class="col-md-8 offset-md-4"> <div class="col-md-6">
<button type="submit" class="btn-primary btn-md" *ngIf="(loginInfo$ | async).size !== 0" (click)="runDistribution()" > <button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="runDistribution()" >
Εκτέλεση Κατανομής Μαθητών<span class="glyphicon glyphicon-menu-right"></span> Εκτέλεση Κατανομής Μαθητών<span class="glyphicon glyphicon-menu-right"></span>
</button> </button>
</div> </div>
</form> </form>
<!--
<button type="button" class="btn-primary btn-md" (click)="testModal()" >
Test Modal
</button>
-->
</div> </div>
` `
}) })
...@@ -70,8 +116,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -70,8 +116,8 @@ import { API_ENDPOINT } from '../../app.settings';
public formGroup: FormGroup; public formGroup: FormGroup;
loginInfo$: BehaviorSubject<ILoginInfo>; loginInfo$: BehaviorSubject<ILoginInfo>;
loginInfoSub: Subscription; loginInfoSub: Subscription;
public isModalShown: BehaviorSubject<boolean>; //public isModalShownWaiting: BehaviorSubject<boolean>;
public isModalShownMy: boolean; //public isModalShownCompleted: BehaviorSubject<boolean>;
private apiEndPoint = API_ENDPOINT; private apiEndPoint = API_ENDPOINT;
private minedu_userName: string; private minedu_userName: string;
private minedu_userPassword: string; private minedu_userPassword: string;
...@@ -90,47 +136,51 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -90,47 +136,51 @@ import { API_ENDPOINT } from '../../app.settings';
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE); this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
this.isModalShown = new BehaviorSubject(false); //this.isModalShownWaiting = new BehaviorSubject(false);
//this.isModalShownCompleted = new BehaviorSubject(false);
} }
/* public showModal(popupMsgId):void {
public showModal():void {
console.log("about to show modal"); console.log("about to show modal");
this.isModalShown.next(true); //(<any>$('#distributionWaitingNotice')).modal('show');
this.isModalShownMy = true; (<any>$(popupMsgId)).modal('show');
} }
public hideModal():void { public hideModal(popupMsgId):void {
this.autoShownModal.hide(); //(<any>$('#distributionWaitingNotice')).modal('hide');
(<any>$(popupMsgId)).modal('hide');
} }
public onHidden():void { public onHidden(popupMsgId):void {
this.isModalShown.next(false); /*
this.isModalShownMy = false; if (popupMsgId == "#distributionWaitingNotice")
} this.isModalShownWaiting.next(false);
else if (popupMsgId == "#distributionCompletedNotice")
this.isModalShownCompleted.next(false);
*/ */
//this.isModalShownWaiting.next(false);