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
75acfb0f
Commit
75acfb0f
authored
May 16, 2017
by
Νίκος Κατσαούνος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
453e9f33
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
16 deletions
+54
-16
source/components/minister/minister-reports.ts
source/components/minister/minister-reports.ts
+10
-2
source/components/minister/report-all-stat.ts
source/components/minister/report-all-stat.ts
+31
-8
source/components/navbar/navbar.component.html
source/components/navbar/navbar.component.html
+2
-3
source/components/student-application-form/application.submit.ts
...components/student-application-form/application.submit.ts
+7
-2
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+4
-1
No files found.
source/components/minister/minister-reports.ts
View file @
75acfb0f
...
...
@@ -10,6 +10,7 @@ import { Router, ActivatedRoute, Params} from '@angular/router';
import
{
BehaviorSubject
,
Subscription
}
from
'
rxjs/Rx
'
;
import
{
ILoginInfo
}
from
'
../../store/logininfo/logininfo.types
'
;
import
{
LOGININFO_INITIAL_STATE
}
from
'
../../store/logininfo/logininfo.initial-state
'
;
import
{
PDE_ROLE
,
DIDE_ROLE
}
from
'
../../constants
'
;
import
{
FormBuilder
,
...
...
@@ -87,6 +88,13 @@ import { API_ENDPOINT } from '../../app.settings';
state
.
loginInfo
.
reduce
(({},
loginInfoToken
)
=>
{
this
.
minedu_userName
=
loginInfoToken
.
minedu_username
;
this
.
minedu_userPassword
=
loginInfoToken
.
minedu_userpassword
;
console
.
log
(
"
Role:
"
);
console
.
log
(
loginInfoToken
.
auth_role
);
if
(
loginInfoToken
.
auth_role
==
PDE_ROLE
||
loginInfoToken
.
auth_role
==
DIDE_ROLE
)
{
console
.
log
(
"
inside..
"
);
this
.
minedu_userName
=
loginInfoToken
.
auth_token
;
this
.
minedu_userPassword
=
loginInfoToken
.
auth_token
;
}
return
loginInfoToken
;
},
{});
}
...
...
source/components/minister/report-all-stat.ts
View file @
75acfb0f
...
...
@@ -12,6 +12,7 @@ import { ILoginInfo } from '../../store/logininfo/logininfo.types';
import
{
Ng2SmartTableModule
,
LocalDataSource
}
from
'
ng2-smart-table
'
;
import
{
reportsSchema
,
TableColumn
}
from
'
./reports-schema
'
;
import
{
LOGININFO_INITIAL_STATE
}
from
'
../../store/logininfo/logininfo.initial-state
'
;
import
{
PDE_ROLE
,
DIDE_ROLE
}
from
'
../../constants
'
;
import
{
csvCreator
}
from
'
./csv-creator
'
;
import
{
...
...
@@ -31,11 +32,10 @@ import { API_ENDPOINT } from '../../app.settings';
<div>
<!--
<div
class = "loading" *ngIf="validCreator == 0" >
</div>
-->
<form [formGroup]="formGroup" #form>
...
...
@@ -45,8 +45,8 @@ import { API_ENDPOINT } from '../../app.settings';
> Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου
</button>
<div class="col-md-11 offset-md-1">
<label *ngIf = "enableRegionFilter"> Περιφερειακή Διεύθυνση </label>
<select #regsel class="form-control" (change)="checkregion(regsel)" *ngIf = "enableRegionFilter" formControlName="region">
<label *ngIf = "enableRegionFilter
&& userLoggedIn == 'supervisor'
"> Περιφερειακή Διεύθυνση </label>
<select #regsel class="form-control" (change)="checkregion(regsel)" *ngIf = "enableRegionFilter"
[value] = "regionSelected" [hidden] = "userLoggedIn != 'supervisor'"
formControlName="region">
<option value="0"></option>
<option *ngFor="let RegionSelection$ of RegionSelections$ | async; let i=index" [value] = "RegionSelection$.id"> {{RegionSelection$.name}} </option>
</select>
...
...
@@ -158,6 +158,7 @@ import { API_ENDPOINT } from '../../app.settings';
private
courseSelected
:
number
;
private
enableRegionFilter
:
boolean
;
private
enableCourseFilter
:
boolean
;
private
userLoggedIn
:
string
;
columnMap
:
Map
<
string
,
TableColumn
>
=
new
Map
<
string
,
TableColumn
>
();
@
Input
()
settings
:
any
;
...
...
@@ -214,6 +215,27 @@ import { API_ENDPOINT } from '../../app.settings';
state
.
loginInfo
.
reduce
(({},
loginInfoToken
)
=>
{
this
.
minedu_userName
=
loginInfoToken
.
minedu_username
;
this
.
minedu_userPassword
=
loginInfoToken
.
minedu_userpassword
;
this
.
userLoggedIn
=
loginInfoToken
.
auth_role
;
if
(
loginInfoToken
.
auth_role
==
PDE_ROLE
||
loginInfoToken
.
auth_role
==
DIDE_ROLE
)
{
console
.
log
(
"
inside..
"
);
this
.
minedu_userName
=
loginInfoToken
.
auth_token
;
this
.
minedu_userPassword
=
loginInfoToken
.
auth_token
;
/*
if (loginInfoToken.auth_role == PDE_ROLE)
this.userLoggedIn = "pde";
else if (loginInfoToken.auth_role == DIDE_ROLE)
this.userLoggedIn = "dide";
console.log(this.userLoggedIn);
*/
if
(
loginInfoToken
.
auth_role
==
PDE_ROLE
)
{
//CALL CONTROLLER THAT RETURNS ID OF PDE
this
.
regionSelected
=
1
;
this
.
showAdminList
.
next
(
true
);
this
.
checkregion
(
this
.
regionSelected
);
}
}
return
loginInfoToken
;
},
{});
}
...
...
@@ -346,13 +368,14 @@ toggleCourseFilter() {
checkregion
(
regionId
)
{
if
(
typeof
regionId
.
value
!=
"
undefined
"
)
this
.
regionSelected
=
regionId
.
value
;
this
.
adminAreaSelected
=
0
;
this
.
schSelected
=
0
;
//if (regionId.value != 0) {
this
.
AdminAreaSelectionsSub
=
this
.
_hds
.
getAdminAreas
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
regionId
.
value
).
subscribe
(
data
=>
{
this
.
AdminAreaSelectionsSub
=
this
.
_hds
.
getAdminAreas
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
this
.
regionSelected
).
subscribe
(
data
=>
{
this
.
AdminAreaSelections$
.
next
(
data
);
},
error
=>
{
...
...
@@ -365,7 +388,7 @@ checkregion(regionId) {
}
);
this
.
SchoolSelectionsSub
=
this
.
_hds
.
getSchoolsPerRegion
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
regionId
.
value
).
subscribe
(
data
=>
{
this
.
SchoolSelectionsSub
=
this
.
_hds
.
getSchoolsPerRegion
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
this
.
regionSelected
).
subscribe
(
data
=>
{
this
.
SchoolSelections$
.
next
(
data
);
},
error
=>
{
...
...
source/components/navbar/navbar.component.html
View file @
75acfb0f
...
...
@@ -44,13 +44,12 @@
</li>
</div>
<!--
<div
*ngIf=
"(loginInfo$ | async).size > 0"
class=
"nav-item"
>
<li
*ngIf=
"authRole=='pde'"
class=
"nav-item"
>
<a class="nav-link" [routerLink]="['/
school/perfecture-view
']" [routerLinkActive]="['active']"><b>Αναφορές</b></a>
<a
class=
"nav-link"
[routerLink]=
"['/
ministry/minister-reports
']"
[routerLinkActive]=
"['active']"
><b>
Αναφορές
</b></a>
</li>
</div>
-->
</div>
</ul>
...
...
source/components/student-application-form/application.submit.ts
View file @
75acfb0f
...
...
@@ -197,10 +197,15 @@ import {AppSettings} from '../../app.settings';
criteriaObj
[
i
]
=
new
StudentCriteriaChosen
(
null
,
null
,
this
.
studentCriteria
[
i
]);
aitisiObj
[
'
2
'
]
=
criteriaObj
;
if
(
aitisiObj
[
0
][
'
currentclass
'
]
===
"
Β' Λυκείου
"
)
console
.
log
(
"
Debugging..
"
);
console
.
log
(
aitisiObj
[
0
][
'
currentclass
'
]);
//if (aitisiObj[0]['currentclass'] === "Β' Λυκείου" )
if
(
aitisiObj
[
0
][
'
currentclass
'
]
===
"
2
"
)
aitisiObj
[
'
3
'
]
=
new
StudentSectorChosen
(
null
,
this
.
sectorSelected
);
else
if
(
aitisiObj
[
0
][
'
currentclass
'
]
===
"
Γ' Λυκείου
"
)
//else if (aitisiObj[0]['currentclass'] === "Γ' Λυκείου" )
else
if
(
aitisiObj
[
0
][
'
currentclass
'
]
===
"
3
"
)
{
aitisiObj
[
'
3
'
]
=
new
StudentCourseChosen
(
null
,
this
.
courseSelected
);
}
//console.log(aitisiObj);
...
...
source/services/helper-data-service.ts
View file @
75acfb0f
...
...
@@ -44,6 +44,9 @@ export class HelperDataService implements OnInit, OnDestroy {
this
.
authRole
=
loginInfoToken
.
auth_role
;
//this.minedu_userName = loginInfoToken.minedu_username;
//this.minedu_userPassword = loginInfoToken.minedu_userpassword;
console
.
log
(
"
Auth details..
"
);
console
.
log
(
this
.
authToken
);
console
.
log
(
this
.
authRole
);
return
loginInfoToken
;
},
{});
}
...
...
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