main.routes.ts 4.99 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';
Open Source Developer's avatar
Open Source Developer committed
24
import DirectorView from '../components/director/director-view';
Open Source Developer's avatar
trans  
Open Source Developer committed
25
import DirectorButtons from '../components/director/director.buttons';
Open Source Developer's avatar
trans  
Open Source Developer committed
26
import PerfectureView from '../components/infoviews/perfecture-view';
Open Source Developer's avatar
Open Source Developer committed
27
import DirectorClassCapacity from '../components/director/director-classcapacity';
28
import MinisterView from '../components/minister/minister-view';
29
import MinisterReports from '../components/minister/minister-reports';
30 31
import ReportAllStat from '../components/minister/report-all-stat';
import ReportGeneral from '../components/minister/report-general';
32
import InformStudents from '../components/minister/minister-informstudents';
33 34
import SchoolAuthGuard from '../guards/school.auth.guard';
import StudentAuthGuard from '../guards/student.auth.guard';
Open Source Developer's avatar
trans  
Open Source Developer committed
35
import RegionEduAuthGuard from '../guards/regionedu.auth.guard';
36
import Breadcrumbs from '../components/main/breadcrumbs';
37 38 39

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

export const MainDeclarations = [
  CamelCasePipe,
Open Source Developer's avatar
UI  
Open Source Developer committed
69
  RemoveSpaces,
70 71
  StudentsList,
  Home,
72
  SchoolHome,
73
  MinistryHome,
74
  CourseFieldsSelect,
Open Source Developer's avatar
Open Source Developer committed
75
  EpalClassesSelect,
76
  SectorFieldsSelect,
77
  RegionSchoolsSelect,
78
  SectorCoursesSelect,
79
  ParentForm,
80
  StudentApplicationMain,
Open Source Developer's avatar
Open Source Developer committed
81
  ApplicationPreview,
82
  SchoolsOrderSelect,
Open Source Developer's avatar
Open Source Developer committed
83 84
  ApplicationSubmit,
  SubmitedPreview,
Open Source Developer's avatar
Open Source Developer committed
85
  SubmitedPerson,
Open Source Developer's avatar
Open Source Developer committed
86
  DirectorView,
87
  DirectorClassCapacity,
88
  MinisterView,
89
  MinisterReports,
90 91
  ReportAllStat,
  ReportGeneral,
Open Source Developer's avatar
trans  
Open Source Developer committed
92
  InformStudents,
Open Source Developer's avatar
trans  
Open Source Developer committed
93
  PerfectureView,
94
  Breadcrumbs,
Open Source Developer's avatar
trans  
Open Source Developer committed
95
  DirectorButtons
96
];