copy parent's tags to a new amendment

This commit is contained in:
Maximilian Krambach 2019-04-24 10:57:25 +02:00
parent c04c59b666
commit e77fdc6707
2 changed files with 5 additions and 1 deletions

View File

@ -212,6 +212,7 @@ export class AmendmentCreateWizardComponent extends BaseViewComponent {
text: text, // Workaround as 'text' is required from the backend
parent_id: this.motion.id,
category_id: this.motion.category_id,
tags_id: this.motion.tags_id,
motion_block_id: this.motion.motion_block_id,
amendment_paragraphs: amendedParagraphs
};

View File

@ -617,12 +617,14 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
defaultMotion.title = defaultTitle;
defaultMotion.parent_id = parentMotion.id;
defaultMotion.category_id = parentMotion.category_id;
defaultMotion.tags_id = parentMotion.tags_id;
defaultMotion.motion_block_id = parentMotion.motion_block_id;
this.contentForm.patchValue({
title: defaultTitle,
category_id: parentMotion.category_id,
motion_block_id: parentMotion.motion_block_id,
parent_id: parentMotion.id
parent_id: parentMotion.id,
tags_id: parentMotion.tags_id
});
}
if (mode === 'fulltext') {
@ -697,6 +699,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
submitters_id: [],
supporters_id: [[]],
workflow_id: [],
tags_id: [],
origin: [''],
selected_paragraphs: [],
statute_amendment: [''], // Internal value for the checkbox, not saved to the model