main.routes.ts 6.32 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 ParentForm from '../components/student-application-form/parent.form';
9
import StudentApplicationMain from '../components/student-application-form/application.form.main';
10 11
import StudentsList from '../components/students/students-list';
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 ReportNoCapacity from '../components/minister/report-no-capacity';
36
import InformStudents from '../components/minister/minister-informstudents';
37
import MinisterSettings from '../components/minister/minister-settings';
38 39
import SchoolAuthGuard from '../guards/school.auth.guard';
import StudentAuthGuard from '../guards/student.auth.guard';
Open Source Developer's avatar
trans  
Open Source Developer committed
40
import RegionEduAuthGuard from '../guards/regionedu.auth.guard';
Open Source Developer's avatar
Open Source Developer committed
41 42
import  EduAdminAuthGuard from  '../guards/eduadmin.auth.guard';

43
import MinistryAuthGuard from '../guards/ministry.auth.guard';
44
import Breadcrumbs from '../components/main/breadcrumbs';
45 46 47

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

export const MainDeclarations = [
  CamelCasePipe,
Open Source Developer's avatar
UI  
Open Source Developer committed
85
  RemoveSpaces,
86 87
  StudentsList,
  Home,
88
  SchoolHome,
89
  MinistryHome,
90
  CourseFieldsSelect,
91
  Disclaimer,
Open Source Developer's avatar
Open Source Developer committed
92
  EpalClassesSelect,
93
  SectorFieldsSelect,
94
  RegionSchoolsSelect,
95
  SectorCoursesSelect,
96
  ParentForm,
97
  StudentApplicationMain,
Open Source Developer's avatar
Open Source Developer committed
98
  ApplicationPreview,
99
  SchoolsOrderSelect,
Open Source Developer's avatar
Open Source Developer committed
100 101
  ApplicationSubmit,
  SubmitedPreview,
Open Source Developer's avatar
Open Source Developer committed
102
  SubmitedPerson,
103
  AfterSubmit,
Open Source Developer's avatar
Open Source Developer committed
104
  DirectorView,
105
  DirectorClassCapacity,
106
  MinisterView,
107
  MinisterReports,
108 109
  ReportAllStat,
  ReportGeneral,
110
  ReportNoCapacity,
Open Source Developer's avatar
trans  
Open Source Developer committed
111
  InformStudents,
112
  MinisterSettings,
Open Source Developer's avatar
trans  
Open Source Developer committed
113
  PerfectureView,
114
  Breadcrumbs,
Open Source Developer's avatar
Open Source Developer committed
115 116
  DirectorButtons,
  EduadminView,
117
];