updated application.form.main Component

parent b98f784d
......@@ -36,6 +36,50 @@
Δεν επιτρέπονται ψηφία ή άλλοι μη έγκυροι χαρακτήρες σε αυτό το πεδίο!
</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="date" formControlName="studentbirthdate">
</div>
<table>
<tr>
<td>
......@@ -115,13 +159,13 @@
-->
<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">
<option *ngFor="let criter$ of criteria$ | async; let i=index" >
<div *ngIf="criter$.name === 'Εισόδημα' && criter$.name !== 'Απόσταση'">
{{criter$.name}} </div></option>
<option *ngFor="let criter$ of criteria$ | async; let i=index">
<div *ngIf="criter$.name === 'Εισόδημα' && criter$.name !== 'Απόσταση'">
{{criter$.name}}> </div> </option>
</select>
-->
<div class="form-group">
......@@ -159,6 +203,19 @@
</div>
</div>
<div *ngFor="let criter$ of criteria$ | async; let i=index">
<div class="row" *ngIf="criter$.name === 'Εισόδημα' && criter$.name !== 'Απόσταση'">
<div class="col-md-1">
<input #cb type="checkbox" (change)="checkcriteria(cb, criter$.mutual_disabled_id)" formControlName={{i}}>
</div>
<div class="col-md-11 pull-left">
{{criter$.name}}
</div>
</div>
</div>
<div class="row">
</div>
......
......@@ -40,6 +40,9 @@ import {
private rss = new FormArray([]);
private selectionIncomeId = <number>0;
private sdate; // = Date.now();
//date: [datePipe.transform(this.event.date, 'yyyy-MM-dd'), [Validators.required]]
constructor(private fb: FormBuilder,
private _sdfa: StudentDataFieldsActions,
private _sdfb: CriteriaActions,
......@@ -52,6 +55,12 @@ import {
epaluser_id: [,[]],
name: ['ΝΙΚΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
studentsurname: ['ΚΑΤΣΑΟΥΝΟΣ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
studentbirthdate: [this.sdate, [Validators.required]],
//studentbirthdate: [datePipe.transform(this.event.date, 'yyyy-MM-dd'), [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]],
regiontk: ['26334', [Validators.pattern(VALID_ADDRESSTK_PATTERN),Validators.required]],
regionarea: ['ΠΑΤΡΑ', [Validators.pattern(VALID_NAMES_PATTERN),Validators.required]],
......@@ -70,7 +79,7 @@ import {
income: ['', this.checkChoice ],
//income: ['noincomecriterio', Validators.required ],
//income: [this.selectionIncomeId, this.checkChoice ],
//incometest: ['noincomecriterio', checkChoice ],
incometest: ['noincomecriterio', this. checkChoice ],
});
};
......
......@@ -180,6 +180,7 @@ import {AppSettings} from '../../app.settings';
//aitisiObj[0] = studentDataFields["_tail"]["array"][0];
aitisiObj[0] = this.student;
console.log("Hello:"); console.log(aitisiObj[0]['studentbirthdate']);
aitisiObj[0]['currentclass'] = this.classSelected;
//aitisiObj[0]['studentamka'] = ...;
......
......@@ -6,6 +6,7 @@ export class Student {
public epaluser_id: number,
public name: string,
public studentsurname: string,
//public studentbirthdate: Date,
public regionaddress: string,
public regiontk: string,
public regionarea: string,
......
......@@ -15,7 +15,9 @@ export function deimmutifyStudentDataFields(state: IStudentDataFields): IStudent
*/
state.forEach(studentdataField => {
fetchedStudentDataFields.push(<IStudentDataField>{epaluser_id:studentdataField.epaluser_id,
name: studentdataField.name, studentsurname: studentdataField.studentsurname,
name: studentdataField.name, studentsurname: studentdataField.studentsurname, studentbirthdate: studentdataField.studentbirthdate,
fatherfirstname: studentdataField.fatherfirstname, fathersurname: studentdataField.fathersurname,
motherfirstname: studentdataField.motherfirstname, mothersurname: studentdataField.mothersurname,
studentamka: studentdataField.studentamka, regionaddress: studentdataField.regionaddress,
regiontk: studentdataField.regiontk,regionarea: studentdataField.regionarea,
certificatetype: studentdataField.certificatetype, relationtostudent: studentdataField.relationtostudent,
......
......@@ -18,6 +18,11 @@ export interface IStudentDataField {
epaluser_id: number;
name: string;
studentsurname: string;
fatherfirstname:string;
fathersurname:string;
motherfirstname:string;
mothersurname:string;
studentbirthdate: Date;
studentamka: string;
regionaddress: string;
regiontk: string;
......
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