Merge pull request #5246 from jsangmeister/motion-block-check
Added an indicator if all motions of a block are finished
This commit is contained in:
commit
4d4697eee0
@ -23,6 +23,13 @@ export class ViewMotionBlock extends BaseViewModelWithAgendaItemAndListOfSpeaker
|
||||
return this._model;
|
||||
}
|
||||
|
||||
/**
|
||||
* A block is finished when all its motions are in a final state
|
||||
*/
|
||||
public get isFinished(): boolean {
|
||||
return this.motions && this.motions.length && this.motions.every(motion => motion.isInFinalState());
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the category for search
|
||||
*
|
||||
|
@ -1,10 +1,24 @@
|
||||
<os-head-bar [nav]="false">
|
||||
<!-- Title -->
|
||||
<div class="title-slot">
|
||||
<h2 *ngIf="block">
|
||||
<mat-icon *ngIf="block.internal">lock</mat-icon>
|
||||
{{ block.title }}
|
||||
</h2>
|
||||
<os-icon-container
|
||||
*ngIf="block"
|
||||
[noWrap]="true"
|
||||
icon="check"
|
||||
size="large"
|
||||
[showIcon]="block.isFinished"
|
||||
[iconTooltip]="'Finished' | translate"
|
||||
>
|
||||
<os-icon-container
|
||||
[noWrap]="true"
|
||||
icon="lock"
|
||||
size="large"
|
||||
[showIcon]="block.internal"
|
||||
[iconTooltip]="'Internal' | translate"
|
||||
>
|
||||
<h2>{{ block.title }}</h2>
|
||||
</os-icon-container>
|
||||
</os-icon-container>
|
||||
</div>
|
||||
|
||||
<!-- Menu -->
|
||||
|
@ -148,6 +148,7 @@ export class MotionBlockDetailComponent extends BaseListViewComponent<ViewMotion
|
||||
this.configService
|
||||
.get<boolean>('motions_show_sequential_numbers')
|
||||
.subscribe(show => (this.showSequential = show));
|
||||
(<any>window).comp = this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,16 +19,28 @@
|
||||
<!-- Title column -->
|
||||
<div *pblNgridCellDef="'title'; value as title; row as block; rowContext as rowContext" class="cell-slot fill">
|
||||
<a class="detail-link" [routerLink]="block.id" *ngIf="!isMultiSelect"></a>
|
||||
<!--
|
||||
TODO: Tooltips do not work when hidden under the absolute link, but they can't be above it either,
|
||||
because for some reason they don't delegate the click event. So no tooltips for now
|
||||
-->
|
||||
<div class="innerTable">
|
||||
<os-icon-container
|
||||
[noWrap]="true"
|
||||
[icon]="block.internal ? 'lock' : null"
|
||||
[icon]="block.isFinished ? 'check' : block.internal ? 'lock' : null"
|
||||
size="large"
|
||||
[matTooltip]="Internal"
|
||||
[iconTooltip]="block.isFinished ? 'Finished' : block.internal ? 'Internal' : '' | translate"
|
||||
>
|
||||
<div class="ellipsis-overflow">
|
||||
{{ title }}
|
||||
</div>
|
||||
<os-icon-container
|
||||
[noWrap]="true"
|
||||
icon="lock"
|
||||
size="large"
|
||||
[showIcon]="block.isFinished && block.internal"
|
||||
[iconTooltip]="'Internal' | translate"
|
||||
>
|
||||
<div class="ellipsis-overflow">
|
||||
{{ title }}
|
||||
</div>
|
||||
</os-icon-container>
|
||||
</os-icon-container>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user