main.routes.ts 5.78 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';
Open Source Developer's avatar
Open Source Developer committed
15
import EpalClassesSelect from '../components/student-application-form/epal.class.select';
16
import SectorFieldsSelect from '../components/student-application-form/sector.fields.select';
17
import RegionSchoolsSelect from '../components/student-application-form/region.schools.select';
18 19
import SectorCoursesSelect from '../components/student-application-form/sector.courses.select';
import ApplicationPreview from '../components/student-application-form/application.preview';
20 21
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
22
import SubmitedPreview from '../components/student-application-form/submited.aplication.preview';
Open Source Developer's avatar
Open Source Developer committed
23
import SubmitedPerson from '../components/student-application-form/submitedstudent.preview';
24
import AfterSubmit from '../components/student-application-form/after.submit';
Open Source Developer's avatar
Open Source Developer committed
25
import DirectorView from '../components/director/director-view';
Open Source Developer's avatar
trans  
Open Source Developer committed
26
import DirectorButtons from '../components/director/director.buttons';
Open Source Developer's avatar
trans  
Open Source Developer committed
27
import PerfectureView from '../components/infoviews/perfecture-view';
Open Source Developer's avatar
Open Source Developer committed
28
import DirectorClassCapacity from '../components/director/director-classcapacity';
29
import MinisterView from '../components/minister/minister-view';
30
import MinisterReports from '../components/minister/minister-reports';
31 32
import ReportAllStat from '../components/minister/report-all-stat';
import ReportGeneral from '../components/minister/report-general';
33
import ReportNoCapacity from '../components/minister/report-no-capacity';
34
import InformStudents from '../components/minister/minister-informstudents';
35 36
import SchoolAuthGuard from '../guards/school.auth.guard';
import StudentAuthGuard from '../guards/student.auth.guard';
Open Source Developer's avatar
trans  
Open Source Developer committed
37
import RegionEduAuthGuard from '../guards/regionedu.auth.guard';
38
import MinistryAuthGuard from '../guards/ministry.auth.guard';
39
import Breadcrumbs from '../components/main/breadcrumbs';
40 41 42

export const MainRoutes: Routes = [
  { path: '', component: Home },
43
  { path: 'logout', component: Home },
44
  { path: 'school', component: SchoolHome },
45
  { path: 'school/logout', component: SchoolHome },
46
  { path: 'ministry', component: MinistryHome },
47 48
  { path: 'ministry/logout', component: MinistryHome },
//  { path: 'breadcrumbs', component: Breadcrumbs },
49 50 51 52 53 54 55 56 57 58 59 60 61
  { 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] },
  { 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] },
62
  { path: 'post-submit', component: AfterSubmit, canActivate: [StudentAuthGuard] },
63
  { path: 'school/director-view', component: DirectorView, canActivate: [SchoolAuthGuard] },
64
  { path: 'school/director-buttons', component: DirectorButtons, canActivate: [SchoolAuthGuard]  },
65
  { path: 'school/director-classcapacity', component: DirectorClassCapacity, canActivate: [SchoolAuthGuard] },
66 67 68 69 70 71
  { path: 'ministry/minister-view', component: MinisterView, canActivate: [MinistryAuthGuard]  },
  { path: 'ministry/minister-reports', component: MinisterReports, canActivate: [MinistryAuthGuard]  },
  { path: 'ministry/report-all-stat/:reportId', component: ReportAllStat, canActivate: [MinistryAuthGuard]  },
  { 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]  },
Open Source Developer's avatar
trans  
Open Source Developer committed
72
  { path: 'school/perfecture-view', component: PerfectureView, canActivate: [RegionEduAuthGuard] },
73 74 75 76
];

export const MainDeclarations = [
  CamelCasePipe,
Open Source Developer's avatar
UI  
Open Source Developer committed
77
  RemoveSpaces,
78 79
  StudentsList,
  Home,
80
  SchoolHome,
81
  MinistryHome,
82
  CourseFieldsSelect,
Open Source Developer's avatar
Open Source Developer committed
83
  EpalClassesSelect,
84
  SectorFieldsSelect,
85
  RegionSchoolsSelect,
86
  SectorCoursesSelect,
87
  ParentForm,
88
  StudentApplicationMain,
Open Source Developer's avatar
Open Source Developer committed
89
  ApplicationPreview,
90
  SchoolsOrderSelect,
Open Source Developer's avatar
Open Source Developer committed
91 92
  ApplicationSubmit,
  SubmitedPreview,
Open Source Developer's avatar
Open Source Developer committed
93
  SubmitedPerson,
94
  AfterSubmit,
Open Source Developer's avatar
Open Source Developer committed
95
  DirectorView,
96
  DirectorClassCapacity,
97
  MinisterView,
98
  MinisterReports,
99 100
  ReportAllStat,
  ReportGeneral,
101
  ReportNoCapacity,
Open Source Developer's avatar
trans  
Open Source Developer committed
102
  InformStudents,
Open Source Developer's avatar
trans  
Open Source Developer committed
103
  PerfectureView,
104
  Breadcrumbs,
Open Source Developer's avatar
trans  
Open Source Developer committed
105
  DirectorButtons
106
];