Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
e-epal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
a140c1a0
Commit
a140c1a0
authored
May 18, 2017
by
Open Source Developer
Browse files
Options
Browse Files
Download
Plain Diff
trans
parents
5ae06c7c
50265b51
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
319 additions
and
332 deletions
+319
-332
source/app.ts
source/app.ts
+1
-1
source/components/director/director-classcapacity.ts
source/components/director/director-classcapacity.ts
+122
-129
source/components/director/director-view.ts
source/components/director/director-view.ts
+69
-69
source/components/director/director.buttons.ts
source/components/director/director.buttons.ts
+12
-38
source/components/infoviews/perfecture-view.ts
source/components/infoviews/perfecture-view.ts
+15
-16
source/components/school.home.ts
source/components/school.home.ts
+21
-11
source/components/student-application-form/application.submit.ts
...components/student-application-form/application.submit.ts
+58
-54
source/components/student-application-form/parent.form.html
source/components/student-application-form/parent.form.html
+1
-1
source/components/student-application-form/parent.form.ts
source/components/student-application-form/parent.form.ts
+4
-4
source/components/student-application-form/region.schools.select.ts
...ponents/student-application-form/region.schools.select.ts
+16
-9
No files found.
source/app.ts
View file @
a140c1a0
...
...
@@ -87,5 +87,5 @@ class MyLocalization extends NgLocalization {
})
class
AppModule
{}
//
enableProdMode();
enableProdMode
();
platformBrowserDynamic
().
bootstrapModule
(
AppModule
);
source/components/director/director-classcapacity.ts
View file @
a140c1a0
import
{
Component
,
OnInit
,
OnDestroy
,
ElementRef
,
ViewChild
}
from
"
@angular/core
"
;
import
{
Component
,
OnInit
,
OnDestroy
,
ElementRef
,
ViewChild
}
from
"
@angular/core
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
AppSettings
}
from
'
../../app.settings
'
;
import
{
HelperDataService
}
from
'
../../services/helper-data-service
'
;
...
...
@@ -20,6 +20,7 @@ import {
@
Component
({
selector
:
'
director-classcapacity
'
,
template
:
`
<div style="min-height: 500px;">
<form [formGroup]="formGroup">
<label for="taxi">Τάξη</label><br/>
<div class="form-group">
...
...
@@ -28,7 +29,7 @@ import {
<option value="2" >Β' Λυκείου</option>
<option value="3" >Γ' Λυκείου</option>
</select>
</div>
</div>
<div class="form-group">
<select #tmop class="form-control" *ngIf="(selectionBClass | async)" (change)="checkbclass(tmop,txoption)" formControlName="tomeas">
...
...
@@ -40,14 +41,14 @@ import {
<option *ngFor="let SpecialSelection$ of StudentSelectedSpecial$ | async; let i=index" [value] = "SpecialSelection$.id"> {{SpecialSelection$.specialty_id}} </option>
</select>
</div>
<div *ngIf="(retrievedStudent | async) && (modify === false)">
<strong>Δυναμική σε τμήματα:</strong>
<div *ngFor="let classCapac$ of classCapacity$ | async;" >
<div><label for="capc">Τρέχουσα Δυναμική:</label> <p class="form-control" id = "capc" style="border:1px solid #eceeef;"> {{classCapac$.capacity}} </p></div>
</div>
<p style="margin-top: 20px; line-height: 2em;"> Αν θέλετε να αλλάξετε τη δυναμική σε τμήματα για τη συγκεκριμένή επιλογή συνέχεια επιλέξτε <i>Τροποποίηση</i>.</p>
<button type="button" class="btn-primary btn-sm pull-right" (click) ="modifyCapacity()">
Τροποποίηση
...
...
@@ -55,15 +56,17 @@ import {
</div>
<div *ngIf="(modify === true)">
<input type="number" formControlName="capacity" min="1" max="10">
<button type="button" class="btn-primary btn-sm pull-right" (click) ="saveCapacity()">
Αποθήκευση
</button>
</div>
</form>
</div>
`
})
@
Injectable
()
export
default
class
DirectorClassCapacity
implements
OnInit
,
OnDestroy
{
@
Injectable
()
export
default
class
DirectorClassCapacity
implements
OnInit
,
OnDestroy
{
public
formGroup
:
FormGroup
;
private
StudentSelected$
:
BehaviorSubject
<
any
>
;
...
...
@@ -72,37 +75,35 @@ import {
private
StudentSelectedSpecialSub
:
Subscription
;
private
selectionBClass
:
BehaviorSubject
<
boolean
>
;
private
selectionCClass
:
BehaviorSubject
<
boolean
>
;
private
SchoolId
=
147
;
private
SchoolId
=
147
;
private
currentclass
:
Number
;
private
classCapacity$
:
BehaviorSubject
<
any
>
;
private
classCapacitySub
:
Subscription
;
private
retrievedStudent
:
BehaviorSubject
<
boolean
>
;
private
modify
=
false
;
constructor
(
private
fb
:
FormBuilder
,
private
_hds
:
HelperDataService
,
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
)
{
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
classCapacity$
=
new
BehaviorSubject
([{}]);
this
.
selectionBClass
=
new
BehaviorSubject
(
false
);
this
.
selectionCClass
=
new
BehaviorSubject
(
false
);
this
.
retrievedStudent
=
new
BehaviorSubject
(
false
);
this
.
formGroup
=
this
.
fb
.
group
({
tomeas
:
[
''
,
[]],
taxi
:
[
''
,
[]],
specialit
:
[
''
,
[]],
capacity
:
[
''
,
[]],
});
constructor
(
private
fb
:
FormBuilder
,
private
_hds
:
HelperDataService
,
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
)
{
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
classCapacity$
=
new
BehaviorSubject
([{}]);
this
.
selectionBClass
=
new
BehaviorSubject
(
false
);
this
.
selectionCClass
=
new
BehaviorSubject
(
false
);
this
.
retrievedStudent
=
new
BehaviorSubject
(
false
);
this
.
formGroup
=
this
.
fb
.
group
({
tomeas
:
[
''
,
[]],
taxi
:
[
''
,
[]],
specialit
:
[
''
,
[]],
capacity
:
[
''
,
[]],
});
}
ngOnDestroy
()
{
ngOnDestroy
()
{
if
(
this
.
StudentSelectedSub
)
this
.
StudentSelectedSub
.
unsubscribe
();
if
(
this
.
StudentSelectedSpecialSub
)
...
...
@@ -110,117 +111,110 @@ import {
if
(
this
.
selectionBClass
)
this
.
selectionBClass
.
unsubscribe
();
if
(
this
.
selectionCClass
)
this
.
selectionCClass
.
unsubscribe
();
this
.
selectionCClass
.
unsubscribe
();
if
(
this
.
classCapacitySub
)
this
.
classCapacitySub
.
unsubscribe
();
if
(
this
.
retrievedStudent
)
this
.
retrievedStudent
.
unsubscribe
();
this
.
retrievedStudent
.
unsubscribe
();
}
ngOnInit
()
{
this
.
retrievedStudent
.
next
(
false
);
}
verifyclass
(
txop
)
{
this
.
modify
=
false
;
console
.
log
(
this
.
formGroup
.
value
.
specialit
,
"
speciality
"
);
if
(
txop
.
value
===
"
1
"
)
{
this
.
selectionBClass
.
next
(
false
);
this
.
selectionCClass
.
next
(
false
);
this
.
formGroup
.
patchValue
({
tomeas
:
''
,
specialit
:
''
,
});
console
.
log
(
"
a class
"
);
this
.
classCapacitySub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
0
,
0
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
verifyclass
(
txop
)
{
this
.
modify
=
false
;
console
.
log
(
this
.
formGroup
.
value
.
specialit
,
"
speciality
"
);
if
(
txop
.
value
===
"
1
"
)
{
this
.
selectionBClass
.
next
(
false
);
this
.
selectionCClass
.
next
(
false
);
this
.
formGroup
.
patchValue
({
tomeas
:
''
,
specialit
:
''
,
});
console
.
log
(
"
a class
"
);
this
.
classCapacitySub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
0
,
0
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
}
else
if
(
txop
.
value
===
"
2
"
)
{
this
.
formGroup
.
patchValue
({
specialit
:
''
,
});
this
.
selectionBClass
.
next
(
true
);
this
.
selectionCClass
.
next
(
false
);
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSub
=
this
.
_hds
.
getSectorPerSchool
(
this
.
SchoolId
).
subscribe
(
this
.
StudentSelected$
);
}
else
if
(
txop
.
value
===
"
3
"
)
{
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
console
.
log
(
sectorint
,
"
test
"
);
if
(
this
.
formGroup
.
value
.
tomeas
!=
''
)
{
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecialSub
=
this
.
_hds
.
getSpecialityPerSchool
(
this
.
SchoolId
,
sectorint
).
subscribe
(
this
.
StudentSelectedSpecial$
);
}
else
if
(
txop
.
value
===
"
2
"
)
{
this
.
formGroup
.
patchValue
({
specialit
:
''
,
});
this
.
selectionBClass
.
next
(
true
);
this
.
selectionCClass
.
next
(
false
);
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSub
=
this
.
_hds
.
getSectorPerSchool
(
this
.
SchoolId
).
subscribe
(
this
.
StudentSelected$
);
}
else
if
(
txop
.
value
===
"
3
"
)
{
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
console
.
log
(
sectorint
,
"
test
"
);
if
(
this
.
formGroup
.
value
.
tomeas
!=
''
)
{
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecialSub
=
this
.
_hds
.
getSpecialityPerSchool
(
this
.
SchoolId
,
sectorint
).
subscribe
(
this
.
StudentSelectedSpecial$
);
}
this
.
selectionBClass
.
next
(
true
);
this
.
selectionCClass
.
next
(
true
);
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSub
=
this
.
_hds
.
getSectorPerSchool
(
this
.
SchoolId
).
subscribe
(
this
.
StudentSelected$
);
}
this
.
selectionBClass
.
next
(
true
);
this
.
selectionCClass
.
next
(
true
);
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSub
=
this
.
_hds
.
getSectorPerSchool
(
this
.
SchoolId
).
subscribe
(
this
.
StudentSelected$
);
}
}
checkbclass
(
tmop
,
txop
)
{
this
.
modify
=
false
;
checkbclass
(
tmop
,
txop
)
{
this
.
modify
=
false
;
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
console
.
log
(
sectorint
,
"
tomeas
"
);
if
(
txop
.
value
===
"
2
"
)
{
console
.
log
(
"
b class
"
);
this
.
classCapacitySub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
sectorint
,
0
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
console
.
log
(
sectorint
,
"
tomeas
"
);
if
(
txop
.
value
===
"
2
"
)
{
console
.
log
(
"
b class
"
);
this
.
classCapacitySub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
sectorint
,
0
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
}
if
(
txop
.
value
===
"
3
"
)
{
if
(
txop
.
value
===
"
3
"
)
{
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecialSub
=
this
.
_hds
.
getSpecialityPerSchool
(
this
.
SchoolId
,
sectorint
).
subscribe
(
this
.
StudentSelectedSpecial$
);
this
.
StudentSelectedSpecialSub
=
this
.
_hds
.
getSpecialityPerSchool
(
this
.
SchoolId
,
sectorint
).
subscribe
(
this
.
StudentSelectedSpecial$
);
}
}
checkcclass
(
tmop
,
txop
,
spop
)
{
this
.
modify
=
false
;
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
checkcclass
(
tmop
,
txop
,
spop
)
{
this
.
modify
=
false
;
var
sectorint
=
+
this
.
formGroup
.
value
.
tomeas
;
var
specialint
=
+
this
.
formGroup
.
value
.
specialit
;
if
(
txop
.
value
===
"
3
"
)
{
console
.
log
(
"
c class
"
);
this
.
classCapacity
Sub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
sectorint
,
specialint
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
if
(
txop
.
value
===
"
3
"
)
{
console
.
log
(
"
c class
"
);
this
.
classCapacitySub
=
this
.
_hds
.
getCapacityPerSchool
(
this
.
formGroup
.
value
.
taxi
,
sectorint
,
specialint
,
this
.
SchoolId
).
subscribe
(
data
=>
{
this
.
classCapacity
$
.
next
(
data
);
this
.
retrievedStudent
.
next
(
true
);
},
error
=>
{
this
.
classCapacity$
.
next
([{}]);
console
.
log
(
"
Error Getting Capacity
"
);
},
()
=>
console
.
log
(
"
Getting Capacity
"
));
}
...
...
@@ -229,19 +223,18 @@ import {
saveCapacity
()
{
saveCapacity
()
{
var
tomeas
=
+
this
.
formGroup
.
value
.
tomeas
;
var
specialit
=
+
this
.
formGroup
.
value
.
specialit
;
console
.
log
(
tomeas
,
specialit
);
this
.
_hds
.
saveCapacity
(
this
.
formGroup
.
value
.
taxi
,
tomeas
,
specialit
,
this
.
formGroup
.
value
.
capacity
,
this
.
SchoolId
);
var
tomeas
=
+
this
.
formGroup
.
value
.
tomeas
;
var
specialit
=
+
this
.
formGroup
.
value
.
specialit
;
console
.
log
(
tomeas
,
specialit
);
this
.
_hds
.
saveCapacity
(
this
.
formGroup
.
value
.
taxi
,
tomeas
,
specialit
,
this
.
formGroup
.
value
.
capacity
,
this
.
SchoolId
);
}
}
modifyCapacity
()
{
modifyCapacity
()
{
this
.
modify
=
true
;
}
this
.
modify
=
true
;
}
}
\ No newline at end of file
}
source/components/director/director-view.ts
View file @
a140c1a0
...
...
@@ -20,8 +20,9 @@ import {
@
Component
({
selector
:
'
director-view
'
,
template
:
`
<div style="min-height: 500px;">
<form [formGroup]="formGroup">
<label for="taxi">Τάξη</label><br/>
<div class="form-group">
...
...
@@ -71,12 +72,12 @@ import {
<table>
<tr><td>
<div class="form-group" *ngIf="StudentDetails$.relationtostudent === 'Μαθητής' ">
<label for="guardianfirstname">Όνομα κηδεμόνα</label><p class="form-control" id="guardianfirstname" style="border:1px solid #eceeef;">{{StudentDetails$.guardianfirstname}} </p>
<label for="guardianfirstname">Όνομα κηδεμόνα</label><p class="form-control" id="guardianfirstname" style="border:1px solid #eceeef;">{{StudentDetails$.guardianfirstname}} </p>
</div>
</td>
<td>
<div class="form-group" *ngIf="StudentDetails$.relationtostudent === 'Μαθητής' ">
<label for="guardiansurname">Επώνυμο κηδεμόνα</label><p class="form-control" id="guardiansurname" style="border:1px solid #eceeef;">{{StudentDetails$.guardiansurname}} </p>
<label for="guardiansurname">Επώνυμο κηδεμόνα</label><p class="form-control" id="guardiansurname" style="border:1px solid #eceeef;">{{StudentDetails$.guardiansurname}} </p>
</div>
</td></tr>
</table>
...
...
@@ -85,8 +86,8 @@ import {
<div><label for="fatherfirstname">Όνομα Πατέρα</label> <p class="form-control" id = "fatherfirstname" style="border:1px solid #eceeef;"> {{StudentDetails$.fatherfirstname}} </p></div>
<div><label for="fathersurname">Επώνυμο Πατέρα</label> <p class="form-control" id = "fathersurname" style="border:1px solid #eceeef;"> {{StudentDetails$.fathersurname}} </p></div>
<div><label for="motherfirstname">Όνομα Μητέρας</label> <p class="form-control" id = "motherfirstname" style="border:1px solid #eceeef;"> {{StudentDetails$.motherfirstname}} </p></div>
<div><label for="mothersurname">Επώνυμο Μητέρας</label> <p class="form-control" id = "mothersurname" style="border:1px solid #eceeef;"> {{StudentDetails$.mothersurname}} </p></div>
<div><label for="birthdate">Ημερομηνία Γέννησης</label> <p class="form-control" id = "birthdate" style="border:1px solid #eceeef;"> {{StudentDetails$.birthdate}} </p></div>
<div><label for="mothersurname">Επώνυμο Μητέρας</label> <p class="form-control" id = "mothersurname" style="border:1px solid #eceeef;"> {{StudentDetails$.mothersurname}} </p></div>
<div><label for="birthdate">Ημερομηνία Γέννησης</label> <p class="form-control" id = "birthdate" style="border:1px solid #eceeef;"> {{StudentDetails$.birthdate}} </p></div>
<table>
...
...
@@ -108,12 +109,14 @@ import {
</td>
</tr>
</table>
<div><label for="certificatetype">Τύπος απολυτηρίου</label> <p class="form-control" id = "certificatetype" style="border:1px solid #eceeef;"> {{StudentDetails$.certificatetype}} </p></div>
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" id = "telnum" style="border:1px solid #eceeef;"> {{StudentDetails$.telnum}} </p></div>
<div><label for="relationtostudent">Η αίτηση γίνεται από</label> <p class="form-control" id = "relationtostudent" style="border:1px solid #eceeef;"> {{StudentDetails$.relationtostudent}} </p></div>
<div><label for="certificatetype">Τύπος απολυτηρίου</label> <p class="form-control" id = "certificatetype" style="border:1px solid #eceeef;"> {{StudentDetails$.certificatetype}} </p></div>
<div><label for="telnum">Τηλέφωνο επικοινωνίας</label> <p class="form-control" id = "telnum" style="border:1px solid #eceeef;"> {{StudentDetails$.telnum}} </p></div>
<div><label for="relationtostudent">Η αίτηση γίνεται από</label> <p class="form-control" id = "relationtostudent" style="border:1px solid #eceeef;"> {{StudentDetails$.relationtostudent}} </p></div>
</div>
<!-- </div> -->
</div>
</div>
</ul>
<br>
<br>
...
...
@@ -121,11 +124,11 @@ import {
Βρίσκεστε στη σελίδα:
<div class="col-1">
<input #pageno type="text" class="form-control" placeholder=".col-1" formControlName="pageno">
</div>
απο
</div>
απο
<div class="col-1">
<input #maxpage type="text" class="form-control" placeholder=".col-1" formControlName="maxpage">
</div>
</div>
</div>
<br>
...
...
@@ -138,10 +141,11 @@ import {
<button class="page-link" (click) ="nextpage(txoption,maxpage) ">Επόμενη</button>
</li>
</ul>
</nav>
</form>
</div>
`
})
...
...
@@ -168,20 +172,20 @@ import {
private
SchoolId
;
private
currentclass
:
Number
;
private
saved
:
Array
<
number
>
=
new
Array
();
private
limitdown
=
0
;
private
limitup
=
25
;
private
limitdown
=
0
;
private
limitup
=
25
;
private
pageno
=
1
;
private
userActive
=
<
number
>-
1
;
private
type
:
Number
;
@
ViewChild
(
'
fileInput
'
)
fileInput
:
ElementRef
;
@
ViewChild
(
'
fileInput
'
)
fileInput
:
ElementRef
;
constructor
(
private
fb
:
FormBuilder
,
private
_hds
:
HelperDataService
,
private
activatedRoute
:
ActivatedRoute
,
private
router
:
Router
,
private
renderer
:
Renderer
)
{
private
renderer
:
Renderer
)
{
this
.
StudentSelected$
=
new
BehaviorSubject
([{}]);
this
.
StudentSelectedSpecial$
=
new
BehaviorSubject
([{}]);
this
.
StudentInfo$
=
new
BehaviorSubject
([{}]);
...
...
@@ -197,8 +201,8 @@ import {
tomeas
:
[
''
,
[]],
taxi
:
[
''
,
[]],
specialit
:
[
''
,
[]],
maxpage
:
[{
value
:
''
,
disabled
:
true
},
[]],
pageno
:
[{
value
:
''
,
disabled
:
true
},
[]],
maxpage
:
[{
value
:
''
,
disabled
:
true
},
[]],
pageno
:
[{
value
:
''
,
disabled
:
true
},
[]],
});
}
...
...
@@ -216,7 +220,7 @@ import {
this
.
retrievedStudent
.
unsubscribe
();
if
(
this
.
SubmitedDetailsSub
)
this
.
SubmitedDetailsSub
.
unsubscribe
();
}
ngOnInit
()
{
...
...
@@ -323,21 +327,20 @@ import {
this
.
currentclass
=
3
;
}
this
.
formGroup
.
get
(
'
pageno
'
).
setValue
(
this
.
pageno
);
if
(
this
.
pageno
==
1
)
{
console
.
log
(
this
.
SchoolId
,
sectorint
,
this
.
currentclass
,
"
test
"
);
this
.
formGroup
.
get
(
'
pageno
'
).
setValue
(
this
.
pageno
);
if
(
this
.
pageno
==
1
)
{
console
.
log
(
this
.
SchoolId
,
sectorint
,
this
.
currentclass
,
"
test
"
);
this
.
StudentsSizeSub
=
this
.
_hds
.
getStudentPerSchool
(
this
.
SchoolId
,
sectorint
,
this
.
currentclass
,
0
,
0
).
subscribe
(
x
=>
{
this
.
StudentsSize$
.
next
(
x
);
tot_pages
=
x
.
id
/
5
;
if
(
x
.
id
%
5
>
0
)
{
tot_pages
=
(
x
.
id
-
(
x
.
id
%
5
))
/
5
+
1
;
}
this
.
formGroup
.
get
(
'
maxpage
'
).
setValue
(
tot_pages
);
});
}
tot_pages
=
x
.
id
/
5
;
if
(
x
.
id
%
5
>
0
)
{
tot_pages
=
(
x
.
id
-
(
x
.
id
%
5
))
/
5
+
1
;
}
this
.
formGroup
.
get
(
'
maxpage
'
).
setValue
(
tot_pages
);
});
}
// this.StudentInfo$ = new BehaviorSubject([{}]);
// this.StudentInfoSub = this._hds.getStudentPerSchool(this.SchoolId, sectorint, this.currentclass).subscribe(this.StudentInfo$);
this
.
StudentInfoSub
=
this
.
_hds
.
getStudentPerSchool
(
this
.
SchoolId
,
sectorint
,
this
.
currentclass
,
this
.
limitdown
,
this
.
limitup
).
subscribe
(
data
=>
{
...
...
@@ -356,9 +359,9 @@ import {
let
i
=
0
;
if
(
cbvalue
.
value
===
'
1
'
)
{
this
.
saved
[
i
]
=
id
;
this
.
type
=
1
;
this
.
saved
[
i
]
=
id
;
this
.
type
=
1
;
}
else
if
(
cbvalue
.
value
===
'
2
'
)
{
this
.
saved
[
i
]
=
id
;
...
...
@@ -368,11 +371,11 @@ import {
// if (this.saved[j] === id) {
// this.saved.splice(j, 1);
// }
console
.
log
(
"
not confirmed
"
)
console
.
log
(
"
not confirmed
"
)
}
else
if
(
cbvalue
.
value
===
'
3
'
)
{
}
}
...
...
@@ -387,43 +390,40 @@ import {
this
.
retrievedStudent
.
next
(
false
);
}
nextpage
(
txop
,
maxpage
){
console
.
log
(
maxpage
.
value
);
if
(
this
.
pageno
<
maxpage
.
value
)
{
this
.
pageno
=
this
.
pageno
+
1
;
this
.
limitdown
=
(
this
.
pageno
-
1
)
*
5
;
this
.
limitup
=
this
.
pageno
*
5
;
this
.
findstudent
(
txop
,
this
.
pageno
)
}
nextpage
(
txop
,
maxpage
)
{
console
.
log
(
maxpage
.
value
);
if
(
this
.
pageno
<
maxpage
.
value
)
{
this
.
pageno
=
this
.
pageno
+
1
;
this
.
limitdown
=
(
this
.
pageno
-
1
)
*
5
;
this
.
limitup
=
this
.
pageno
*
5
;
this
.
findstudent
(
txop
,
this
.
pageno
)
}
}
prevpage
(
txop
){
console
.
log
(
this
.
pageno
,
"
pageno
"
);
if
(
this
.
pageno
>
1
)
{
this
.
pageno
=
this
.
pageno
-
1
;
this
.
limitdown
=
(
this
.
pageno
-
1
)
*
5
;
this
.
limitup
=
this
.
pageno
*
5
;
this
.
findstudent
(
txop
,
this
.
pageno
)
}
prevpage
(
txop
)
{
console
.
log
(
this
.
pageno
,
"
pageno
"
);
if
(
this
.
pageno
>
1
)
{
this
.
pageno
=
this
.
pageno
-
1
;
this
.
limitdown
=
(
this
.
pageno
-
1
)
*
5
;
this
.
limitup
=
this
.
pageno
*
5
;
this
.
findstudent
(
txop
,
this
.
pageno
)
}
}
setActiveUser
(
ind
)
{
ind
=
+
ind
;
console
.
log
(
this
.
userActive
,
"
RA
"
,
ind
);
if
(
ind
===
this
.
userActive
){
ind
=
-
1
;
}
ind
--
;
this
.
userActive
=
ind
+
1
;
setActiveUser
(
ind
)
{
ind
=
+
ind
;
console
.
log
(
this
.
userActive
,
"
RA
"
,
ind
);
if
(
ind
===
this
.
userActive
)
{
ind
=
-
1
;
}
ind
--
;
this
.
userActive
=
ind
+
1
;
}