2017-09-22 12:26:08 +02:00
|
|
|
/**
|
|
|
|
* Created by stefania on 9/16/16.
|
|
|
|
*/
|
|
|
|
import { ModuleWithProviders } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
|
|
|
|
import { DashboardComponent } from "./dashboard.component";
|
2017-12-20 15:26:30 +01:00
|
|
|
import { CommunitiesComponent } from './pages/community/communities.component';
|
2018-03-06 16:25:09 +01:00
|
|
|
import { CommunityEditFormComponent } from "./pages/community/community-edit-form/community-edit-form.component";
|
2018-02-06 15:10:07 +01:00
|
|
|
import { EntitiesComponent } from "./pages/entity/entities.component";
|
|
|
|
import { PagesComponent } from "./pages/page/pages.component";
|
2017-09-22 12:26:08 +02:00
|
|
|
import { PageHelpContentsComponent } from "./pages/helpcontent/page-help-contents.component";
|
|
|
|
import { NewPageHelpContentComponent } from "./pages/helpcontent/new-page-help-content.component";
|
|
|
|
import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component";
|
2018-02-06 12:06:43 +01:00
|
|
|
import { DivIdsComponent } from "./pages/divId/divIds.component";
|
|
|
|
import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component";
|
|
|
|
import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component";
|
|
|
|
import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component";
|
2018-02-12 12:43:08 +01:00
|
|
|
import {ClaimsComponent} from './pages/claims/claims.component';
|
2018-02-15 12:30:50 +01:00
|
|
|
import {FreeGuard} from './openaireLibrary/login/freeGuard.guard';
|
2018-01-04 15:32:31 +01:00
|
|
|
|
2018-02-15 12:30:50 +01:00
|
|
|
import { AdminLoginGuard} from './openaireLibrary/login/adminLoginGuard.guard';
|
|
|
|
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
|
|
|
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
|
|
|
import{ClaimsAdminComponent} from './openaireLibrary/claims/claimsAdmin/claimsAdmin.component';
|
2018-03-05 17:10:19 +01:00
|
|
|
import {StatsComponent} from "./pages/stats/stats.component";
|
2018-03-06 16:25:09 +01:00
|
|
|
|
2018-02-06 12:35:16 +01:00
|
|
|
|
|
|
|
|
2017-09-22 12:26:08 +02:00
|
|
|
const appRoutes: Routes = [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: 'dashboard',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'dashboard',
|
|
|
|
component: DashboardComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-09-22 12:26:08 +02:00
|
|
|
},
|
2018-02-06 12:35:16 +01:00
|
|
|
|
2017-12-13 12:15:19 +01:00
|
|
|
{
|
2017-12-20 15:26:30 +01:00
|
|
|
path: 'communities',
|
|
|
|
component: CommunitiesComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-12-20 15:26:30 +01:00
|
|
|
},
|
2018-01-04 15:32:31 +01:00
|
|
|
{
|
|
|
|
path: 'community-edit-form',
|
|
|
|
component: CommunityEditFormComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-01-04 15:32:31 +01:00
|
|
|
},
|
2017-12-20 15:26:30 +01:00
|
|
|
{
|
|
|
|
path: 'entities',
|
|
|
|
component: EntitiesComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-12-13 12:15:19 +01:00
|
|
|
},
|
2018-02-06 12:06:43 +01:00
|
|
|
{
|
|
|
|
path: 'classes',
|
2018-02-12 12:43:08 +01:00
|
|
|
component: DivIdsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-02-06 12:06:43 +01:00
|
|
|
},
|
2017-09-22 12:26:08 +02:00
|
|
|
{
|
|
|
|
path: 'pages',
|
|
|
|
component: PagesComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-09-22 12:26:08 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'pageContents',
|
|
|
|
component: PageHelpContentsComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-09-22 12:26:08 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'pageContents/new',
|
|
|
|
component: NewPageHelpContentComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2017-09-22 12:26:08 +02:00
|
|
|
},
|
|
|
|
{
|
2017-12-13 12:15:19 +01:00
|
|
|
//path: 'pageContents/edit/:id',
|
|
|
|
path: 'pageContents/edit',
|
2017-09-22 12:26:08 +02:00
|
|
|
component: EditPageHelpContentComponent,
|
2018-02-12 12:43:08 +01:00
|
|
|
canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-02-06 12:06:43 +01:00
|
|
|
},
|
2018-02-06 12:35:16 +01:00
|
|
|
|
2018-02-06 12:06:43 +01:00
|
|
|
{
|
|
|
|
path: 'classContents',
|
2018-02-12 12:43:08 +01:00
|
|
|
component: DivHelpContentsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-02-06 12:06:43 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'classContents/new',
|
2018-02-12 12:43:08 +01:00
|
|
|
component: NewDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-02-06 12:06:43 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'classContents/edit',
|
2018-02-12 12:43:08 +01:00
|
|
|
component: EditDivHelpContentComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'claims',
|
|
|
|
component: ClaimsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
2018-02-06 12:35:16 +01:00
|
|
|
},
|
2018-03-05 17:10:19 +01:00
|
|
|
{
|
|
|
|
path: 'stats',
|
|
|
|
component: StatsComponent,canActivate: [FreeGuard],resolve: { envSpecific: EnvironmentSpecificResolver }
|
|
|
|
},
|
2018-02-06 12:35:16 +01:00
|
|
|
{ path: '**',pathMatch: 'full',component: DashboardComponent }
|
2017-09-22 12:26:08 +02:00
|
|
|
|
2018-02-12 12:43:08 +01:00
|
|
|
];
|
|
|
|
// @NgModule({
|
|
|
|
// imports: [RouterModule.forRoot(appRoutes)],
|
|
|
|
// exports: [RouterModule],
|
|
|
|
// providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
|
|
|
// })
|
2017-09-22 12:26:08 +02:00
|
|
|
export const appRoutingProviders: any[] = [
|
|
|
|
];
|
|
|
|
|
2017-12-13 12:15:19 +01:00
|
|
|
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
|