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
e598a7e2
Commit
e598a7e2
authored
May 29, 2017
by
Νίκος Κατσαούνος
Browse files
updated reports
parent
10958fb2
Changes
7
Hide whitespace changes
Inline
Side-by-side
source/components/minister/minister-reports.ts
View file @
e598a7e2
...
...
@@ -47,11 +47,16 @@ import { API_ENDPOINT } from '../../app.settings';
Αριθμός Μαθητών και Πληρότητα σχολικών μονάδων ΕΠΑΛ
</button>
<br><br>
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(4)" [hidden]="minedu_userName == ''" >
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(4)" [hidden]="minedu_userName == ''
|| userRole == 'pde' || userRole == 'dide'
" >
<i class="fa fa-file-text"></i>
Σχολικές μονάδες που δεν έχουν δηλώσει Χωρητικότητα τμημάτων
</button>
<br><br>
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(5)" [hidden]="minedu_userName == '' " >
<i class="fa fa-file-text"></i>
Ολιγομελή τμήματα (Προσωρινά τοποθετημένοι μαθητές)
</button>
<br><br>
</div>
</div>
...
...
@@ -122,7 +127,7 @@ import { API_ENDPOINT } from '../../app.settings';
if
(
repId
==
1
)
this
.
router
.
navigate
([
'
/ministry/report-general
'
,
repId
]);
else
if
(
repId
==
2
||
repId
==
3
)
else
if
(
repId
==
2
||
repId
==
3
||
repId
==
5
)
this
.
router
.
navigate
([
'
/ministry/report-all-stat
'
,
repId
]);
else
if
(
repId
==
4
)
this
.
router
.
navigate
([
'
/ministry/report-no-capacity
'
,
repId
]);
...
...
source/components/minister/report-all-stat.ts
View file @
e598a7e2
...
...
@@ -67,7 +67,7 @@ import { API_ENDPOINT } from '../../app.settings';
</select>
</div>
<button type="button" class="btn-link" (click)="toggleCourseFilter()" *ngIf = "reportId == 3" >
<button type="button" class="btn-link" (click)="toggleCourseFilter()" *ngIf = "reportId == 3
|| reportId == 5
" >
> Φίλτρο Επιλογής Τομέα / Ειδικότητας
</button>
<br>
...
...
@@ -170,6 +170,7 @@ import { API_ENDPOINT } from '../../app.settings';
private
classSelected
:
number
;
private
sectorSelected
:
number
;
private
courseSelected
:
number
;
private
distribFinalized
:
number
;
private
enableRegionFilter
:
boolean
;
private
enableCourseFilter
:
boolean
;
private
userLoggedIn
:
string
;
...
...
@@ -341,6 +342,12 @@ createReport(regionSel) {
}
else
if
(
this
.
reportId
===
3
)
{
route
=
"
/ministry/report-all-stat/
"
;
this
.
distribFinalized
=
1
;
this
.
settings
=
this
.
reportSchema
.
reportAllStatSchema
;
}
else
if
(
this
.
reportId
===
5
)
{
route
=
"
/ministry/report-all-stat/
"
;
this
.
distribFinalized
=
0
;
this
.
settings
=
this
.
reportSchema
.
reportAllStatSchema
;
}
...
...
@@ -368,7 +375,7 @@ createReport(regionSel) {
else
if
(
this
.
userLoggedIn
==
DIDE_ROLE
)
admSel
=
this
.
adminAreaSelected
;
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
regSel
,
admSel
,
schSel
,
clSel
,
secSel
,
courSel
).
subscribe
(
data
=>
{
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
regSel
,
admSel
,
schSel
,
clSel
,
secSel
,
courSel
,
this
.
distribFinalized
).
subscribe
(
data
=>
{
this
.
generalReport$
.
next
(
data
);
this
.
data
=
data
;
...
...
source/components/minister/report-general.ts
View file @
e598a7e2
...
...
@@ -174,7 +174,7 @@ createReport(regionSel) {
let
regSel
=
0
;
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
0
,
0
,
0
,
0
,
0
,
0
).
subscribe
(
data
=>
{
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
0
,
0
,
0
,
0
,
0
,
0
,
0
).
subscribe
(
data
=>
{
this
.
generalReport$
.
next
(
data
);
this
.
data
=
data
;
},
...
...
@@ -238,7 +238,8 @@ generateGraphData() {
labelsX
.
push
(
"
2η Προτίμηση
"
);
labelsX
.
push
(
"
3η Προτίμηση
"
);
labelsX
.
push
(
"
Μη τοποθετημένοι
"
);
for
(
let
i
=
1
;
i
<=
4
;
i
++
)
{
labelsX
.
push
(
"
Προσωρινά τοποθετημένοι σε ολιγομελή
"
);
for
(
let
i
=
1
;
i
<=
5
;
i
++
)
{
this
.
d3data
.
push
([
labelsX
[
i
-
1
],
this
.
data
[
i
].
numStudents
/
this
.
data
[
0
].
numStudents
,
...
...
source/components/minister/report-no-capacity.ts
View file @
e598a7e2
...
...
@@ -168,7 +168,7 @@ createReport() {
return
;
}
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
this
.
enableCapacityFilter
,
0
,
0
,
0
,
0
,
0
).
subscribe
(
data
=>
{
this
.
generalReportSub
=
this
.
_hds
.
makeReport
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
route
,
this
.
enableCapacityFilter
,
0
,
0
,
0
,
0
,
0
,
0
).
subscribe
(
data
=>
{
this
.
generalReport$
.
next
(
data
);
this
.
data
=
data
;
},
...
...
source/containers/main.routes.ts
View file @
e598a7e2
...
...
@@ -65,8 +65,8 @@ export const MainRoutes: Routes = [
{
path
:
'
school/director-buttons
'
,
component
:
DirectorButtons
,
canActivate
:
[
SchoolAuthGuard
]
},
{
path
:
'
school/director-classcapacity
'
,
component
:
DirectorClassCapacity
,
canActivate
:
[
SchoolAuthGuard
]
},
{
path
:
'
ministry/minister-view
'
,
component
:
MinisterView
,
canActivate
:
[
MinistryAuthGuard
]
},
{
path
:
'
ministry/minister-reports
'
,
component
:
MinisterReports
,
canActivate
:
[
MinistryAuthGuard
]
},
{
path
:
'
ministry/report-all-stat/:reportId
'
,
component
:
ReportAllStat
,
canActivate
:
[
MinistryAuthGuard
]
},
{
path
:
'
ministry/minister-reports
'
,
component
:
MinisterReports
},
{
path
:
'
ministry/report-all-stat/:reportId
'
,
component
:
ReportAllStat
},
{
path
:
'
ministry/report-general/:reportId
'
,
component
:
ReportGeneral
,
canActivate
:
[
MinistryAuthGuard
]
},
{
path
:
'
ministry/report-no-capacity/:reportId
'
,
component
:
ReportNoCapacity
,
canActivate
:
[
MinistryAuthGuard
]
},
{
path
:
'
ministry/minister-informstudents
'
,
component
:
InformStudents
,
canActivate
:
[
MinistryAuthGuard
]
},
...
...
source/guards/ministry.auth.guard.ts
View file @
e598a7e2
...
...
@@ -12,7 +12,9 @@ export default class MinistryAuthGuard implements CanActivate {
canActivate
()
{
return
this
.
authService
.
isLoggedIn
(
MINISTRY_ROLE
).
then
(
loggedIn
=>
{
if
(
!
loggedIn
)
{
console
.
log
(
"
I am IN!
"
);
this
.
router
.
navigate
([
'
/ministry/logout
'
]);
//this.router.navigate(['/ministy/minister-settings']);
}
return
loggedIn
;
}).
catch
(
err
=>
{
...
...
source/services/helper-data-service.ts
View file @
e598a7e2
...
...
@@ -619,7 +619,7 @@ export class HelperDataService implements OnInit, OnDestroy {
}
makeReport
(
username
,
userpassword
,
routepath
,
regionsel
,
adminsel
,
schsel
,
clsel
,
secsel
,
coursel
)
{
makeReport
(
username
,
userpassword
,
routepath
,
regionsel
,
adminsel
,
schsel
,
clsel
,
secsel
,
coursel
,
distribfinal
)
{
let
headers
=
new
Headers
({
"
Content-Type
"
:
"
application/json
"
,
...
...
@@ -638,7 +638,7 @@ export class HelperDataService implements OnInit, OnDestroy {
}
else
if
(
routepath
==
"
/ministry/report-all-stat/
"
){
return
this
.
http
.
get
(
`
${
AppSettings
.
API_ENDPOINT
}
`
+
routepath
+
regionsel
+
"
/
"
+
adminsel
+
"
/
"
+
schsel
+
"
/
"
+
clsel
+
"
/
"
+
secsel
+
"
/
"
+
coursel
,
options
)
clsel
+
"
/
"
+
secsel
+
"
/
"
+
coursel
+
"
/
"
+
distribfinal
,
options
)
.
map
(
response
=>
response
.
json
());
}
else
if
(
routepath
==
"
/ministry/report-no-capacity/
"
){
...
...
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