RED-7023 - Option to compare (effective) dossier dictionary with template dictionary

This commit is contained in:
Valentin Mihai 2023-10-31 00:08:43 +02:00
parent 9bc52de57d
commit 9d8a9c04ad
3 changed files with 18 additions and 2 deletions

View File

@ -33,9 +33,10 @@
icon="iqser:download"
></iqser-circle-button>
</div>
<div class="compare">
<div class="iqser-input-group mr-16">
<mat-checkbox [(ngModel)]="compare" color="primary">
<mat-checkbox (change)="toggleCompareMode()" color="primary">
{{ 'dictionary-overview.compare.compare' | translate }}
</mat-checkbox>
</div>
@ -64,7 +65,11 @@
</div>
</ng-container>
<div *ngIf="!filterByDossierTemplate && !!dossiers.length" class="iqser-input-group w-200 mt-0">
<div
*ngIf="!filterByDossierTemplate && !!dossiers.length"
class="iqser-input-group w-200 mt-0"
[class.not-clickable]="dossiers.length === 2 && !!selectedDossier.id"
>
<mat-form-field>
<mat-select
[(ngModel)]="selectedDossier"

View File

@ -52,6 +52,10 @@ form {
color: black;
}
}
.not-clickable {
pointer-events: none;
}
}
.w-450 {

View File

@ -217,6 +217,13 @@ export class DictionaryManagerComponent implements OnChanges {
this._scrollToCurrentMatch();
}
toggleCompareMode() {
this.compare = !this.compare;
if (!this.compare) {
this.selectedDossier = this.selectDossier;
}
}
ngOnChanges(changes: SimpleChanges): void {
if (
(changes.selectedDictionaryType || changes.activeEntryType) &&