Merge pull request #5035 from GabrielInTheWorld/sortingReferMotions
Quick sorting the reference of motions by their identifier
This commit is contained in:
commit
a688bd0ffe
@ -29,7 +29,7 @@
|
|||||||
<!-- recommendation referencing motions -->
|
<!-- recommendation referencing motions -->
|
||||||
<h2 *ngIf="data.data.recommendation_referencing_motions">
|
<h2 *ngIf="data.data.recommendation_referencing_motions">
|
||||||
<span translate>Referring motions</span>:
|
<span translate>Referring motions</span>:
|
||||||
<span *ngFor="let titleInformation of data.data.recommendation_referencing_motions; let last = last">
|
<span *ngFor="let titleInformation of referencingMotions; let last = last">
|
||||||
{{ getIdentifierOrTitle(titleInformation) }}<span *ngIf="!last">,</span>
|
{{ getIdentifierOrTitle(titleInformation) }}<span *ngIf="!last">,</span>
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -54,6 +54,11 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
|||||||
*/
|
*/
|
||||||
public allChangingObjects: ViewUnifiedChange[];
|
public allChangingObjects: ViewUnifiedChange[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference to all referencing motions to store sorted by `identifier`.
|
||||||
|
*/
|
||||||
|
public referencingMotions = [];
|
||||||
|
|
||||||
private _data: SlideData<MotionSlideData>;
|
private _data: SlideData<MotionSlideData>;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
@ -66,6 +71,12 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
|||||||
|
|
||||||
this.textDivStyles.width = value.data.show_meta_box ? 'calc(100% - 250px)' : '100%';
|
this.textDivStyles.width = value.data.show_meta_box ? 'calc(100% - 250px)' : '100%';
|
||||||
|
|
||||||
|
if (value.data.recommendation_referencing_motions) {
|
||||||
|
this.referencingMotions = value.data.recommendation_referencing_motions.sort((a, b) =>
|
||||||
|
a.identifier.localeCompare(b.identifier)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.recalcUnifiedChanges();
|
this.recalcUnifiedChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user