various fixes(unsubscribe etc). Added intro-statement form(WIP). Application...

various fixes(unsubscribe etc). Added intro-statement form(WIP). Application form modifications(WIP), submission proper validation(WIP)
parent 64c71ff5
...@@ -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);
} }
...@@ -96,6 +96,11 @@ class ApplicationSubmit extends ControllerBase { ...@@ -96,6 +96,11 @@ class ApplicationSubmit extends ControllerBase {
'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;
}
} }
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({
......
...@@ -106,6 +106,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -106,6 +106,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();
} }
......
...@@ -115,6 +115,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -115,6 +115,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() {
......
...@@ -313,6 +313,21 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -313,6 +313,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)
...@@ -321,6 +336,8 @@ import { API_ENDPOINT } from '../../app.settings'; ...@@ -321,6 +336,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();
} }
......
<div class="row"> <div class="row">
<breadcrumbs></breadcrumbs> <breadcrumbs></breadcrumbs>
</div> </div>
<div class = "loading" *ngIf="(criteria$ | async).size === 0 || (loginInfo$ | async).size === 0"></div> <div class = "loading" *ngIf="(loginInfo$ | async).size === 0"></div>
<div id="applicationFormNotice" (onHidden)="onHidden()" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div id="applicationFormNotice" (onHidden)="onHidden()" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<h4> Προσωπικά Στοιχεία Μαθητή </h4>
<form novalidate [formGroup]="studentDataGroup" #form> <form novalidate [formGroup]="studentDataGroup" #form>
<p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ συμπληρώστε τα στοιχεία του μαθητή και στη συνέχεια επιλέξτε <i>Συνέχεια</i>. <strong>Προσοχη!</strong> Παρακαλώ να συμπληρώσετε τα στοιχεία ακριβώς όπως είναι στον τελευταίο τίτλο κτήσης απολυτηρίου/ πτυχίου του μαθητή.</p> <p style="margin-top: 20px; line-height: 2em;"> Παρακαλώ συμπληρώστε τα στοιχεία του μαθητή και στη συνέχεια επιλέξτε <i>Συνέχεια</i>. <strong>Προσοχη!</strong> Παρακαλώ να συμπληρώσετε τα στοιχεία ακριβώς όπως είναι στον τελευταίο τίτλο κτήσης απολυτηρίου/ πτυχίου του μαθητή.</p>
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
</div> </div>
</div> </div>
<div class="row evenin" style="margin: 20px 2px 10px 2px; line-height: 2em;">
<div class="col-md-12" style="font-size: 1.5em; font-weight: bold; text-align: center;">Στοιχεία μαθητή</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="name">Όνομα μαθητή(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="name"> <label for="name">Όνομα μαθητή(<span style="color: #ff0000;">*</span>)</label><input class="form-control" type="text" formControlName="name">
</div> </div>
...@@ -110,7 +113,7 @@ ...@@ -110,7 +113,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="studentbirthdate">Ημερομηνία γέννησης - Δεν πληκτρολογείτε. Επιλέξτε το εικονίδιο δεξιά!(<span style="color: #ff0000;">*</span>)</label> <label for="studentbirthdate">Ημερομηνία γέννησης μαθητή- Δεν πληκτρολογείτε. Επιλέξτε το εικονίδιο δεξιά!(<span style="color: #ff0000;">*</span>)</label>
<my-date-picker name="studentbirthdate" [options]="myDatePickerOptions" <my-date-picker name="studentbirthdate" [options]="myDatePickerOptions"
formControlName="studentbirthdate" locale="el"></my-date-picker> formControlName="studentbirthdate" locale="el"></my-date-picker>
</div> </div>
...@@ -192,7 +195,7 @@ ...@@ -192,7 +195,7 @@
</div> </div>
<form novalidate [formGroup]="studentCriteriaGroup"> <!-- <form novalidate [formGroup]="studentCriteriaGroup">
<div formArrayName="formArray"> <div formArrayName="formArray">
...@@ -231,9 +234,9 @@ ...@@ -231,9 +234,9 @@
</div> </div>
</form> </form> -->
<div class="row" style="margin-top: 20px; margin-bottom: 20px;" *ngIf="(criteria$ | async).size > 0"> <div class="row" style="margin-top: 20px; margin-bottom: 20px;">
<div class="col-md-6"> <div class="col-md-6">
<button type="button" class="btn-primary btn-lg pull-left" (click)="navigateBack()"> <button type="button" class="btn-primary btn-lg pull-left" (click)="navigateBack()">
<i class="fa fa-backward"></i> <i class="fa fa-backward"></i>
......
...@@ -85,9 +85,9 @@ import { ...@@ -85,9 +85,9 @@ import {
telnum: ['', [Validators.pattern(VALID_DIGITS_PATTERN),Validators.required]], telnum: ['', [Validators.pattern(VALID_DIGITS_PATTERN),Validators.required]],
}); });
this.studentCriteriaGroup = this.fb.group({ /* this.studentCriteriaGroup = this.fb.group({
formArray: this.rss, formArray: this.rss,
}); }); */
}; };
...@@ -126,7 +126,7 @@ import { ...@@ -126,7 +126,7 @@ import {
return state.studentDataFields; return state.studentDataFields;
}).subscribe(this.studentDataFields$); }).subscribe(this.studentDataFields$);
this._sdfb.getCriteria(true); /* this._sdfb.getCriteria(true);
this.criteriaSub = this._ngRedux.select(state => { this.criteriaSub = this._ngRedux.select(state => {
if (state.criter.size > 0) { if (state.criter.size > 0) {
state.criter.reduce(({}, criteria) => { state.criter.reduce(({}, criteria) => {
...@@ -140,34 +140,35 @@ import { ...@@ -140,34 +140,35 @@ import {
}, {}); }, {});
} }
return state.criter; return state.criter;
}).subscribe(this.criteria$); }).subscribe(this.criteria$); */
} }
ngOnDestroy() { ngOnDestroy() {
(<any>$('#applicationFormNotice')).remove(); (<any>$('#applicationFormNotice')).remove();
if (this.studentDataFieldsSub) this.studentDataFieldsSub.unsubscribe(); if (this.studentDataFieldsSub) this.studentDataFieldsSub.unsubscribe();
if (this.criteriaSub) this.criteriaSub.unsubscribe(); // if (this.criteriaSub) this.criteriaSub.unsubscribe();
if (this.studentDataFields$) this.studentDataFields$.unsubscribe(); if (this.studentDataFields$) this.studentDataFields$.unsubscribe();
if (this.criteria$) this.criteria$.unsubscribe(); // if (this.criteria$) this.criteria$.unsubscribe();
if (this.loginInfo$) this.loginInfo$.unsubscribe(); if (this.loginInfo$) this.loginInfo$.unsubscribe();
} }
navigateBack() { navigateBack() {
this._sdfa.saveStudentDataFields([this.studentDataGroup.value]); this._sdfa.saveStudentDataFields([this.studentDataGroup.value]);
this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]); // this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]);
this.router.navigate(['/schools-order-select']); this.router.navigate(['/schools-order-select']);
} }
submitSelected() { submitSelected() {
if (this.studentDataGroup.invalid || this.studentCriteriaGroup.invalid) { // if (this.studentDataGroup.invalid || this.studentCriteriaGroup.invalid) {
if (this.studentDataGroup.invalid) {
this.modalHeader.next("modal-header-danger"); this.modalHeader.next("modal-header-danger");
this.modalTitle.next("Η αίτηση δεν είναι πλήρης"); this.modalTitle.next("Η αίτηση δεν είναι πλήρης");
this.modalText.next("Πρέπει να συμπληρώσετε όλα τα πεδία που συνοδεύονται από (*)"); this.modalText.next("Πρέπει να συμπληρώσετε όλα τα πεδία που συνοδεύονται από (*)");
this.showModal(); this.showModal();
} else { } else {
this._sdfa.saveStudentDataFields([this.studentDataGroup.value]); this._sdfa.saveStudentDataFields([this.studentDataGroup.value]);
this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]); // this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]);
this.router.navigate(['/application-submit']); this.router.navigate(['/application-submit']);
} }
} }
......
...@@ -17,11 +17,6 @@ import { REGION_SCHOOLS_INITIAL_STATE } from '../../store/regionschools/regionsc ...@@ -17,11 +17,6 @@ import { REGION_SCHOOLS_INITIAL_STATE } from '../../store/regionschools/regionsc
import { EPALCLASSES_INITIAL_STATE } from '../../store/epalclasses/epalclasses.initial-state'; import { EPALCLASSES_INITIAL_STATE } from '../../store/epalclasses/epalclasses.initial-state';
import { SECTOR_COURSES_INITIAL_STATE } from '../../store/sectorcourses/sectorcourses.initial-state'; import { SECTOR_COURSES_INITIAL_STATE } from '../../store/sectorcourses/sectorcourses.initial-state';
import { SECTOR_FIELDS_INITIAL_STATE } from '../../store/sectorfields/sectorfields.initial-state'; import { SECTOR_FIELDS_INITIAL_STATE } from '../../store/sectorfields/sectorfields.initial-state';
import { IStudentDataFields } from '../../store/studentdatafields/studentdatafields.types';
import { STUDENT_DATA_FIELDS_INITIAL_STATE } from '../../store/studentdatafields/studentdatafields.initial-state';
import { ICriteria, ICriter } from '../../store/criteria/criteria.types';
import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-state';
@Component({ @Component({
selector: 'application-preview-select', selector: 'application-preview-select',
...@@ -80,62 +75,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st ...@@ -80,62 +75,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
</li> </li>
</div> </div>
</ul> </ul>
<div *ngIf="currentUrl === '/application-submit'">
<div *ngFor="let studentDataField$ of studentDataFields$ | async;">
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Στοιχεία μαθητή
</li>
</ul>
<div><label for="name">Όνομα μαθητή</label> <p class="form-control" id="name" style="border:1px solid #eceeef;"> {{studentDataField$.name}} </p> </div>
<div><label for="studentsurname">Επώνυμο μαθητή</label> <p class="form-control" id = "studentsurname" style="border:1px solid #eceeef;"> {{studentDataField$.studentsurname}} </p></div>
<div><label for="fatherfirstname">Όνομα Πατέρα</label> <p class="form-control" id = "fatherfirstname" style="border:1px solid #eceeef;"> {{studentDataField$.fatherfirstname}} </p></div>
<div><label for="fathersurname">Επώνυμο Πατέρα</label> <p class="form-control" id = "fathersurname" style="border:1px solid #eceeef;"> {{studentDataField$.fathersurname}} </p></div>
<div><label for="motherfirstname">Όνομα Μητέρας</label> <p class="form-control" id = "motherfirstname" style="border:1px solid #eceeef;"> {{studentDataField$.motherfirstname}} </p></div>
<div><label for="mothersurname">Επώνυμο Μητέρας</label> <p class="form-control" id = "mothersurname" style="border:1px solid #eceeef;"> {{studentDataField$.mothersurname}} </p></div>
<div><label for="birthdate">Ημερομηνία Γέννησης</label> <p class="form-control" id = "birthdate" style="border:1px solid #eceeef;"> {{studentDataField$.studentbirthdate}} </p></div>
<table>
<tr>
<td>
<div class="form-group">
<label for="regionaddress">Διεύθυνση κατοικίας</label><p class="form-control" id = "regionaddress" style="border:1px solid #eceeef;"> {{studentDataField$.regionaddress}} </p>
</div>
</td>
<td>
<div class="form-group">
<label for="regiontk">TK </label><p class="form-control" id = "regiontk" style="border:1px solid #eceeef;"> {{studentDataField$.regiontk}} </p>
</div>
</td>
<td>
<div class="form-group">
<label for="regionarea">Πόλη/Περιοχή</label><p class="form-control" id = "regionarea" style="border:1px solid #eceeef;"> {{studentDataField$.regionarea}} </p>
</div>
</td>
</tr>
</table>
<div><label for="certificatetype">Τύπος απολυτηρίου</label> <p class="form-control" id = "certificatetype" style="border:1px solid #eceeef;"> {{studentDataField$.certificatetype}} </p></div>
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" id = "telnum" style="border:1px solid #eceeef;"> {{studentDataField$.telnum}} </p></div>
<div><label for="relationtostudent">Η αίτηση γίνεται από</label> <p class="form-control" id = "relationtostudent" style="border:1px solid #eceeef;"> {{studentDataField$.relationtostudent}} </p></div>
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
<div *ngIf="currentUrl === '/application-submit'">
Κοινωνικά/Εισοδηματικά Κριτήρια
</div>
</li>
</ul>
</div>
</div>
<div *ngIf="currentUrl === '/application-submit'">
<div *ngFor="let criteriaField$ of criteriaFields$ | async;">
<div *ngIf="criteriaField$.selected === true">
{{criteriaField$.name}}
</div>
</div>
</div>
` `
}) })
...@@ -144,14 +83,11 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st ...@@ -144,14 +83,11 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
private regions$: BehaviorSubject<IRegions>; private regions$: BehaviorSubject<IRegions>;
private selectedSchools$: BehaviorSubject<Array<IRegionSchool>> = new BehaviorSubject(Array()); private selectedSchools$: BehaviorSubject<Array<IRegionSchool>> = new BehaviorSubject(Array());
private sectorFields$: BehaviorSubject<ISectorFields>; private sectorFields$: BehaviorSubject<ISectorFields>;
private criteriaFields$: BehaviorSubject<ICriter>;
private studentDataFields$: BehaviorSubject<IStudentDataFields>;
private epalclasses$: BehaviorSubject<IEpalClasses>; private epalclasses$: BehaviorSubject<IEpalClasses>;
private sectorsSub: Subscription; private sectorsSub: Subscription;
private regionsSub: Subscription; private regionsSub: Subscription;
private sectorFieldsSub: Subscription; private sectorFieldsSub: Subscription;
private criteriaFieldsSub: Subscription; private criteriaFieldsSub: Subscription;
private studentDataFieldsSub: Subscription;
private courseActive = "-1"; private courseActive = "-1";
private numSelectedSchools = <number>0; private numSelectedSchools = <number>0;
private numSelectedOrder = <number>0; private numSelectedOrder = <number>0;
...@@ -167,8 +103,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st ...@@ -167,8 +103,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
this.sectors$ = new BehaviorSubject(SECTOR_COURSES_INITIAL_STATE); this.sectors$ = new BehaviorSubject(SECTOR_COURSES_INITIAL_STATE);
this.sectorFields$ = new BehaviorSubject(SECTOR_FIELDS_INITIAL_STATE); this.sectorFields$ = new BehaviorSubject(SECTOR_FIELDS_INITIAL_STATE);
this.criteriaFields$ = new BehaviorSubject(CRITERIA_INITIAL_STATE);
this.studentDataFields$ = new BehaviorSubject(STUDENT_DATA_FIELDS_INITIAL_STATE);
}; };
ngOnInit() { ngOnInit() {
...@@ -218,21 +152,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st ...@@ -218,21 +152,6 @@ import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-st
return state.sectorFields; return state.sectorFields;
}).subscribe(this.sectorFields$); }).subscribe(this.sectorFields$);
this.studentDataFieldsSub = this._ngRedux.select(state => {
state.studentDataFields.reduce(({}, studentDataField) => {
return studentDataField;
}, {});
return state.studentDataFields;
}).subscribe(this.studentDataFields$);
this.criteriaFieldsSub = this._ngRedux.select(state => {
state.criter.reduce(({}, criteriaField) => {
return criteriaField;
}, {});
return state.criter;
}).subscribe(this.criteriaFields$);
this._ngRedux.select(state => { this._ngRedux.select(state => {
state.epalclasses.reduce(({}, epalclass) => { state.epalclasses.reduce(({}, epalclass) => {
if (epalclass.name === "Α' Λυκείου") if (epalclass.name === "Α' Λυκείου")
......
This diff is collapsed.
...@@ -40,7 +40,12 @@ import {AppSettings} from '../../app.settings'; ...@@ -40,7 +40,12 @@ import {AppSettings} from '../../app.settings';
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12 col-md-offset-5"> <div class="col-md-6">
<button type="button" class="btn-primary btn-lg pull-left" (click)="navigateBack()">
<i class="fa fa-backward"></i>
</button>
</div>
<div class="col-md-6">
<button type="button" class="btn-primary btn-lg pull-right isclickable" style="width: 9em;" (click)="saveSelected()"> <button type="button" class="btn-primary btn-lg pull-right isclickable" style="width: 9em;" (click)="saveSelected()">
<span style="font-size: 0.9em; font-weight: bold;">Συνέχεια&nbsp;&nbsp;&nbsp;</span><i class="fa fa-forward"></i> <span style="font-size: 0.9em; font-weight: bold;">Συνέχεια&nbsp;&nbsp;&nbsp;</span><i class="fa fa-forward"></i>
</button> </button>
...@@ -107,6 +112,10 @@ import {AppSettings} from '../../app.settings'; ...@@ -107,6 +112,10 @@ import {AppSettings} from '../../app.settings';
} }
navigateBack() {
this.router.navigate(['/intro-statement']);
}