Quick sorting the reference of motions by their identifier
This commit is contained in:
parent
ee50191da6
commit
0cac6b1e8d
@ -29,7 +29,7 @@
|
||||
<!-- recommendation referencing motions -->
|
||||
<h2 *ngIf="data.data.recommendation_referencing_motions">
|
||||
<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>
|
||||
</span>
|
||||
</h2>
|
||||
|
@ -54,6 +54,11 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
||||
*/
|
||||
public allChangingObjects: ViewUnifiedChange[];
|
||||
|
||||
/**
|
||||
* Reference to all referencing motions to store sorted by `identifier`.
|
||||
*/
|
||||
public referencingMotions = [];
|
||||
|
||||
private _data: SlideData<MotionSlideData>;
|
||||
|
||||
@Input()
|
||||
@ -66,6 +71,12 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user