added gsis retrieve data, added configuration field regarding gsis data use

parent 1657f00c
......@@ -7,7 +7,7 @@ deploysystem.ministry.retrievesettings:
requirements:
_user_is_logged_in: 'TRUE'
deploysystem.ministry.storesettings:
path: '/ministry/store-settings/{capacityDisabled}/{directorViewDisabled}/{applicantsLoginDisabled}/{applicantsAppModifyDisabled}/{applicantsAppDeleteDisabled}/{applicantsResultsDisabled}/{secondPeriodEnabled}/{dateStart}/{smallClassApproved}/{wsIdentEnabled}'
path: '/ministry/store-settings/{capacityDisabled}/{directorViewDisabled}/{applicantsLoginDisabled}/{applicantsAppModifyDisabled}/{applicantsAppDeleteDisabled}/{applicantsResultsDisabled}/{secondPeriodEnabled}/{dateStart}/{smallClassApproved}/{ws}/{gsis}'
options:
_auth: [ 'basic_auth' ]
defaults:
......@@ -38,3 +38,11 @@ deploysystem.is_ws_enabled:
_controller: '\Drupal\deploysystem\Controller\MinisterSettings::isWSIdentEnabled'
requirements:
_user_is_logged_in: 'TRUE'
deploysystem.is_gsis_enabled:
path: '/deploysystem/isgsisenabled'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\deploysystem\Controller\MinisterSettings::isGsisIdentEnabled'
requirements:
_user_is_logged_in: 'TRUE'
......@@ -105,6 +105,7 @@ class MinisterSettings extends ControllerBase {
$dateStart = $eggrafesConfig->date_start_b_period->getString();
$smallClassApproved = $eggrafesConfig->lock_small_classes->getString();
$wsIdentEnabled = $eggrafesConfig->ws_ident->getString();
$gsisIdentEnabled = $eggrafesConfig->gsis_ident->getString();
}
$config_storage->resetCache();
......@@ -119,7 +120,8 @@ class MinisterSettings extends ControllerBase {
'secondPeriodEnabled' => $secondPeriodEnabled,
'dateStart' => $dateStart,
'smallClassApproved' => $smallClassApproved,
'$wsIdentEnabled' => $wsIdentEnabled
'$wsIdentEnabled' => $wsIdentEnabled,
'$gsisIdentEnabled' => $gsisIdentEnabled
], Response::HTTP_OK);
} //end try
......@@ -138,7 +140,7 @@ class MinisterSettings extends ControllerBase {
public function storeSettings(Request $request, $capacityDisabled, $directorViewDisabled, $applicantsLoginDisabled, $applicantsAppModifyDisabled,
$applicantsAppDeleteDisabled, $applicantsResultsDisabled, $secondPeriodEnabled,
$dateStart, $smallClassApproved, $wsIdentEnabled ) {
$dateStart, $smallClassApproved, $ws, $gsis ) {
try {
if (!$request->isMethod('GET')) {
......@@ -190,7 +192,8 @@ public function storeSettings(Request $request, $capacityDisabled, $directorView
$eggrafesConfig->set('activate_second_period', $secondPeriodEnabled);
$eggrafesConfig->set('date_start_b_period', $dateStart);
$eggrafesConfig->set('lock_small_classes', $smallClassApproved);
$eggrafesConfig->set('ws_ident', $wsIdentEnabled );
$eggrafesConfig->set('ws_ident', $ws );
$eggrafesConfig->set('gsis_ident', $gsis );
$eggrafesConfig->save();
}
$config_storage->resetCache();
......@@ -207,7 +210,8 @@ public function storeSettings(Request $request, $capacityDisabled, $directorView
'secondPeriodEnabled' => $secondPeriodEnabled,
'dateStart' => $dateStart,
'smallClassApproved' =>$smallClassApproved,
'$wsIdentEnabled' =>$wsIdentEnabled
'$wsIdentEnabled' =>$ws,
'$gsisIdentEnabled' =>$gsis
], Response::HTTP_OK);
} //end try
......@@ -246,6 +250,29 @@ public function isWSIdentEnabled(Request $request)
}
public function isGsisIdentEnabled(Request $request)
{
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if (!$user) {
return $this->respondWithStatus([
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
$config_storage = $this->entityTypeManager->getStorage('eggrafes_config');
$eggrafesConfigs = $config_storage->loadByProperties(array('name' => 'eggrafes_config'));
$eggrafesConfig = reset($eggrafesConfigs);
if (!$eggrafesConfig)
return $this->respondWithStatus([
'message' => t("eggrafesConfig Enity not found"),
], Response::HTTP_FORBIDDEN);
else
return $this->respondWithStatus(array('res' => $eggrafesConfig->gsis_ident->value), Response::HTTP_OK);
}
private function respondWithStatus($arr, $s) {
$res = new JsonResponse($arr);
......
......@@ -174,8 +174,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))
->setDescription(t('The name of the Eggrafes config entity.'))
->setLabel(t('Ονομασία'))
->setDescription(t('Ονομασία του Eggrafes config entity.'))
->setSettings([
'max_length' => 50,
'text_processing' => 0,
......@@ -194,8 +194,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_school_capacity'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock School Capacity'))
->setDescription(t('Lock School Capacity.'))
->setLabel(t('Απενεργοποίηση δυνατότητας τροποποίησης χωρητικότητας από τους Διευθυντές σχολείων'))
->setDescription(t('Απενεργοποίηση δυνατότητας τροποποίησης χωρητικότητας από τους Διευθυντές σχολείων.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -214,8 +214,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_school_students_view'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock School Students View'))
->setDescription(t('Lock School Students View.'))
->setLabel(t('Απενεργοποίηση δυνατότητας προβολής κατανομής μαθητών από τους Διευθυντές σχολείων'))
->setDescription(t('Απενεργοποίηση δυνατότητας προβολής κατανομής μαθητών από τους Διευθυντές σχολείων.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -234,8 +234,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_application'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock Application'))
->setDescription(t('Lock Application.'))
->setLabel(t('Απενεργοποίηση δυνατότητας υποβολής δήλωσης προτίμησης'))
->setDescription(t('Απενεργοποίηση δυνατότητας υποβολής δήλωσης προτίμησης.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -254,8 +254,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_modify'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock Modifications'))
->setDescription(t('Lock Modifications.'))
->setLabel(t('Απενεργοποίηση δυνατότητας τροποποίησης αίτησης'))
->setDescription(t('Απενεργοποίηση δυνατότητας τροποποίησης αίτησης.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -274,8 +274,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_delete'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock Deletions'))
->setDescription(t('Lock Deletions.'))
->setLabel(t('Απενεργοποίηση δυνατότητας διαγραφής αίτησης'))
->setDescription(t('Απενεργοποίηση δυνατότητας διαγραφής αίτησης.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -294,8 +294,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['lock_results'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Lock Results'))
->setDescription(t('Lock Results.'))
->setLabel(t('Απενεργοποίηση δυνατότητας προβολής αποτελεσμάτων κατανομής από τους μαθητές'))
->setDescription(t('Απενεργοποίηση δυνατότητας προβολής αποτελεσμάτων κατανομής από τους μαθητές.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -314,8 +314,8 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('view', TRUE);
$fields['activate_second_period'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Activate second periods of applications'))
->setDescription(t('Activate second periods of applications.'))
->setLabel(t('Ενεργοποίηση δεύτερης περιόδου αιτήσεων'))
->setDescription(t('Ενεργοποίηση δεύτερης περιόδου αιτήσεων.'))
->setSettings(array(
'text_processing' => 0,
))
......@@ -389,6 +389,26 @@ class EggrafesConfig extends ContentEntityBase implements EggrafesConfigInterfac
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['gsis_ident'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Ενεργοποίηση χρήστης στοιχείων από ΓΓΠΣ'))
->setDescription(t('Ενεργοποίηση χρήστης στοιχείων από ΓΓΠΣ'))
->setSettings(array(
'text_processing' => 0,
))
->setRequired(FALSE)
->setDefaultValue(FALSE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'boolean',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'boolean',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
->setDescription(t('A boolean indicating whether the Eggrafes config is published.'))
......
......@@ -67,7 +67,6 @@ class CBController extends ControllerBase
public function loginCB(Request $request)
{
$oauthostSessions = $this->entityTypeManager->getStorage('oauthost_session')->loadByProperties(array('name' => $request->query->get('sid_ost')));
$this->oauthostSession = reset($oauthostSessions);
if ($this->oauthostSession) {
......@@ -150,6 +149,15 @@ class CBController extends ControllerBase
public function authenticatePhase2($request, $authToken, $authVerifier)
{
$useGSIS = "0";
$config_storage = $this->entityTypeManager->getStorage('eggrafes_config');
$eggrafesConfigs = $config_storage->loadByProperties(array('name' => 'eggrafes_config'));
$eggrafesConfig = reset($eggrafesConfigs);
if (!$eggrafesConfig)
return false;
else
$useGSIS = $eggrafesConfig->gsis_ident->value;
try {
$taxis_userid = null;
$trx = $this->connection->startTransaction();
......@@ -183,6 +191,7 @@ class CBController extends ControllerBase
$user->setPassword($schoolToken);
$user->setUsername($schoolToken);
$user->save();
$schoolUser->set('authtoken', $schoolToken);
$schoolUser->set('accesstoken', $accessToken['oauth_token']);
$schoolUser->set('accesstoken_secret', $accessToken['oauth_token_secret']);
......@@ -223,6 +232,19 @@ class CBController extends ControllerBase
$crypt = new Crypt();
try {
$name_encoded = $crypt->encrypt($unique_id);
if ($useGSIS === "1") {
$firstname_encoded = $crypt->encrypt($taxis_userData['firstName']);
$surname_encoded = $crypt->encrypt($taxis_userData['surname']);
$fathername_encoded = $crypt->encrypt($taxis_userData['fathersName']);
$mothername_encoded = $crypt->encrypt("");
}
else {
$firstname_encoded = $name_encoded;
$surname_encoded = $name_encoded;
$fathername_encoded = $name_encoded;
$mothername_encoded = $name_encoded;
}
}
catch (\Exception $e) {
unset($crypt);
......@@ -239,15 +261,15 @@ class CBController extends ControllerBase
$schoolUser = $this->entityTypeManager()->getStorage('applicant_users')->create(array(
'langcode' => 'el',
'user_id' => $user->id(),
//'drupaluser_id' => $user->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,
//'name' => $name_encoded,
//'surname' => $name_encoded,
//'fathername' => $name_encoded,
//'mothername' => $name_encoded,
'name' => $firstname_encoded,
'surname' => $surname_encoded,
'fathername' => $fathername_encoded,
'mothername' => $mothername_encoded,
'accesstoken' => $accessToken['oauth_token'],
'accesstoken_secret' => $accessToken['oauth_token_secret'],
'authtoken' => $schoolToken,
......@@ -315,6 +337,7 @@ class CBController extends ControllerBase
foreach( $webUserDetails as $element )
{
$comments = $element->getElementsByTagName( "comments" );
//$comments = $element->getElementsByTagName( "mothersName" );
$comment = $comments->item(0)->nodeValue;
$fathersNames = $element->getElementsByTagName( "fathersName" );
......
......@@ -369,10 +369,14 @@ class CurrentUser extends ControllerBase
$postData = json_decode($content);
$crypt = new Crypt();
try {
$name_encoded = $crypt->encrypt($postData->userProfile->userName);
$surname_encoded = $crypt->encrypt($postData->userProfile->userSurname);
$fathername_encoded = $crypt->encrypt($postData->userProfile->userMothername);
$mothername_encoded = $crypt->encrypt($postData->userProfile->userFathername);
if (isset($postData->userProfile->userName))
$name_encoded = $crypt->encrypt($postData->userProfile->userName);
if (isset($postData->userProfile->userSurname))
$surname_encoded = $crypt->encrypt($postData->userProfile->userSurname);
if (isset($postData->userProfile->userFathername))
$fathername_encoded = $crypt->encrypt($postData->userProfile->userFathername);
if (isset($postData->userProfile->userMothername))
$mothername_encoded = $crypt->encrypt($postData->userProfile->userMothername);
}
catch (\Exception $e) {
unset($crypt);
......@@ -383,10 +387,14 @@ class CurrentUser extends ControllerBase
}
unset($crypt);
$applicantUser->set('name', $name_encoded);
$applicantUser->set('surname', $surname_encoded);
$applicantUser->set('mothername', $fathername_encoded);
$applicantUser->set('fathername', $mothername_encoded);
if (isset($postData->userProfile->userName))
$applicantUser->set('name', $name_encoded);
if (isset($postData->userProfile->userSurname))
$applicantUser->set('surname', $surname_encoded);
if (isset($postData->userProfile->userFathername))
$applicantUser->set('fathername', $fathername_encoded);
if (isset($postData->userProfile->userMothername))
$applicantUser->set('mothername', $mothername_encoded);
$representRole = "0";
if (isset($postData->userProfile->representRole)) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -154,7 +154,17 @@ import { IAppState } from "../../store/store";
<label for="wsIdentEnabled">Ενεργοποίηση Web Service Ταυτοποίησης Μαθητή του ΠΣ Myschool</label>
</div>
</div>
<br>
<div class="row">
<div class="col-md-1 ">
<input type="checkbox" [checked]="gsisIdentEnabled" formControlName="gsisIdentEnabled"
(click)="toggleGsisIdent()" >
</div>
<div class="col-md-9">
<label for="gsisIdentEnabled">Ενεργοποίηση χρήσης δεδομένων από τη ΓΓΠΣ</label>
</div>
</div>
<br>
<button type="submit" class="btn btn-md pull-right" (click)="storeSettings()" [disabled] = "secondPeriodEnabled && formGroup.get('distributionstartdate').hasError('required')" >
......@@ -191,6 +201,7 @@ import { IAppState } from "../../store/store";
private dataRetrieved: number;
private smallClassApproved: boolean;
private wsIdentEnabled: boolean;
private gsisIdentEnabled: boolean;
private showLoader: BehaviorSubject<boolean>;
private minedu_userName: string;
......@@ -219,6 +230,7 @@ import { IAppState } from "../../store/store";
distributionstartdate:["", [Validators.required]],
smallClassApproved:["",[]],
wsIdentEnabled:["",[]],
gsisIdentEnabled:["",[]],
});
this.loginInfo$ = new BehaviorSubject(LOGININFO_INITIAL_STATE);
......@@ -296,6 +308,7 @@ import { IAppState } from "../../store/store";
//this.formGroup.controls["distributionstartdate"].setValue(this.populateDate(this.dateStartBPeriod));
this.smallClassApproved = Boolean(Number(this.settings$.value["smallClassApproved"]));
this.wsIdentEnabled = Boolean(Number(this.settings$.value["wsIdentEnabled"]));
this.gsisIdentEnabled = Boolean(Number(this.settings$.value["gsisIdentEnabled"]));
this.dataRetrieved = 1;
},
......@@ -322,7 +335,7 @@ import { IAppState } from "../../store/store";
this.settingsSub = this._hds.storeAdminSettings(this.minedu_userName, this.minedu_userPassword,
this.capacityDisabled, this.directorViewDisabled, this.applicantsLoginDisabled,
this.applicantsAppModifyDisabled, this.applicantsAppDeleteDisabled, this.applicantsResultsDisabled,
this.secondPeriodEnabled, this.dateStartBPeriod, this.smallClassApproved, this.wsIdentEnabled)
this.secondPeriodEnabled, this.dateStartBPeriod, this.smallClassApproved, this.wsIdentEnabled, this.gsisIdentEnabled)
.subscribe(data => {
this.settings$.next(data);
this.dataRetrieved = 1;
......@@ -391,6 +404,10 @@ import { IAppState } from "../../store/store";
toggleWsIdent(){
this.wsIdentEnabled =!this.wsIdentEnabled;
}
toggleGsisIdent(){
this.gsisIdentEnabled =!this.gsisIdentEnabled;
}
}
......@@ -152,7 +152,7 @@
<div class="form-group">
<label for="lastschool_schoolname">Σχολείο τελευταίας φοίτησης(<span style="color: #ff0000;">*</span>)</label><br/>
<input ngui-auto-complete formControlName="lastschool_schoolname" [value] = " (lastSchName || async).value" [source]="observableSource.bind(this)" [list-formatter]="lastSchoolListFormatter" [value-formatter]="lastSchoolValueFormatter" [min-chars]="5" no-match-found-text="Δεν βρέθηκαν σχολεία"
<input ngui-auto-complete formControlName="lastschool_schoolname" [value] = " (lastSchName || async).value" [source]="observableSource.bind(this)" [list-formatter]="lastSchoolListFormatter" [value-formatter]="lastSchoolValueFormatter" [min-chars]="1" no-match-found-text="Δεν βρέθηκαν σχολεία"
(valueChanged)="lastSchoolValueChanged($event)" placeholder="Πληκτρολογήστε τουλάχιστο 5 χαρακτήρες" class="form-control">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('lastschool_schoolname').dirty && studentDataGroup.get('lastschool_schoolname').hasError('status')">
......
......@@ -70,17 +70,27 @@ import {
};
private observableSource = (keyword: any): Observable<any[]> => {
let url: string = "https://mm.sch.gr/api/units?name=" + keyword;
//let url: string = "https://mm.sch.gr/api/units?name=" + keyword;
let url: string = "http://eduslim2.minedu.gov.gr/e-eggrafes/drupal/sectorsperschool/list?sector_id=8";
if (keyword) {
console.log("mpika1");
return this.http.get(url)
.map(res => {
let json = res.json();
let retArr = <any>Array();
for (let i = 0; i < json.data.length; i++) {
console.log("mpika2");
console.log(json.length);
//for (let i = 0; i < json.data.length; i++) {
for (let i = 0; i < json.length; i++) {
retArr[i] = {};
retArr[i].registry_no = json.data[i].registry_no;
retArr[i].name = json.data[i].name;
retArr[i].unit_type_id = json.data[i].unit_type_id;
//retArr[i].registry_no = json.data[i].registry_no;
//retArr[i].name = json.data[i].name;
//retArr[i].unit_type_id = json.data[i].unit_type_id;
retArr[i].name = json[i].epal_name;
console.log(json[i].epal_name);
}
return retArr;
});
......
......@@ -33,7 +33,7 @@
</div>
<div class="form-group">
<label for="userName">Όνομα(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="userName">
<label for="userName">Όνομα(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="userName" >
<div class="alert alert-danger" *ngIf="formGroup.get('userName').touched && formGroup.get('userName').hasError('required') ">
Το πεδίο δεν μπορεί να αφεθεί κενό!
</div>
......@@ -77,7 +77,7 @@
<input class="form-control" type="number" formControlName="userChildren" style="width:54px" min = "0" max = "4">
</div>
<div class="col-md-11">
<label for="userChildren">Αριθμός παιδιών που βρίσκονται στην επιμέλειά μου και έχουν δικαίωμα να εγγραφούν σε ΕΠΑΛ</label>
<label for="userChildren">Αριθμός παιδιών που βρίσκονται στην επιμέλειά μου και έχουν δικαίωμα να εγγραφούν σε ΕΠΑΛ ή ΓΕΛ</label>
</div>
</div>
......
......@@ -24,8 +24,7 @@ import { HelperDataService } from "../../services/helper-data-service";
public isModalShown: BehaviorSubject<boolean>;
public hasRight: BehaviorSubject<boolean>;
private representativeRole: BehaviorSubject<boolean>;
//private existentRole: boolean;
//private existentMail: string;
private gsisIdentSub: Subscription;
constructor(private fb: FormBuilder,
private router: Router,
......@@ -69,6 +68,17 @@ import { HelperDataService } from "../../services/helper-data-service";
ngOnInit() {
(<any>$("#emailSentNotice")).appendTo("body");
this.showLoader.next(true);
this.gsisIdentSub = this.hds.isGSIS_ident_enabled().subscribe(z => {
if (z.res === "1") {
this.formGroup.get("userName").disable();
this.formGroup.get("userSurname").disable();
this.formGroup.get("userFathername").disable();
//this.formGroup.get("userMothername").disable();
}
});
this.applicantUserDataSub = this.hds.getApplicantUserData().subscribe(x => {
this.showLoader.next(false);
this.applicantUserData$.next(x);
......@@ -104,6 +114,7 @@ import { HelperDataService } from "../../services/helper-data-service";
ngOnDestroy() {
(<any>$("#emailSentNotice")).remove();
if (this.applicantUserDataSub) this.applicantUserDataSub.unsubscribe();
if (this.gsisIdentSub) this.gsisIdentSub.unsubscribe();
}
saveProfileAndContinue(): void {
......@@ -128,9 +139,11 @@ import { HelperDataService } from "../../services/helper-data-service";
*/
else {
this.showLoader.next(true);
this.hds.saveProfile(this.formGroup.value)
//this.hds.saveProfile(this.formGroup.value)
this.hds.saveProfile(this.formGroup.getRawValue())
.then(res => {
this._prfa.saveProfile(this.formGroup.value);
//this._prfa.saveProfile(this.formGroup.value);
this._prfa.saveProfile(this.formGroup.getRawValue());
this.showLoader.next(false);
this.router.navigate(["/intro-statement"]);
})
......
......@@ -829,7 +829,8 @@ export class HelperDataService implements OnInit, OnDestroy {
.map(response => response.json());
}
storeAdminSettings(username, userpassword, capac, dirview, applogin, appmodify, appdelete, appresults, secondperiod, datestart, smallClassApproved, wsIdentEnabled) {
storeAdminSettings(username, userpassword, capac, dirview, applogin, appmodify, appdelete,
appresults, secondperiod, datestart, smallClassApproved, wsIdentEnabled, gsisIdentEnabled) {
let headers = new Headers({
"Content-Type": "application/json",
......@@ -841,7 +842,7 @@ export class HelperDataService implements OnInit, OnDestroy {
return this.http.get(`${AppSettings.API_ENDPOINT}/ministry/store-settings/` +
Number(capac) + "/" + Number(dirview) + "/" + Number(applogin) + "/" + Number(appmodify) + "/" +
Number(appdelete) + "/" + Number(appresults) + "/" + Number(secondperiod) + "/" + datestart + "/" +
Number(smallClassApproved) + "/" + Number(wsIdentEnabled) , options)
Number(smallClassApproved) + "/" + Number(wsIdentEnabled) + "/" + Number(gsisIdentEnabled) , options)
.map(response => response.json());
}
......@@ -1427,6 +1428,22 @@ isWS_ident_enabled()
}
isGSIS_ident_enabled()
{
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);
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/deploysystem/isgsisenabled`, options)
.map(response => response.json());
}
OffLinecalculationofSmallClasses(username, userpassword) {
......
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