Merge pull request #5009 from GabrielInTheWorld/createAmendmentPerm
Fixes can create amendments if having permissions
This commit is contained in:
commit
1f3617f9ef
@ -1100,7 +1100,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
|||||||
if (mode === 'paragraph') {
|
if (mode === 'paragraph') {
|
||||||
this.router.navigate(['./create-amendment'], { relativeTo: this.route });
|
this.router.navigate(['./create-amendment'], { relativeTo: this.route });
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['./motions/new'], {
|
this.router.navigate(['./motions/new-amendment'], {
|
||||||
relativeTo: this.route.snapshot.params.relativeTo,
|
relativeTo: this.route.snapshot.params.relativeTo,
|
||||||
queryParams: { parent: this.motion.id || null }
|
queryParams: { parent: this.motion.id || null }
|
||||||
});
|
});
|
||||||
|
@ -52,6 +52,11 @@ const routes: Routes = [
|
|||||||
loadChildren: () => import('./modules/motion-detail/motion-detail.module').then(m => m.MotionDetailModule),
|
loadChildren: () => import('./modules/motion-detail/motion-detail.module').then(m => m.MotionDetailModule),
|
||||||
data: { basePerm: 'motions.can_create' }
|
data: { basePerm: 'motions.can_create' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'new-amendment',
|
||||||
|
loadChildren: () => import('./modules/motion-detail/motion-detail.module').then(m => m.MotionDetailModule),
|
||||||
|
data: { basePerm: 'motions.can_create_amendments' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'amendments',
|
path: 'amendments',
|
||||||
loadChildren: () => import('./modules/amendment-list/amendment-list.module').then(m => m.AmendmentListModule),
|
loadChildren: () => import('./modules/amendment-list/amendment-list.module').then(m => m.AmendmentListModule),
|
||||||
|
Loading…
Reference in New Issue
Block a user