File

src/app/modules/groups/groups-routing.module.ts

import { WORKSPACE, ADD_MEMBER_TO_GROUP, CREATE_GROUP, MY_GROUPS,
  ADD_ACTIVITY_TO_GROUP, ACTIVITY_DETAILS, GROUP_DETAILS, ADD_MEMBER,
  ADD_ACTIVITY_CONTENT_TYPES, EDIT_GROUP, ACTIVITY_DASHBOARD} from './interfaces';
import {
  MyGroupsComponent, AddMemberComponent, GroupDetailsComponent,
  CreateEditGroupComponent, ActivitySearchComponent, AddActivityContentTypesComponent, ActivityDashboardComponent
} from './components';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ActivityDetailsComponent } from './components/activity/activity-details/activity-details.component';
const telemetryEnv = 'groups';
const type = 'view';
const subtype = 'paginate';
const routes: Routes = [
  {
    path: '', component: MyGroupsComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: MY_GROUPS, type: type },
      baseUrl: MY_GROUPS,
      menuBar: {
        visible: false
      }
    },
    children: [
      {
        path: CREATE_GROUP, component: CreateEditGroupComponent,
        data: {
          telemetry: { env: telemetryEnv, pageid: CREATE_GROUP, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
        },
      },
    ],
  },
  {
    path: `${GROUP_DETAILS}/:groupId`, component: GroupDetailsComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: GROUP_DETAILS, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
    children: [
      {
        path: EDIT_GROUP, component: CreateEditGroupComponent,
        data: {
          telemetry: { env: telemetryEnv, pageid: EDIT_GROUP, type: type, subtype: subtype },
          menuBar: {
            visible: false
          }
        },
      },
    ],
  },
  {
    path: ADD_MEMBER_TO_GROUP, component: AddMemberComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: ADD_MEMBER, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
  },
  {
    path: `${`${GROUP_DETAILS}/:groupId`}/${ACTIVITY_DETAILS}/:activityId`, component: ActivityDetailsComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: ACTIVITY_DETAILS, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
  },
  {
    path: `${`${GROUP_DETAILS}/:groupId`}/${ADD_ACTIVITY_CONTENT_TYPES}`, component: AddActivityContentTypesComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: ADD_ACTIVITY_CONTENT_TYPES, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
  },
  {
    path: `${`${GROUP_DETAILS}/:groupId`}/${ADD_ACTIVITY_CONTENT_TYPES}/${ADD_ACTIVITY_TO_GROUP}/:activityType/:pageNumber`,
    component: ActivitySearchComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: ADD_ACTIVITY_TO_GROUP, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
  },
  {
    path: `${`${GROUP_DETAILS}/:groupId`}/${ACTIVITY_DASHBOARD}/:activityId`,
    component: ActivityDashboardComponent,
    data: {
      telemetry: { env: telemetryEnv, pageid: ACTIVITY_DASHBOARD, type: type, subtype: subtype },
      menuBar: {
        visible: false
      }
    },
  },
];


@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class GroupsRoutingModule { }

results matching ""

    No results matching ""