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
9846d74b
Commit
9846d74b
authored
May 31, 2017
by
Νίκος Κατσαούνος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated ministry environment
parent
7cb36363
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
32 deletions
+132
-32
source/components/minister/minister-informstudents.ts
source/components/minister/minister-informstudents.ts
+43
-7
source/components/minister/minister-reports.ts
source/components/minister/minister-reports.ts
+41
-1
source/components/minister/minister-settings.ts
source/components/minister/minister-settings.ts
+19
-5
source/components/minister/minister-view.ts
source/components/minister/minister-view.ts
+13
-10
source/components/minister/report-all-stat.ts
source/components/minister/report-all-stat.ts
+13
-7
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+3
-2
No files found.
source/components/minister/minister-informstudents.ts
View file @
9846d74b
...
...
@@ -42,13 +42,13 @@ import { API_ENDPOINT } from '../../app.settings';
<h5> >Αποστολή ειδοποιήσεων <br></h5>
<br><br>
<div class="col-md-12">
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents(true)" >
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents(true)"
[disabled] = "!applicantsResultsDisabled"
>
Μαζική αποστολή e-mail στους μαθητές που ΔΕΝ τοποθετήθηκαν<span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
<br>
<div class="col-md-12">
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents(false)" >
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="informUnlocatedStudents(false)"
[disabled] = "!applicantsResultsDisabled"
>
Μαζική αποστολή e-mail στους μαθητές που τοποθετήθηκαν<span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
...
...
@@ -62,14 +62,16 @@ import { API_ENDPOINT } from '../../app.settings';
private
modalTitle
:
BehaviorSubject
<
string
>
;
private
modalText
:
BehaviorSubject
<
string
>
;
private
modalHeader
:
BehaviorSubject
<
string
>
;
//public modalHeader: string
;
private
settings$
:
BehaviorSubject
<
any
>
;
loginInfoSub
:
Subscription
;
private
settingsSub
:
Subscription
;
private
numSuccessMails
:
number
;
private
numFailMails
:
number
;
private
successSending
:
number
;
private
apiEndPoint
=
API_ENDPOINT
;
private
minedu_userName
:
string
;
private
minedu_userPassword
:
string
;
private
applicantsResultsDisabled
:
boolean
;
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
...
...
@@ -78,10 +80,10 @@ import { API_ENDPOINT } from '../../app.settings';
private
router
:
Router
)
{
this
.
loginInfo$
=
new
BehaviorSubject
(
LOGININFO_INITIAL_STATE
);
//this.isModalShown = new BehaviorSubject(false);
this
.
modalTitle
=
new
BehaviorSubject
(
""
);
this
.
modalText
=
new
BehaviorSubject
(
""
);
this
.
modalHeader
=
new
BehaviorSubject
(
""
);
this
.
settings$
=
new
BehaviorSubject
([{}]);
}
...
...
@@ -104,6 +106,8 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
numFailMails
=
0
;
this
.
successSending
=
-
1
;
this
.
retrieveSettings
();
}
ngOnDestroy
()
{
...
...
@@ -112,13 +116,18 @@ import { API_ENDPOINT } from '../../app.settings';
if
(
this
.
loginInfoSub
)
this
.
loginInfoSub
.
unsubscribe
();
if
(
this
.
loginInfo$
)
this
.
loginInfo$
.
unsubscribe
();
if
(
this
.
loginInfo$
)
this
.
loginInfo$
.
unsubscribe
();
if
(
this
.
settingsSub
)
this
.
settingsSub
.
unsubscribe
();
if
(
this
.
loginInfo$
)
this
.
loginInfo$
.
unsubscribe
();
if
(
this
.
settings$
)
this
.
settings$
.
unsubscribe
();
}
public
showModal
():
void
{
console
.
log
(
"
about to show modal
"
);
(
<
any
>
$
(
'
#emaiSentNotice
'
)).
modal
(
'
show
'
);
...
...
@@ -172,4 +181,31 @@ import { API_ENDPOINT } from '../../app.settings';
}
retrieveSettings
()
{
this
.
settingsSub
=
this
.
_hds
.
retrieveAdminSettings
(
this
.
minedu_userName
,
this
.
minedu_userPassword
).
subscribe
(
data
=>
{
this
.
settings$
.
next
(
data
);
},
error
=>
{
this
.
settings$
.
next
([{}]);
console
.
log
(
"
Error Getting MinisterRetrieveSettings
"
);
},
()
=>
{
console
.
log
(
"
Success Getting MinisterRetrieveSettings
"
);
this
.
applicantsResultsDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
applicantsResultsDisabled
'
]));
if
(
this
.
applicantsResultsDisabled
==
false
)
{
this
.
modalTitle
.
next
(
"
Κατανομή Μαθητών
"
);
this
.
modalText
.
next
((
"
ΠΡΟΣΟΧΗ: Για να μπορείτε να αποστείλετε e-mail ενημέρωσης, παρακαλώ πηγαίνετε στις Ρυθμίσεις και ΕΝΕΡΓΟΠΟΙΗΣΤΕ
"
)
+
(
"
τη δυνατότητα της προβολής αποτελεσμάτων κατανομής από τους μαθητές.
"
)
);
this
.
modalHeader
.
next
(
"
modal-header-warning
"
);
this
.
showModal
();
}
}
)
}
}
source/components/minister/minister-reports.ts
View file @
9846d74b
...
...
@@ -32,6 +32,8 @@ import { API_ENDPOINT } from '../../app.settings';
<h5> >Επιλογή Αναφοράς<br><br></h5>
<div class="col-md-1">
<!--
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(1)" [hidden]="minedu_userName == '' || userRole == 'pde' || userRole == 'dide'" >
<i class="fa fa-file-text"></i>
Κατανομή Μαθητών με Βάση τη Σειρά Προτίμησης
...
...
@@ -52,12 +54,50 @@ import { API_ENDPOINT } from '../../app.settings';
Σχολικές μονάδες που δεν έχουν δηλώσει Χωρητικότητα τμημάτων
</button>
<br><br>
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(5)" [hidden]="minedu_userName == '' " >
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(5)" [hidden]="minedu_userName == '' || userRole == 'pde' || userRole == 'dide' " >
<i class="fa fa-file-text"></i>
Ολιγομελή τμήματα (Προσωρινά τοποθετημένοι μαθητές)
</button>
<br><br>
</div>
-->
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(1)" >
<i class="fa fa-file-text"></i>
Κατανομή Μαθητών με Βάση τη Σειρά Προτίμησης
</button>
<br><br>
</div>
<div *ngIf = "minedu_userName != ''" >
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(2)" >
<i class="fa fa-file-text"></i>
Συνολική Πληρότητα σχολικών μονάδων ΕΠΑΛ ανά τάξη
</button>
<br><br>
</div>
<div *ngIf = "minedu_userName != ''" >
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(3)" >
<i class="fa fa-file-text"></i>
Αριθμός Μαθητών και Πληρότητα σχολικών μονάδων ΕΠΑΛ
</button>
<br><br>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(4)" >
<i class="fa fa-file-text"></i>
Σχολικές μονάδες που δεν έχουν δηλώσει Χωρητικότητα τμημάτων
</button>
<br><br>
</div>
<div *ngIf = "minedu_userName != '' && userRole != 'pde' && userRole != 'dide'">
<button type="button" class="btn btn-alert" (click)="nav_to_reportpath(5)" >
<i class="fa fa-file-text"></i>
Ολιγομελή τμήματα (Προσωρινά τοποθετημένοι μαθητές)
</button>
<br><br>
</div>
</div>
</div>
...
...
source/components/minister/minister-settings.ts
View file @
9846d74b
...
...
@@ -85,6 +85,17 @@ import {
</div>
<br>
<div class="row">
<div class="col-md-1 ">
<input type="checkbox" [checked]="applicantsResultsDisabled" formControlName="applicantsResultsDisabled"
(click)="toggleApplicantsResults()" >
</div>
<div class="col-md-9">
<label for="applicantsResultsDisabled">Απενεργοποίηση δυνατότητας προβολής αποτελεσμάτων κατανομής από τους μαθητές </label>
</div>
</div>
<br>
<button type="submit" class="btn btn-md pull-right" (click)="storeSettings()" >
Εφαρμογή
</button>
...
...
@@ -106,11 +117,11 @@ import {
private
settings$
:
BehaviorSubject
<
any
>
;
loginInfoSub
:
Subscription
;
private
settingsSub
:
Subscription
;
//private data;
private
capacityDisabled
:
boolean
;
private
directorViewDisabled
:
boolean
;
private
applicantsLoginDisabled
:
boolean
;
private
applicantsResultsDisabled
:
boolean
;
private
dataRetrieved
:
number
;
private
minedu_userName
:
string
;
...
...
@@ -125,6 +136,7 @@ import {
capacityDisabled
:
[
''
,
[]],
directorViewDisabled
:
[
''
,
[]],
applicantsLoginDisabled
:
[
''
,
[]],
applicantsResultsDisabled
:
[
''
,
[]],
});
this
.
loginInfo$
=
new
BehaviorSubject
(
LOGININFO_INITIAL_STATE
);
...
...
@@ -201,6 +213,7 @@ import {
this
.
capacityDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
capacityDisabled
'
]));
this
.
directorViewDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
directorViewDisabled
'
]));
this
.
applicantsLoginDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
applicantsLoginDisabled
'
]));
this
.
applicantsResultsDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
applicantsResultsDisabled
'
]));
this
.
dataRetrieved
=
1
;
}
...
...
@@ -212,7 +225,8 @@ import {
this
.
dataRetrieved
=
-
1
;
this
.
settingsSub
=
this
.
_hds
.
storeAdminSettings
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
this
.
capacityDisabled
,
this
.
directorViewDisabled
,
this
.
applicantsLoginDisabled
)
this
.
settingsSub
=
this
.
_hds
.
storeAdminSettings
(
this
.
minedu_userName
,
this
.
minedu_userPassword
,
this
.
capacityDisabled
,
this
.
directorViewDisabled
,
this
.
applicantsLoginDisabled
,
this
.
applicantsResultsDisabled
)
.
subscribe
(
data
=>
{
this
.
settings$
.
next
(
data
);
//this.data = data;
...
...
@@ -262,11 +276,11 @@ import {
}
toggleApplicantsResults
()
{
this
.
applicantsResultsDisabled
=
!
this
.
applicantsResultsDisabled
;
}
...
...
source/components/minister/minister-view.ts
View file @
9846d74b
...
...
@@ -105,6 +105,7 @@ import { API_ENDPOINT } from '../../app.settings';
private
distStatus
=
"
READY
"
;
private
capacityDisabled
:
boolean
;
private
directorViewDisabled
:
boolean
;
private
applicantsResultsDisabled
:
boolean
;
constructor
(
/*private fb: FormBuilder,*/
// private _ata: LoginInfoActions,
...
...
@@ -169,10 +170,10 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
loginInfoSub
.
unsubscribe
();
if
(
this
.
settingsSub
)
this
.
settingsSub
.
unsubscribe
();
if
(
this
.
loginInfo$
)
this
.
loginInfo$
.
unsubscribe
();
if
(
this
.
settings$
)
this
.
settings$
.
unsubscribe
();
if
(
this
.
loginInfo$
)
this
.
loginInfo$
.
unsubscribe
();
if
(
this
.
settings$
)
this
.
settings$
.
unsubscribe
();
}
ngOnInit
()
{
...
...
@@ -205,10 +206,7 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
showModal
(
"
#distributionWaitingNotice
"
);
this
.
_hds
.
makeDistribution
(
this
.
minedu_userName
,
this
.
minedu_userPassword
)
.
then
(
msg
=>
{
//console.log("Nikos2");
this
.
modalTitle
.
next
(
"
Κατανομή Μαθητών
"
);
this
.
modalText
.
next
(
"
Η κατανομή ολοκληρώθηκε με επιτυχία!
"
);
this
.
modalHeader
.
next
(
"
modal-header-success
"
);
...
...
@@ -218,8 +216,6 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
distStatus
=
"
FINISHED
"
;
})
.
catch
(
err
=>
{
console
.
log
(
err
);
//console.log("Nikos1");
//console.log(err);
this
.
distStatus
=
"
ERROR
"
;
this
.
modalTitle
.
next
(
"
Κατανομή Μαθητών
"
);
...
...
@@ -247,6 +243,7 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
capacityDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
capacityDisabled
'
]));
this
.
directorViewDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
directorViewDisabled
'
]));
this
.
applicantsResultsDisabled
=
Boolean
(
Number
(
this
.
settings$
.
value
[
'
applicantsResultsDisabled
'
]));
console
.
log
(
"
Debugging..
"
);
console
.
log
(
this
.
capacityDisabled
);
...
...
@@ -265,7 +262,13 @@ import { API_ENDPOINT } from '../../app.settings';
this
.
modalHeader
.
next
(
"
modal-header-warning
"
);
this
.
showModal
(
"
#distributionNotice
"
);
}
else
if
(
this
.
applicantsResultsDisabled
==
false
)
{
this
.
modalTitle
.
next
(
"
Κατανομή Μαθητών
"
);
this
.
modalText
.
next
((
"
ΠΡΟΣΟΧΗ: Για να μπορείτε να εκτελέσετε την κατανομή, παρακαλώ πηγαίνετε στις Ρυθμίσεις και ΑΠΕΝΕΡΓΟΠΟΙΗΣΤΕ
"
)
+
(
"
τη δυνατότητα της προβολής αποτελεσμάτων κατανομής από τους μαθητές.
"
)
);
this
.
modalHeader
.
next
(
"
modal-header-warning
"
);
this
.
showModal
(
"
#distributionNotice
"
);
}
//this.dataRetrieved = 1;
}
...
...
source/components/minister/report-all-stat.ts
View file @
9846d74b
...
...
@@ -12,7 +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
{
DIDE_ROLE
,
PDE_ROLE
,
MINISTRY
_ROLE
}
from
'
../../constants
'
;
import
{
csvCreator
}
from
'
./csv-creator
'
;
import
{
chartCreator
}
from
'
./chart-creator
'
;
...
...
@@ -43,8 +43,13 @@ import { API_ENDPOINT } from '../../app.settings';
<!--<h5> >Επιλογή Φίλτρων <br><br></h5>-->
<br>
<button type="button" class="btn-link" (click)="toggleRegionFilter()" >
> Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου
<div *ngIf = "userLoggedIn == 'supervisor'"> > Φίλτρο Επιλογής Περιφ/κής Δ/νσης - Δ/νσης Εκπ/σης - Σχολείου </div>
<div *ngIf = "userLoggedIn == 'dide'" > > Φίλτρο Επιλογής Σχολείου </div>
<div *ngIf = "userLoggedIn == 'pde'"> > Φίλτρο Επιλογής Δ/νσης Εκπ/σης - Σχολείου </div>
</button>
<div class="col-md-11 offset-md-1">
<label *ngIf = "enableRegionFilter && userLoggedIn == 'supervisor'"> Περιφερειακή Διεύθυνση </label>
<select #regsel class="form-control" (change)="checkregion(regsel)" *ngIf = "enableRegionFilter" [value] = "regionSelected" [hidden] = "userLoggedIn != 'supervisor'" formControlName="region">
...
...
@@ -67,10 +72,12 @@ import { API_ENDPOINT } from '../../app.settings';
</select>
</div>
<button type="button" class="btn-link" (click)="toggleCourseFilter()" *ngIf = "reportId == 3 || reportId == 5" >
> Φίλτρο Επιλογής Τομέα / Ειδικότητας
</button>
<br>
<div *ngIf = "reportId == 3 || reportId == 5" >
<button type="button" class="btn-link" (click)="toggleCourseFilter()" >
> Φίλτρο Επιλογής Τομέα / Ειδικότητας
</button>
</div>
<div class="col-md-11 offset-md-1">
<label for="classid" *ngIf = "enableCourseFilter" >Τάξη</label><br/>
<select #class_sel class="form-control" (change)="checkclass(class_sel)" *ngIf = "enableCourseFilter" formControlName="classid" >
...
...
@@ -97,7 +104,6 @@ import { API_ENDPOINT } from '../../app.settings';
<option *ngFor="let CourseSelection$ of CourseSelections$ | async; let i=index" [value] = "CourseSelection$.id"> {{CourseSelection$.name}}</option>
</select>
</div>
<br>
<button type="submit" class="btn btn-alert" (click)="createReport(regsel)" [hidden]="minedu_userName == ''" >
<i class="fa fa-file-text"></i>
...
...
source/services/helper-data-service.ts
View file @
9846d74b
...
...
@@ -778,7 +778,7 @@ retrieveAdminSettings(username, userpassword) {
.
map
(
response
=>
response
.
json
());
}
storeAdminSettings
(
username
,
userpassword
,
capac
,
dirview
,
applogin
)
{
storeAdminSettings
(
username
,
userpassword
,
capac
,
dirview
,
applogin
,
appresults
)
{
let
headers
=
new
Headers
({
"
Content-Type
"
:
"
application/json
"
,
...
...
@@ -787,7 +787,8 @@ storeAdminSettings(username, userpassword, capac, dirview, applogin) {
this
.
createMinistryAuthorizationHeader
(
headers
,
username
,
userpassword
);
let
options
=
new
RequestOptions
({
headers
:
headers
});
return
this
.
http
.
get
(
`
${
AppSettings
.
API_ENDPOINT
}
/ministry/store-settings/`
+
Number
(
capac
)
+
"
/
"
+
Number
(
dirview
)
+
"
/
"
+
Number
(
applogin
)
,
options
)
return
this
.
http
.
get
(
`
${
AppSettings
.
API_ENDPOINT
}
/ministry/store-settings/`
+
Number
(
capac
)
+
"
/
"
+
Number
(
dirview
)
+
"
/
"
+
Number
(
applogin
)
+
"
/
"
+
Number
(
appresults
)
,
options
)
.
map
(
response
=>
response
.
json
());
}
...
...
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