Variables
Const AppRoutes
AppRoutes: Routes = [{path: '',component: NoAuthLayoutComponent,canActivate: [NoAuthGuardService],canActivateChild: [NoAuthGuardService],children: [{path: '',loadChildren: './no-auth/no-auth.module#NoAuthModule'}]},{path: 'auth',canActivate: [AuthGuardService],canLoad: [AuthGuardService],component: AuthLayoutComponent,children: [{path: '',loadChildren: './auth/auth.module#AuthModule'}]},{path: '**',redirectTo: '/not-found'}]
Const AuthRoutes
AuthRoutes: Routes = [{path: '',pathMatch: 'full',redirectTo: 'internships'},{path: '',children: [generateAuthRouteModule('internships', './internships/internships.module#InternshipsModule', []),generateAuthRouteModule('user', './user/user.module#UserModule', []),generateAuthRouteModule('proposals', './proposals/proposals.module#ProposalsModule', []),]}]
Const CalendarRoutes
CalendarRoutes: Routes = [{path: '',children: [{path: '',component: CalendarComponent}]}]
Const InternshipsRoutes
InternshipsRoutes: Routes = [{path: '',redirectTo: 'offers'},{path: '',children: [generateAuthRoute('offers', InternshipsViewComponent, [], 'Pages.InternshipOffers.Title'),generateAuthRoute('offers/:id/candidate', InternshipCandidateComponent, [RoleType.Student], 'Pages.InternshipCandidate.Title'),generateAuthRoute('add', InternshipAddComponent, [RoleType.Company], 'Pages.InternshipAdd.Title'),generateAuthRoute('edit/:id', InternshipEditComponent, [RoleType.Company], 'Pages.InternshipEdit.Title'),generateAuthRoute('details/:id', InternshipDetailsComponent, [], 'Pages.InternshipDetails.Title'),generateAuthRoute('company', InternshipsOwnCompanyComponent, [RoleType.Company], 'Pages.InternshipOwnCompany.Title'),generateAuthRoute('approve', InternshipsApproveListComponent, [RoleType.Professor], 'Pages.InternshipApproveList.Title'),generateAuthRoute('approve/:id', InternshipApproveComponent, [RoleType.Professor], 'Pages.InternshipApprove.Title')]}]
Const NoAuthRoutes
NoAuthRoutes: Routes = [{path: '',pathMatch: 'full',redirectTo: '/index'},{path: '',children: [{path: 'login',component: LoginComponent},{path: 'login',children: [{path: 'company',component: CompanyLoginComponent}]},{path: 'lock',component: LockComponent},{path: 'register',component: RegisterComponent,children: [{path: '',redirectTo: 'company'},{path: 'company',component: RegisterComponent}]}]}]
Const ProposalsRoutes
ProposalsRoutes: Routes = [{path: '',redirectTo: 'student'},{path: '',children: [generateAuthRoute('professor', InternshipProposalsListComponent, [RoleType.Professor], 'Pages.InternshipProposalList.Title'),generateAuthRoute('student', InternshipOwnProposalsListComponent, [RoleType.Student], 'Pages.InternshipOwnProposalList.Title'),generateAuthRoute('details/:id', InternshipProposalDetailsComponent, [], 'Pages.InternshipProposalDetails.Title'),generateAuthRoute('track/:id', InternshipProposalTrackComponent, [], 'Pages.InternshipProposalTrack.Title'),generateAuthRoute('edit/:id', InternshipProposalEditComponent, [RoleType.Student], 'Pages.InternshipProposalDetails.Title'),generateAuthRoute('approve/:id', InternshipProposalApproveComponent, [RoleType.Professor, RoleType.Company], 'Pages.InternshipProposalApprove.Title'),generateAuthRoute('company', CompanyInternshipProposalsListComponent, [RoleType.Company], 'Pages.CompanyInternshipProposals.Title'),]}]
Const ROUTES
ROUTES
: RouteInfo[] = [{path: '/',title: 'Dictionary.Home',type: 'link',icontype: 'ti-home'},{path: '/auth/internships/',title: 'Pages.InternshipOffers.Title',type: 'sub',icontype: 'fas fa-th-list',children: [{path: 'offers',title: 'Pages.InternshipOffers.ViewOffers',ab: 'L'},{path: 'add',title: 'Dictionary.AddInternship',ab: 'A',requiredRoles: [RoleType.Company]}]},{path: '/auth/',title: 'Dictionary.Student',type: 'sub',icontype: 'fas fa-user-graduate',requiredRoles: [RoleType.Student],children: [{path: 'proposals/student',title: 'Dictionary.MyProposals',ab: 'P'}]},{path: '/auth/',title: 'Pages.InternshipOwnCompany.Title',type: 'sub',icontype: 'fas fa-briefcase',requiredRoles: [RoleType.Company],children: [{path: 'internships/company',title: 'Dictionary.OwnInternships',ab: 'M'},{path: 'proposals/company',title: 'Pages.CompanyInternshipProposals.MenuItem',ab: 'P'}]},{path: '/auth/',title: 'Dictionary.Professor',type: 'sub',icontype: 'fas fa-user-graduate',requiredRoles: [RoleType.Professor],children: [{path: 'internships/approve',title: 'Dictionary.WaitForApproval',ab: 'I'},{path: 'proposals/professor',title: 'Dictionary.StudentsWaitForApproval',ab: 'S'}]}]
Const SharedRoutes
SharedRoutes: Routes = [{path: 'index',component: IndexComponent},{path: 'not-found',component: NotFoundComponent}]
Const UserRoutes
UserRoutes: Routes = [{path: '',children: [generateAuthRoute('', UserViewComponent, [], 'Pages.User.Title'),generateAuthRoute('edit', UserEditComponent, [], 'Pages.UserEdit.Title'),generateAuthRoute('logout', UserLogoutComponent),generateAuthRoute('edit/company/:id', CompanyEditComponent, [RoleType.Company], 'Pages.EditCompany.Title')]}]
Const context
context: any = require.context('./', true, /\.spec\.ts$/)
The application routes