Skip to content

Commit

Permalink
Fix amendment wizard routing (#4284)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisa-beerboom authored Oct 23, 2024
1 parent 6a52d30 commit 5ffc263
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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`,
Expand Down
Original file line number Diff line number Diff line change
@@ -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({
Expand Down

0 comments on commit 5ffc263

Please sign in to comment.