90 lines
2.7 KiB
TypeScript
90 lines
2.7 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { NbMenuItem } from '@nebular/theme';
|
|
import { Role } from '../entity/Auth';
|
|
import { DomainType } from '../entity/PastoralDomain';
|
|
import { CellGroupComponent } from './cell-group.component';
|
|
import { DinnerComponent } from './dinner/dinner.component';
|
|
import { FinanceComponent } from './finance/finance.component';
|
|
import { GoogleLoginComponent } from './google-login/google-login.component';
|
|
import { BestListComponent, HappinessWeekListComponent } from './happiness-group/happiness-group.component';
|
|
import { PrayerComponent } from './prayer/prayer.component';
|
|
import { UserProfileComponent } from './user-profile/user-profile.component';
|
|
export class CellGroupRoutingConfig {
|
|
public static MENU_ITEMS: NbMenuItem[] = [
|
|
|
|
{
|
|
title: '細胞小組',
|
|
icon: 'people-outline',
|
|
children: [
|
|
|
|
{
|
|
title: '小組禱告',
|
|
//icon: 'people-outline',
|
|
link: '/myapp/prayer'
|
|
},
|
|
{
|
|
title: '小組晚餐',
|
|
//icon: 'people-outline',
|
|
link: '/myapp/dinner',
|
|
},
|
|
],
|
|
data: DomainType.CellGroup
|
|
},
|
|
{
|
|
title: '幸福小組',
|
|
icon: 'smiling-face-outline',
|
|
children: [
|
|
|
|
{
|
|
title: 'Bests',
|
|
//icon: 'people-outline',
|
|
link: '/myapp/bests'
|
|
},
|
|
{
|
|
title: '幸福周',
|
|
//icon: 'people-outline',
|
|
link: '/myapp/happinessWeeks',
|
|
},
|
|
{
|
|
title: '財務表',
|
|
//icon: 'people-outline',
|
|
link: '/myapp/finance',
|
|
},
|
|
],
|
|
data: DomainType.HappinessGroup
|
|
},
|
|
]
|
|
}
|
|
const routes: Routes = [
|
|
{
|
|
path: '', component: CellGroupComponent,
|
|
children:
|
|
[
|
|
{ path: 'dinner', component: DinnerComponent, },
|
|
{ path: 'dinner/:groupId', component: DinnerComponent, },
|
|
{ path: 'prayer', component: PrayerComponent, },
|
|
{ path: 'prayer/:groupId', component: PrayerComponent, },
|
|
{ path: 'profile', component: UserProfileComponent, },
|
|
{ path: 'bests', component: BestListComponent, },
|
|
{ path: 'bests/:groupId', component: BestListComponent, },
|
|
{ path: 'happinessWeeks', component: HappinessWeekListComponent, },
|
|
{ path: 'happinessWeeks/:groupId', component: HappinessWeekListComponent, },
|
|
{ path: 'finance/:groupId', component: FinanceComponent, },
|
|
|
|
{
|
|
path: 'management', component: GoogleLoginComponent,
|
|
data: {
|
|
roles: Role.Admin | Role.Pastor | Role.CellGroupLeader
|
|
}
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class CellGroupRoutingModule { }
|