added an indicator if all motions of a block are finished
This commit is contained in:
parent
3ad8944b9c
commit
aa46922c8b
@ -23,6 +23,13 @@ export class ViewMotionBlock extends BaseViewModelWithAgendaItemAndListOfSpeaker
|
|||||||
return this._model;
|
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
|
* Formats the category for search
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,24 @@
|
|||||||
<os-head-bar [nav]="false">
|
<os-head-bar [nav]="false">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title-slot">
|
<div class="title-slot">
|
||||||
<h2 *ngIf="block">
|
<os-icon-container
|
||||||
<mat-icon *ngIf="block.internal">lock</mat-icon>
|
*ngIf="block"
|
||||||
{{ block.title }}
|
[noWrap]="true"
|
||||||
</h2>
|
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>
|
</div>
|
||||||
|
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
|
@ -148,6 +148,7 @@ export class MotionBlockDetailComponent extends BaseListViewComponent<ViewMotion
|
|||||||
this.configService
|
this.configService
|
||||||
.get<boolean>('motions_show_sequential_numbers')
|
.get<boolean>('motions_show_sequential_numbers')
|
||||||
.subscribe(show => (this.showSequential = show));
|
.subscribe(show => (this.showSequential = show));
|
||||||
|
(<any>window).comp = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,17 +19,29 @@
|
|||||||
<!-- Title column -->
|
<!-- Title column -->
|
||||||
<div *pblNgridCellDef="'title'; value as title; row as block; rowContext as rowContext" class="cell-slot fill">
|
<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>
|
<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">
|
<div class="innerTable">
|
||||||
<os-icon-container
|
<os-icon-container
|
||||||
[noWrap]="true"
|
[noWrap]="true"
|
||||||
[icon]="block.internal ? 'lock' : null"
|
[icon]="block.isFinished ? 'check' : block.internal ? 'lock' : null"
|
||||||
size="large"
|
size="large"
|
||||||
[matTooltip]="Internal"
|
[iconTooltip]="block.isFinished ? 'Finished' : block.internal ? 'Internal' : '' | translate"
|
||||||
|
>
|
||||||
|
<os-icon-container
|
||||||
|
[noWrap]="true"
|
||||||
|
icon="lock"
|
||||||
|
size="large"
|
||||||
|
[showIcon]="block.isFinished && block.internal"
|
||||||
|
[iconTooltip]="'Internal' | translate"
|
||||||
>
|
>
|
||||||
<div class="ellipsis-overflow">
|
<div class="ellipsis-overflow">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</div>
|
</div>
|
||||||
</os-icon-container>
|
</os-icon-container>
|
||||||
|
</os-icon-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user