132 lines
3.5 KiB
TypeScript
132 lines
3.5 KiB
TypeScript
import {RouterModule, Routes} from '@angular/router';
|
|
import {ModuleWithProviders} from '@angular/core';
|
|
import {ManageComponent} from './manage.component';
|
|
import {UserListComponent} from './users/user-list/user-list.component';
|
|
import {EditUserComponent} from './users/edit-user/edit-user.component';
|
|
import {AwardUserComponent} from './users/award-user/award-user.component';
|
|
import {RankListComponent} from './ranks/rank-list/rank-list.component';
|
|
import {EditRankComponent} from './ranks/edit-rank/edit-rank.component';
|
|
import {DecorationListComponent} from './decorations/decoration-list/decoration-list.component';
|
|
import {EditDecorationComponent} from './decorations/edit-decoration/edit-decoration.component';
|
|
import {SquadListComponent} from './squads/squad-list/squad-list.component';
|
|
import {EditSquadComponent} from './squads/edit-squad/edit-squad.component';
|
|
import {DecorationItemComponent} from './decorations/decoration-list/decoration-item.component';
|
|
import {RankItemComponent} from './ranks/rank-list/rank-item.component';
|
|
import {SquadItemComponent} from './squads/squad-list/squad-item.component';
|
|
import {UserItemComponent} from './users/user-list/user-item.component';
|
|
|
|
|
|
export const publicRoutes: Routes = [
|
|
{
|
|
path: 'decorations',
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: ManageComponent,
|
|
outlet: 'left',
|
|
children: [{
|
|
path: '',
|
|
component: DecorationListComponent
|
|
}]
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: EditDecorationComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'edit/:id',
|
|
component: EditDecorationComponent,
|
|
outlet: 'right'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'ranks',
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: ManageComponent,
|
|
outlet: 'left',
|
|
children: [{
|
|
path: '',
|
|
component: RankListComponent
|
|
}]
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: EditRankComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'edit/:id',
|
|
component: EditRankComponent,
|
|
outlet: 'right'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'squads',
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: ManageComponent,
|
|
outlet: 'left',
|
|
children: [{
|
|
path: '',
|
|
component: SquadListComponent,
|
|
}]
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: EditSquadComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'edit/:id',
|
|
component: EditSquadComponent,
|
|
outlet: 'right'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: 'users',
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: ManageComponent,
|
|
outlet: 'left',
|
|
children: [{
|
|
path: '',
|
|
component: UserListComponent
|
|
}]
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: EditUserComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'edit/:id',
|
|
component: EditUserComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'award/:id',
|
|
component: AwardUserComponent,
|
|
outlet: 'right'
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
export const manageRouterModule: ModuleWithProviders = RouterModule.forChild(publicRoutes);
|
|
|
|
export const manageRoutingComponents = [
|
|
ManageComponent,
|
|
DecorationListComponent, DecorationItemComponent, EditDecorationComponent,
|
|
RankListComponent, RankItemComponent, EditRankComponent,
|
|
SquadListComponent, SquadItemComponent, EditSquadComponent,
|
|
UserListComponent, UserItemComponent, EditUserComponent, AwardUserComponent
|
|
];
|