diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/motion-detail-routing.module.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/motion-detail-routing.module.ts index d7a45cd08c..71994ea412 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/motion-detail-routing.module.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/motion-detail-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { Permission } from 'src/app/domain/definitions/permission'; import { MotionDetailComponent } from './components/motion-detail/motion-detail.component'; @@ -11,8 +10,7 @@ const routes: Routes = [ children: [ { path: ``, - loadChildren: () => import(`./pages/motion-form/motion-form.module`).then(m => m.MotionFormModule), - data: { meetingPermissions: [Permission.motionCanCreate] } + loadChildren: () => import(`./pages/motion-form/motion-form.module`).then(m => m.MotionFormModule) }, { path: `:id`, diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/motion-form-routing.module.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/motion-form-routing.module.ts index 69b7c26d6c..375d2a4f36 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/motion-form-routing.module.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/motion-form-routing.module.ts @@ -1,13 +1,21 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { Permission } from 'src/app/domain/definitions/permission'; import { AmendmentCreateWizardComponent } from './components/amendment-create-wizard/amendment-create-wizard.component'; import { MotionFormComponent } from './components/motion-form/motion-form.component'; const routes: Routes = [ - { path: `:id/create-amendment`, component: AmendmentCreateWizardComponent }, - { path: `:id/edit`, component: MotionFormComponent }, - { path: `new`, component: MotionFormComponent } + { + path: `:id/create-amendment`, + component: AmendmentCreateWizardComponent, + data: { meetingPermissions: [Permission.motionCanCreateAmendments] } + }, + { + path: `:id/edit`, + component: MotionFormComponent + }, + { path: `new`, component: MotionFormComponent, data: { meetingPermissions: [Permission.motionCanCreate] } } ]; @NgModule({