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

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

parents e598a7e2 5933a60e
...@@ -99,15 +99,13 @@ class CASLogin extends ControllerBase ...@@ -99,15 +99,13 @@ class CASLogin extends ControllerBase
// Enable verbose error messages. Disable in production! // Enable verbose error messages. Disable in production!
//phpCAS::setVerbose(true); //phpCAS::setVerbose(true);
phpCAS::client($this->serverVersion, phpCAS::client(
$this->serverVersion,
$this->serverHostname, $this->serverHostname,
intval($this->serverPort), intval($this->serverPort),
$this->serverUri, $this->serverUri,
boolval($this->changeSessionId)); boolval($this->changeSessionId)
);
// \phpCAS::setServerLoginURL('http://sso-test.sch.gr/login');
// \phpCAS::setServerServiceValidateURL('http://sso-test.sch.gr/cas/samlValidate');
if ($this->CASServerCACert) { if ($this->CASServerCACert) {
if ($this->CASServerCNValidate) { if ($this->CASServerCNValidate) {
...@@ -124,12 +122,9 @@ class CASLogin extends ControllerBase ...@@ -124,12 +122,9 @@ class CASLogin extends ControllerBase
return $this->redirectForbidden($configRowName, '5001'); return $this->redirectForbidden($configRowName, '5001');
} }
$attributes = phpCAS::getAttributes(); $attributes = phpCAS::getAttributes();
/* foreach ($attributes as $attr_key => $attr_value) {
$this->logger->warning($attr_key);
$this->logger->warning(phpCAS::getAttribute($attr_key));
} */
/* $isAllowed = true; /*
$isAllowed = true;
$att1 = $attributes[$this->allowed1]; $att1 = $attributes[$this->allowed1];
$att2 = $attributes[$this->allowed2]; $att2 = $attributes[$this->allowed2];
if (!isset($att1) || !isset($att2)) { if (!isset($att1) || !isset($att2)) {
...@@ -155,15 +150,17 @@ class CASLogin extends ControllerBase ...@@ -155,15 +150,17 @@ class CASLogin extends ControllerBase
} }
if (!$found1 || !$found2) { if (!$found1 || !$found2) {
$isAllowed = false; $isAllowed = false;
} */ }
/* if (!$isAllowed) { if (!$isAllowed) {
$response = new Response(); $response = new Response();
$response->setContent(t('Access is allowed only to official school accounts')); $response->setContent(t('Access is allowed only to official school accounts'));
$response->setStatusCode(Response::HTTP_FORBIDDEN); $response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json;charset=UTF-8'); $response->headers->set('Content-Type', 'application/json;charset=UTF-8');
return $response; return $response;
} */ }
*/
$CASUser = phpCAS::getUser(); $CASUser = phpCAS::getUser();
$this->logger->warning($CASUser); $this->logger->warning($CASUser);
...@@ -179,14 +176,15 @@ class CASLogin extends ControllerBase ...@@ -179,14 +176,15 @@ class CASLogin extends ControllerBase
$physicaldeliveryofficename = $filterAttribute("physicaldeliveryofficename"); $physicaldeliveryofficename = $filterAttribute("physicaldeliveryofficename");
/****** the following is for production ***************************/ /****** the following is for production : Χρήση μόνο από ΕΠΙΣΗΜΟΥΣ ΛΟΓΑΡΙΑΣΜΟΥΣ ***************************/
/*
/* if (!$umdobject || $umdobject !== "Account") { if (!$umdobject || $umdobject !== "Account") {
return $this->redirectForbidden($configRowName, '5002'); return $this->redirectForbidden($configRowName, '5002');
} }
if (!$physicaldeliveryofficename || preg_replace('/\s+/', '', $physicaldeliveryofficename) !== 'ΕΠΙΣΗΜΟΣΛΟΓΑΡΙΑΣΜΟΣ') { if (!$physicaldeliveryofficename || preg_replace('/\s+/', '', $physicaldeliveryofficename) !== 'ΕΠΙΣΗΜΟΣΛΟΓΑΡΙΑΣΜΟΣ') {
return $this->redirectForbidden($configRowName, '5003'); return $this->redirectForbidden($configRowName, '5003');
} */ }
*/
phpCAS::trace($umdobject); phpCAS::trace($umdobject);
phpCAS::trace($physicaldeliveryofficename); phpCAS::trace($physicaldeliveryofficename);
...@@ -198,20 +196,14 @@ class CASLogin extends ControllerBase ...@@ -198,20 +196,14 @@ class CASLogin extends ControllerBase
return $this->redirectForbidden($configRowName, '5004'); return $this->redirectForbidden($configRowName, '5004');
} }
// $this->logger->warning('redirecturl=' . $this->redirectUrl);
$epalToken = $this->authenticatePhase2($request, $CASUser, $userAssigned, $filterAttribute('cn')); $epalToken = $this->authenticatePhase2($request, $CASUser, $userAssigned, $filterAttribute('cn'));
if ($epalToken) { if ($epalToken) {
if ('casost_sch_sso_config' === $configRowName) { if ('casost_sch_sso_config' === $configRowName) {
/* $cookie = new Cookie('auth_token', $epalToken, 0, '/', null, false, false);
$cookie2 = new Cookie('auth_role', $exposedRole, 0, '/', null, false, false); */
return new RedirectResponse($this->redirectUrl . $epalToken.'&auth_role=' . $userAssigned["exposedRole"], 302, []); return new RedirectResponse($this->redirectUrl . $epalToken.'&auth_role=' . $userAssigned["exposedRole"], 302, []);
} else { } else {
\Drupal::service('page_cache_kill_switch')->trigger(); \Drupal::service('page_cache_kill_switch')->trigger();
return new RedirectResponseWithCookieExt($this->redirectUrl . $epalToken.'&auth_role=' . $userAssigned["exposedRole"], 302, []); return new RedirectResponseWithCookieExt($this->redirectUrl . $epalToken.'&auth_role=' . $userAssigned["exposedRole"], 302, []);
} }
// $headers = array("auth_token" => $epalToken, "auth_role" => "director");
// return new RedirectResponse($this->redirectUrl, 302, $headers);
} else { } else {
return $this->redirectForbidden($configRowName, '5005'); return $this->redirectForbidden($configRowName, '5005');
} }
......
...@@ -20,6 +20,7 @@ class CASLogout extends ControllerBase ...@@ -20,6 +20,7 @@ class CASLogout extends ControllerBase
protected $serverPort; protected $serverPort;
protected $serverUri; protected $serverUri;
protected $changeSessionId; protected $changeSessionId;
protected $logoutRedirectUrl;
protected $CASServerCACert; protected $CASServerCACert;
protected $CASServerCNValidate; protected $CASServerCNValidate;
protected $noCASServerValidation; protected $noCASServerValidation;
...@@ -76,6 +77,7 @@ class CASLogout extends ControllerBase ...@@ -76,6 +77,7 @@ class CASLogout extends ControllerBase
$this->serverUri = $CASOSTConfig->serveruri->value === null ? '' : $CASOSTConfig->serveruri->value; $this->serverUri = $CASOSTConfig->serveruri->value === null ? '' : $CASOSTConfig->serveruri->value;
$this->redirectUrl = $CASOSTConfig->redirecturl->value; $this->redirectUrl = $CASOSTConfig->redirecturl->value;
$this->changeSessionId = $CASOSTConfig->changesessionid->value; $this->changeSessionId = $CASOSTConfig->changesessionid->value;
$this->logoutRedirectUrl = $CASOSTConfig->logoutredirecturl->value;
$this->CASServerCACert = $CASOSTConfig->casservercacert->value; $this->CASServerCACert = $CASOSTConfig->casservercacert->value;
$this->CASServerCNValidate = $CASOSTConfig->casservercnvalidate->value; $this->CASServerCNValidate = $CASOSTConfig->casservercnvalidate->value;
$this->noCASServerValidation = $CASOSTConfig->nocasservervalidation->value; $this->noCASServerValidation = $CASOSTConfig->nocasservervalidation->value;
...@@ -93,14 +95,16 @@ class CASLogout extends ControllerBase ...@@ -93,14 +95,16 @@ class CASLogout extends ControllerBase
// Enable debugging // Enable debugging
phpCAS::setDebug("phpcas.log"); phpCAS::setDebug("phpcas.log");
// Enable verbose error messages. Disable in production! // Enable verbose error messages. Disable in production!
phpCAS::setVerbose(true); // phpCAS::setVerbose(true);
// Initialize phpCAS // Initialize phpCAS
phpCAS::client($this->serverVersion, phpCAS::client(
$this->serverVersion,
$this->serverHostname, $this->serverHostname,
intval($this->serverPort), intval($this->serverPort),
$this->serverUri, $this->serverUri,
boolval($this->changeSessionId)); boolval($this->changeSessionId)
);
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken)); $users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
...@@ -109,32 +113,22 @@ class CASLogout extends ControllerBase ...@@ -109,32 +113,22 @@ class CASLogout extends ControllerBase
if (!$user) { if (!$user) {
return $this->redirectForbidden($configRowName, '7002'); return $this->redirectForbidden($configRowName, '7002');
} }
// phpCAS::handleLogoutRequests();
// phpCAS::logoutWithRedirectService('http://eduslim2.minedu.gov.gr/dist/#/school');
// session_unset();
// session_destroy();
$user->setPassword(uniqid('pw')); $user->setPassword(uniqid('pw'));
$user->save(); $user->save();
$response = new Response(); $response = new Response();
$response->setContent('logout successful'); $response->setContent("{\"message\": \"Server logout successful\",\"next\": \"{$this->logoutRedirectUrl}\"}");
$response->setStatusCode(Response::HTTP_OK); $response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type', 'application/json'); $response->headers->set('Content-Type', 'application/json');
// phpCAS::logout(array('url'=>$this->redirectUrl)); session_unset();
// phpCAS::logout(); session_destroy();
session_unset();
session_destroy();
\Drupal::service('page_cache_kill_switch')->trigger(); \Drupal::service('page_cache_kill_switch')->trigger();
// phpCAS::logoutWithRedirectServiceAndUrl('https://sso-test.sch.gr/logout',''); // phpCAS::logout(array('service' => 'http://eduslim2.minedu.gov.gr/dist/#/school'));
// header('Location: '.'https://sso-test.sch.gr/login?service=https%3A%2F%2Feduslim2.minedu.gov.gr%2Fdrupal%2Fcas%2Flogin%3Fconfig%3D2'); // phpCAS::logoutWithRedirectService('http://eduslim2.minedu.gov.gr/dist/#/school');
// header('Location: https://sso-test.sch.gr/logout'); // phpCAS::handleLogoutRequests();
// exit(0);
// return new RedirectResponseWithCookieExt("https://sso-test.sch.gr/logout", 302, []); session_start();
return $response; return $response;
} catch (\Exception $e) { } catch (\Exception $e) {
$this->logger->warning($e->getMessage()); $this->logger->warning($e->getMessage());
......
...@@ -42,7 +42,7 @@ class ApplicationSubmit extends ControllerBase { ...@@ -42,7 +42,7 @@ class ApplicationSubmit extends ControllerBase {
if (!$request->isMethod('POST')) { if (!$request->isMethod('POST')) {
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("Method Not Allowed") "error_code" => 2001
], Response::HTTP_METHOD_NOT_ALLOWED); ], Response::HTTP_METHOD_NOT_ALLOWED);
} }
...@@ -55,7 +55,7 @@ class ApplicationSubmit extends ControllerBase { ...@@ -55,7 +55,7 @@ class ApplicationSubmit extends ControllerBase {
} }
else { else {
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("Bad Request") "error_code" => 5002
], Response::HTTP_BAD_REQUEST); ], Response::HTTP_BAD_REQUEST);
} }
...@@ -91,11 +91,16 @@ class ApplicationSubmit extends ControllerBase { ...@@ -91,11 +91,16 @@ class ApplicationSubmit extends ControllerBase {
//'currentepal' => $applicationForm[0][currentepal], //'currentepal' => $applicationForm[0][currentepal],
//'currentsector' => $applicationForm[0][currentsector], //'currentsector' => $applicationForm[0][currentsector],
'points' => $applicationForm[0][points], 'points' => $applicationForm[0][points],
'relationtostudent' => $applicationForm[0][relationtostudent], 'relationtostudent' => $applicationForm[0][relationtostudent],
'telnum' => $applicationForm[0][telnum] 'telnum' => $applicationForm[0][telnum]
); );
if (($errorCode = $this->validateStudent($student)) > 0) {
return $this->respondWithStatus([
"error_code" => $errorCode ], Response::HTTP_OK);
}
$entity_storage_student = $this->entityTypeManager->getStorage('epal_student'); $entity_storage_student = $this->entityTypeManager->getStorage('epal_student');
$entity_object = $entity_storage_student->create($student); $entity_object = $entity_storage_student->create($student);
$entity_storage_student->save($entity_object); $entity_storage_student->save($entity_object);
...@@ -164,7 +169,7 @@ class ApplicationSubmit extends ControllerBase { ...@@ -164,7 +169,7 @@ class ApplicationSubmit extends ControllerBase {
$entity_storage_sector->save($entity_object); $entity_storage_sector->save($entity_object);
} }
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("Application saved successfully") "error_code" => 0
], Response::HTTP_OK); ], Response::HTTP_OK);
} }
...@@ -172,7 +177,7 @@ class ApplicationSubmit extends ControllerBase { ...@@ -172,7 +177,7 @@ class ApplicationSubmit extends ControllerBase {
$this->logger->warning($e->getMessage()); $this->logger->warning($e->getMessage());
$transaction->rollback(); $transaction->rollback();
return $this->respondWithStatus([ return $this->respondWithStatus([
"message" => t("An unexpected problem occured") "error_code" => 5001
], Response::HTTP_INTERNAL_SERVER_ERROR); ], Response::HTTP_INTERNAL_SERVER_ERROR);
} }
} }
...@@ -182,4 +187,11 @@ class ApplicationSubmit extends ControllerBase { ...@@ -182,4 +187,11 @@ class ApplicationSubmit extends ControllerBase {
$res->setStatusCode($s); $res->setStatusCode($s);
return $res; return $res;
} }
private function validateStudent($student) {
if(!$student["agreement"]) {
return 1001;
}
return 0;
}
} }
...@@ -199,7 +199,9 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim ...@@ -199,7 +199,9 @@ public function getStudentPerSchool(Request $request , $selectId, $classId, $lim
if ($limitdown==$limitup && $limitup == 0) if ($limitdown==$limitup && $limitup == 0)
{ {
$list=array( $list=array(
'id' => sizeof($studentPerSchool) 'id' => sizeof($studentPerSchool),
'up' => $limitup,
'down' => $limitdown
); );
} }
......
import { LOGININFO_SAVE, PROFILE_SAVE, LOGININFO_RECEIVED } from '../constants'; import { LOGININFO_SAVE, PROFILE_SAVE, LOGININFO_RECEIVED, STATEMENTAGREE_SAVE } from '../constants';
import { LOGININFO_INIT } from '../constants'; import { LOGININFO_INIT } from '../constants';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { NgRedux } from 'ng2-redux'; import { NgRedux } from 'ng2-redux';
...@@ -41,6 +41,15 @@ saveProfile = (profile) => { ...@@ -41,6 +41,15 @@ saveProfile = (profile) => {
}); });
}; };
saveStatementAgree = (disclaimer_checked) => {
return this._ngRedux.dispatch({
type: STATEMENTAGREE_SAVE,
payload: {
disclaimer_checked
}
});
};
initLoginInfo = () => { initLoginInfo = () => {
return this._ngRedux.dispatch({ return this._ngRedux.dispatch({
......
...@@ -62,9 +62,9 @@ import { ...@@ -62,9 +62,9 @@ import {
<p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ αφού γίνει ο έλεγχος των στοιχείων του μαθητή επιβεβαιώστε τη δυνατότητα εγγραφής του.</p> <p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ αφού γίνει ο έλεγχος των στοιχείων του μαθητή επιβεβαιώστε τη δυνατότητα εγγραφής του.</p>
<strong><label>Επιβεβαίωση Εγγραφής:</label> </strong> <strong><label>Επιβεβαίωση Εγγραφής:</label> </strong>
<select #cb name="{{StudentDetails$.id}}" (change)="updateCheckedOptions(StudentDetails$.id, cb)" > <select #cb name="{{StudentDetails$.id}}" (change)="updateCheckedOptions(StudentDetails$.id, cb)" >
<option value=1>Ναι</option> <option value=1 [selected]="StudentDetails$.checkstatus === '1' ">Ναι</option>
<option value=2>Όχι</option> <option value=2 [selected]="StudentDetails$.checkstatus === '0' ">Όχι</option>
<option value=3 selected></option> <option value=3 [selected]="StudentDetails$.checkstatus != '0' && StudentDetails$.checkstatus != '1'"></option>
</select> </select>
<button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent(txoption)"> <button type="button" class="btn-primary btn-sm pull-right" (click)="confirmStudent(txoption)">
Επιβεβαίωση Εγγραφής Επιβεβαίωση Εγγραφής
...@@ -164,6 +164,8 @@ import { ...@@ -164,6 +164,8 @@ import {
private StudentInfo$: BehaviorSubject<any>; private StudentInfo$: BehaviorSubject<any>;
private StudentInfoSub: Subscription; private StudentInfoSub: Subscription;
private StudentsSize$: BehaviorSubject<any>; private StudentsSize$: BehaviorSubject<any>;
private SavedStudentsSub: Subscription;
private SavedStudents$: BehaviorSubject<any>;
private StudentsSizeSub: Subscription; private StudentsSizeSub: Subscription;
private StudentSelectedSpecial$: BehaviorSubject<any>; private StudentSelectedSpecial$: BehaviorSubject<any>;
private StudentSelectedSpecialSub: Subscription; private StudentSelectedSpecialSub: Subscription;
...@@ -194,6 +196,7 @@ import { ...@@ -194,6 +196,7 @@ import {
this.StudentSelectedSpecial$ = new BehaviorSubject([{}]); this.StudentSelectedSpecial$ = new BehaviorSubject([{}]);
this.StudentInfo$ = new BehaviorSubject([{}]); this.StudentInfo$ = new BehaviorSubject([{}]);
this.StudentsSize$ = new BehaviorSubject({}); this.StudentsSize$ = new BehaviorSubject({});
this.SavedStudents$ = new BehaviorSubject({});
this.SubmitedDetails$ = new BehaviorSubject([{}]); this.SubmitedDetails$ = new BehaviorSubject([{}]);
this.retrievedStudent = new BehaviorSubject(false); this.retrievedStudent = new BehaviorSubject(false);
this.selectionBClass = new BehaviorSubject(false); this.selectionBClass = new BehaviorSubject(false);
...@@ -251,6 +254,8 @@ import { ...@@ -251,6 +254,8 @@ import {
verifyclass(txop) { verifyclass(txop) {
this.limitdown = 0;
this.limitup = 5;
console.log(this.SchoolId,"schoolida"); console.log(this.SchoolId,"schoolida");
this.pageno = 1; this.pageno = 1;
this.retrievedStudent.next(false); this.retrievedStudent.next(false);
...@@ -356,7 +361,7 @@ import { ...@@ -356,7 +361,7 @@ import {
}); });
} }
console.log(this.limitdown, this.limitup,"mits");
this.StudentInfoSub = this._hds.getStudentPerSchool(sectorint, this.currentclass, this.limitdown, this.limitup).subscribe(data => { this.StudentInfoSub = this._hds.getStudentPerSchool(sectorint, this.currentclass, this.limitdown, this.limitup).subscribe(data => {
this.StudentInfo$.next(data); this.StudentInfo$.next(data);
if (tot_pages === 0){ if (tot_pages === 0){
...@@ -399,8 +404,21 @@ import { ...@@ -399,8 +404,21 @@ import {
confirmStudent(txop) { confirmStudent(txop) {
this._hds.saveConfirmStudents(this.saved, this.type);
this.findstudent(txop, this.pageno); this.SavedStudentsSub = this._hds.saveConfirmStudents(this.saved, this.type).subscribe(data => {
this.SavedStudents$.next(data);
},
error => {
this.SavedStudents$.next([{}]);
console.log("Error saving Students");
},
() => {
console.log("saved Students");
this.findstudent(txop, this.pageno);
});
} }
......
...@@ -83,13 +83,22 @@ export default class HeaderComponent implements OnInit, OnDestroy { ...@@ -83,13 +83,22 @@ export default class HeaderComponent implements OnInit, OnDestroy {
this._hds.signOut().then(data => { this._hds.signOut().then(data => {
this._ata.initLoginInfo(); this._ata.initLoginInfo();
if (this.authRole === SCHOOL_ROLE) { if (this.authRole === SCHOOL_ROLE) {
this.router.navigate(['/school']); // this.router.navigate(['/school']);
this.authToken = '';
this.authRole = '';
window.location.assign((<any> data).next);
} }
else if (this.authRole === PDE_ROLE) { else if (this.authRole === PDE_ROLE) {
this.router.navigate(['/school']); // this.router.navigate(['/school']);
this.authToken = '';
this.authRole = '';
window.location.assign((<any> data).next);
} }
else if (this.authRole === DIDE_ROLE) { else if (this.authRole === DIDE_ROLE) {
this.router.navigate(['/school']); // this.router.navigate(['/school']);
this.authToken = '';
this.authRole = '';
window.location.assign((<any> data).next);
} }
else if (this.authRole === STUDENT_ROLE) { else if (this.authRole === STUDENT_ROLE) {
this._eca.initEpalClasses(); this._eca.initEpalClasses();
......
...@@ -112,6 +112,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -112,6 +112,8 @@ import { API_ENDPOINT } from '../../app.settings';
if (this.loginInfoSub) if (this.loginInfoSub)
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
} }
......
...@@ -120,6 +120,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -120,6 +120,8 @@ import { API_ENDPOINT } from '../../app.settings';
if (this.loginInfoSub) if (this.loginInfoSub)
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
} }
......
...@@ -157,6 +157,10 @@ import { ...@@ -157,6 +157,10 @@ import {
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.settingsSub) if (this.settingsSub)
this.settingsSub.unsubscribe(); this.settingsSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
if (this.settings$)
this.settings$.unsubscribe();
} }
ngOnInit() { ngOnInit() {
......
...@@ -169,6 +169,10 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -169,6 +169,10 @@ import { API_ENDPOINT } from '../../app.settings';
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.settingsSub) if (this.settingsSub)
this.settingsSub.unsubscribe(); this.settingsSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
if (this.settings$)
this.settings$.unsubscribe();
} }
ngOnInit() { ngOnInit() {
......
...@@ -314,6 +314,21 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -314,6 +314,21 @@ import { API_ENDPOINT } from '../../app.settings';
this.SectorSelectionsSub.unsubscribe(); this.SectorSelectionsSub.unsubscribe();
if (this.CourseSelectionsSub) if (this.CourseSelectionsSub)
this.CourseSelectionsSub.unsubscribe(); this.CourseSelectionsSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
if (this.generalReport$)
this.generalReport$.unsubscribe();
if (this.RegionSelections$)
this.RegionSelections$.unsubscribe();
if (this.AdminAreaSelections$)
this.AdminAreaSelections$.unsubscribe();
if (this.SchoolSelections$)
this.SchoolSelections$.unsubscribe();
if (this.SectorSelections$)
this.SectorSelections$.unsubscribe();
if (this.CourseSelections$)
this.CourseSelections$.unsubscribe();
if (this.showAdminList) if (this.showAdminList)
this.showAdminList.unsubscribe(); this.showAdminList.unsubscribe();
if (this.showSectorList) if (this.showSectorList)
...@@ -322,6 +337,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -322,6 +337,8 @@ import { API_ENDPOINT } from '../../app.settings';
this.showCourseList.unsubscribe(); this.showCourseList.unsubscribe();
if (this.RegionRetrieveSub) if (this.RegionRetrieveSub)
this.RegionRetrieveSub.unsubscribe(); this.RegionRetrieveSub.unsubscribe();
if (this.RegionRetrieve$)
this.RegionRetrieve$.unsubscribe();
} }
......
...@@ -149,6 +149,10 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -149,6 +149,10 @@ import { API_ENDPOINT } from '../../app.settings';
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.generalReportSub) if (this.generalReportSub)
this.generalReportSub.unsubscribe(); this.generalReportSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
if (this.generalReport$)
this.generalReport$.unsubscribe();
} }
......
...@@ -147,6 +147,10 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -147,6 +147,10 @@ import { API_ENDPOINT } from '../../app.settings';
this.loginInfoSub.unsubscribe(); this.loginInfoSub.unsubscribe();
if (this.generalReportSub) if (this.generalReportSub)
this.generalReportSub.unsubscribe(); this.generalReportSub.unsubscribe();
if (this.loginInfo$)
this.loginInfo$.unsubscribe();
if (this.generalReport$)
this.generalReport$.unsubscribe();
} }
......