Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
3fa4fc2f
Commit
3fa4fc2f
authored
May 08, 2017
by
Open Source Developer
Browse files
trans
parent
6e336d1a
Changes
4
Hide whitespace changes
Inline
Side-by-side
source/components/student-application-form/application.preview.ts
View file @
3fa4fc2f
...
...
@@ -30,8 +30,14 @@ import { STUDENT_DATA_FIELDS_INITIAL_STATE } from '../../store/studentdatafields
<li class="list-group-item active">
Τάξη εισαγωγής
</li>
<li class="list-group-item">
{{epalclass$.name }}
<li class="list-group-item" *ngIf="epalclass$.name === '1'">
Α’ Λυκείου
</li>
<li class="list-group-item" *ngIf="epalclass$.name === '2'">
Β’ Λυκείου
</li>
<li class="list-group-item" *ngIf="epalclass$.name === '3'">
Γ’ Λυκείου
</li>
</ul>
...
...
source/components/student-application-form/epal.class.select.ts
View file @
3fa4fc2f
...
...
@@ -30,9 +30,9 @@ import {AppSettings} from '../../app.settings';
<div class="form-group" style= "margin-top: 50px; margin-bottom: 100px;">
<label for="name"></label><br/>
<select class="form-control" formControlName="name" (change)="initializestore()">
<option value=
"Α' Λυκείου"
>Α
'
Λυκείου</option>
<option value=
"Β' Λυκείου"
>Β
'
Λυκείου</option>
<option value=
"Γ' Λυκείου"
>Γ
'
Λυκείου</option>
<option value=
1
>Α
’
Λυκείου</option>
<option value=
2
>Β
’
Λυκείου</option>
<option value=
3
>Γ
’
Λυκείου</option>
</select>
</div>
...
...
@@ -91,12 +91,13 @@ import {AppSettings} from '../../app.settings';
}
else
{
console
.
log
(
this
.
formGroup
.
value
);
this
.
_cfa
.
saveEpalClassesSelected
(
this
.
formGroup
.
value
);
if
(
this
.
formGroup
.
value
.
name
===
"
Α' Λυκείου
"
)
if
(
this
.
formGroup
.
value
.
name
===
"
1
"
)
this
.
router
.
navigate
([
'
/region-schools-select
'
]);
else
if
(
this
.
formGroup
.
value
.
name
===
"
Β' Λυκείου
"
)
else
if
(
this
.
formGroup
.
value
.
name
===
"
2
"
)
this
.
router
.
navigate
([
'
/sector-fields-select
'
]);
else
if
(
this
.
formGroup
.
value
.
name
===
"
Γ' Λυκείου
"
)
else
if
(
this
.
formGroup
.
value
.
name
===
"
3
"
)
this
.
router
.
navigate
([
'
/sectorcourses-fields-select
'
]);
}
...
...
source/components/student-application-form/region.schools.select.ts
View file @
3fa4fc2f
...
...
@@ -199,10 +199,10 @@ import {AppSettings} from '../../app.settings';
getAppropriateSchools
(
epalClass
)
{
if
(
epalClass
===
"
Α' Λυκείου
"
)
{
if
(
epalClass
===
"
1
"
)
{
this
.
_rsa
.
getRegionSchools
(
1
,
"
-1
"
,
false
);
}
else
if
(
epalClass
===
"
Β' Λυκείου
"
)
{
else
if
(
epalClass
===
"
2
"
)
{
this
.
sectorFieldsSub
=
this
.
_ngRedux
.
select
(
state
=>
{
state
.
sectorFields
.
reduce
(({},
sectorField
)
=>
{
if
(
sectorField
.
selected
===
true
)
{
...
...
@@ -214,7 +214,7 @@ import {AppSettings} from '../../app.settings';
return
state
.
sectorFields
;
}).
subscribe
(
this
.
sectorFields$
);
}
else
if
(
epalClass
===
"
Γ' Λυκείου
"
)
{
else
if
(
epalClass
===
"
3
"
)
{
this
.
sectorsSub
=
this
.
_ngRedux
.
select
(
state
=>
{
state
.
sectors
.
reduce
((
prevSector
,
sector
)
=>
{
if
(
sector
.
sector_selected
===
true
)
{
...
...
@@ -235,13 +235,13 @@ import {AppSettings} from '../../app.settings';
navigateBack
()
{
// this.router.navigate(['/epal-class-select']);
if
(
this
.
classActive
===
"
Α' Λυκείου
"
)
{
if
(
this
.
classActive
===
"
1
"
)
{
this
.
router
.
navigate
([
'
/epal-class-select
'
]);
}
else
if
(
this
.
classActive
===
"
Β' Λυκείου
"
)
{
else
if
(
this
.
classActive
===
"
2
"
)
{
this
.
router
.
navigate
([
'
/sector-fields-select
'
]);
}
else
if
(
this
.
classActive
===
"
Γ' Λυκείου
"
)
{
else
if
(
this
.
classActive
===
"
3
"
)
{
this
.
router
.
navigate
([
'
/sectorcourses-fields-select
'
]);
}
}
...
...
source/components/student-application-form/submited.aplication.preview.ts
View file @
3fa4fc2f
...
...
@@ -12,6 +12,14 @@ import { IAppState } from '../../store/store';
import
{
ILoginInfo
}
from
'
../../store/logininfo/logininfo.types
'
;
import
{
Router
,
ActivatedRoute
,
Params
}
from
'
@angular/router
'
;
import
{
BehaviorSubject
,
Subscription
}
from
'
rxjs/Rx
'
;
import
{
FormBuilder
,
FormGroup
,
FormControl
,
FormArray
,
Validators
,
}
from
'
@angular/forms
'
;
@
Component
({
...
...
@@ -32,7 +40,89 @@ import { BehaviorSubject, Subscription } from 'rxjs/Rx';
<div *ngFor="let StudentDetails$ of SubmitedDetails$ | async" [hidden]="UserData$.id !== userActive" >
<div *ngFor="let StudentDetails$ of SubmitedDetails$ | async" [hidden]="UserData$.id !== userActive" >
<form [formGroup]="studentDataGroup" >
<form [formGroup]="applicantDataGroup">
<table>
<tr><td>
<div class="form-group">
<label for="guardianfirstname">Όνομα κηδεμόνα</label><input class="form-control" type="text" formControlName="guardianfirstname" disabled = "true">
</div>
</td>
<td>
<div class="form-group">
<label for="guardiansurname">Επώνυμο κηδεμόνα</label><input class="form-control" type="text" formControlName="guardiansurname" disabled = "true">
</div>
</td></tr>
</table>
</form>
<div class="form-group">
<label for="name">Όνομα μαθητή</label><input class="form-control" type="text" formControlName="name">
</div>
<div class="form-group">
<label for="studentsurname">Επώνυμο μαθητή</label><input class="form-control" type="text" formControlName="studentsurname">
</div>
<div class="form-group">
<label for="fatherfirstname">Όνομα πατέρα</label><input class="form-control" type="text" formControlName="fatherfirstname">
</div>
<div class="form-group">
<label for="fathersurname">Επώνυμο πατέρα</label><input class="form-control" type="text" formControlName="fathersurname">
</div>
<div class="form-group">
<label for="motherfirstname">Όνομα μητέρας</label><input class="form-control" type="text" formControlName="motherfirstname">
</div>
<div class="form-group">
<label for="mothersurname">Γένος μητέρας</label><input class="form-control" type="text" formControlName="mothersurname">
</div>
<div class="form-group">
<label for="studentbirthdate">Ημερομηνία γέννησης</label>
<input class="form-control" type="date" formControlName="studentbirthdate">
</div>
<table>
<tr>
<td>
<div class="form-group">
<label for="regionaddress">Διεύθυνση κατοικίας</label><input class="form-control" type="text" formControlName="regionaddress">
</div>
</td>
<td>
<div class="form-group">
<label for="regiontk">TK </label><input class="form-control" type="text" formControlName="regiontk">
</div>
</td>
<td>
<div class="form-group">
<label for="regionarea">Πόλη/Περιοχή</label><input class="form-control" type="text" formControlName="regionarea">
</div>
</td>
</tr>
</table>
<div class="form-group">
<label for="telnum">Τηλέφωνο επικοινωνίας</label><input class="form-control" type="text" formControlName="telnum">
</div>
</form>
<strong> Όνομα:</strong> <p style="border:1px solid #eceeef;"> {{StudentDetails$.name}} </p>
<strong> Επώνυμο:</strong> <p style="border:1px solid #eceeef;"> {{StudentDetails$.studentsurname}} </p>
<strong> Όνομα Πατέρα:</strong> <p style="border:1px solid #eceeef;"> {{StudentDetails$.fatherfirstname}}</p>
...
...
@@ -42,7 +132,7 @@ import { BehaviorSubject, Subscription } from 'rxjs/Rx';
<strong> Ημερομηνία Γέννησης:</strong> <p style="border:1px solid #eceeef;">{{StudentDetails$.birthdate}}</p>
<p><b>Επιλογές ΕΠΑΛ</b> </p>
<br>
</div>
</div>
<div *ngFor="let epalChoices$ of EpalChosen$ | async" [hidden]="UserData$.id !== userActive">
Σχολείο: {{epalChoices$.epal_id}}
...
...
@@ -72,18 +162,37 @@ import { BehaviorSubject, Subscription } from 'rxjs/Rx';
private
EpalChosen$
:
BehaviorSubject
<
any
>
;
private
EpalChosenSub
:
Subscription
;
public
studentDataGroup
:
FormGroup
;
public
applicantDataGroup
:
FormGroup
;
public
StudentId
;
private
userActive
=
<
number
>-
1
;
constructor
(
private
_hds
:
HelperDataService
,
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
)
private
router
:
Router
,
private
fb
:
FormBuilder
)
{
this
.
SubmitedApplic$
=
new
BehaviorSubject
([{}]);
this
.
SubmitedDetails$
=
new
BehaviorSubject
([{}]);
this
.
EpalChosen$
=
new
BehaviorSubject
([{}]);
this
.
studentDataGroup
=
this
.
fb
.
group
({
epaluser_id
:
[,[]],
name
:
[
'
ΝΙΚΟΣ
'
],
studentsurname
:
[
'
ΚΑΤΣΑΟΥΝΟΣ
'
],
studentbirthdate
:
[
''
],
});
this
.
applicantDataGroup
=
this
.
fb
.
group
({
guardianfirstname
:
[
'
ΑΝΑΣΤΑΣΙΟΣ
'
],
guardiansurname
:
[
'
ΚΑΤΣΑΟΥΝΟΣ
'
],
});
}
ngOnDestroy
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment