Commit 49e09b3e authored by Ασπασία Κατσή's avatar Ασπασία Κατσή

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

parents 59a3b922 08dcfa08
......@@ -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:
......@@ -394,5 +386,45 @@ epal.undomerge:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\SmallClassDistribution::UndoMerge'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-applications:
path: '/ministry/report-applications/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportApplications'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-user-applications:
path: '/ministry/report-user-applications/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ReportsCreator::makeReportUserApplications'
requirements:
_user_is_logged_in: 'TRUE'
epal.ministry.report-gel-students:
path: '/ministry/report-gel-students/{regionId}/{adminId}/{schId}/{classId}/{sectorId}/{courseId}/{finalized}'
options:
_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
......@@ -112,7 +112,7 @@ class CurrentUser extends ControllerBase
$numAppSelf = $this->getNumApps($epalUser->user_id->target_id, "Μαθητής");
$numAppChildren = $this->getNumApps($epalUser->user_id->target_id, "Γονέας/Κηδεμόνας");
if ($numSelf === -1 || $numChildren === -1)
if ($numAppSelf === -1 || $numAppChildren === -1)
return $this->respondWithStatus([
'message' => t("num of children not found"),
], Response::HTTP_INTERNAL_SERVER_ERROR);
......@@ -169,7 +169,7 @@ class CurrentUser extends ControllerBase
$numAppSelf = $this->getNumApps($epalUser->user_id->target_id, "Μαθητής");
$numAppChildren = $this->getNumApps($epalUser->user_id->target_id, "Γονέας/Κηδεμόνας");
if ($numSelf === -1 || $numChildren === -1)
if ($numAppSelf === -1 || $numAppChildren === -1)
return $this->respondWithStatus([
'message' => t("num of children not found"),
], Response::HTTP_INTERNAL_SERVER_ERROR);
......@@ -363,6 +363,13 @@ class CurrentUser extends ControllerBase
$postData = json_decode($content);
$representRole = $postData->userProfile->representRole;
//validate representRole
/*
if ( $epalUser->name->value !== "" && intval($epalUser->representative->value) !== $representRole )
return $this->respondWithStatus([
"error_code" => 5001
], Response::HTTP_INTERNAL_SERVER_ERROR);
*/
$crypt = new Crypt();
try {
$name_encoded = $crypt->encrypt($postData->userProfile->userName);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -75,7 +75,7 @@ class CBController extends ControllerBase
$configRowName = $this->oauthostSession->configrowname->value;
} else {
$response = new Response();
$response->setContent('forbidden1');
$response->setContent('forbidden: no valid oauthostSessions');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
......@@ -116,7 +116,7 @@ class CBController extends ControllerBase
$this->redirect_url = $ostauthConfig->redirect_url->value;
} else {
$response = new Response();
$response->setContent('forbidden2');
$response->setContent('forbidden: no valid ostauthConfig');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
......@@ -142,7 +142,7 @@ class CBController extends ControllerBase
} else {
$this->logger->notice('epalToken false');
$response = new Response();
$response->setContent('forbidden3');
$response->setContent('forbidden: epalToken false');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
......@@ -155,6 +155,7 @@ class CBController extends ControllerBase
$taxis_userid = null;
$trx = $this->connection->startTransaction();
$oauth = new OAuth($this->consumer_key, $this->consumer_secret, OAUTH_SIG_METHOD_PLAINTEXT, OAUTH_AUTH_TYPE_URI);
$oauth->disableSSLChecks();
// $oauth->enableDebug();
$oauth->setToken($authToken, $this->requestTokenSecret);
$accessToken = $oauth->getAccessToken($this->access_token_url, '', $authVerifier);
......@@ -169,7 +170,10 @@ class CBController extends ControllerBase
}
$currentTime = time();
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('taxis_userid' => $taxis_userData['tin']));
$hashId = hash("sha256", $taxis_userData['tin']);
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('taxis_userid' => $hashId));
//$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('taxis_userid' => $taxis_userData['tin']));
$epalUser = reset($epalUsers);
$epalToken = md5(uniqid(mt_rand(), true));
......@@ -231,25 +235,19 @@ class CBController extends ControllerBase
}
unset($crypt);
$hashId = hash("sha256", $taxis_userData['tin']);
$epalUser = $this->entityTypeManager()->getStorage('epal_users')->create(array(
'langcode' => 'el',
'user_id' => $user->id(),
'drupaluser_id' => $user->id(),
'taxis_userid' => $taxis_userData['tin'],
'taxis_taxid' => $taxis_userData['tin'],
/* 'name' => $taxis_userData['firstName'],
'surname' => $taxis_userData['surname'],
'fathername' => $taxis_userData['fathersName'], */
//'name' => $unique_id,
//'surname' => $unique_id,
//'fathername' => $unique_id,
//'mothername' => $unique_id,
//'taxis_userid' => $taxis_userData['tin']),
'taxis_userid' => $hashId,
//'taxis_taxid' => $taxis_userData['tin'],
'taxis_taxid' => $hashId,
'name' => $name_encoded,
'surname' => $name_encoded,
'fathername' => $name_encoded,
'mothername' => $name_encoded,
'accesstoken' => $accessToken['oauth_token'],
'accesstoken_secret' => $accessToken['oauth_token_secret'],
'authtoken' => $epalToken,
......
......@@ -98,7 +98,7 @@ class OAuthLogin extends ControllerBase
$this->redirect_url = $ostauthConfig->redirect_url->value;
} else {
$response = new Response();
$response->setContent('forbidden1');
$response->setContent('forbidden: no valid ostauthConfig');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
......@@ -106,7 +106,7 @@ class OAuthLogin extends ControllerBase
try {
$oauth = new OAuth($this->consumer_key, $this->consumer_secret, OAUTH_SIG_METHOD_PLAINTEXT, OAUTH_AUTH_TYPE_URI);
$oauth->disableSSLChecks();
$oauth->enableDebug();
$uniqid = uniqid('sid');
......@@ -135,7 +135,7 @@ class OAuthLogin extends ControllerBase
} catch (OAuthException $e) {
$this->logger->warning($e->getMessage());
$response = new Response();
$response->setContent('forbidden2');
$response->setContent('forbidden: LoginGo: OAuthException');
$response->setStatusCode(Response::HTTP_FORBIDDEN);
$response->headers->set('Content-Type', 'application/json');
return $response;
......
......@@ -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>
......@@ -45,6 +47,18 @@ import { IAppState } from "../../store/store";
<div *ngIf = "minedu_userName != ''">
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(6)"><i class="fa fa-file-text"></i> Συγχωνεύσεις Ολιγομελών Τμημάτων</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(7)"><i class="fa fa-file-text"></i> Αριθμός Αιτήσεων ανά σχολική μονάδα ΕΠΑΛ</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(8)"><i class="fa fa-file-text"></i> Αριθμός Αιτήσεων ανά Αιτούντα</button>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'" >
<button type="button" class="btn btn-block" (click)="nav_to_reportpath(9)"><i class="fa fa-file-text"></i> Αριθμός Αιτούντων Μαθητών προερχόμενων απο Γενικά Λύκεια</button>
</div>
</div>
`
......@@ -109,6 +123,12 @@ import { IAppState } from "../../store/store";
this.router.navigate(["/ministry/report-no-capacity", repId]);
} else if(repId === 6){
this.router.navigate(["/ministry/report-merged-classes"]);
} else if(repId === 7){
this.router.navigate(["/ministry/report-applications"]);
}else if(repId === 8){
this.router.navigate(["/ministry/report-user-applications"]);
}else if(repId === 9){
this.router.navigate(["/ministry/report-gel-students"]);
}
}
......
......@@ -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-ΕΠΑΛ Ολιγομελή τμήματα - Προσωρινά τοποθετημένοι μαθητές";
......@@ -449,7 +449,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
}
checkclass(classId) {
this.classSelected = classId.value;
this.classSelected = Number(classId.value);
this.sectorSelected = 0;
this.courseSelected = 0;
......
This diff is collapsed.
This diff is collapsed.
......@@ -27,7 +27,7 @@ import { ReportsSchema, TableColumn } from "./reports-schema";
<h5>Συγχωνεύσεις Τμημάτων</h5>
<h6>Επιλογή Φίλτρων</h6>
<button type="button" class="btn btn-sm" (click)="toggleRegionFilter()" >
<div *ngIf = "userLoggedIn === 'supervisor'">Διαλεξε ΠΔΕ - Φίλτρο Επιλογής Περιφ/κής Δ/νσης</div>
<div *ngIf = "userLoggedIn === 'supervisor'">Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου</div>
<div *ngIf = "userLoggedIn === 'dide'">Φίλτρο Επιλογής Σχολείου</div>
<div *ngIf = "userLoggedIn === 'pde'">Φίλτρο Επιλογής Δ/νσης Εκπ/σης - Σχολείου</div>
</button>
......@@ -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)
......
This diff is collapsed.
......@@ -71,8 +71,13 @@ export class ReportsSchema {
width: "18%",
filter: false
},
num_not_confirmed: {
title: "Κατανεμημένοι Μαθητές",
width: "8%",
filter: false
},
num: {
title: "Αριθμός Μαθητών",
title: "Εγγεγραμμένοι Μαθητές",
width: "8%",
filter: false
},
......@@ -227,7 +232,7 @@ export class ReportsSchema {
width: "5%",
filter: false
}
}
}
};
......@@ -262,12 +267,12 @@ export class ReportsSchema {
filter: false
},
num: {
title: "Αριθμός Μαθητών",
title: "Εγγεγραμμένοι Μαθητές",
width: "8%",
filter: false
},
limit_down: {
title: "Ελάχιστος Αριθμός Μαθητών",
title: "Κατώτατο Όριο Μαθητών",
width: "8%",
filter: false
},
......@@ -284,6 +289,103 @@ export class ReportsSchema {
}
};
reportUserApplicationsSchema = {
actions: false,
fileName: "e-ΕΠΑΛ Αριθμός Αιτήσεων ανά Αιτούντα",
pager: {
display: true,
perPage: 10
},
noDataMessage: "Δεν υπάρχουν δεδομένα που περιέχουν το κείμενο αναζήτησης",
columns: {
studentId: {
title: "Αιτών/ούσα",
width: "25%",
filter: false
},
numapps: {
title: "Αριθμός Αιτήσεων",
width: "25%",
filter: false
}
}
};
reportApplicationsSchema = {
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
}
}
};
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,
......
......@@ -47,6 +47,11 @@ import StudentLockGuard from "../guards/student.lock.guard";
import { CamelCasePipe } from "../pipes/camelcase";
import { RemoveSpaces } from "../pipes/removespaces";
import ReportMergedClasses from "../components/minister/report-merged-classes";
import ReportApplications from "../components/minister/report-applications";
import ReportUserApplications from "../components/minister/report-user-applications";
import ReportGelStudents from "../components/minister/report-gel-students";
export const MainRoutes: Routes = [
{ path: "", component: Home },
......@@ -86,6 +91,11 @@ export const MainRoutes: Routes = [
{ path: "school/undomerge", component: UndoMergeSchools, canActivate: [DidepdeAuthGuard] },
{ path: "help-desk", component: HelpDesk, canActivate: [StudentAuthGuard] },
{ path: "ministry/report-merged-classes", component: ReportMergedClasses, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-applications", component: ReportApplications, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-user-applications", component: ReportUserApplications, canActivate: [ReportsAuthGuard] },
{ path: "ministry/report-gel-students", component: ReportGelStudents, canActivate: [ReportsAuthGuard] },
];
......@@ -127,4 +137,7 @@ export const MainDeclarations = [
MergeSchools,
UndoMergeSchools,
ReportMergedClasses,
ReportApplications,
ReportUserApplications,
ReportGelStudents,
];
......@@ -31,16 +31,18 @@ export default class Main {
// deserializeState: reimmutify,
});
const storeEnhancers = _devTools.isEnabled() ?
[ _devTools.enhancer() ] :
[];
const storeEnhancers =
//_devTools.isEnabled() ?
//[ _devTools.enhancer() ] :
[];
_ngRedux.configureStore(
rootReducer,
{},
[],
//_devTools.enhancer(),
// _devTools.enhancer(),
storeEnhancers);
// middleware,
// tools ? [ ...enhancers, tools ] : enhancers);
// tools);
......
......@@ -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());
......@@ -623,6 +628,21 @@ export class HelperDataService implements OnInit, OnDestroy {
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
.map(response => response.json());
}
else if (routepath === "/ministry/report-applications/") {
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-user-applications/") {
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-gel-students/") {
return this.http.get(`${AppSettings.API_ENDPOINT}` + routepath + regionsel + "/" + adminsel + "/" + schsel + "/" +
clsel + "/" + secsel + "/" + coursel + "/" + distribfinal, options)
.map(response => response.json());
}
}
......@@ -923,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" });
})
......@@ -1027,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;
......@@ -1044,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;
......@@ -1089,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",
......@@ -1099,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