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
Hide 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_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
IAppState
}
from
'
../store
'
;
import
{
EPALCLASSES_SAVE
}
from
"
../constants
"
;
import
{
EPALCLASSES_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
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 @
b3b0fba0
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
,
Criteria
Actions
];
const
ACTION_PROVIDERS
=
[
SectorFieldsActions
,
RegionSchoolsActions
,
SectorCoursesActions
,
StudentDataFieldsActions
,
EpalClassesActions
,
LoginInfo
Actions
];
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 @
b3b0fba0
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
LOGININFO_RECEIVED
,
STATEMENTAGREE_SAVE
}
from
'
../constants
'
;
import
{
LOGININFO_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
'
;
import
{
LOGININFO_SAVE
,
PROFILE_SAVE
,
LOGININFO_RECEIVED
,
STATEMENTAGREE_SAVE
}
from
"
../constants
"
;
import
{
LOGININFO_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
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
}
});
});
}
saveMinEduloginInfo
=
(
loginInfos
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_SAVE
,
payload
:
{
loginInfos
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
}
});
});
}
});
};
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
}
});
};
initLoginInfo
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
LOGININFO_INIT
,
payload
:
{
}
});
};
}
source/actions/regionschools.actions.ts
View file @
b3b0fba0
import
{
REGIONSCHOOLS_RECEIVED
,
REGIONSCHOOLS_SELECTED_SAVE
,
REGIONSCHOOLS_ORDER_SAVE
,
REGIONSCHOOLS_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
'
;
import
{
REGIONSCHOOLS_RECEIVED
,
REGIONSCHOOLS_SELECTED_SAVE
,
REGIONSCHOOLS_ORDER_SAVE
,
REGIONSCHOOLS_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
RegionSchoolsActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
getRegionSchools
=
(
classActive
,
courseActive
,
reload
)
=>
{
const
{
regions
}
=
this
.
_ngRedux
.
getState
();
if
(
reload
===
true
||
(
reload
===
false
&&
regions
.
size
===
0
))
{
return
this
.
_hds
.
getRegionsWithSchools
(
classActive
,
courseActive
).
then
(
regions
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_RECEIVED
,
payload
:
{
regions
}
getRegionSchools
=
(
classActive
,
courseActive
,
reload
)
=>
{
const
{
regions
}
=
this
.
_ngRedux
.
getState
();
if
(
reload
===
true
||
(
reload
===
false
&&
regions
.
size
===
0
))
{
return
this
.
_hds
.
getRegionsWithSchools
(
classActive
,
courseActive
).
then
(
regions
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_RECEIVED
,
payload
:
{
regions
}
});
});
});
}
};
initRegionSchools
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_INIT
,
payload
:
{
}
});
};
}
};
/*
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
}
});
initRegionSchools
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_INIT
,
payload
:
{
}
});
//}
};
*/
};
saveRegionSchoolsSelected
=
(
checked
,
i
,
j
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_SELECTED_SAVE
,
payload
:
{
checked
:
checked
,
rIndex
:
i
,
sIndex
:
j
}
});
};
saveRegionSchoolsSelected
=
(
checked
,
i
,
j
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_SELECTED_SAVE
,
payload
:
{
checked
:
checked
,
rIndex
:
i
,
sIndex
:
j
}
});
};
saveRegionSchoolsOrder
=
(
selectedSchools
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_ORDER_SAVE
,
payload
:
{
selectedSchools
}
});
};
saveRegionSchoolsOrder
=
(
selectedSchools
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
REGIONSCHOOLS_ORDER_SAVE
,
payload
:
{
selectedSchools
}
});
};
}
source/actions/sectorcourses.actions.ts
View file @
b3b0fba0
import
{
SECTORCOURSES_RECEIVED
,
SECTORCOURSES_SELECTED_SAVE
,
SECTORCOURSES_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
'
;
import
{
SECTORCOURSES_RECEIVED
,
SECTORCOURSES_SELECTED_SAVE
,
SECTORCOURSES_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
SectorCoursesActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
,
private
_hds
:
HelperDataService
)
{
}
getSectorCourses
=
(
reload
)
=>
{
const
{
sectors
}
=
this
.
_ngRedux
.
getState
();
//if (sectors.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
sectors
.
size
===
0
))
{
return
this
.
_hds
.
getSectorsWithCourses
().
then
(
sectors
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_RECEIVED
,
payload
:
{
sectors
}
getSectorCourses
=
(
reload
)
=>
{
const
{
sectors
}
=
this
.
_ngRedux
.
getState
();
// if (sectors.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
sectors
.
size
===
0
))
{
return
this
.
_hds
.
getSectorsWithCourses
().
then
(
sectors
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_RECEIVED
,
payload
:
{
sectors
}
});
});
});
}
};
initSectorCourses
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_INIT
,
payload
:
{
}
});
};
}
};
/*
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
}
});
initSectorCourses
=
()
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_INIT
,
payload
:
{
}
});
//}
};
*/
};
saveSectorCoursesSelected
=
(
sectorCoursesSelected
,
sectorSelected
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_SELECTED_SAVE
,
payload
:
{
sectorCoursesSelected
,
sectorSelected
}
});
};
saveSectorCoursesSelected
=
(
sectorCoursesSelected
,
sectorSelected
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
SECTORCOURSES_SELECTED_SAVE
,
payload
:
{
sectorCoursesSelected
,
sectorSelected
}
});
};
}
source/actions/sectorfields.actions.ts
View file @
b3b0fba0
import
{
SECTORFIELDS_RECEIVED
,
SECTORFIELDS_SELECTED_SAVE
,
SECTORFIELDS_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
'
;
import
{
SECTORFIELDS_RECEIVED
,
SECTORFIELDS_SELECTED_SAVE
,
SECTORFIELDS_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
SectorFieldsActions
{
...
...
@@ -12,7 +12,7 @@ export class SectorFieldsActions {
getSectorFields
=
(
reload
)
=>
{
const
{
sectorFields
}
=
this
.
_ngRedux
.
getState
();
//if (sectorFields.size === 0) {
//
if (sectorFields.size === 0) {
if
(
reload
===
true
||
(
reload
===
false
&&
sectorFields
.
size
===
0
))
{
return
this
.
_hds
.
getSectorFields
().
then
(
sectorFields
=>
{
return
this
.
_ngRedux
.
dispatch
({
...
...
source/actions/studentdatafields.actions.ts
View file @
b3b0fba0
import
{
STUDENTDATAFIELDS_SAVE
,
STUDENTDATAFIELDS_INIT
}
from
'
../constants
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
NgRedux
}
from
'
@angular-redux/store
'
;
import
{
IAppState
}
from
'
../store
'
;
//import { UserDataService } from '../services/user-data-service';
import
{
STUDENTDATAFIELDS_SAVE
,
STUDENTDATAFIELDS_INIT
}
from
"
../constants
"
;
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
NgRedux
}
from
"
@angular-redux/store
"
;
import
{
IAppState
}
from
"
../store
"
;
@
Injectable
()
export
class
StudentDataFieldsActions
{
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
constructor
(
private
_ngRedux
:
NgRedux
<
IAppState
>
)
{
}
saveStudentDataFields
=
(
studentDataFields
)
=>
{
saveStudentDataFields
=
(
studentDataFields
)
=>
{
return
this
.
_ngRedux
.
dispatch
({
type
:
STUDENTDATAFIELDS_SAVE
,
payload
:
{
studentDataFields
}
return
this
.
_ngRedux
.
dispatch
({
type
:
STUDENTDATAFIELDS_SAVE
,
payload
:
{
studentDataFields
}
});