import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { LocaleResolver } from '@core/resolvers/locale.resolver'; import { GCCoreModule } from '@core/_core.module'; import { AllActiveManagerProgramsResolver } from '@features/programs/resolvers/all-active-manager-programs.resolver'; import { SystemTagsResolver } from '@features/system-tags/resolvers/system-tags.resolver'; import { ApplicantsPageComponent } from './applicants-page/applicants-page.component'; import { ApplicationManagerPageComponent } from './application-manager-page/application-manager-page.component'; import { ApplicationManagerWrapperComponent } from './application-manager-wrapper/application-manager-wrapper.component'; import { ApplicationManagerModule } from './application-manager.module'; import { FormManagerTableComponent } from './form-manager/form-manager-table/form-manager-table.component'; import { FormManagerResolver } from './form-manager/form-manager.resolver'; import { OrganizationsPageComponent } from './organizations-page/organizations-page.component'; import { ApplicationManagerResolver } from './resolvers/application-manager.resolver'; @NgModule({ imports: [ GCCoreModule, ApplicationManagerModule, RouterModule.forChild([{ path: '', component: ApplicationManagerWrapperComponent, resolve: { locale: LocaleResolver, tags: SystemTagsResolver }, data: { namespace: ['MANAGE', 'APPLY', 'APPLICATION', 'AWARDS', 'FORMS', 'BUDGET', 'CONFIG'] }, children: [{ path: 'applications', children: [{ path: '', component: ApplicationManagerPageComponent, data: { breadcrumbLabel: 'Applications' }, resolve: { appManager: ApplicationManagerResolver } }] }, { path: 'forms', component: FormManagerTableComponent, data: { breadcrumbLabel: 'Applications' }, resolve: { formManager: FormManagerResolver, managerPrograms: AllActiveManagerProgramsResolver } }, { path: 'applicants', component: ApplicantsPageComponent, data: { breadcrumbLabel: 'Applications' } }, { path: 'organizations', component: OrganizationsPageComponent, data: { breadcrumbLabel: 'Applications' } }, { path: '', pathMatch: 'full', redirectTo: 'applications' }] }, { path: 'application/:id', loadChildren: () => import('@features/offline-grants/offline-grants.routing.module') .then(m => m.OfflineGrantsRoutingModule), data: { breadcrumbLabel: 'Edit', breadcrumb: true } }, { path: 'nonprofit', loadChildren: () => import('@features/nonprofit/nonprofit-routing.module') .then(m => m.NonprofitRoutingModule) }, { path: 'applicant-profile', loadChildren: () => import('@features/applicant/applicant-routing.module') .then(m => m.ApplicantRoutingModule) }]) ] }) export class ApplicationManagerRoutingModule { }