main.routes.ts 7.36 KB
Newer Older
1 2 3 4 5 6
import {
  Routes,
  RouterModule,
} from '@angular/router';

import {CamelCasePipe} from '../pipes/camelcase';
Open Source Developer's avatar
UI  
Open Source Developer committed
7
import {RemoveSpaces} from '../pipes/removespaces';
8
import Info from '../components/student-application-form/info';
9
import ParentForm from '../components/student-application-form/parent.form';
10
import StudentApplicationMain from '../components/student-application-form/application.form.main';
11
import Home from '../components/home';
12
import SchoolHome from '../components/school.home';
13
import MinistryHome from '../components/ministry.home';
14
import CourseFieldsSelect from '../components/student-application-form/course.fields.select';
15
import Disclaimer from '../components/student-application-form/disclaimer';
Open Source Developer's avatar
Open Source Developer committed
16
import EpalClassesSelect from '../components/student-application-form/epal.class.select';
17
import SectorFieldsSelect from '../components/student-application-form/sector.fields.select';
18
import RegionSchoolsSelect from '../components/student-application-form/region.schools.select';
19 20
import SectorCoursesSelect from '../components/student-application-form/sector.courses.select';
import ApplicationPreview from '../components/student-application-form/application.preview';
21 22
import SchoolsOrderSelect from '../components/student-application-form/schools-order-select';
import ApplicationSubmit from '../components/student-application-form/application.submit';
Open Source Developer's avatar
Open Source Developer committed
23
import SubmitedPreview from '../components/student-application-form/submited.aplication.preview';
Open Source Developer's avatar
Open Source Developer committed
24
import SubmitedPerson from '../components/student-application-form/submitedstudent.preview';
25
import AfterSubmit from '../components/student-application-form/after.submit';
Open Source Developer's avatar
Open Source Developer committed
26
import DirectorView from '../components/director/director-view';
Open Source Developer's avatar
trans  
Open Source Developer committed
27
import DirectorButtons from '../components/director/director.buttons';
Open Source Developer's avatar
trans  
Open Source Developer committed
28
import PerfectureView from '../components/infoviews/perfecture-view';
Open Source Developer's avatar
Open Source Developer committed
29
import EduadminView from '../components/infoviews/eduadmin-view';
Open Source Developer's avatar
Open Source Developer committed
30
import DirectorClassCapacity from '../components/director/director-classcapacity';
31
import MinisterView from '../components/minister/minister-view';
32
import MinisterReports from '../components/minister/minister-reports';
33 34
import ReportAllStat from '../components/minister/report-all-stat';
import ReportGeneral from '../components/minister/report-general';
35
import ReportUsers from '../components/minister/report-users';
36
import ReportNoCapacity from '../components/minister/report-no-capacity';
37
import InformStudents from '../components/minister/minister-informstudents';
38
import MinisterSettings from '../components/minister/minister-settings';
39
import SchoolAuthGuard from '../guards/school.auth.guard';
40
import SchoolStudentsLockedGuard from '../guards/school.students.locked.guard';
41
import SchoolCapacityLockedGuard from '../guards/school.capacity.locked.guard';
42
import StudentAuthGuard from '../guards/student.auth.guard';
43
import StudentLockGuard from '../guards/student.lock.guard';
Open Source Developer's avatar
trans  
Open Source Developer committed
44
import RegionEduAuthGuard from '../guards/regionedu.auth.guard';
Open Source Developer's avatar
Open Source Developer committed
45
import  EduAdminAuthGuard from  '../guards/eduadmin.auth.guard';
46
import HelpDesk from  '../components/student-application-form/help-desk';
Open Source Developer's avatar
others  
Open Source Developer committed
47
import LegalInfo from  '../components/student-application-form/legalinfos';
48
import MinistryAuthGuard from '../guards/ministry.auth.guard';
49
import ReportsAuthGuard from '../guards/reports.auth.guard';
50
import Breadcrumbs from '../components/main/breadcrumbs';
51 52 53

export const MainRoutes: Routes = [
  { path: '', component: Home },
54
  { path: 'info', component: Info, canActivate: [StudentAuthGuard] },
55
  { path: 'logout', component: Home },
56
  { path: 'school', component: SchoolHome },
57
  { path: 'school/logout', component: SchoolHome },
58
  { path: 'ministry', component: MinistryHome },
59
  { path: 'ministry/logout', component: MinistryHome },
60 61 62 63
  { path: 'parent-form', component: ParentForm, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'student-application-form-main', component: StudentApplicationMain, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'course-fields-select', component: CourseFieldsSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'intro-statement', component: Disclaimer, canActivate: [StudentAuthGuard, StudentLockGuard] },
Open Source Developer's avatar
others  
Open Source Developer committed
64
  { path: 'legal-info', component: LegalInfo},
65 66 67 68 69 70 71
  { path: 'epal-class-select', component: EpalClassesSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'sector-fields-select', component: SectorFieldsSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'region-schools-select', component: RegionSchoolsSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'sectorcourses-fields-select', component: SectorCoursesSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'application-preview', component: ApplicationPreview, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'schools-order-select', component: SchoolsOrderSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'application-submit', component: ApplicationSubmit, canActivate: [StudentAuthGuard, StudentLockGuard] },
72
  { path: 'submited-preview', component: SubmitedPreview, canActivate: [StudentAuthGuard] },
73 74 75
  { path: 'submited-person', component: SubmitedPerson, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'post-submit', component: AfterSubmit, canActivate: [StudentAuthGuard, StudentLockGuard] },
  { path: 'school/director-view', component: DirectorView, canActivate: [SchoolAuthGuard, SchoolStudentsLockedGuard] },
76
  { path: 'school/director-buttons', component: DirectorButtons, canActivate: [SchoolAuthGuard]  },
77
  { path: 'school/director-classcapacity', component: DirectorClassCapacity, canActivate: [SchoolAuthGuard, SchoolCapacityLockedGuard] },
78
  { path: 'ministry/minister-view', component: MinisterView, canActivate: [MinistryAuthGuard]  },
79 80
  { path: 'ministry/minister-reports', component: MinisterReports, canActivate: [ReportsAuthGuard] },
  { path: 'ministry/report-all-stat/:reportId', component: ReportAllStat, canActivate: [ReportsAuthGuard] },
81
  { path: 'ministry/report-general', component: ReportGeneral, canActivate: [MinistryAuthGuard]  },
82
  { path: 'ministry/report-users/:reportId', component: ReportUsers, canActivate: [MinistryAuthGuard]  },
83 84
  { path: 'ministry/report-no-capacity/:reportId', component: ReportNoCapacity, canActivate: [MinistryAuthGuard]  },
  { path: 'ministry/minister-informstudents', component: InformStudents, canActivate: [MinistryAuthGuard]  },
85
  { path: 'ministry/minister-settings', component: MinisterSettings, canActivate: [MinistryAuthGuard] },
Open Source Developer's avatar
trans  
Open Source Developer committed
86
  { path: 'school/perfecture-view', component: PerfectureView, canActivate: [RegionEduAuthGuard] },
Open Source Developer's avatar
Open Source Developer committed
87
  { path: 'school/eduadmin-view', component: EduadminView, canActivate: [EduAdminAuthGuard] },
88
  { path: 'help-desk', component: HelpDesk, canActivate: [StudentAuthGuard] },
89 90 91 92
];

export const MainDeclarations = [
  CamelCasePipe,
Open Source Developer's avatar
UI  
Open Source Developer committed
93
  RemoveSpaces,
94
  Home,
95
  SchoolHome,
96
  MinistryHome,
97
  CourseFieldsSelect,
98
  Disclaimer,
Open Source Developer's avatar
Open Source Developer committed
99
  EpalClassesSelect,
100
  SectorFieldsSelect,
101
  RegionSchoolsSelect,
102
  SectorCoursesSelect,
103
  ParentForm,
104
  Info,
105
  StudentApplicationMain,
Open Source Developer's avatar
Open Source Developer committed
106
  ApplicationPreview,
107
  SchoolsOrderSelect,
Open Source Developer's avatar
Open Source Developer committed
108 109
  ApplicationSubmit,
  SubmitedPreview,
Open Source Developer's avatar
Open Source Developer committed
110
  SubmitedPerson,
111
  AfterSubmit,
Open Source Developer's avatar
Open Source Developer committed
112
  DirectorView,
113
  DirectorClassCapacity,
114
  MinisterView,
115
  MinisterReports,
116 117
  ReportAllStat,
  ReportGeneral,
118
  ReportUsers,
119
  ReportNoCapacity,
Open Source Developer's avatar
trans  
Open Source Developer committed
120
  InformStudents,
121
  MinisterSettings,
Open Source Developer's avatar
trans  
Open Source Developer committed
122
  PerfectureView,
123
  Breadcrumbs,
Open Source Developer's avatar
Open Source Developer committed
124 125
  DirectorButtons,
  EduadminView,
126
  HelpDesk,
Open Source Developer's avatar
others  
Open Source Developer committed
127
  LegalInfo
128
];