Merge branch 'develop' of https://git.minedu.gov.gr/itminedu/e-epal into sch_sso

necessary updates
parents 7159785a 05d807dd
...@@ -71,11 +71,11 @@ class ApplicationSubmit extends ControllerBase { ...@@ -71,11 +71,11 @@ class ApplicationSubmit extends ControllerBase {
'epaluser_id' => $epalUser->id(), 'epaluser_id' => $epalUser->id(),
'name' => $applicationForm[0][name], 'name' => $applicationForm[0][name],
'studentsurname' => $applicationForm[0][studentsurname], 'studentsurname' => $applicationForm[0][studentsurname],
//'birthdate' => $applicationForm[0][birthdate], 'birthdate' => $applicationForm[0][studentbirthdate],
//'fatherfirstname' => $applicationForm[0][fatherfirstname], 'fatherfirstname' => $applicationForm[0][fatherfirstname],
//'fathersurname' => $applicationForm[0][fathersurname], 'fathersurname' => $applicationForm[0][fathersurname],
//'motherfirstname' => $applicationForm[0][motherfirstname], 'motherfirstname' => $applicationForm[0][motherfirstname],
//'mothersurname' => $applicationForm[0][mothersurname], 'mothersurname' => $applicationForm[0][mothersurname],
'studentamka' => $applicationForm[0][studentamka], 'studentamka' => $applicationForm[0][studentamka],
'regionaddress' => $applicationForm[0][regionaddress], 'regionaddress' => $applicationForm[0][regionaddress],
'regionarea' => $applicationForm[0][regionarea], 'regionarea' => $applicationForm[0][regionarea],
...@@ -85,6 +85,7 @@ class ApplicationSubmit extends ControllerBase { ...@@ -85,6 +85,7 @@ class ApplicationSubmit extends ControllerBase {
'currentclass' => $applicationForm[0][currentclass], 'currentclass' => $applicationForm[0][currentclass],
//'currentepal' => $applicationForm[0][currentepal], //'currentepal' => $applicationForm[0][currentepal],
//'currentsector' => $applicationForm[0][currentsector], //'currentsector' => $applicationForm[0][currentsector],
'points' => $applicationForm[0][points],
'relationtostudent' => $applicationForm[0][relationtostudent], 'relationtostudent' => $applicationForm[0][relationtostudent],
'telnum' => $applicationForm[0][telnum] 'telnum' => $applicationForm[0][telnum]
); );
......
...@@ -12,6 +12,8 @@ dependencies: ...@@ -12,6 +12,8 @@ dependencies:
- rest - rest
- serialization - serialization
- user - user
_core:
default_config_hash: 2NbNzaqbe_smf6WW5GA6xdNaOyLrqo5IfrwynZngc0k
id: criterialist id: criterialist
label: criteriaList label: criteriaList
module: views module: views
...@@ -213,6 +215,71 @@ display: ...@@ -213,6 +215,71 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
category:
id: category
table: epal_criteria
field: category
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: false
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: epal_criteria
entity_field: category
plugin_id: field
mutual_disabled_id: mutual_disabled_id:
id: mutual_disabled_id id: mutual_disabled_id
table: epal_criteria table: epal_criteria
...@@ -279,6 +346,74 @@ display: ...@@ -279,6 +346,74 @@ display:
entity_type: epal_criteria entity_type: epal_criteria
entity_field: mutual_disabled_id entity_field: mutual_disabled_id
plugin_id: field plugin_id: field
moria:
id: moria
table: epal_criteria
field: moria
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_decimal
settings:
thousand_separator: ''
prefix_suffix: true
decimal_separator: .
scale: 2
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: epal_criteria
entity_field: moria
plugin_id: field
filters: { } filters: { }
sorts: { } sorts: { }
header: { } header: { }
...@@ -326,9 +461,15 @@ display: ...@@ -326,9 +461,15 @@ display:
name: name:
alias: '' alias: ''
raw_output: true raw_output: true
category:
alias: ''
raw_output: true
mutual_disabled_id: mutual_disabled_id:
alias: '' alias: ''
raw_output: true raw_output: true
moria:
alias: points
raw_output: true
auth: auth:
- basic_auth - basic_auth
cache_metadata: cache_metadata:
......
...@@ -36,6 +36,63 @@ ...@@ -36,6 +36,63 @@
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο! Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div> </div>
<div class="form-group">
<label for="fatherfirstname">Όνομα πατέρα</label><input class="form-control" type="text" formControlName="fatherfirstname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fatherfirstname').touched && studentDataGroup.get('fatherfirstname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fatherfirstname').dirty && studentDataGroup.get('fatherfirstname').hasError('pattern')">
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div>
<div class="form-group">
<label for="fathersurname">Επώνυμο πατέρα</label><input class="form-control" type="text" formControlName="fathersurname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fathersurname').touched && studentDataGroup.get('fathersurname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('fathersurname').dirty && studentDataGroup.get('fathersurname').hasError('pattern')">
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div>
<div class="form-group">
<label for="motherfirstname">Όνομα μητέρας</label><input class="form-control" type="text" formControlName="motherfirstname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('motherfirstname').touched && studentDataGroup.get('motherfirstname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('motherfirstname').dirty && studentDataGroup.get('motherfirstname').hasError('pattern')">
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div>
<div class="form-group">
<label for="mothersurname">Γένος μητέρας</label><input class="form-control" type="text" formControlName="mothersurname">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('mothersurname').touched && studentDataGroup.get('mothersurname').hasError('required')">
Το πεδίο δεν μπορεί να αφεθεί κενό!
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('mothersurname').dirty && studentDataGroup.get('mothersurname').hasError('pattern')">
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</div>
<div class="form-group">
<label for="studentbirthdate">Ημερομηνία γέννησης</label>
<input class="form-control" type="text" formControlName="studentbirthdate">
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentbirthdate').pristine ">
Η ημερομηνία γέννησης πρέπει να είναι της μορφής ΗΗ/ΜΜ/ΕΕΕΕ
</div>
<div class="alert alert-danger" *ngIf="studentDataGroup.get('studentbirthdate').dirty && studentDataGroup.get('studentbirthdate').hasError('pattern')">
Η ημερομηνία γέννησης πρέπει να είναι της μορφής ΗΗ/ΜΜ/ΕΕΕΕ
</div>
<table> <table>
<tr> <tr>
<td> <td>
...@@ -113,19 +170,19 @@ ...@@ -113,19 +170,19 @@
<!-- <!--
<fieldset class="group"> <fieldset class="group">
--> -->
<legend>Εισοδηματικά κριτήρια</legend>
<!-- TEST for defining income in combolist in a redux-dynamic way <!-- TEST for defining income in combolist in a redux-dynamic way-->
<!--
<select #cblsttest class="form-control" (change)="checkstatus(cblsttest)" formControlName="incometest"> <select #cblsttest class="form-control" (change)="checkstatus(cblsttest)" formControlName="incometest">
<option *ngFor="let criter$ of criteria$ | async; let i=index" > <option *ngFor="let criterIncome$ of criteriaIncome$ | async; let i=index">
<div *ngIf="criter$.name === 'Εισόδημα' && criter$.name !== 'Απόσταση'"> <div *ngIf="criter$.name === 'Εισόδημα' && criter$.name !== 'Απόσταση'">
{{criter$.name}} </div></option> {{criterIncome$.name}}> </div> </option>
</select> </select>
--> -->
<!--
<div class="form-group"> <div class="form-group">
<label for="income">Το κατά κεφαλήν εισόδημα στο προηγούμενο φορολογικό έτος είναι:</label><br/> <label for="income">Το κατά κεφαλήν εισόδημα στο προηγούμενο φορολογικό έτος είναι:</label><br/>
<select #cblst class="form-control" (change)="checkstatus(cblst)" formControlName="income"> <select #cblst class="form-control" (change)="checkstatus(cblst)" formControlName="income">
<option value="noincomecriterio" [selected] = "selectionIncomeId === 0" >Παρακαλώ επιλέξτε..</option> <option value="noincomecriterio" [selected] = "selectionIncomeId === 0" >Παρακαλώ επιλέξτε..</option>
...@@ -139,9 +196,22 @@ ...@@ -139,9 +196,22 @@
Η επιλογή από αυτή τη λίστα είναι απαραίτητη! Η επιλογή από αυτή τη λίστα είναι απαραίτητη!
</div> </div>
</div> </div>
-->
<div formArrayName="formArray"> <div formArrayName="formArray">
<legend>Εισοδηματικά κριτήρια</legend>
<div *ngFor="let criter$ of criteria$ | async; let j=index">
<div class="row" *ngIf="criter$.category === 'Εισοδηματικό' ">
<div class="col-md-1">
<input #cb type="checkbox" (change)="checkcriteria(cb, criter$.mutual_disabled_id)" formControlName={{j}}>
</div>
<div class="col-md-11 pull-left">
{{criter$.name}}
</div>
</div>
</div>
<legend>Κοινωνικά κριτήρια</legend> <legend>Κοινωνικά κριτήρια</legend>
<p style="margin-top: 15px; line-height: 1.5em;">Επιλέξτε όσα από τα παρακάτω κριτήρια πληρούνται για εσάς. <p style="margin-top: 15px; line-height: 1.5em;">Επιλέξτε όσα από τα παρακάτω κριτήρια πληρούνται για εσάς.
Οι επιλογές σας επέχουν θέση υπέυθυνης δήλωσης. Οι επιλογές σας επέχουν θέση υπέυθυνης δήλωσης.
...@@ -149,7 +219,7 @@ ...@@ -149,7 +219,7 @@
</p> </p>
<div *ngFor="let criter$ of criteria$ | async; let i=index"> <div *ngFor="let criter$ of criteria$ | async; let i=index">
<div class="row" *ngIf="criter$.name !== 'Εισόδημα' && criter$.name !== 'Απόσταση'"> <div class="row" *ngIf="criter$.category === 'Κοινωνικό' ">
<div class="col-md-1"> <div class="col-md-1">
<input #cb type="checkbox" (change)="checkcriteria(cb, criter$.mutual_disabled_id)" formControlName={{i}}> <input #cb type="checkbox" (change)="checkcriteria(cb, criter$.mutual_disabled_id)" formControlName={{i}}>
</div> </div>
...@@ -159,6 +229,7 @@ ...@@ -159,6 +229,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
</div> </div>
...@@ -176,7 +247,7 @@ ...@@ -176,7 +247,7 @@
</button> </button>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<button type="button" class="btn-primary btn-lg pull-right" (click)="submitSelected()" [disabled]="studentDataGroup.invalid || (studentCriteriaGroup.invalid || selectionIncomeId === 0)" > <button type="button" class="btn-primary btn-lg pull-right" (click)="submitSelected()" [disabled]="studentDataGroup.invalid || studentCriteriaGroup.invalid " >
<i class="fa fa-forward"></i> <i class="fa fa-forward"></i>
</button> </button>
</div> </div>
......
...@@ -8,7 +8,7 @@ import { IStudentDataFields } from '../../store/studentdatafields/studentdatafie ...@@ -8,7 +8,7 @@ import { IStudentDataFields } from '../../store/studentdatafields/studentdatafie
import { CriteriaActions } from '../../actions/criteria.actions'; import { CriteriaActions } from '../../actions/criteria.actions';
import { ICriter } from '../../store/criteria/criteria.types'; import { ICriter } from '../../store/criteria/criteria.types';
import { IAppState } from '../../store/store'; import { IAppState } from '../../store/store';
import { VALID_NAMES_PATTERN, VALID_ADDRESS_PATTERN, VALID_ADDRESSTK_PATTERN, VALID_DIGITS_PATTERN } from '../../constants'; import { VALID_NAMES_PATTERN, VALID_ADDRESS_PATTERN, VALID_ADDRESSTK_PATTERN, VALID_DIGITS_PATTERN, VALID_DATE_PATTERN } from '../../constants';
import { STUDENT_DATA_FIELDS_INITIAL_STATE } from '../../store/studentdatafields/studentdatafields.initial-state'; import { STUDENT_DATA_FIELDS_INITIAL_STATE } from '../../store/studentdatafields/studentdatafields.initial-state';
import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-state'; import { CRITERIA_INITIAL_STATE } from '../../store/criteria/criteria.initial-state';
...@@ -38,7 +38,10 @@ import { ...@@ -38,7 +38,10 @@ import {
public studentCriteriaGroup: FormGroup; public studentCriteriaGroup: FormGroup;
private rss = new FormArray([]); private rss = new FormArray([]);
private selectionIncomeId = <number>0; //private selectionIncomeId = <number>0;
//private sdate;// = new Date(2013,7,29); // = Date.now();
//date: [datePipe.transform(this.event.date, 'yyyy-MM-dd'), [Validators.required]]
constructor(private fb: FormBuilder, constructor(private fb: FormBuilder,
private _sdfa: StudentDataFieldsActions, private _sdfa: StudentDataFieldsActions,
...@@ -52,6 +55,12 @@ import { ...@@ -52,6 +55,12 @@ import {
epaluser_id: [,[]], epaluser_id: [,[]],
name: ['ΝΙΚΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], name: ['ΝΙΚΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
studentsurname: ['ΚΑΤΣΑΟΥΝΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], studentsurname: ['ΚΑΤΣΑΟΥΝΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
//studentbirthdate: [this.sdate, [Validators.required]],
studentbirthdate: ['', [Validators.pattern(VALID_DATE_PATTERN),Validators.required]],
fatherfirstname: ['ΑΝΑΣΤΑΣΙΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
fathersurname: ['ΚΑΤΣΑΟΥΝΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
motherfirstname: ['ΚΑΤΕΡΙΝΑ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
mothersurname: ['ΚΑΤΣΑΟΥΝΟΥ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
regionaddress: ['ΓΙΑΝΝΙΤΣΩΝ 5', [Validators.pattern(VALID_ADDRESS_PATTERN),Validators.required]], regionaddress: ['ΓΙΑΝΝΙΤΣΩΝ 5', [Validators.pattern(VALID_ADDRESS_PATTERN),Validators.required]],
regiontk: ['26334', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]], regiontk: ['26334', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]],
regionarea: ['ΠΑΤΡΑ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]], regionarea: ['ΠΑΤΡΑ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
...@@ -67,10 +76,10 @@ import { ...@@ -67,10 +76,10 @@ import {
this.studentCriteriaGroup = this.fb.group({ this.studentCriteriaGroup = this.fb.group({
formArray: this.rss, formArray: this.rss,
income: ['', this.checkChoice ], //income: ['', this.checkChoice ],
//income: ['noincomecriterio', Validators.required ], //income: ['noincomecriterio', Validators.required ],
//income: [this.selectionIncomeId, this.checkChoice ], //income: [this.selectionIncomeId, this.checkChoice ],
//incometest: ['noincomecriterio', checkChoice ], //incometest: ['noincomecriterio', this. checkChoice ],
}); });
}; };
...@@ -92,9 +101,10 @@ import { ...@@ -92,9 +101,10 @@ import {
if (state.criter.size > 0) { if (state.criter.size > 0) {
state.criter.reduce(({}, criteria) => { state.criter.reduce(({}, criteria) => {
//this.studentCriteriaGroup.setValue(criteria); //this.studentCriteriaGroup.setValue(criteria);
if (criteria.selected === true && (criteria.name === "Εισόδημα" )) {
this.selectionIncomeId = Number(criteria.id); //if (criteria.selected === true && (criteria.name === "Εισόδημα" )) {
} // this.selectionIncomeId = Number(criteria.id);
//}
this.rss.push( new FormControl(criteria.selected, [])); this.rss.push( new FormControl(criteria.selected, []));
return criteria; return criteria;
}, {}); }, {});
...@@ -117,11 +127,6 @@ import { ...@@ -117,11 +127,6 @@ import {
submitSelected() { submitSelected() {
this._sdfa.saveStudentDataFields([this.studentDataGroup.value]); this._sdfa.saveStudentDataFields([this.studentDataGroup.value]);
for (let i=7; i < 11; i++)
this.studentCriteriaGroup.controls['formArray']['controls'][i].setValue(false);
this.studentCriteriaGroup.controls['formArray']['controls'][this.selectionIncomeId-1].setValue(true);
this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]); this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]);
this.router.navigate(['/application-submit']); this.router.navigate(['/application-submit']);
...@@ -129,11 +134,21 @@ import { ...@@ -129,11 +134,21 @@ import {
checkcriteria(cb, mutual_disabled) { checkcriteria(cb, mutual_disabled) {
if (mutual_disabled !== "-1" && cb.checked === true) { if (mutual_disabled !== "-1" && cb.checked === true) {
this.studentCriteriaGroup.controls['formArray']['controls'][mutual_disabled-1].setValue(false); //this.studentCriteriaGroup.controls['formArray']['controls'][mutual_disabled-1].setValue(false);
let mutual_ids = mutual_disabled.split(",");
for (let i=0; i<mutual_ids.length; i++) {
this.studentCriteriaGroup.controls['formArray']['controls'][mutual_ids[i]-1].setValue(false);
}
} }
//this._sdfb.saveCriteria([this.studentCriteriaGroup.value.formArray]);
} }
/*
checkstatus(cb) { checkstatus(cb) {
if (cb.value === "<= 3000 Ευρώ") if (cb.value === "<= 3000 Ευρώ")
this.selectionIncomeId = 8; this.selectionIncomeId = 8;
else if (cb.value === "<= 6000 Ευρώ") else if (cb.value === "<= 6000 Ευρώ")
...@@ -143,6 +158,7 @@ import { ...@@ -143,6 +158,7 @@ import {
else if (cb.value === "> 9000 Ευρώ") else if (cb.value === "> 9000 Ευρώ")
this.selectionIncomeId = 11; this.selectionIncomeId = 11;
} }
*/
//checkChoice(c: FormControl) { //checkChoice(c: FormControl) {
checkChoice(c: FormControl) { checkChoice(c: FormControl) {
......
...@@ -41,6 +41,7 @@ import {AppSettings} from '../../app.settings'; ...@@ -41,6 +41,7 @@ import {AppSettings} from '../../app.settings';
private courseSelected; private courseSelected;
private sectorSelected; private sectorSelected;
private classSelected; private classSelected;
private totalPoints= <number>0;
private studentDataFields$: BehaviorSubject<IStudentDataFields>; private studentDataFields$: BehaviorSubject<IStudentDataFields>;
private regions$: BehaviorSubject<IRegions>; private regions$: BehaviorSubject<IRegions>;
private criteria$: BehaviorSubject<ICriter>; private criteria$: BehaviorSubject<ICriter>;
...@@ -120,8 +121,11 @@ import {AppSettings} from '../../app.settings'; ...@@ -120,8 +121,11 @@ import {AppSettings} from '../../app.settings';
if (state.criter.size > 0) { if (state.criter.size > 0) {
state.criter.reduce(({}, criteria) => { state.criter.reduce(({}, criteria) => {
//code to be replaced in next version //code to be replaced in next version
if (criteria.selected === true && Number(criteria.id) !== 11) //if (criteria.selected === true && Number(criteria.id) !== 11)
if (criteria.selected === true ) {
this.studentCriteria.push(Number(criteria.id)); this.studentCriteria.push(Number(criteria.id));
this.totalPoints = this.totalPoints + Number(criteria.points);
}
return criteria; return criteria;
}, {}); }, {});
...@@ -129,7 +133,6 @@ import {AppSettings} from '../../app.settings'; ...@@ -129,7 +133,6 @@ import {AppSettings} from '../../app.settings';
return state.criter; return state.criter;
}).subscribe(this.criteria$); }).subscribe(this.criteria$);
this.sectorsSub = this._ngRedux.select(state => { this.sectorsSub = this._ngRedux.select(state => {
state.sectors.reduce((prevSector, sector) =>{ state.sectors.reduce((prevSector, sector) =>{
sector.courses.reduce((prevCourse, course) =>{ sector.courses.reduce((prevCourse, course) =>{
...@@ -178,10 +181,11 @@ import {AppSettings} from '../../app.settings'; ...@@ -178,10 +181,11 @@ import {AppSettings} from '../../app.settings';
let epalObj: Array<StudentEpalChosen> = []; let epalObj: Array<StudentEpalChosen> = [];
let criteriaObj: Array<StudentCriteriaChosen> = []; let criteriaObj: Array<StudentCriteriaChosen> = [];
//aitisiObj[0] = studentDataFields["_tail"]["array"][0];
aitisiObj[0] = this.student; aitisiObj[0] = this.student;
//console.log(aitisiObj[0]['studentbirthdate']);
aitisiObj[0]['currentclass'] = this.classSelected; aitisiObj[0]['currentclass'] = this.classSelected;
//aitisiObj[0]['studentamka'] = ...; //aitisiObj[0]['studentamka'] = ...;
aitisiObj[0]['points'] = this.totalPoints;
for (let i=0; i < this.epalSelected.length; i++) for (let i=0; i < this.epalSelected.length; i++)
epalObj[i] =new StudentEpalChosen(null, this.epalSelected[i] , this.epalSelectedOrder[i]); epalObj[i] =new StudentEpalChosen(null, this.epalSelected[i] , this.epalSelectedOrder[i]);
......
...@@ -6,6 +6,7 @@ export class Student { ...@@ -6,6 +6,7 @@ export class Student {
public epaluser_id: number, public epaluser_id: number,
public name: string, public name: string,
public studentsurname: string, public studentsurname: string,
//public studentbirthdate: Date,
public regionaddress: string, public regionaddress: string,
public regiontk: string, public regiontk: string,
public regionarea: string, public regionarea: string,
......
...@@ -36,4 +36,14 @@ export const VALID_NAMES_PATTERN = '[A-Za-zΑ-ΩΆΈΉΊΎΌΏα-ωάέήίύό ...@@ -36,4 +36,14 @@ export const VALID_NAMES_PATTERN = '[A-Za-zΑ-ΩΆΈΉΊΎΌΏα-ωάέήίύό
export const VALID_ADDRESS_PATTERN = '[0-9A-Za-zΑ-ΩΆΈΉΊΎΌΏα-ωάέήίύόώ ]*$'; export const VALID_ADDRESS_PATTERN = '[0-9A-Za-zΑ-ΩΆΈΉΊΎΌΏα-ωάέήίύόώ ]*$';
export const VALID_ADDRESSTK_PATTERN = '[0-9 ]*$'; export const VALID_ADDRESSTK_PATTERN = '[0-9 ]*$';
export const VALID_DIGITS_PATTERN = '[0-9]*$'; export const VALID_DIGITS_PATTERN = '[0-9]*$';
export const VALID_EMAIL_PATTERN = '[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}'; export const VALID_EMAIL_PATTERN = '[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}';
//YYYY-MM-DD FULL
//export const VALID_DATE_PATTERN = '(?:19|20)[0-9]{2}/(?:(?:0[1-9]|1[0-2])/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))';
//MM-DD-YYYY FULL
//export const VALID_DATE_PATTERN = '(?:(?:0[1-9]|1[0-2])[\/\\-. ]?(?:0[1-9]|[12][0-9])|(?:(?:0[13-9]|1[0-2])[\/\\-. ]?30)|(?:(?:0[13578]|1[02])[\/\\-. ]?31))[\/\\-. ]?(?:19|20)[0-9]{2}';
//DD-MM-YYYY
export const VALID_DATE_PATTERN = '([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.](19|20)[0-9][0-9]';
...@@ -326,6 +326,7 @@ export class HelperDataService implements OnInit, OnDestroy{ ...@@ -326,6 +326,7 @@ export class HelperDataService implements OnInit, OnDestroy{
} }