+82
-15
@@ -21,6 +21,8 @@ import { CheckRegisterPageComponent } from './features/disbursement/pages/check-
|
||||
import { ChurchProfilePageComponent } from './features/disbursement/pages/church-profile-page/church-profile-page.component';
|
||||
import { AttendanceCounterPageComponent } from './features/meal-attendance/pages/attendance-counter-page/attendance-counter-page.component';
|
||||
import { OfferingEntryMobilePageComponent } from './features/giving/pages/offering-entry-mobile-page/offering-entry-mobile-page.component';
|
||||
import { SystemLogsPageComponent } from './features/logging/pages/system-logs-page/system-logs-page.component';
|
||||
import { AuditLogsPageComponent } from './features/logging/pages/audit-logs-page/audit-logs-page.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
// Public routes
|
||||
@@ -39,85 +41,150 @@ export const routes: Routes = [
|
||||
canActivate: [AuthGuard],
|
||||
children: [
|
||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
|
||||
{ path: 'dashboard', component: DashboardComponent },
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: DashboardComponent,
|
||||
data: { title: 'Dashboard', titleZh: '首頁', section: 'Home' },
|
||||
},
|
||||
{
|
||||
path: 'admin/members',
|
||||
component: MembersPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Members, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Members, action: 'read' },
|
||||
title: 'Member Management', titleZh: '會友管理', section: 'Admin',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'admin/users',
|
||||
component: UsersPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Users, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Users, action: 'read' },
|
||||
title: 'User Management', titleZh: '使用者管理', section: 'Admin',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'admin/permissions',
|
||||
component: PermissionsPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Permissions, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Permissions, action: 'read' },
|
||||
title: 'Role Permissions', titleZh: '權限設定', section: 'Admin',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'admin/logs/system',
|
||||
component: SystemLogsPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: {
|
||||
permission: { module: PermissionModules.SystemLogs, action: 'read' },
|
||||
title: 'System Logs', titleZh: '系統日誌', section: 'Admin',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'admin/logs/audit',
|
||||
component: AuditLogsPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: {
|
||||
permission: { module: PermissionModules.AuditLogs, action: 'read' },
|
||||
title: 'Audit Logs', titleZh: '稽核日誌', section: 'Admin',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/dashboard',
|
||||
component: FinanceDashboardPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.FinanceDashboard, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.FinanceDashboard, action: 'read' },
|
||||
title: 'Finance Dashboard', titleZh: '財務儀表板', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/giving-categories',
|
||||
component: GivingCategoriesPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.GivingCategories, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.GivingCategories, action: 'read' },
|
||||
title: 'Giving Types', titleZh: '奉獻類型', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/givings',
|
||||
component: GivingsPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Givings, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Givings, action: 'read' },
|
||||
title: 'Givings', titleZh: '單筆奉獻', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/offering-session',
|
||||
component: OfferingSessionPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.OfferingSessions, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.OfferingSessions, action: 'read' },
|
||||
title: 'Sunday Offering Entry', titleZh: '主日奉獻錄入', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'reimbursements',
|
||||
component: MyReimbursementsPageComponent,
|
||||
data: { title: 'My Reimbursements', titleZh: '我的報銷', section: 'Finance' },
|
||||
},
|
||||
{ path: 'reimbursements', component: MyReimbursementsPageComponent },
|
||||
{
|
||||
path: 'finance/expenses',
|
||||
component: ExpensesPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Expenses, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Expenses, action: 'read' },
|
||||
title: 'Expenses', titleZh: '支出', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/expense-categories',
|
||||
component: ExpenseCategoriesPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.ExpenseCategories, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.ExpenseCategories, action: 'read' },
|
||||
title: 'Expense Categories', titleZh: '費用類別', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/monthly-statement',
|
||||
component: MonthlyStatementPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.MonthlyStatements, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.MonthlyStatements, action: 'read' },
|
||||
title: 'Monthly Statement', titleZh: '月報表', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/disbursements',
|
||||
component: DisbursementPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Disbursements, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Disbursements, action: 'read' },
|
||||
title: 'Disbursement Management', titleZh: '支票開立', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/check-register',
|
||||
component: CheckRegisterPageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.Disbursements, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.Disbursements, action: 'read' },
|
||||
title: 'Check Register', titleZh: '支票登記簿', section: 'Finance',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'finance/church-profile',
|
||||
component: ChurchProfilePageComponent,
|
||||
canActivate: [PermissionGuard],
|
||||
data: { permission: { module: PermissionModules.ChurchProfile, action: 'read' } },
|
||||
data: {
|
||||
permission: { module: PermissionModules.ChurchProfile, action: 'read' },
|
||||
title: 'Church Profile', titleZh: '教會資料', section: 'Finance',
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user