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
b3b0fba0
Commit
b3b0fba0
authored
Jul 28, 2017
by
Χάρης Παπαδόπουλος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typescript warnings. NgRedux.select() rewrite. Other fixes
parent
d91d67ab
Changes
124
Show whitespace changes
Inline
Side-by-side
Showing
124 changed files
with
3163 additions
and
3857 deletions
+3163
-3857
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
-22
source/actions/index.ts
source/actions/index.ts
+15
-20
source/actions/logininfo.actions.ts
source/actions/logininfo.actions.ts
+56
-56
source/actions/regionschools.actions.ts
source/actions/regionschools.actions.ts
+44
-60
source/actions/sectorcourses.actions.ts
source/actions/sectorcourses.actions.ts
+36
-52
source/actions/sectorfields.actions.ts
source/actions/sectorfields.actions.ts
+6
-6
source/actions/studentdatafields.actions.ts
source/actions/studentdatafields.actions.ts
+15
-17
source/app.routes.ts
source/app.routes.ts
+4
-4
source/app.settings.deployment.ts
source/app.settings.deployment.ts
+8
-8
source/app.ts
source/app.ts
+50
-51
source/components/director/director-classcapacity.ts
source/components/director/director-classcapacity.ts
+18
-19
source/components/director/director-view.ts
source/components/director/director-view.ts
+37
-38
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
+20
-30
source/components/home.ts
source/components/home.ts
+28
-31
source/components/infoviews/eduadmin-view.ts
source/components/infoviews/eduadmin-view.ts
+4
-5
source/components/infoviews/perfecture-view.ts
source/components/infoviews/perfecture-view.ts
+1
-2
source/components/main/breadcrumbs.ts
source/components/main/breadcrumbs.ts
+16
-18
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
+90
-92
source/components/minister/csv-creator.ts
source/components/minister/csv-creator.ts
+92
-92
source/components/minister/minister-informstudents.ts
source/components/minister/minister-informstudents.ts
+32
-37
source/components/minister/minister-reports.ts
source/components/minister/minister-reports.ts
+20
-21
source/components/minister/minister-settings.ts
source/components/minister/minister-settings.ts
+42
-44
source/components/minister/minister-view.ts
source/components/minister/minister-view.ts
+120
-128
source/components/minister/report-all-stat.ts
source/components/minister/report-all-stat.ts
+108
-129
source/components/minister/report-general.ts
source/components/minister/report-general.ts
+22
-24
source/components/minister/report-no-capacity.ts
source/components/minister/report-no-capacity.ts
+41
-44
source/components/minister/report-users.ts
source/components/minister/report-users.ts
+16
-14
source/components/minister/reports-schema.ts
source/components/minister/reports-schema.ts
+187
-187
source/components/ministry.home.ts
source/components/ministry.home.ts
+39
-42
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
+42
-40
source/components/school.home.ts
source/components/school.home.ts
+8
-9
source/components/student-application-form/after.submit.ts
source/components/student-application-form/after.submit.ts
+24
-27
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
+34
-38
source/components/student-application-form/application.preview.ts
...omponents/student-application-form/application.preview.ts
+31
-31
source/components/student-application-form/application.submit.ts
...components/student-application-form/application.submit.ts
+32
-56
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
+52
-52
source/components/student-application-form/epal.class.select.ts
.../components/student-application-form/epal.class.select.ts
+58
-60
source/components/student-application-form/help-desk.ts
source/components/student-application-form/help-desk.ts
+22
-23
source/components/student-application-form/info.ts
source/components/student-application-form/info.ts
+8
-8
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
+44
-43
source/components/student-application-form/region.schools.select.ts
...ponents/student-application-form/region.schools.select.ts
+95
-120
source/components/student-application-form/schools-order-select.ts
...mponents/student-application-form/schools-order-select.ts
+18
-29
source/components/student-application-form/sector.courses.select.ts
...ponents/student-application-form/sector.courses.select.ts
+48
-48
source/components/student-application-form/sector.fields.select.ts
...mponents/student-application-form/sector.fields.select.ts
+34
-34
source/components/student-application-form/submited.aplication.preview.ts
...s/student-application-form/submited.aplication.preview.ts
+21
-29
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
-59
source/containers/globalstyles.css
source/containers/globalstyles.css
+65
-58
source/containers/main.routes.ts
source/containers/main.routes.ts
+114
-120
source/containers/main.ts
source/containers/main.ts
+39
-55
source/guards/eduadmin.auth.guard.ts
source/guards/eduadmin.auth.guard.ts
+16
-16
source/guards/ministry.auth.guard.ts
source/guards/ministry.auth.guard.ts
+16
-16
source/guards/regionedu.auth.guard.ts
source/guards/regionedu.auth.guard.ts
+16
-16
source/guards/reports.auth.guard.ts
source/guards/reports.auth.guard.ts
+16
-17
source/guards/school.auth.guard.ts
source/guards/school.auth.guard.ts
+16
-16
source/guards/school.capacity.locked.guard.ts
source/guards/school.capacity.locked.guard.ts
+16
-16
source/guards/school.students.locked.guard.ts
source/guards/school.students.locked.guard.ts
+16
-16
source/guards/student.auth.guard.ts
source/guards/student.auth.guard.ts
+18
-18
source/guards/student.lock.guard.ts
source/guards/student.lock.guard.ts
+17
-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
+44
-44
source/services/helper-data-service.ts
source/services/helper-data-service.ts
+28
-78
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
+2
-2
source/store/epalclasses/epalclasses.reducer.ts
source/store/epalclasses/epalclasses.reducer.ts
+13
-16
source/store/epalclasses/epalclasses.transformers.ts
source/store/epalclasses/epalclasses.transformers.ts
+2
-5
source/store/epalclasses/epalclasses.types.ts
source/store/epalclasses/epalclasses.types.ts
+3
-6
source/store/epalclasses/index.ts
source/store/epalclasses/index.ts
+7
-7
source/store/index.ts
source/store/index.ts
+30
-48
source/store/logininfo/index.ts
source/store/logininfo/index.ts
+7
-7
source/store/logininfo/logininfo.initial-state.ts
source/store/logininfo/logininfo.initial-state.ts
+2
-3
source/store/logininfo/logininfo.reducer.ts
source/store/logininfo/logininfo.reducer.ts
+41
-41
source/store/logininfo/logininfo.transformers.ts
source/store/logininfo/logininfo.transformers.ts
+1
-1
source/store/logininfo/logininfo.types.ts
source/store/logininfo/logininfo.types.ts
+1
-1
source/store/regionschools/index.ts
source/store/regionschools/index.ts
+11
-11
source/store/regionschools/regionschools.initial-state.ts
source/store/regionschools/regionschools.initial-state.ts
+3
-5
source/store/regionschools/regionschools.reducer.ts
source/store/regionschools/regionschools.reducer.ts
+56
-56
source/store/regionschools/regionschools.transformers.ts
source/store/regionschools/regionschools.transformers.ts
+1
-13
source/store/regionschools/regionschools.types.ts
source/store/regionschools/regionschools.types.ts
+4
-4
source/store/sectorcourses/index.ts
source/store/sectorcourses/index.ts
+8
-8
source/store/sectorcourses/sectorcourses.initial-state.ts
source/store/sectorcourses/sectorcourses.initial-state.ts
+2
-3
source/store/sectorcourses/sectorcourses.reducer.ts
source/store/sectorcourses/sectorcourses.reducer.ts
+35
-35
source/store/sectorcourses/sectorcourses.transformers.ts
source/store/sectorcourses/sectorcourses.transformers.ts
+4
-4
source/store/sectorcourses/sectorcourses.types.ts
source/store/sectorcourses/sectorcourses.types.ts
+1
-1
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
+2
-3
source/store/sectorfields/sectorfields.reducer.ts
source/store/sectorfields/sectorfields.reducer.ts
+28
-28
source/store/sectorfields/sectorfields.transformers.ts
source/store/sectorfields/sectorfields.transformers.ts
+2
-6
source/store/sectorfields/sectorfields.types.ts
source/store/sectorfields/sectorfields.types.ts
+1
-1
source/store/store.ts
source/store/store.ts
+21
-34
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
+2
-3
source/store/studentdatafields/studentdatafields.reducer.ts
source/store/studentdatafields/studentdatafields.reducer.ts
+25
-25
source/store/studentdatafields/studentdatafields.transformers.ts
...store/studentdatafields/studentdatafields.transformers.ts
+13
-12
source/store/studentdatafields/studentdatafields.types.ts
source/store/studentdatafields/studentdatafields.types.ts
+20
-20
webpack.config.js
webpack.config.js
+141
-104
webpack.prod.js
webpack.prod.js
+145
-107
No files found.
source/actions/coursefields.actions.ts
deleted
100644 → 0
View file @
d91d67ab
import
{
COURSEFIELDS_RECEIVED
,
COURSEFIELDS_SELECTED_SAVE
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
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 @
d91d67ab
import
{
CRITERIA_RECEIVED
,
CRITERIA_SAVE
,
CRITERIA_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
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 @
b3b0fba0
import
{
EPALCLASSES_SAVE
}
from
'
../constants
'
;
import
{
EPALCLASSES_SAVE
}
from
"
../constants
"
;
import
{
EPALCLASSES_INIT
}
from
'
../constants
'
;
import
{
EPALCLASSES_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
@
Injectable
()
@
Injectable
()
export
class
EpalClassesActions
{
export
class
EpalClassesActions
{
constructor
(
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
saveEpalClassesSelected
=
(
epalClasses
)
=>
{
saveEpalClassesSelected
=
(
epalClasses
)
=>
{
...
...
source/actions/index.ts
View file @
b3b0fba0
import
{
CourseFieldsActions
}
from
'
./coursefields.actions
'
;
import
{
SectorFieldsActions
}
from
"
./sectorfields.actions
"
;
import
{
SectorFieldsActions
}
from
'
./sectorfields.actions
'
;
import
{
RegionSchoolsActions
}
from
"
./regionschools.actions
"
;
import
{
RegionSchoolsActions
}
from
'
./regionschools.actions
'
;
import
{
SectorCoursesActions
}
from
"
./sectorcourses.actions
"
;
import
{
SectorCoursesActions
}
from
'
./sectorcourses.actions
'
;
import
{
StudentDataFieldsActions
}
from
"
./studentdatafields.actions
"
;
import
{
StudentDataFieldsActions
}
from
'
./studentdatafields.actions
'
;
import
{
EpalClassesActions
}
from
"
./epalclass.actions
"
;
import
{
EpalClassesActions
}
from
'
./epalclass.actions
'
;
import
{
LoginInfoActions
}
from
"
./logininfo.actions
"
;
import
{
LoginInfoActions
}
from
'
./logininfo.actions
'
;
import
{
CriteriaActions
}
from
'
./criteria.actions
'
;
const
ACTION_PROVIDERS
=
[
CourseFieldsActions
,
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
const
ACTION_PROVIDERS
=
[
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfoActions
,
Criteria
Actions
];
EpalClassesActions
,
LoginInfo
Actions
];
export
{
export
{
CourseFieldsActions
,
SectorFieldsActions
,
SectorFieldsActions
,
RegionSchoolsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
EpalClassesActions
,
LoginInfoActions
,
LoginInfoActions
,
ACTION_PROVIDERS
,
CriteriaActions
,
ACTION_PROVIDERS
,
};
};
source/actions/logininfo.actions.ts
View file @
b3b0fba0
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
LOGININFO_RECEIVED
,
STATEMENTAGREE_SAVE
}
from
'
../constants
'
;
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
LOGININFO_RECEIVED
,
STATEMENTAGREE_SAVE
}
from
"
../constants
"
;
import
{
LOGININFO_INIT
}
from
'
../constants
'
;
import
{
LOGININFO_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
import
{
HelperDataService
}
from
"
../services/helper-data-service
"
;
@
Injectable
()
@
Injectable
()
export
class
LoginInfoActions
{
export
class
LoginInfoActions
{
constructor
(
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
private
_hds
:
HelperDataService
)
{
}
getloginInfo
=
(
loginInfo
)
=>
{
getloginInfo
=
(
loginInfo
)
=>
{
return
this
.
_hds
.
getCurrentUser
(
loginInfo
.
auth_token
,
loginInfo
.
auth_role
).
then
(
loginInfos
=>
{
return
this
.
_hds
.
getCurrentUser
(
loginInfo
.
auth_token
,
loginInfo
.
auth_role
).
then
(
loginInfos
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
type
:
LOGININFO_SAVE
,
payload
:
{
payload
:
{
...
@@ -21,7 +21,7 @@ export class LoginInfoActions {
...
@@ -21,7 +21,7 @@ export class LoginInfoActions {
}
}
});
});
});
});
}
}
saveMinEduloginInfo
=
(
loginInfos
)
=>
{
saveMinEduloginInfo
=
(
loginInfos
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
...
@@ -30,25 +30,25 @@ export class LoginInfoActions {
...
@@ -30,25 +30,25 @@ export class LoginInfoActions {
loginInfos
loginInfos
}
}
});
});
};
};
saveProfile
=
(
profile
)
=>
{
saveProfile
=
(
profile
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
PROFILE_SAVE
,
type
:
PROFILE_SAVE
,
payload
:
{
payload
:
{
profile
profile
}
}
});
});
};
};
saveStatementAgree
=
(
disclaimer_checked
)
=>
{
saveStatementAgree
=
(
disclaimer_checked
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
STATEMENTAGREE_SAVE
,
type
:
STATEMENTAGREE_SAVE
,
payload
:
{
payload
:
{
disclaimer_checked
disclaimer_checked
}
}
});
});
};
};
initLoginInfo
=
()
=>
{
initLoginInfo
=
()
=>
{
...
...
source/actions/regionschools.actions.ts
View file @
b3b0fba0
import
{
REGIONSCHOOLS_RECEIVED
,
REGIONSCHOOLS_SELECTED_SAVE
,
REGIONSCHOOLS_ORDER_SAVE
,
REGIONSCHOOLS_INIT
}
from
'
../constants
'
;
import
{
REGIONSCHOOLS_RECEIVED
,
REGIONSCHOOLS_SELECTED_SAVE
,
REGIONSCHOOLS_ORDER_SAVE
,
REGIONSCHOOLS_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
import
{
HelperDataService
}
from
"
../services/helper-data-service
"
;
@
Injectable
()
@
Injectable
()
export
class
RegionSchoolsActions
{
export
class
RegionSchoolsActions
{
constructor
(
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
private
_hds
:
HelperDataService
)
{
}
getRegionSchools
=
(
classActive
,
courseActive
,
reload
)
=>
{
getRegionSchools
=
(
classActive
,
courseActive
,
reload
)
=>
{
const
{
regions
}
=
this
.
_ngRedux
.
getState
();
const
{
regions
}
=
this
.
_ngRedux
.
getState
();
if
(
reload
===
true
||
(
reload
===
false
&&
regions
.
size
===
0
))
{
if
(
reload
===
true
||
(
reload
===
false
&&
regions
.
size
===
0
))
{
return
this
.
_hds
.
getRegionsWithSchools
(
classActive
,
courseActive
).
then
(
regions
=>
{
return
this
.
_hds
.
getRegionsWithSchools
(
classActive
,
courseActive
).
then
(
regions
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_RECEIVED
,
type
:
REGIONSCHOOLS_RECEIVED
,
payload
:
{
payload
:
{
...
@@ -32,22 +32,6 @@ export class RegionSchoolsActions {
...
@@ -32,22 +32,6 @@ export class RegionSchoolsActions {
});
});
};
};
/*
getRegionSchools_Reload = (courseActive) => {
const { regions } = this._ngRedux.getState();
//if (regions.size === 0) {
return this._hds.getRegionsWithSchools(courseActive).then(regions => {
return this._ngRedux.dispatch({
type: REGIONSCHOOLS_RECEIVED,
payload: {
regions
}
});
});
//}
};
*/
saveRegionSchoolsSelected
=
(
checked
,
i
,
j
)
=>
{
saveRegionSchoolsSelected
=
(
checked
,
i
,
j
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_SELECTED_SAVE
,
type
:
REGIONSCHOOLS_SELECTED_SAVE
,
...
...
source/actions/sectorcourses.actions.ts
View file @
b3b0fba0
import
{
SECTORCOURSES_RECEIVED
,
SECTORCOURSES_SELECTED_SAVE
,
SECTORCOURSES_INIT
}
from
'
../constants
'
;
import
{
SECTORCOURSES_RECEIVED
,
SECTORCOURSES_SELECTED_SAVE
,
SECTORCOURSES_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
import
{
HelperDataService
}
from
"
../services/helper-data-service
"
;
@
Injectable
()
@
Injectable
()
export
class
SectorCoursesActions
{
export
class
SectorCoursesActions
{
constructor
(
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
private
_hds
:
HelperDataService
)
{
}
getSectorCourses
=
(
reload
)
=>
{
getSectorCourses
=
(
reload
)
=>
{
const
{
sectors
}
=
this
.
_ngRedux
.
getState
();
const
{
sectors
}
=
this
.
_ngRedux
.
getState
();
//
if (sectors.size === 0) {
//
if (sectors.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
sectors
.
size
===
0
))
{
if
(
reload
===
true
||
(
reload
===
false
&&
sectors
.
size
===
0
))
{
return
this
.
_hds
.
getSectorsWithCourses
().
then
(
sectors
=>
{
return
this
.
_hds
.
getSectorsWithCourses
().
then
(
sectors
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
...
@@ -33,23 +33,7 @@ export class SectorCoursesActions {
...
@@ -33,23 +33,7 @@ export class SectorCoursesActions {
});
});
};
};
/*
saveSectorCoursesSelected
=
(
sectorCoursesSelected
,
sectorSelected
)
=>
{
getSectorCourses_Reload = () => {
const { sectors } = this._ngRedux.getState();
//if (sectors.size === 0) {
return this._hds.getSectorsWithCourses().then(sectors => {
return this._ngRedux.dispatch({
type: SECTORCOURSES_RECEIVED,
payload: {
sectors
}
});
});
//}
};
*/
saveSectorCoursesSelected
=
(
sectorCoursesSelected
,
sectorSelected
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_SELECTED_SAVE
,
type
:
SECTORCOURSES_SELECTED_SAVE
,
payload
:
{
payload
:
{
...
...
source/actions/sectorfields.actions.ts
View file @
b3b0fba0
import
{
SECTORFIELDS_RECEIVED
,
SECTORFIELDS_SELECTED_SAVE
,
SECTORFIELDS_INIT
}
from
'
../constants
'
;
import
{
SECTORFIELDS_RECEIVED
,
SECTORFIELDS_SELECTED_SAVE
,
SECTORFIELDS_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
import
{
HelperDataService
}
from
'
../services/helper-data-service
'
;
import
{
HelperDataService
}
from
"
../services/helper-data-service
"
;
@
Injectable
()
@
Injectable
()
export
class
SectorFieldsActions
{
export
class
SectorFieldsActions
{
...
@@ -12,7 +12,7 @@ export class SectorFieldsActions {
...
@@ -12,7 +12,7 @@ export class SectorFieldsActions {
getSectorFields
=
(
reload
)
=>
{
getSectorFields
=
(
reload
)
=>
{
const
{
sectorFields
}
=
this
.
_ngRedux
.
getState
();
const
{
sectorFields
}
=
this
.
_ngRedux
.
getState
();
//if (sectorFields.size === 0) {
//
if (sectorFields.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
sectorFields
.
size
===
0
))
{
if
(
reload
===
true
||
(
reload
===
false
&&
sectorFields
.
size
===
0
))
{
return
this
.
_hds
.
getSectorFields
().
then
(
sectorFields
=>
{
return
this
.
_hds
.
getSectorFields
().
then
(
sectorFields
=>
{
return
this
.
_ngRedux
.
dispatch
({
return
this
.
_ngRedux
.
dispatch
({
...
...
source/actions/studentdatafields.actions.ts
View file @
b3b0fba0
import
{
STUDENTDATAFIELDS_SAVE
,
STUDENTDATAFIELDS_INIT
}
from
'
../constants
'
;
import
{
STUDENTDATAFIELDS_SAVE
,
STUDENTDATAFIELDS_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../store
'
;
import
{
IAppState
}
from
"
../store
"
;
//import { UserDataService } from '../services/user-data-service';
@
Injectable
()
@
Injectable
()
export
class
StudentDataFieldsActions
{
export
class
StudentDataFieldsActions
{
constructor
(
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
saveStudentDataFields
=
(
studentDataFields
)
=>
{
saveStudentDataFields
=
(
studentDataFields
)
=>
{
...
...
source/app.routes.ts
View file @
b3b0fba0
import
{
RouterModule
}
from
'
@angular/router
'
;
import
{
RouterModule
}
from
"
@angular/router
"
;
import
{
MainRoutes
,
MainDeclarations
}
import
{
MainRoutes
,
MainDeclarations
}
from
'
./containers/main.routes
'
;
from
"
./containers/main.routes
"
;
export
const
routes
=
[
export
const
routes
=
[
...
MainRoutes
...
MainRoutes
...
...
source/app.settings.deployment.ts
View file @
b3b0fba0
export
const
API_ENDPOINT
=
''
;
export
const
API_ENDPOINT
=
""
;
export
const
API_ENDPOINT_PARAMS
=
''
;
export
const
API_ENDPOINT_PARAMS
=
""
;
export
class
AppSettings
{
export
class
AppSettings
{
public
static
get
API_ENDPOINT
():
string
{
public
static
get
API_ENDPOINT
():
string
{
return
''
;
return
""
;
}
}
public
static
get
API_ENDPOINT_PARAMS
():
string
{
public
static
get
API_ENDPOINT_PARAMS
():
string
{
return
''
;
return
""
;
}
}
}
}
source/app.ts
View file @
b3b0fba0
...
@@ -26,7 +26,6 @@ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
...
@@ -26,7 +26,6 @@ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import
Main
from
"
./containers/main
"
;
import
Main
from
"
./containers/main
"
;
import
{
APP_ROUTER_PROVIDERS
,
APP_DECLARATIONS
}
from
"
./app.routes
"
;
import
{
APP_ROUTER_PROVIDERS
,
APP_DECLARATIONS
}
from
"
./app.routes
"
;
/* Here we import services */
import
{
HelperDataService
}
from
"
./services/helper-data-service
"
;
import
{
HelperDataService
}
from
"
./services/helper-data-service
"
;
import
{
LoaderService
}
from
"
./services/Spinner.service
"
;
import
{
LoaderService
}
from
"
./services/Spinner.service
"
;
import
{
AuthService
}
from
"
./services/auth.service
"
;
import
{
AuthService
}
from
"
./services/auth.service
"
;
...
@@ -78,7 +77,7 @@ class MyLocalization extends NgLocalization {
...
@@ -78,7 +77,7 @@ class MyLocalization extends NgLocalization {
Main
,
FooterComponent
,
HeaderComponent
,
NavbarComponent
,
MainComponent
,
Main
,
FooterComponent
,
HeaderComponent
,
NavbarComponent
,
MainComponent
,
APP_DECLARATIONS
,
APP_DECLARATIONS
,
],
],
bootstrap
:
[
Main
],
bootstrap
:
[
Main
],
providers
:
[
providers
:
[
{
provide
:
APP_BASE_HREF
,
useValue
:
"
/
"
},
{
provide
:
APP_BASE_HREF
,
useValue
:
"
/
"
},
{
provide
:
LocationStrategy
,
useClass
:
HashLocationStrategy
},
{
provide
:
LocationStrategy
,
useClass
:
HashLocationStrategy
},
...
@@ -100,7 +99,7 @@ class MyLocalization extends NgLocalization {
...
@@ -100,7 +99,7 @@ class MyLocalization extends NgLocalization {
ReportsAuthGuard
ReportsAuthGuard
]
]
})
})
class
AppModule
{}
class
AppModule
{
}
// enableProdMode();
// enableProdMode();
platformBrowserDynamic
().
bootstrapModule
(
AppModule
);
platformBrowserDynamic
().
bootstrapModule
(
AppModule
);
source/components/director/director-classcapacity.ts
View file @
b3b0fba0
import
{
Component
,
OnInit
,
OnDestroy
,
ElementRef
,
ViewChild
}
from
"
@angular/core
"
;
import
{
Component
,
OnInit
,
OnDestroy
,
ElementRef
,
ViewChild
}
from
"
@angular/core
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
AppSettings
}
from
'
../../app.settings
'
;
import
{
AppSettings
}
from
"
../../app.settings
"
;
import
{
HelperDataService
}
from
'
../../services/helper-data-service
'
;
import
{
HelperDataService
}
from
"
../../services/helper-data-service
"
;
import
{
Observable
}
from
"
rxjs/Observable
"
;
import
{
Observable
}
from
"
rxjs/Observable
"
;
import
{
Http
,
Headers
,
RequestOptions
}
from
'
@angular/http
'
;
import
{
Http
,
Headers
,
RequestOptions
}
from
"
@angular/http
"
;
import
{
NgRedux
,
select
}
from
'
@angular-redux/store
'
;
import
{
NgRedux
,
select
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
'
../../store/store
'
;
import
{
IAppState
}
from
"
../../store/store
"
;
import
{
Router
,
ActivatedRoute
,
Params
}
from
'
@angular/router
'
;
import
{
Router
,
ActivatedRoute
,
Params
}
from
"
@angular/router
"
;
import
{
BehaviorSubject
,
Subscription
}
from
'
rxjs/Rx
'
;
import
{
BehaviorSubject
,
Subscription
}
from
"
rxjs/Rx
"
;
import
{
ILoginInfo
}
from
'
../../store/logininfo/logininfo.types
'
;
import
{
ILoginInfo
}
from
"
../../store/logininfo/logininfo.types
"
;
import
{
VALID_CAPACITY_PATTERN
}
from
'
../../constants
'
;
import
{
VALID_CAPACITY_PATTERN
}
from
"
../../constants
"
;
import
{
maxValue
}
from
'
../../constants
'
;
import
{
maxValue
}
from
"
../../constants
"
;
import
{
minValue
}
from
'
../../constants
'
;
import
{
minValue
}
from
"
../../constants
"
;
import
{
import
{
...
@@ -20,9 +20,9 @@ import {
...
@@ -20,9 +20,9 @@ import {
FormControl
,
FormControl
,
FormArray
,
FormArray
,
Validators
,
Validators
,
}
from
'
@angular/forms
'
;
}
from
"
@angular/forms
"
;
@
Component
({
@
Component
({
selector
:
'
director-classcapacity
'
,
selector
:
"
director-classcapacity
"
,
template
:
`
template
:
`
<div class = "loading" *ngIf="(showLoader | async) === true"></div>
<div class = "loading" *ngIf="(showLoader | async) === true"></div>
<div style="min-height: 500px;">
<div style="min-height: 500px;">
...
@@ -92,7 +92,7 @@ import {
...
@@ -92,7 +92,7 @@ import {
@
Injectable
()
export
default
class
DirectorClassCapacity
implements
OnInit
,
OnDestroy
{
@
Injectable
()
export
default
class
DirectorClassCapacity
implements
OnInit
,
OnDestroy
{
p
ublic
formGroup
:
FormGroup
;
p
rivate
formGroup
:
FormGroup
;
private
CapacityPerCourse$
:
BehaviorSubject
<
any
>
;
private
CapacityPerCourse$
:
BehaviorSubject
<
any
>
;
private
CapacityPerCourseSub
:
Subscription
;
private
CapacityPerCourseSub
:
Subscription
;
...
@@ -124,12 +124,11 @@ import {
...