All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.app.modules.campaign.campaign.routes.ts Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
import { Routes } from '@angular/router';

import { CampaignListComponent } from './components/campaign-list/campaign-list.component';
import { CampaignExecutionComponent } from './components/execution/execution-campaign.component';
import { CampaignEditionComponent } from './components/create-campaign/campaign-edition.component';
import { CampaignSchedulingComponent } from './components/campaign-scheduling/campaign-scheduling.component';
import { AuthGuard } from '@core/guards';
import { Authorization } from '@model';

export const CampaignRoute: Routes = [
    {
        path: '',
        component: CampaignListComponent,
        canActivate: [AuthGuard],
        data: { 'authorizations': [ Authorization.CAMPAIGN_READ ] }
    },
    {
        path: ':id/execution',
        redirectTo: ':id/execution/last',
        pathMatch: 'full'
    },
    {
        path: ':id/execution/:execId',
        component: CampaignExecutionComponent,
        canActivate: [AuthGuard],
        data: { 'authorizations': [ Authorization.CAMPAIGN_READ ] }
    },
    {
        path: ':id/edition',component: CampaignEditionComponent,
        canActivate: [AuthGuard],
        data: { 'authorizations': [ Authorization.CAMPAIGN_WRITE ] }
    },
    {
        path: 'edition',
        component: CampaignEditionComponent,
        canActivate: [AuthGuard],
        data: { 'authorizations': [ Authorization.CAMPAIGN_WRITE ] }
    },
    {
        path: 'scheduling',
        component: CampaignSchedulingComponent,
        canActivate: [AuthGuard],
        data: { 'authorizations': [ Authorization.CAMPAIGN_EXECUTE ] }
    },
];




© 2015 - 2025 Weber Informatics LLC | Privacy Policy