RED-10332 - Dossier Template not changeable when comparing dossier dictionaries in Edit dossier modal
This commit is contained in:
parent
3d26a73b05
commit
82e31fffd8
@ -29,63 +29,67 @@
|
||||
</div>
|
||||
|
||||
<ng-container>
|
||||
<div *ngIf="dossierTemplates" class="iqser-input-group w-200 mt-0 mr-8">
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDossierTemplate"
|
||||
[disabled]="!compare || dossierTemplates.length === 1"
|
||||
[placeholder]="
|
||||
selectedDossierTemplate.id ? selectedDossierTemplate.name : (selectedDossierTemplate.name | translate)
|
||||
"
|
||||
>
|
||||
<ng-container *ngFor="let dossierTemplate of dossierTemplates">
|
||||
<mat-option
|
||||
*ngIf="!initialDossierTemplateId || dossierTemplate?.id !== selectedDossierTemplate.id"
|
||||
[class.mat-mdc-option-active]="false"
|
||||
[value]="dossierTemplate"
|
||||
>
|
||||
{{ dossierTemplate.id ? dossierTemplate.name : (dossierTemplate.name | translate) }}
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@if (dossierTemplates) {
|
||||
<div class="iqser-input-group w-200 mt-0 mr-8">
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDossierTemplate"
|
||||
[disabled]="!compare || dossierTemplates.length === 1"
|
||||
[placeholder]="
|
||||
selectedDossierTemplate.id ? selectedDossierTemplate.name : (selectedDossierTemplate.name | translate)
|
||||
"
|
||||
>
|
||||
@for (dossierTemplate of dossierTemplates; track dossierTemplate) {
|
||||
@if (!initialDossierTemplateId || dossierTemplate?.id !== selectedDossierTemplate.id) {
|
||||
<mat-option [class.mat-mdc-option-active]="false" [value]="dossierTemplate">
|
||||
{{ dossierTemplate.id ? dossierTemplate.name : (dossierTemplate.name | translate) }}
|
||||
</mat-option>
|
||||
}
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="iqser-input-group w-200 mt-0">
|
||||
<mat-form-field *ngIf="initialDossierTemplateId">
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDossier"
|
||||
[disabled]="!compare || (dossiers.length === 1 && !optionNotSelected)"
|
||||
[placeholder]="selectedDossier.dossierId ? selectedDossier.dossierName : (selectDictionary.label | translate)"
|
||||
>
|
||||
<ng-container *ngFor="let dossier of dossiers; let index = index">
|
||||
<mat-option
|
||||
*ngIf="dossier.dossierId !== selectedDossier.dossierId"
|
||||
[class.mat-mdc-option-active]="false"
|
||||
[value]="dossier"
|
||||
>
|
||||
{{ dossier.dossierName }}
|
||||
</mat-option>
|
||||
<mat-divider
|
||||
*ngIf="index === dossiers.length - 2 && !selectedDossier.dossierId?.includes('template')"
|
||||
></mat-divider>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (initialDossierTemplateId) {
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDossier"
|
||||
[disabled]="!compare || (dossiers.length === 1 && !optionNotSelected)"
|
||||
[placeholder]="
|
||||
selectedDossier.dossierId ? selectedDossier.dossierName : (selectDictionary.label | translate)
|
||||
"
|
||||
>
|
||||
@for (dossier of dossiers; track dossier; let index = $index) {
|
||||
@if (dossier.dossierId !== selectedDossier.dossierId) {
|
||||
<mat-option [class.mat-mdc-option-active]="false" [value]="dossier">
|
||||
{{ dossier.dossierName }}
|
||||
</mat-option>
|
||||
@if (index === dossiers.length - 2 && !selectedDossier.dossierId?.includes('template')) {
|
||||
<mat-divider></mat-divider>
|
||||
}
|
||||
}
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="!initialDossierTemplateId">
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDictionary"
|
||||
[disabled]="!compare || !templateSelected"
|
||||
[placeholder]="selectedDictionary.id ? selectedDictionary.label : (selectDictionary.label | translate)"
|
||||
>
|
||||
<ng-container *ngFor="let dictionary of dictionaries; let index = index">
|
||||
<mat-option [value]="dictionary">
|
||||
{{ dictionary.id ? dictionary.label : (dictionary.label | translate) }}
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (!initialDossierTemplateId) {
|
||||
<mat-form-field>
|
||||
<mat-select
|
||||
[(ngModel)]="selectedDictionary"
|
||||
[disabled]="!compare || !templateSelected"
|
||||
[placeholder]="selectedDictionary.id ? selectedDictionary.label : (selectDictionary.label | translate)"
|
||||
>
|
||||
@for (dictionary of dictionaries; track dictionary; let index = $index) {
|
||||
<mat-option [value]="dictionary">
|
||||
{{ dictionary.id ? dictionary.label : (dictionary.label | translate) }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
@ -100,20 +104,24 @@
|
||||
[showDiffEditor]="compare && showDiffEditor"
|
||||
></redaction-editor>
|
||||
|
||||
<div *ngIf="compare && optionNotSelected" class="no-dictionary-selected">
|
||||
<mat-icon svgIcon="red:dictionary"></mat-icon>
|
||||
<span class="heading-l" translate="dictionary-overview.select-dictionary"></span>
|
||||
</div>
|
||||
@if (compare && optionNotSelected) {
|
||||
<div class="no-dictionary-selected">
|
||||
<mat-icon svgIcon="red:dictionary"></mat-icon>
|
||||
<span class="heading-l" translate="dictionary-overview.select-dictionary"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div *ngIf="withFloatingActions && !!editor?.hasChanges && canEdit && !isLeavingPage" [class.offset]="compare" class="changes-box">
|
||||
<iqser-icon-button
|
||||
(action)="saveDictionary.emit()"
|
||||
[disabled]="!!_loadingService.isLoading()"
|
||||
[label]="'dictionary-overview.save-changes' | translate"
|
||||
[type]="iconButtonTypes.primary"
|
||||
icon="iqser:check"
|
||||
></iqser-icon-button>
|
||||
<div (click)="revert()" class="all-caps-label cancel" translate="dictionary-overview.revert-changes"></div>
|
||||
</div>
|
||||
@if (withFloatingActions && !!editor?.hasChanges && canEdit && !isLeavingPage) {
|
||||
<div [class.offset]="compare" class="changes-box">
|
||||
<iqser-icon-button
|
||||
(action)="saveDictionary.emit()"
|
||||
[disabled]="!!_loadingService.isLoading()"
|
||||
[label]="'dictionary-overview.save-changes' | translate"
|
||||
[type]="iconButtonTypes.primary"
|
||||
icon="iqser:check"
|
||||
></iqser-icon-button>
|
||||
<div (click)="revert()" class="all-caps-label cancel" translate="dictionary-overview.revert-changes"></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user