Merge pull request #4068 from CatoTH/Amendment-Bugfixes-20181216

Amendment bugfixes
This commit is contained in:
Emanuel Schütze 2018-12-19 09:47:15 +01:00 committed by GitHub
commit a164b3416e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View File

@ -127,7 +127,7 @@ export class AmendmentCreateWizardComponent extends BaseViewComponent {
state_id: [''],
recommendation_id: [''],
submitters_id: [],
supporters_id: [],
supporters_id: [[]],
origin: ['']
});
}

View File

@ -111,7 +111,7 @@
<button
type="button"
mat-menu-item
[disabled]="hasCollissions(change)"
[disabled]="hasCollissions(change, changes)"
(click)="setAcceptanceValue(change, 'accepted')"
>
<mat-icon>thumb_up</mat-icon>
@ -121,7 +121,7 @@
<button
type="button"
mat-menu-item
[disabled]="hasCollissions(change)"
[disabled]="hasCollissions(change, changes)"
(click)="setAcceptanceValue(change, 'rejected')"
>
<mat-icon>thumb_down</mat-icon>

View File

@ -101,11 +101,13 @@ export class MotionDetailDiffComponent extends BaseViewComponent implements Afte
return (
changes.filter((otherChange: ViewUnifiedChange) => {
return (
(otherChange.getChangeId() === change.getChangeId() &&
(otherChange.getLineFrom() >= change.getLineFrom() &&
otherChange.getLineFrom() < change.getLineTo())) ||
(otherChange.getLineTo() > change.getLineFrom() && otherChange.getLineTo() <= change.getLineTo()) ||
(otherChange.getLineFrom() < change.getLineFrom() && otherChange.getLineTo() > change.getLineTo())
otherChange.getChangeId() !== change.getChangeId() &&
((otherChange.getLineFrom() >= change.getLineFrom() &&
otherChange.getLineFrom() < change.getLineTo()) ||
(otherChange.getLineTo() > change.getLineFrom() &&
otherChange.getLineTo() <= change.getLineTo()) ||
(otherChange.getLineFrom() < change.getLineFrom() &&
otherChange.getLineTo() > change.getLineTo()))
);
}).length > 0
);