b period

parent 0337f27e
......@@ -116,7 +116,9 @@ class DirectorView extends ControllerBase
->condition('eStudent.id', $studentId , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -504,7 +506,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', -1 , '=')
->condition('eSchool.currentclass', 1 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -552,7 +554,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $sectorid , '=')
->condition('eSchool.currentclass', 2 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -595,7 +597,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 3 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -636,7 +638,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 4 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -742,7 +744,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $sectorid , '=')
->condition('eSchool.currentclass', 2 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$results = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -769,7 +771,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 3 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -795,7 +797,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 4 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -976,7 +978,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', -1 , '=')
->condition('eSchool.currentclass', 1 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -1015,7 +1017,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $sectorid , '=')
->condition('eSchool.currentclass', 2 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -1055,7 +1057,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 3 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -1091,7 +1093,7 @@ class DirectorView extends ControllerBase
->condition('eSchool.specialization_id', $specialityid , '=')
->condition('eSchool.currentclass', 4 , '=')
->condition('eStudent.delapp', 0 , '=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2));
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......
......@@ -174,3 +174,11 @@ gel.deleteFromDirector:
_controller: '\Drupal\gel\Controller\GelDistribution::deleteApplicationFromDirector'
requirements:
_user_is_logged_in: 'TRUE'
gel.initializationBperiod:
path: '/gel/initializationBperiod'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\GelDistribution::Initializationbperiod'
requirements:
_user_is_logged_in: 'TRUE'
......@@ -79,6 +79,14 @@ import { IAppState } from "../../store/store";
</div>
<br>
<div class="col-md-6">
<button type="submit" class="btn btn-lg btn-block"
*ngIf="(loginInfo$ | async).size !== 0" (click)="InitializeBPeriod()" >
Initialization Β Περιόδου <span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
<br>
</div>
</div>
......@@ -95,6 +103,7 @@ import { IAppState } from "../../store/store";
private showLoader: BehaviorSubject<boolean>;
private loginInfoSub: Subscription;
private ServiceStudentCertifSub: Subscription;
private InitializedSub: Subscription;
//private wsIdentSub: Subscription;
private minedu_userName: string;
private minedu_userPassword: string;
......@@ -136,6 +145,8 @@ import { IAppState } from "../../store/store";
this.loginInfoSub.unsubscribe();
if (this.ServiceStudentCertifSub)
this.ServiceStudentCertifSub.unsubscribe();
if (this.InitializedSub)
this.InitializedSub.unsubscribe();
//if (this.wsIdentSub)
// this.wsIdentSub.unsubscribe();
}
......@@ -239,7 +250,52 @@ import { IAppState } from "../../store/store";
}
InitializeBPeriod()
{
console.log("ua mas trelanei");
this.showLoader.next(true);
this.InitializedSub = this._hds.InitialazationBPeriod(this.minedu_userName, this.minedu_userPassword)
.subscribe(data => {
let mTitle = "ok";
let mText = "H αρχικοποιηση για τη Β' περίοδο έγινε με επιτυχία.";
let mHeader = "modal-header-success";
this.modalTitle.next(mTitle);
this.modalText.next(mText);
this.modalHeader.next(mHeader);
this.showModal("#promotionNotice");
(<any>$(".loading")).remove();
this.showLoader.next(false);
},
error => {
console.log("Error Getting goToSecondPeriod from Web Service");
let mTitle = "Αποτυχία Αρχικοποιησης.";
let mText = "Αποτυχία Αρχικοποιησης. " +
"Προσπαθήστε ξανά. Σε περίπτωση που το πρόβλημα επιμείνει, παρακαλώ επικοινωνήστε με την ομάδα υποστήριξης.";
let mHeader = "modal-header-danger";
this.modalTitle.next(mTitle);
this.modalText.next(mText);
this.modalHeader.next(mHeader);
this.showModal("#promotionNotice");
(<any>$(".loading")).remove();
this.showLoader.next(false);
return;
});
}
}
//}
}
......@@ -1836,6 +1836,25 @@ Initialazation() {
}
InitialazationBPeriod(username, userpassword) {
let headers = new Headers({
"Content-Type": "application/json",
});
this.createMinistryAuthorizationHeader(headers, username, userpassword);
let options = new RequestOptions({ headers: headers });
console.log("tralalala");
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/initializationBperiod` , options)
.map(response => response.json());
}
findIfInitialized()
{
this.loginInfo$.getValue().forEach(loginInfoToken => {
......
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