Commit 6617fdf1 authored by Δάρα Κατερίνα's avatar Δάρα Κατερίνα 👀

administration recover gel application

parent 2bfadf4e
......@@ -248,8 +248,8 @@ class MinisterAdmin extends ControllerBase {
], Response::HTTP_FORBIDDEN);
}
if ($schooltype === 'epal') {
$config_storage = $this->entityTypeManager->getStorage('epal_student');
if ($schooltype === 'epal' || $schooltype === 'gel') {
$config_storage = $this->entityTypeManager->getStorage($schooltype.'_student');
$applications = $config_storage->loadByProperties(array('id' => $appid));
$application = reset($applications);
if (!$application) {
......@@ -261,14 +261,14 @@ class MinisterAdmin extends ControllerBase {
$application->set('delapp', 0);
$application->set('delapp_role', NULL);
$application->set('delapp_changed', NULL);
$application->set('delapp_epalid', NULL);
$application->set('delapp_'.$schooltype.'id', NULL);
$application->set('delapp_studentid', NULL);
}else{
$application->set('delapp', 1);
$application->set('delapp_role', 'ministry');
$timestamp = strtotime(date("Y-m-d H:i"));
$application->set('delapp_changed', $timestamp);
$application->set('delapp_epalid', NULL);
$application->set('delapp_'.$schooltype.'id', NULL);
$application->set('delapp_studentid', NULL);
}
......
......@@ -215,9 +215,9 @@ class Client
];
$endpoint = $endpoint_base_url . array_reduce($data, function ($c, $v) {
$c .= "/" . urlencode($v);
return $c;
}, '');
$c .= "/" . urlencode($v);
return $c;
}, '');
$result = $this->get($endpoint, [], $headers); // data as path params...
try {
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -1431,14 +1431,25 @@ export class HelperDataService implements OnInit, OnDestroy {
getOrientationGroup(classid, typeid)
{
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
if (this.authRole === MINISTRY_ROLE) {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.minedu_userName = loginInfoToken.minedu_username;
this.minedu_userPassword = loginInfoToken.minedu_userpassword;
});
this.createMinistryAuthorizationHeader(headers, this.minedu_userName, this.minedu_userPassword);
}else{
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
this.createAuthorizationHeader(headers);
}
let options = new RequestOptions({ headers: headers });
return new Promise((resolve, reject) => {
this.http.get(`${AppSettings.API_ENDPOINT}/choicesperclass/list/?type_id=`+ typeid + `&class_id=` +classid + `?q=choicesperclass/list&_format=json`, options)
......@@ -1545,8 +1556,6 @@ saveApprovedClasses(taxi, classid, type)
}
getStatusofLockSmallClasses()
{
let headers = new Headers({
......@@ -1590,14 +1599,25 @@ getGelSubmittedPreview() {
getGelStudentDetails(headerid) {
let headerIdNew = headerid.toString();
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
if (this.authRole === MINISTRY_ROLE) {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.minedu_userName = loginInfoToken.minedu_username;
this.minedu_userPassword = loginInfoToken.minedu_userpassword;
});
this.createMinistryAuthorizationHeader(headers, this.minedu_userName, this.minedu_userPassword);
}else{
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
this.createAuthorizationHeader(headers);
}
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/application/` + headerIdNew, 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