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
143dc6c9
Commit
143dc6c9
authored
Aug 03, 2017
by
Χάρης Παπαδόπουλος
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'edge_v4' into 'develop'
Merge to develop See merge request !255
parents
96f089d9
1cb2f0e4
Changes
129
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
129 changed files
with
10902 additions
and
5055 deletions
+10902
-5055
drupal/modules/epal/src/Controller/HelpDesk.php
drupal/modules/epal/src/Controller/HelpDesk.php
+38
-73
package-lock.json
package-lock.json
+6950
-0
package.json
package.json
+33
-33
source/actions/coursefields.actions.ts
source/actions/coursefields.actions.ts
+0
-36
source/actions/criteria.actions.ts
source/actions/criteria.actions.ts
+0
-45
source/actions/epalclass.actions.ts
source/actions/epalclass.actions.ts
+22
-23
source/actions/index.ts
source/actions/index.ts
+21
-20
source/actions/logininfo.actions.ts
source/actions/logininfo.actions.ts
+56
-55
source/actions/regionschools.actions.ts
source/actions/regionschools.actions.ts
+50
-60
source/actions/sectorcourses.actions.ts
source/actions/sectorcourses.actions.ts
+40
-52
source/actions/sectorfields.actions.ts
source/actions/sectorfields.actions.ts
+10
-8
source/actions/studentdatafields.actions.ts
source/actions/studentdatafields.actions.ts
+15
-17
source/app.routes.ts
source/app.routes.ts
+4
-5
source/app.settings.deployment.ts
source/app.settings.deployment.ts
+8
-8
source/app.ts
source/app.ts
+81
-93
source/components/director/director-classcapacity.ts
source/components/director/director-classcapacity.ts
+15
-52
source/components/director/director-view.ts
source/components/director/director-view.ts
+34
-85
source/components/director/director.buttons.ts
source/components/director/director.buttons.ts
+8
-9
source/components/footer/footer.component.html
source/components/footer/footer.component.html
+8
-11
source/components/footer/footer.component.ts
source/components/footer/footer.component.ts
+3
-3
source/components/header/header.component.html
source/components/header/header.component.html
+4
-4
source/components/header/header.component.ts
source/components/header/header.component.ts
+46
-58
source/components/home.ts
source/components/home.ts
+50
-56
source/components/infoviews/eduadmin-view.ts
source/components/infoviews/eduadmin-view.ts
+9
-25
source/components/infoviews/perfecture-view.ts
source/components/infoviews/perfecture-view.ts
+6
-23
source/components/main/breadcrumbs.ts
source/components/main/breadcrumbs.ts
+15
-21
source/components/main/main.component.html
source/components/main/main.component.html
+42
-42
source/components/main/main.component.ts
source/components/main/main.component.ts
+8
-8
source/components/minister/chart-creator.ts
source/components/minister/chart-creator.ts
+92
-94
source/components/minister/csv-creator.ts
source/components/minister/csv-creator.ts
+89
-93
source/components/minister/minister-informstudents.ts
source/components/minister/minister-informstudents.ts
+33
-42
source/components/minister/minister-reports.ts
source/components/minister/minister-reports.ts
+30
-55
source/components/minister/minister-settings.ts
source/components/minister/minister-settings.ts
+41
-67
source/components/minister/minister-view.ts
source/components/minister/minister-view.ts
+119
-137
source/components/minister/report-all-stat.ts
source/components/minister/report-all-stat.ts
+108
-169
source/components/minister/report-general.ts
source/components/minister/report-general.ts
+33
-62
source/components/minister/report-no-capacity.ts
source/components/minister/report-no-capacity.ts
+41
-64
source/components/minister/report-users.ts
source/components/minister/report-users.ts
+25
-38
source/components/minister/reports-schema.ts
source/components/minister/reports-schema.ts
+168
-189
source/components/ministry.home.ts
source/components/ministry.home.ts
+58
-61
source/components/navbar/navbar.component.html
source/components/navbar/navbar.component.html
+73
-73
source/components/navbar/navbar.component.ts
source/components/navbar/navbar.component.ts
+44
-45
source/components/school.home.ts
source/components/school.home.ts
+41
-42
source/components/student-application-form/after.submit.ts
source/components/student-application-form/after.submit.ts
+38
-43
source/components/student-application-form/application.form.main.html
...nents/student-application-form/application.form.main.html
+3
-9
source/components/student-application-form/application.form.main.ts
...ponents/student-application-form/application.form.main.ts
+81
-91
source/components/student-application-form/application.preview.ts
...omponents/student-application-form/application.preview.ts
+103
-102
source/components/student-application-form/application.submit.ts
...components/student-application-form/application.submit.ts
+168
-148
source/components/student-application-form/course.fields.select.ts
...mponents/student-application-form/course.fields.select.ts
+0
-81
source/components/student-application-form/disclaimer.ts
source/components/student-application-form/disclaimer.ts
+62
-71
source/components/student-application-form/epal.class.select.ts
.../components/student-application-form/epal.class.select.ts
+63
-63
source/components/student-application-form/help-desk.ts
source/components/student-application-form/help-desk.ts
+37
-47
source/components/student-application-form/info.ts
source/components/student-application-form/info.ts
+16
-22
source/components/student-application-form/legalinfos.ts
source/components/student-application-form/legalinfos.ts
+4
-4
source/components/student-application-form/parent.form.html
source/components/student-application-form/parent.form.html
+60
-60
source/components/student-application-form/parent.form.ts
source/components/student-application-form/parent.form.ts
+43
-51
source/components/student-application-form/region.schools.select.ts
...ponents/student-application-form/region.schools.select.ts
+138
-167
source/components/student-application-form/schools-order-select.ts
...mponents/student-application-form/schools-order-select.ts
+37
-54
source/components/student-application-form/sector.courses.select.ts
...ponents/student-application-form/sector.courses.select.ts
+93
-86
source/components/student-application-form/sector.fields.select.ts
...mponents/student-application-form/sector.fields.select.ts
+41
-72
source/components/student-application-form/submited.aplication.preview.ts
...s/student-application-form/submited.aplication.preview.ts
+20
-32
source/components/student-application-form/submitedstudent.preview.ts
...nents/student-application-form/submitedstudent.preview.ts
+0
-89
source/components/students/student.ts
source/components/students/student.ts
+16
-60
source/constants.ts
source/constants.ts
+59
-60
source/containers/globalstyles.css
source/containers/globalstyles.css
+65
-58
source/containers/main.routes.ts
source/containers/main.routes.ts
+112
-121
source/containers/main.ts
source/containers/main.ts
+28
-42
source/guards/eduadmin.auth.guard.ts
source/guards/eduadmin.auth.guard.ts
+17
-16
source/guards/ministry.auth.guard.ts
source/guards/ministry.auth.guard.ts
+17
-16
source/guards/regionedu.auth.guard.ts
source/guards/regionedu.auth.guard.ts
+17
-16
source/guards/reports.auth.guard.ts
source/guards/reports.auth.guard.ts
+17
-17
source/guards/school.auth.guard.ts
source/guards/school.auth.guard.ts
+17
-16
source/guards/school.capacity.locked.guard.ts
source/guards/school.capacity.locked.guard.ts
+17
-16
source/guards/school.students.locked.guard.ts
source/guards/school.students.locked.guard.ts
+17
-16
source/guards/student.auth.guard.ts
source/guards/student.auth.guard.ts
+18
-17
source/guards/student.lock.guard.ts
source/guards/student.lock.guard.ts
+18
-17
source/index.html
source/index.html
+8
-5
source/pipes/camelcase.ts
source/pipes/camelcase.ts
+6
-6
source/pipes/removehtmltags.ts
source/pipes/removehtmltags.ts
+5
-5
source/pipes/removespaces.ts
source/pipes/removespaces.ts
+7
-13
source/services/Spinner.service.ts
source/services/Spinner.service.ts
+4
-4
source/services/auth.service.ts
source/services/auth.service.ts
+100
-102
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+53
-128
source/store/coursefields/coursefields.initial-state.ts
source/store/coursefields/coursefields.initial-state.ts
+0
-5
source/store/coursefields/coursefields.reducer.ts
source/store/coursefields/coursefields.reducer.ts
+0
-30
source/store/coursefields/coursefields.transformers.ts
source/store/coursefields/coursefields.transformers.ts
+0
-13
source/store/coursefields/coursefields.types.ts
source/store/coursefields/coursefields.types.ts
+0
-9
source/store/coursefields/index.ts
source/store/coursefields/index.ts
+0
-10
source/store/criteria/criteria.initial-state.ts
source/store/criteria/criteria.initial-state.ts
+0
-5
source/store/criteria/criteria.reducer.ts
source/store/criteria/criteria.reducer.ts
+0
-48
source/store/criteria/criteria.transformers.ts
source/store/criteria/criteria.transformers.ts
+0
-12
source/store/criteria/criteria.types.ts
source/store/criteria/criteria.types.ts
+0
-12
source/store/criteria/index.ts
source/store/criteria/index.ts
+0
-10
source/store/epalclasses/epalclasses.initial-state.ts
source/store/epalclasses/epalclasses.initial-state.ts
+3
-4
source/store/epalclasses/epalclasses.reducer.ts
source/store/epalclasses/epalclasses.reducer.ts
+15
-16
source/store/epalclasses/epalclasses.transformers.ts
source/store/epalclasses/epalclasses.transformers.ts
+3
-10
source/store/epalclasses/epalclasses.types.ts
source/store/epalclasses/epalclasses.types.ts
+4
-6
source/store/epalclasses/index.ts
source/store/epalclasses/index.ts
+8
-7
source/store/index.ts
source/store/index.ts
+39
-34
source/store/logininfo/index.ts
source/store/logininfo/index.ts
+8
-7
source/store/logininfo/logininfo.initial-state.ts
source/store/logininfo/logininfo.initial-state.ts
+4
-4
source/store/logininfo/logininfo.reducer.ts
source/store/logininfo/logininfo.reducer.ts
+45
-56
source/store/logininfo/logininfo.transformers.ts
source/store/logininfo/logininfo.transformers.ts
+3
-21
source/store/logininfo/logininfo.types.ts
source/store/logininfo/logininfo.types.ts
+5
-3
source/store/regionschools/index.ts
source/store/regionschools/index.ts
+11
-8
source/store/regionschools/regionschools.initial-state.ts
source/store/regionschools/regionschools.initial-state.ts
+4
-4
source/store/regionschools/regionschools.reducer.ts
source/store/regionschools/regionschools.reducer.ts
+64
-63
source/store/regionschools/regionschools.transformers.ts
source/store/regionschools/regionschools.transformers.ts
+3
-12
source/store/regionschools/regionschools.types.ts
source/store/regionschools/regionschools.types.ts
+9
-5
source/store/sectorcourses/index.ts
source/store/sectorcourses/index.ts
+11
-8
source/store/sectorcourses/sectorcourses.initial-state.ts
source/store/sectorcourses/sectorcourses.initial-state.ts
+4
-4
source/store/sectorcourses/sectorcourses.reducer.ts
source/store/sectorcourses/sectorcourses.reducer.ts
+31
-33
source/store/sectorcourses/sectorcourses.transformers.ts
source/store/sectorcourses/sectorcourses.transformers.ts
+3
-12
source/store/sectorcourses/sectorcourses.types.ts
source/store/sectorcourses/sectorcourses.types.ts
+7
-3
source/store/sectorfields/index.ts
source/store/sectorfields/index.ts
+7
-7
source/store/sectorfields/sectorfields.initial-state.ts
source/store/sectorfields/sectorfields.initial-state.ts
+4
-4
source/store/sectorfields/sectorfields.reducer.ts
source/store/sectorfields/sectorfields.reducer.ts
+27
-30
source/store/sectorfields/sectorfields.transformers.ts
source/store/sectorfields/sectorfields.transformers.ts
+3
-11
source/store/sectorfields/sectorfields.types.ts
source/store/sectorfields/sectorfields.types.ts
+4
-2
source/store/store.ts
source/store/store.ts
+27
-39
source/store/studentdatafields/index.ts
source/store/studentdatafields/index.ts
+7
-7
source/store/studentdatafields/studentdatafields.initial-state.ts
...tore/studentdatafields/studentdatafields.initial-state.ts
+4
-4
source/store/studentdatafields/studentdatafields.reducer.ts
source/store/studentdatafields/studentdatafields.reducer.ts
+24
-27
source/store/studentdatafields/studentdatafields.transformers.ts
...store/studentdatafields/studentdatafields.transformers.ts
+3
-18
source/store/studentdatafields/studentdatafields.types.ts
source/store/studentdatafields/studentdatafields.types.ts
+23
-21
source/typings.d.ts
source/typings.d.ts
+1
-0
tsconfig.json
tsconfig.json
+2
-1
webpack.config.js
webpack.config.js
+141
-104
webpack.prod.js
webpack.prod.js
+145
-107
No files found.
drupal/modules/epal/src/Controller/HelpDesk.php
View file @
143dc6c9
<?php
/**
* @file
* Contains \Drupal\query_example\Controller\QueryExampleController
.
* Contains \Drupal\query_example\Controller\QueryExampleController
*/
namespace
Drupal\epal\Controller
;
...
...
@@ -20,8 +20,6 @@ use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use
Drupal\Core\TypedData\Plugin\DataType\TimeStamp
;
use
Drupal\Core\Language\LanguageManagerInterface
;
class
HelpDesk
extends
ControllerBase
{
protected
$entity_query
;
...
...
@@ -35,12 +33,11 @@ class HelpDesk extends ControllerBase {
Connection
$connection
,
LoggerChannelFactoryInterface
$loggerChannel
)
{
$this
->
entityTypeManager
=
$entityTypeManager
;
$this
->
entity_query
=
$entity_query
;
$connection
=
Database
::
getConnection
();
$this
->
connection
=
$connection
;
$this
->
logger
=
$loggerChannel
->
get
(
'epal'
);
$this
->
entityTypeManager
=
$entityTypeManager
;
$this
->
entity_query
=
$entity_query
;
$connection
=
Database
::
getConnection
();
$this
->
connection
=
$connection
;
$this
->
logger
=
$loggerChannel
->
get
(
'epal'
);
}
public
static
function
create
(
ContainerInterface
$container
)
...
...
@@ -53,44 +50,36 @@ class HelpDesk extends ControllerBase {
);
}
private
function
respondWithStatus
(
$arr
,
$s
)
{
$res
=
new
JsonResponse
(
$arr
);
$res
->
setStatusCode
(
$s
);
return
$res
;
}
public
function
sendEmail
(
Request
$request
)
public
function
sendEmail
(
Request
$request
)
{
if
(
!
$request
->
isMethod
(
'POST'
))
{
return
$this
->
respondWithStatus
([
"message"
=>
t
(
"Method Not Allowed"
)
],
Response
::
HTTP_METHOD_NOT_ALLOWED
);
"message"
=>
t
(
"Method Not Allowed"
)
],
Response
::
HTTP_METHOD_NOT_ALLOWED
);
}
$postData
=
null
;
if
(
$content
=
$request
->
getContent
())
{
$postData
=
json_decode
(
$content
);
$this
->
sendEmailToHelpDesk
(
$postData
->
userEmail
,
$postData
->
userName
,
$postData
->
userMessage
,
$postData
->
userSurname
);
return
$this
->
respondWithStatus
([
'error_code'
=>
0
,
],
Response
::
HTTP_OK
);
}
else
{
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"post with no data"
),
],
Response
::
HTTP_BAD_REQUEST
);
}
$postData
=
null
;
if
(
$content
=
$request
->
getContent
())
{
$postData
=
json_decode
(
$content
);
$this
->
sendEmailToHelpDesk
(
$postData
->
userEmail
,
$postData
->
userName
,
$postData
->
userMessage
,
$postData
->
userSurname
);
return
$this
->
respondWithStatus
([
'error_code'
=>
0
,
],
Response
::
HTTP_OK
);
}
else
{
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"post with no data"
),
],
Response
::
HTTP_BAD_REQUEST
);
}
}
private
function
sendEmailToHelpDesk
(
$email
,
$name
,
$cont_message
,
$surname
)
{
$mailManager
=
\
Drupal
::
service
(
'plugin.manager.mail'
);
...
...
@@ -113,50 +102,26 @@ class HelpDesk extends ControllerBase {
return
;
}
public
function
findTotalStudents
(
Request
$request
)
public
function
findTotalStudents
(
Request
$request
)
{
$authToken
=
$request
->
headers
->
get
(
'PHP_AUTH_USER'
);
$users
=
$this
->
entityTypeManager
->
getStorage
(
'user'
)
->
loadByProperties
(
array
(
'name'
=>
$authToken
));
$user
=
reset
(
$users
);
if
(
!
$user
)
{
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"User not found"
),
],
Response
::
HTTP_FORBIDDEN
);
}
$list
=
array
();
$sCon
=
$this
->
connection
->
select
(
'epal_student'
,
'eStudent'
)
->
fields
(
'eStudent'
,
array
(
'id'
));
$numApplications
=
$sCon
->
countQuery
()
->
execute
()
->
fetchField
();
array_push
(
$list
,
(
object
)
array
(
'name'
=>
"Αριθμός Αιτήσεων (συνολικά)"
,
'numStudents'
=>
$numApplications
));
$authToken
=
$request
->
headers
->
get
(
'PHP_AUTH_USER'
);
$users
=
$this
->
entityTypeManager
->
getStorage
(
'user'
)
->
loadByProperties
(
array
(
'name'
=>
$authToken
));
$user
=
reset
(
$users
);
if
(
!
$user
)
{
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"User not found"
),
],
Response
::
HTTP_FORBIDDEN
);
}
//user role validation
$roles
=
$user
->
getRoles
();
$validRole
=
false
;
foreach
(
$roles
as
$role
)
{
if
(
$role
===
"applicant"
)
{
$validRole
=
true
;
break
;
}
}
if
(
!
$validRole
)
{
return
$this
->
respondWithStatus
([
'message'
=>
t
(
"User Invalid Role"
),
],
Response
::
HTTP_FORBIDDEN
);
}
$list
=
array
();
$sCon
=
$this
->
connection
->
select
(
'epal_student'
,
'eStudent'
)
->
fields
(
'eStudent'
,
array
(
'id'
));
$numApplications
=
$sCon
->
countQuery
()
->
execute
()
->
fetchField
();
array_push
(
$list
,
(
object
)
array
(
'name'
=>
"Αριθμός Αιτήσεων (συνολικά)"
,
'numStudents'
=>
$numApplications
));
return
$this
->
respondWithStatus
(
$list
,
Response
::
HTTP_OK
);
return
$this
->
respondWithStatus
(
$list
,
Response
::
HTTP_OK
);
}
}
package-lock.json
0 → 100644
View file @
143dc6c9
This diff is collapsed.
Click to expand it.
package.json
View file @
143dc6c9
...
...
@@ -12,54 +12,51 @@
"typings"
:
"rimraf typings/ && typings install"
},
"devDependencies"
:
{
"
@types/d3
"
:
"
^4.8.0
"
,
"
@types/node
"
:
"
^6.0.48
"
,
"
@types/redux-logger
"
:
"
^3.0.0
"
,
"
@types/systemjs
"
:
"
^0.20.2
"
,
"
angular2-router-loader
"
:
"
^0.3.4
"
,
"
angular2-template-loader
"
:
"
^0.6.0
"
,
"
babel-core
"
:
"
^6.20.0
"
,
"
babel-loader
"
:
"
^6.2.9
"
,
"
babel-preset-env
"
:
"
^1.1.4
"
,
"
babel-preset-es2015
"
:
"
^6.18.0
"
,
"
babel-preset-stage-1
"
:
"
^6.16.0
"
,
"
babili-webpack-plugin
"
:
"
^0.1.1
"
,
"
bootstrap-loader
"
:
"
^2.0.0-beta.20
"
,
"
css-loader
"
:
"
^0.25.0
"
,
"
node-sass
"
:
"
^4.5.0
"
,
"
redux-logger
"
:
"
^2.7.4
"
,
"
resolve-url-loader
"
:
"
^1.6.1
"
,
"
sass-loader
"
:
"
^4.1.1
"
,
"
style-loader
"
:
"
^0.13.1
"
,
"
to-string-loader
"
:
"
^1.1.5
"
,
"
tslint
"
:
"
^3.15.1
"
,
"
tslint-loader
"
:
"
^2.1.5
"
,
"
typescript
"
:
"
^2.0.10
"
,
"
url-loader
"
:
"
^0.5.7
"
,
"
webpack
"
:
"
^1.14.0
"
,
"
webpack-cleanup-plugin
"
:
"
^0.5.1
"
,
"
webpack-closure-compiler
"
:
"
^2.1.4
"
,
"
webpack-dashboard
"
:
"
^0.2.0
"
,
"
webpack-dev-server
"
:
"
^1.16.2
"
},
"dependencies"
:
{
"
@angular/common
"
:
"
^2.0.0
"
,
"
@angular/compiler
"
:
"
^2.0.0
"
,
"
@angular/core
"
:
"
^2.0.0
"
,
"
@angular/forms
"
:
"
^2.0.0
"
,
"
@angular/http
"
:
"
^2.0.0
"
,
"
@angular/platform-browser
"
:
"
^2.0.0
"
,
"
@angular/platform-browser-dynamic
"
:
"
^2.0.0
"
,
"
@angular/router
"
:
"
^3.2.0
"
,
"
@angular-redux/store
"
:
"
^6.5.7
"
,
"
@angular/animations
"
:
"
^4.3.1
"
,
"
@angular/common
"
:
"
^4.3.1
"
,
"
@angular/compiler
"
:
"
^4.3.1
"
,
"
@angular/compiler-cli
"
:
"
^4.3.1
"
,
"
@angular/core
"
:
"
^4.3.1
"
,
"
@angular/forms
"
:
"
^4.3.1
"
,
"
@angular/http
"
:
"
^4.3.1
"
,
"
@angular/platform-browser
"
:
"
^4.3.1
"
,
"
@angular/platform-browser-dynamic
"
:
"
^4.3.1
"
,
"
@angular/platform-server
"
:
"
^4.3.1
"
,
"
@angular/router
"
:
"
^4.3.1
"
,
"
@ngui/auto-complete
"
:
"
^0.13.3
"
,
"
@types/d3
"
:
"
^4.10.0
"
,
"
@types/file-saver
"
:
"
0.0.1
"
,
"
@types/jquery
"
:
"
^2.0.4
1
"
,
"
@types/node
"
:
"
^6.0.
60
"
,
"
@types/jquery
"
:
"
^2.0.4
8
"
,
"
@types/node
"
:
"
^6.0.
85
"
,
"
@types/node-sass
"
:
"
^3.10.32
"
,
"
babel-polyfill
"
:
"
^6.20.0
"
,
"
babel-core
"
:
"
^6.25.0
"
,
"
babel-loader
"
:
"
^6.4.1
"
,
"
babel-polyfill
"
:
"
^6.23.0
"
,
"
babel-preset-env
"
:
"
^1.6.0
"
,
"
babel-preset-es2015
"
:
"
^6.24.1
"
,
"
babel-preset-stage-1
"
:
"
^6.24.1
"
,
"
bootstrap
"
:
"
^4.0.0-alpha.6
"
,
"
core-js
"
:
"
^2.4.1
"
,
"
css-loader
"
:
"
^0.25.0
"
,
"
d3
"
:
"
^4.
4
.0
"
,
"
d3
"
:
"
^4.
10
.0
"
,
"
es6-promise
"
:
"
^4.0.5
"
,
"
es6-shim
"
:
"
^0.35.0
"
,
"
file-loader
"
:
"
^0.9.0
"
,
...
...
@@ -68,22 +65,25 @@
"
fs-writefile-promise
"
:
"
^2.0.0
"
,
"
html-webpack-plugin
"
:
"
^2.24.1
"
,
"
immutable
"
:
"
^3.8.1
"
,
"
jquery
"
:
"
^3.1.1
"
,
"
mydatepicker
"
:
"
^2.0.13
"
,
"
ng2-redux
"
:
"
^5.1.0
"
,
"
ng2-smart-table
"
:
"
^0.4.0-5
"
,
"
jquery
"
:
"
^3.2.1
"
,
"
mydatepicker
"
:
"
^2.0.26
"
,
"
ng2-smart-table
"
:
"
^1.2.1
"
,
"
ngx-cookie
"
:
"
^1.0.0
"
,
"
ngx-uploader
"
:
"
^2.2.5
"
,
"
raw-loader
"
:
"
^0.5.1
"
,
"
redux
"
:
"
^3.6.0
"
,
"
redux
"
:
"
^3.7.2
"
,
"
redux-logger
"
:
"
^3.0.6
"
,
"
reflect-metadata
"
:
"
0.1.8
"
,
"
rimraf
"
:
"
^2.4.3
"
,
"
roboto-fontface
"
:
"
^0.7.
0
"
,
"
roboto-fontface
"
:
"
^0.7.
1
"
,
"
rxjs
"
:
"
^5.0.0-rc.3
"
,
"
style-loader
"
:
"
^0.13.1
"
,
"
ts-loader
"
:
"
^1.2.1
"
,
"
typed-immutable-record
"
:
"
0.0.6
"
,
"
typescript
"
:
"
^2.4.2
"
,
"
url-loader
"
:
"
^0.5.7
"
,
"
webpack
"
:
"
^1.13.3
"
,
"
zone.js
"
:
"
>=0.6.26
"
"
webpack-closure-compiler
"
:
"
^2.1.5
"
,
"
zone.js
"
:
"
^0.8.14
"
}
}
source/actions/coursefields.actions.ts
deleted
100644 → 0
View file @
96f089d9
import
{
COURSEFIELDS_RECEIVED
,
COURSEFIELDS_SELECTED_SAVE
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
ng2-redux
'
;
import
{
IAppState
}
from
'
../store
'
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
@
Injectable
()
export
class
CourseFieldsActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{}
getCourseFields
=
()
=>
{
const
{
courseFields
}
=
this
.
_ngRedux
.
getState
();
if
(
courseFields
.
size
===
0
)
{
return
this
.
_hds
.
getCourseFields
().
then
(
courseFields
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
COURSEFIELDS_RECEIVED
,
payload
:
{
courseFields
}
});
});
}
};
saveCourseFieldsSelected
=
(
courseFieldsSelected
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
COURSEFIELDS_SELECTED_SAVE
,
payload
:
{
courseFieldsSelected
}
});
};
}
source/actions/criteria.actions.ts
deleted
100644 → 0
View file @
96f089d9
import
{
CRITERIA_RECEIVED
,
CRITERIA_SAVE
,
CRITERIA_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
ng2-redux
'
;
import
{
IAppState
}
from
'
../store
'
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
@
Injectable
()
export
class
CriteriaActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{}
getCriteria
=
(
reload
)
=>
{
const
{
criter
}
=
this
.
_ngRedux
.
getState
();
//if (sectorFields.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
criter
.
size
===
0
))
{
return
this
.
_hds
.
getCriteria
().
then
(
criteria
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
CRITERIA_RECEIVED
,
payload
:
{
criteria
}
});
});
}
};
saveCriteria
=
(
criter
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
CRITERIA_SAVE
,
payload
:
{
criter
}
});
};
initCriteria
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
CRITERIA_INIT
,
payload
:
{
}
});
};
}
source/actions/epalclass.actions.ts
View file @
143dc6c9
import
{
EPALCLASSES_SAVE
}
from
'
../constants
'
;
import
{
EPALCLASSES_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
ng2-redux
'
;
import
{
IAppState
}
from
'
../store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
EPALCLASSES_SAVE
}
from
"
../constants
"
;
import
{
EPALCLASSES_INIT
}
from
"
../constants
"
;
import
{
IAppState
}
from
"
../store
"
;
@
Injectable
()
export
class
EpalClassesActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
saveEpalClassesSelected
=
(
epalClasses
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
EPALCLASSES_SAVE
,
payload
:
{
epalClasses
}
});
};
saveEpalClassesSelected
=
(
epalClasses
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
EPALCLASSES_SAVE
,
payload
:
{
epalClasses
}
});
};
initEpalClasses
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
EPALCLASSES_INIT
,
payload
:
{
}
});
};
initEpalClasses
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
EPALCLASSES_INIT
,
payload
:
{
}
});
};
}
source/actions/index.ts
View file @
143dc6c9
import
{
CourseFieldsActions
}
from
'
./coursefields.actions
'
;
import
{
SectorFieldsActions
}
from
'
./sectorfields.actions
'
;
import
{
RegionSchoolsActions
}
from
'
./regionschools.actions
'
;
import
{
SectorCoursesActions
}
from
'
./sectorcourses.actions
'
;
import
{
StudentDataFieldsActions
}
from
'
./studentdatafields.actions
'
;
import
{
EpalClassesActions
}
from
'
./epalclass.actions
'
;
import
{
LoginInfoActions
}
from
'
./logininfo.actions
'
;
import
{
CriteriaActions
}
from
'
./criteria.actions
'
;
import
{
SectorFieldsActions
}
from
"
./sectorfields.actions
"
;
import
{
RegionSchoolsActions
}
from
"
./regionschools.actions
"
;
import
{
SectorCoursesActions
}
from
"
./sectorcourses.actions
"
;
import
{
StudentDataFieldsActions
}
from
"
./studentdatafields.actions
"
;
import
{
EpalClassesActions
}
from
"
./epalclass.actions
"
;
import
{
LoginInfoActions
}
from
"
./logininfo.actions
"
;
const
ACTION_PROVIDERS
=
[
CourseFieldsActions
,
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfoActions
,
CriteriaActions
];
const
ACTION_PROVIDERS
=
[
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfoActions
];
export
{
CourseFieldsActions
,
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfoActions
,
CriteriaActions
,
ACTION_PROVIDERS
,
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfoActions
,
ACTION_PROVIDERS
,
};
source/actions/logininfo.actions.ts
View file @
143dc6c9
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
LOGININFO_RECEIVED
,
STATEMENTAGREE_SAVE
}
from
'
../constants
'
;
import
{
LOGININFO_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
ng2-redux
'
;
import
{
IAppState
}
from
'
../store
'
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
STATEMENTAGREE_SAVE
}
from
"
../constants
"
;
import
{
LOGININFO_INIT
}
from
"
../constants
"
;
import
{
HelperDataService
}
from
"
../services/helper-data-service
"
;
import
{
IAppState
}
from
"
../store
"
;
@
Injectable
()
export
class
LoginInfoActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{}
getloginInfo
=
(
loginInfo
)
=>
{
return
this
.
_hds
.
getCurrentUser
(
loginInfo
.
auth_token
,
loginInfo
.
auth_role
).
then
(
loginInfos
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
payload
:
{
loginInfos
}
});
});
}
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
saveMinEduloginInfo
=
(
loginInfos
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
payload
:
{
loginInfos
getloginInfo
=
(
loginInfo
)
=>
{
return
this
.
_hds
.
getCurrentUser
(
loginInfo
.
auth_token
,
loginInfo
.
auth_role
).
then
(
loginInfos
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
payload
:
{
loginInfos
}
});
});
}
});
};
saveProfile
=
(
profile
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
PROFILE_SAVE
,
payload
:
{
profile
}
});
};
saveStatementAgree
=
(
disclaimer_checked
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
STATEMENTAGREE_SAVE
,
payload
:
{
disclaimer_checked
}
});
};
initLoginInfo
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_INIT
,
payload
:
{
}
});
};
saveMinEduloginInfo
=
(
loginInfos
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
payload
:
{
loginInfos
}
});
};
saveProfile
=
(
profile
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
PROFILE_SAVE
,
payload
:
{
profile
}
});
};
saveStatementAgree
=
(
disclaimer_checked
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
STATEMENTAGREE_SAVE
,
payload
:
{
disclaimer_checked
}