Commit 4e584c8e authored by Ασπασία Κατσή's avatar Ασπασία Κατσή

small classes

parents c95e0cb3 74234637
epal.user.send_verification_code:
path: '/epal/user/sendvercode'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::sendVerificationCode'
requirements:
_user_is_logged_in: 'TRUE'
epal.user.verify_verification_code:
path: '/epal/user/verifyvercode'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::verifyVerificationCode'
requirements:
_user_is_logged_in: 'TRUE'
epal.user.save_profile:
path: '/epal/user/save'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::saveUserProfile'
requirements:
_user_is_logged_in: 'TRUE'
epal.user.get_data:
path: '/epal/userdata'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::getEpalUserData'
requirements:
_user_is_logged_in: 'TRUE'
epal.current_user:
path: '/epal/curuser'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::getLoginInfo'
requirements:
_user_is_logged_in: 'TRUE'
epal.applicationdetails:
path: '/epal/application/{studentId}'
options:
......
......@@ -16,7 +16,7 @@ class Crypt
if (is_string($fname)) {
$this->fname = $fname;
} else {
$this->fname = __DIR__ . "/../../../../../app.txt";
$this->fname = __DIR__ . "/../../../app.txt";
}
}
......
gel.user.get_data:
path: '/gel/userdata'
gel.application_submit:
path: '/gel/appsubmit'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\CurrentUser::getGelUserData'
requirements:
_user_is_logged_in: 'TRUE'
gel.current_user:
path: '/gel/curuser'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\CurrentUser::getLoginInfo'
requirements:
_user_is_logged_in: 'TRUE'
gel.user.save_profile:
path: '/gel/user/save'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\CurrentUser::saveUserProfile'
_controller: '\Drupal\gel\Controller\GelApplicationSubmit::appSubmit'
requirements:
_user_is_logged_in: 'TRUE'
This diff is collapsed.
This diff is collapsed.
......@@ -16,7 +16,7 @@ class Crypt
if (is_string($fname)) {
$this->fname = $fname;
} else {
$this->fname = __DIR__ . "/../../../../../app.txt";
$this->fname = __DIR__ . "/../../../app.txt";
}
}
......
......@@ -82,6 +82,15 @@ class GelStudentChoices extends ContentEntityBase implements GelStudentChoicesIn
return $this;
}
public function getOrder_no() {
return $this->get('order_id')->value;
}
public function setOrder_no($name) {
$this->set('order_id', $name);
return $this;
}
/**
* {@inheritdoc}
*/
......@@ -193,7 +202,7 @@ class GelStudentChoices extends ContentEntityBase implements GelStudentChoicesIn
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['student_id'] = BaseFieldDefinition::create('entity_reference')
$fields['student_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Id μαθητη '))
->setDescription(t('Δώσε το id του μαθητη.'))
->setSetting('target_type', 'gel_student')
......@@ -218,13 +227,13 @@ class GelStudentChoices extends ContentEntityBase implements GelStudentChoicesIn
->setDisplayConfigurable('view', true);
$fields['choice_id'] = BaseFieldDefinition::create('entity_reference')
$fields['choice_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Id επιλογής '))
->setDescription(t('Δώσε το id της επιλογής.'))
->setSetting('target_type', 'gel_choices')
->setSetting('handler', 'default')
->setRequired(true)
->setDisplayOptions('view', array(
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'author',
'weight' => 0,
......@@ -242,6 +251,25 @@ class GelStudentChoices extends ContentEntityBase implements GelStudentChoicesIn
->setDisplayConfigurable('form', true)
->setDisplayConfigurable('view', true);
$fields['order_id'] = BaseFieldDefinition::create('integer')
->setLabel(t('Σειρά προτίμησης'))
->setDescription(t('Δώσε τη σειρά προτίμησης.'))
->setSettings(array(
'max_length' => 2,
'text_processing' => 0,
))
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'integer',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
......
......@@ -18,3 +18,44 @@ oauthost.log_out_go:
_controller: '\Drupal\oauthost\Controller\OAuthLogout::logoutGo'
requirements:
_user_is_logged_in: 'TRUE'
oauthost.user.send_verification_code:
path: '/oauth/user/sendvercode'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\oauthost\Controller\CurrentUser::sendVerificationCode'
requirements:
_user_is_logged_in: 'TRUE'
oauthost.user.verify_verification_code:
path: '/oauth/user/verifyvercode'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\oauthost\Controller\CurrentUser::verifyVerificationCode'
requirements:
_user_is_logged_in: 'TRUE'
oauthost.user.save_profile:
path: '/oauth/user/save'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\oauthost\Controller\CurrentUser::saveUserProfile'
requirements:
_user_is_logged_in: 'TRUE'
oauthost.user.get_data:
path: '/oauth/userdata'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\oauthost\Controller\CurrentUser::getApplicantUserData'
requirements:
_user_is_logged_in: 'TRUE'
oauthost.current_user:
path: '/oauth/curuser'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\oauthost\Controller\CurrentUser::getLoginInfo'
requirements:
_user_is_logged_in: 'TRUE'
......@@ -16,7 +16,7 @@ class Crypt
if (is_string($fname)) {
$this->fname = $fname;
} else {
$this->fname = __DIR__ . "/../../../../../app.txt";
$this->fname = __DIR__ . "/../../../app.txt";
}
}
......
{
"name": "e-gel",
"description": "e-GEL student registration system for Greek Ministry of Education",
"name": "e-eggrafes",
"description": "e-eggrafes student registration system for Greek Ministry of Education",
"license": "EUPL-1.1",
"repository": {
"type": "git",
"url": "https://git.minedu.gov.gr/itminedu/e-gel.git"
"url": "https://git.minedu.gov.gr/itminedu/e-eggrafes.git"
},
"scripts": {
"start": "webpack-dashboard -- webpack --progress --colors --watch --display-error-details --display-cached",
......
......@@ -11,6 +11,8 @@ import { ElectiveCourseFieldsActions } from "./electivecoursesfields.actions";
import { LangCourseFieldsActions } from "./langcoursesfields.actions";
import { GelClassesActions } from "./gelclasses.actions";
import { GelStudentDataFieldsActions } from "./gelstudentdatafields.actions";
import { SchoolTypeActions } from "./schooltype.actions";
const ACTION_PROVIDERS = [
SectorFieldsActions,
......@@ -26,6 +28,7 @@ const ACTION_PROVIDERS = [
LangCourseFieldsActions,
GelClassesActions,
GelStudentDataFieldsActions,
SchoolTypeActions,
];
export {
......@@ -42,6 +45,7 @@ export {
LangCourseFieldsActions,
GelClassesActions,
GelStudentDataFieldsActions,
SchoolTypeActions,
ACTION_PROVIDERS,
};
......@@ -26,7 +26,7 @@ export class OrientationGroupActions {
}
};
/*
saveOrientationGroupSelected = (prevChoice: number, newChoice: number) => {
return this._ngRedux.dispatch({
type: ORIENTATIONGROUP_SAVE,
......@@ -36,9 +36,23 @@ export class OrientationGroupActions {
}
});
};
*/
saveOrientationGroupSelected = (newChoice: number, isSelected: number) => {
return this._ngRedux.dispatch({
type: ORIENTATIONGROUP_SAVE,
payload: {
newChoice: newChoice,
isSelected: isSelected,
}
});
};
initOrientationGroup = () => {
return this._ngRedux.dispatch({
type: ORIENTATIONGROUP_INIT,
......
import { NgRedux } from "@angular-redux/store";
import { Injectable } from "@angular/core";
import { SCHOOLTYPE_SAVE } from "../constants";
import { SCHOOLTYPE_INIT, SCHOOLTYPE_RECEIVED, SCHOOLTYPE_RESET } from "../constants";
import { IAppState } from "../store";
import { HelperDataService } from "../services/helper-data-service";
@Injectable()
export class SchoolTypeActions {
constructor(
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService) { }
initSchoolType = () => {
return this._ngRedux.dispatch({
type: SCHOOLTYPE_INIT,
payload: {
}
});
};
saveSchoolTypeSelected = (schooltype_id, schooltype_name) => {
return this._ngRedux.dispatch({
type: SCHOOLTYPE_SAVE,
payload: {
schooltype_id,
schooltype_name
}
});
};
}
......@@ -9,6 +9,13 @@ import { RegionSchoolsActions } from "../../actions/regionschools.actions";
import { SectorCoursesActions } from "../../actions/sectorcourses.actions";
import { SectorFieldsActions } from "../../actions/sectorfields.actions";
import { StudentDataFieldsActions } from "../../actions/studentdatafields.actions";
import { SchoolTypeActions } from "../../actions/schooltype.actions";
import { GelClassesActions } from "../../actions/gelclasses.actions";
import { ElectiveCourseFieldsActions } from "../../actions/electivecoursesfields.actions";
import { OrientationGroupActions } from "../../actions/orientationgroup.action";
import { LangCourseFieldsActions } from "../../actions/langcoursesfields.actions";
import { GelStudentDataFieldsActions } from "../../actions/gelstudentdatafields.actions";
import { DIDE_ROLE, MINISTRY_ROLE, PDE_ROLE, SCHOOL_ROLE, STUDENT_ROLE } from "../../constants";
import { HelperDataService } from "../../services/helper-data-service";
import { LOGININFO_INITIAL_STATE } from "../../store/logininfo/logininfo.initial-state";
......@@ -44,6 +51,12 @@ export default class HeaderComponent implements OnInit, OnDestroy {
private _rsa: RegionSchoolsActions,
private _eca: EpalClassesActions,
private _sdfa: StudentDataFieldsActions,
private _sta: SchoolTypeActions,
private _gca: GelClassesActions,
private _ecfa: ElectiveCourseFieldsActions,
private _oga: OrientationGroupActions,
private _lcfa: LangCourseFieldsActions,
private _gsdfa: GelStudentDataFieldsActions,
private _ngRedux: NgRedux<IAppState>,
private router: Router
) {
......@@ -126,6 +139,12 @@ export default class HeaderComponent implements OnInit, OnDestroy {
this._rsa.initRegionSchools();
this._csa.initSectorCourses();
this._sdfa.initStudentDataFields();
this._sta.initSchoolType();
this._gca.initGelClasses();
this._ecfa.initElectiveCourseFields();
this._oga.initOrientationGroup();
this._lcfa.initLangCourseFields();
this._gsdfa.initGelStudentDataFields();
this.router.navigate([""]);
}
else if (this.authRole === MINISTRY_ROLE) {
......
......@@ -139,7 +139,7 @@ import {
//new
//this.showLoader.next(true);
this.epalUserDataSub = this.hds.getEpalUserData().subscribe(x => {
this.epalUserDataSub = this.hds.getApplicantUserData().subscribe(x => {
this.epalUserData$.next(x);
this.numAppSelf.next(Number(x.numAppSelf));
this.numAppChildren.next(Number(x.numAppChildren));
......@@ -217,8 +217,10 @@ import {
let sdfds = <IStudentDataFieldRecords>studentDataFields;
if (sdfds.size > 0) {
sdfds.reduce(({}, studentDataField) => {
if (this.appUpdate.getValue() && !this.dataEdit.getValue())
this.lastSchName.next((studentDataField.get("lastschool_schoolname")).name);
//if (this.appUpdate.getValue() && !this.dataEdit.getValue())
this.lastSchName.next((studentDataField.get("lastschool_schoolname")).name);
if (typeof this.lastSchName.getValue() === "undefined" )
this.lastSchName.next("");
this.studentDataGroup.controls["name"].setValue(studentDataField.get("name"));
this.studentDataGroup.controls["studentsurname"].setValue(studentDataField.get("studentsurname"));
......
......@@ -12,13 +12,69 @@ import { SECTOR_COURSES_INITIAL_STATE } from "../../store/sectorcourses/sectorco
import { ISectorRecords } from "../../store/sectorcourses/sectorcourses.types";
import { SECTOR_FIELDS_INITIAL_STATE } from "../../store/sectorfields/sectorfields.initial-state";
import { ISectorFieldRecords } from "../../store/sectorfields/sectorfields.types";
import { SCHOOLTYPE_INITIAL_STATE } from "../../store/schooltype/schooltype.initial-state";
import { ISchoolType, ISchoolTypeRecord, ISchoolTypeRecords } from "../../store/schooltype/schooltype.types";
import { GELCLASSES_INITIAL_STATE } from "../../store/gelclasses/gelclasses.initial-state";
import { IGelClassRecords } from "../../store/gelclasses/gelclasses.types";
import { IElectiveCourseFieldRecord, IElectiveCourseFieldRecords } from "../../store/electivecoursesfields/electivecoursesfields.types";
import { IOrientationGroupRecords } from "../../store/orientationgroup/orientationgroup.types";
import { ORIENTATIONGROUP_INITIAL_STATE } from "../../store/orientationgroup/orientationgroup.initial-state";
import { IAppState } from "../../store/store";
import { ELECTIVECOURSE_FIELDS_INITIAL_STATE } from "../../store/electivecoursesfields/electivecoursesfields.initial-state";
@Component({
selector: "application-preview-select",
template: `
<div *ngFor="let schooltypeselected$ of schooltype$ | async;">
<h4 style="margin-top: 20px; line-height: 2em;">Οι επιλογές μου</h4>
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Τυπος Σχολείου στο νέο σχολικό έτος
</li>
<li class="list-group-item">
{{schooltypeselected$.get("name")}}
</li>
</ul>
</div>
<div *ngFor="let gelclass$ of gelclasses$ | async;">
<ul *ngIf= "gelclass$.selected===true" class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Τάξη φοίτησης στο νέο σχολικό έτος
</li>
<li class="list-group-item">
{{gelclass$.name}} - {{gelclass$.category}}
</li>
</ul>
</div>
<div *ngFor="let or_group$ of OrientationGroup$ | async;">
<ul *ngIf= "or_group$.selected===true" class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Ομάδα Προσανατολισμού
</li>
<li class="list-group-item">
{{or_group$.name}}
</li>
</ul>
</div>
<ul *ngIf="(selectedCourses$ | async).length>0" class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Μάθημα Επιλογής
</li>
<div *ngFor="let selectedCourse$ of selectedCourses$ | async; let i=index; let isOdd=odd; let isEven=even">
<li class="list-group-item" [class.oddout]="isOdd" [class.evenout]="isEven">
<span class="roundedNumber">{{(i+1)}}</span>{{selectedCourse$.name}}
</li>
</div>
</ul>
<div *ngFor="let epalclass$ of epalclasses$ | async;">
<h4 style="margin-top: 20px; line-height: 2em; ">Οι επιλογές μου</h4>
<ul class="list-group left-side-view" style="margin-bottom: 20px;">
<li class="list-group-item active">
Τάξη φοίτησης στο νέο σχολικό έτος
......@@ -35,7 +91,6 @@ import { IAppState } from "../../store/store";
<li class="list-group-item" *ngIf="epalclass$.get('name') === '4'">
Δ’ Λυκείου
</li>
</ul>
</div>
......@@ -84,12 +139,26 @@ import { IAppState } from "../../store/store";
private sectorsSub: Subscription;
private regionsSub: Subscription;
private sectorFieldsSub: Subscription;
private schooltype$: BehaviorSubject<ISchoolTypeRecords>;
private gelclasses$: BehaviorSubject<IGelClassRecords>;
private electivecourses$: BehaviorSubject<IElectiveCourseFieldRecords>;
private OrientationGroup$: BehaviorSubject<IOrientationGroupRecords>;
private OrientationGroupSub: Subscription;
private electivecoursesSub: Subscription;
private schooltypeSub: Subscription;
private gelclassesSub: Subscription;
private courseActive = "-1";
private numSelectedSchools = <number>0;
private numSelectedOrder = <number>0;
private classSelected = 0;
private currentUrl: string;
private electivecourseSelected = <number>0;
private selectedCourses$: BehaviorSubject<Array<IElectiveCourseFieldRecord>> = new BehaviorSubject(Array());
constructor(private _ngRedux: NgRedux<IAppState>,
private router: Router
) {
......@@ -99,6 +168,12 @@ import { IAppState } from "../../store/store";
this.sectors$ = new BehaviorSubject(SECTOR_COURSES_INITIAL_STATE);
this.sectorFields$ = new BehaviorSubject(SECTOR_FIELDS_INITIAL_STATE);
this.schooltype$ = new BehaviorSubject(SCHOOLTYPE_INITIAL_STATE);
this.gelclasses$ = new BehaviorSubject(GELCLASSES_INITIAL_STATE);
this.OrientationGroup$ = new BehaviorSubject(ORIENTATIONGROUP_INITIAL_STATE);
this.electivecourses$= new BehaviorSubject(ELECTIVECOURSE_FIELDS_INITIAL_STATE);
};
ngOnInit() {
......@@ -164,6 +239,71 @@ import { IAppState } from "../../store/store";
this.epalclasses$.next(ecs);
}, error => { console.log("error selecting epalclasses"); });
this.schooltypeSub = this._ngRedux.select("schooltype")
.map(schooltype => <ISchoolTypeRecords>schooltype)
.subscribe(ecs => {
if (ecs.size > 0) {
ecs.reduce(({}, type) => {
return type;
}, {});
} else {
//this.formGroup.controls["typeId"].setValue("0");
}
this.schooltype$.next(ecs);
}, error => { console.log("error selecting schooltype"); });
this.gelclassesSub = this._ngRedux.select("gelclasses")
.subscribe(gelclasses => {
let ecs = <IGelClassRecords>gelclasses;
ecs.reduce(({}, gelclass) => {
if (gelclass.get("name") === "Α' Λυκείου - ΗΜΕΡΗΣΙΟ")
this.classSelected = 1;
else if (gelclass.get("name") === "Β' Λυκείου")
this.classSelected = 2;
else if (gelclass.get("name") === "Γ' Λυκείου")
this.classSelected = 3;
else if (gelclass.get("name") === "A' Λυκείου")
this.classSelected = 4;
else if (gelclass.get("name") === "B' Λυκείου")
this.classSelected = 5;
else if (gelclass.get("name") === "Γ' Λυκείου")
this.classSelected = 6;
else if (gelclass.get("name") === "Δ' Λυκείου")
this.classSelected = 7;
return gelclass;
}, {});
this.gelclasses$.next(ecs);
}, error => { console.log("error selecting gelclasses"); });
this.electivecoursesSub = this._ngRedux.select("electivecourseFields")
.map(electivecourseFields => <IElectiveCourseFieldRecords>electivecourseFields)
.subscribe(sfds => {
this.electivecourseSelected = 0;
let selectedCourses = Array<IElectiveCourseFieldRecord>();
sfds.reduce(({}, electivecourseField) => {
if (electivecourseField.get("selected") === true) {
++this.electivecourseSelected;
selectedCourses.push(electivecourseField.toJS());
}
return electivecourseField;
}, {});
this.electivecourses$.next(sfds);
selectedCourses.sort(this.compareCourses);
for (let i = 0; i < selectedCourses.length; i++)
selectedCourses[i].order_id = i + 1;
this.selectedCourses$.next(selectedCourses);
}, error => { console.log("error selecting electivecourseFields"); });
this.OrientationGroupSub = this._ngRedux.select("orientationGroup")
.map(orientationGroup => <IOrientationGroupRecords>orientationGroup)
.subscribe(ogs => {
this.OrientationGroup$.next(ogs);
}, error => { console.log("error selecting orientation"); });
}
compareSchools(a: IRegionSchoolRecord, b: IRegionSchoolRecord) {
......@@ -174,6 +314,14 @@ import { IAppState } from "../../store/store";
return 0;
}
compareCourses(a: IElectiveCourseFieldRecord, b: IElectiveCourseFieldRecord) {
if (a.order_id < b.order_id)
return -1;
if (a.order_id > b.order_id)
return 1;
return 0;
}
ngOnDestroy() {
if (this.regionsSub) {
this.regionsSub.unsubscribe();
......@@ -188,6 +336,19 @@ import { IAppState } from "../../store/store";
this.epalclassesSub.unsubscribe();
}
if (this.electivecoursesSub){
this.electivecoursesSub.unsubscribe();
}
if (this.OrientationGroupSub){
this.OrientationGroupSub.unsubscribe();
}
if (this.gelclassesSub){
this.gelclassesSub.unsubscribe();
}
if (this.schooltypeSub){
this.schooltypeSub.unsubscribe();
}
}
}
......@@ -6,6 +6,8 @@ import { Router } from "@angular/router";
import { BehaviorSubject, Subscription } from "rxjs/Rx";
import { GelClassesActions } from "../../actions/gelclasses.actions";
import { OrientationGroupActions } from "../../actions/orientationgroup.action";
import { ElectiveCourseFieldsActions } from "../../actions/electivecoursesfields.actions";
import { GELCLASSES_INITIAL_STATE } from "../../store/gelclasses/gelclasses.initial-state";
import { IGelClass, IGelClassRecord, IGelClassRecords } from "../../store/gelclasses/gelclasses.types";
import { IAppState } from "../../store/store";
......@@ -37,8 +39,8 @@ import { gelclassesReducer } from "../../store/gelclasses/gelclasses.reducer";
<form [formGroup]="formGroup">
<div class = "loading" *ngIf="(gelclasses$ | async).size === 0">
</div>
<p style="margin-top: 5px; line-height: 2em;"> Παρακαλώ επιλέξτε τον τύπο ΓΕΛ (ημερήσιο, εσπερινό) φοίτησης του μαθητή
κατά το σχολικό έτος 2018-2019.</p>
<p style="margin-top: 5px; line-height: 2em;"> Παρακαλώ καθορίστε την κατηγορία ΓΕΛ που θα φοιτήσει ο μαθητής
κατά το σχολικό έτος 2018-19, επιλέγοντας ΗΜΕΡΗΣΙΟ ή ΕΣΠΕΡΙΝΟ.</p>
<div style= "margin-top: 50px; margin-bottom: 100px;">
<label for="category">Τύπος ΓΕ.Λ.:</label><br/>
<select class="form-group" #type_sel class="form-control" formControlName="category" (change)="categoryselected(type_sel)">
......@@ -75,24 +77,25 @@ import { gelclassesReducer } from "../../store/gelclasses/gelclasses.reducer";
})
@Injectable() export default class ClassSelection implements OnInit, OnDestroy {
private gelclasses$: BehaviorSubject<IGelClassRecords>;
private gelclassesSub: Subscription;
private categoryChosen: String;
private enableclassfilter: boolean;
private classActive=0;
private classActive;
private formGroup: FormGroup;
private modalTitle: BehaviorSubject<string>;
private modalText: BehaviorSubject<string>;
private modalHeader: BehaviorSubject<string>;
public isModalShown: BehaviorSubject<boolean>;
constructor(private fb: FormBuilder,
private _ngRedux: NgRedux<IAppState>,
private _cfa: GelClassesActions,
private _gca: GelClassesActions,
private _ogs: OrientationGroupActions,
private _cfe: ElectiveCourseFieldsActions,
private router: Router) {
this.formGroup = this.fb.group({
classId: [],
......@@ -104,12 +107,13 @@ import { gelclassesReducer } from "../../store/gelclasses/gelclasses.reducer";
this.isModalShown = new BehaviorSubject(false);
this.gelclasses$ = new BehaviorSubject(GELCLASSES_INITIAL_STATE);
this.enableclassfilter = false;
this.classActive=0;
};
ngOnInit() {
(<any>$("#gelClassNotice")).appendTo("body");
this._cfa.getClassesList(false);
this._gca.getClassesList(false);
this.gelclassesSub = this._ngRedux.select("gelclasses")
.map(gelclasses => <IGelClassRecords>gelclasses)
.subscribe(ecs => {
......@@ -120,11 +124,15 @@ import { gelclassesReducer } from "../../store/gelclasses/gelclasses.reducer";
this.formGroup.controls["category"].setValue(gelclass.get("category"));
this.enableclassfilter = true;
this.classActive=gelclass.get("id");
this.categoryChosen=gelclass.get("category");
}
return gelclass;
}, {});
} else {
//this.formGroup.controls["name"].setValue("...");
//this.formGroup.controls["classId"].setValue("...");