RED-7020 - Remove Edit Dossier Dictionary dialog
This commit is contained in:
parent
79daeb9178
commit
01cf471315
@ -1,25 +0,0 @@
|
||||
<section class="dialog">
|
||||
<div class="dialog-header heading-l">{{ 'dictionary-details.title' | translate : { readOnly: data.readOnly } }}</div>
|
||||
|
||||
<div class="dialog-content">
|
||||
<redaction-add-edit-entity
|
||||
[dossierId]="data.dossierId"
|
||||
[dossierTemplateId]="data.dictionary.dossierTemplateId"
|
||||
[entity]="data.dictionary"
|
||||
[readOnly]="data.readOnly"
|
||||
></redaction-add-edit-entity>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!data.readOnly" class="dialog-actions">
|
||||
<iqser-icon-button
|
||||
(action)="save()"
|
||||
[disabled]="disabled"
|
||||
[label]="'dictionary-details.actions.save' | translate"
|
||||
[type]="iconButtonTypes.primary"
|
||||
></iqser-icon-button>
|
||||
|
||||
<div (click)="close()" class="all-caps-label cancel" translate="dictionary-details.actions.cancel"></div>
|
||||
</div>
|
||||
|
||||
<iqser-circle-button (action)="close()" class="dialog-close" icon="iqser:close"></iqser-circle-button>
|
||||
</section>
|
||||
@ -1,39 +0,0 @@
|
||||
import { Component, Inject, ViewChild } from '@angular/core';
|
||||
import { BaseDialogComponent } from '@iqser/common-ui';
|
||||
import { dossiersServiceProvider } from '@services/entity-services/dossiers.service.provider';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Dictionary } from '@red/domain';
|
||||
import { AddEditEntityComponent } from '@shared/components/add-edit-entity/add-edit-entity.component';
|
||||
|
||||
@Component({
|
||||
templateUrl: './dictionary-details-dialog.component.html',
|
||||
providers: [dossiersServiceProvider],
|
||||
})
|
||||
export class DictionaryDetailsDialogComponent extends BaseDialogComponent {
|
||||
@ViewChild(AddEditEntityComponent, { static: true }) private readonly _addEditEntityComponent: AddEditEntityComponent;
|
||||
|
||||
constructor(
|
||||
@Inject(MAT_DIALOG_DATA)
|
||||
readonly data: { dictionary: Dictionary; dossierId: string; readOnly: boolean },
|
||||
protected readonly _dialogRef: MatDialogRef<DictionaryDetailsDialogComponent>,
|
||||
) {
|
||||
super(_dialogRef, true);
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
return this._addEditEntityComponent.valid;
|
||||
}
|
||||
|
||||
get changed(): boolean {
|
||||
return this._addEditEntityComponent.changed;
|
||||
}
|
||||
|
||||
get disabled(): boolean {
|
||||
return this._addEditEntityComponent.disabled;
|
||||
}
|
||||
|
||||
async save(): Promise<void> {
|
||||
await this._addEditEntityComponent.save();
|
||||
this._dialogRef.close(true);
|
||||
}
|
||||
}
|
||||
@ -10,15 +10,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<iqser-circle-button
|
||||
(action)="openEditDetailsDialog()"
|
||||
[icon]="canEdit ? 'iqser:edit' : 'red:info'"
|
||||
[tooltip]="canEdit ? ('edit-dossier-dialog.dictionary.edit' | translate) : ('edit-dossier-dialog.dictionary.info' | translate)"
|
||||
class="mt-20"
|
||||
></iqser-circle-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<redaction-dictionary-manager
|
||||
|
||||
@ -70,13 +70,6 @@ export class EditDossierDictionaryComponent implements EditDossierSectionInterfa
|
||||
this._dictionaryManager.revert();
|
||||
}
|
||||
|
||||
openEditDetailsDialog(): void {
|
||||
const data = { dictionary: this.dossierDictionary, dossierId: this.dossier.id, readOnly: !this.canEdit };
|
||||
this._dialogService.openDialog('editDictionaryDetails', data, async () => {
|
||||
await this.#updateDossierDictionary();
|
||||
});
|
||||
}
|
||||
|
||||
async #updateDossierDictionary() {
|
||||
const { dossierId, dossierTemplateId } = this.dossier;
|
||||
this.dossierDictionary = await this._dictionaryService.loadDossierDictionary(dossierTemplateId, dossierId);
|
||||
|
||||
@ -4,9 +4,8 @@ import { EditDossierDialogComponent } from '../dialogs/edit-dossier-dialog/edit-
|
||||
import { AssignReviewerApproverDialogComponent } from '../dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component';
|
||||
import { ConfirmationDialogComponent, DialogConfig, DialogService, largeDialogConfig } from '@iqser/common-ui';
|
||||
import { ImportRedactionsDialogComponent } from '../../file-preview/dialogs/import-redactions-dialog/import-redactions-dialog';
|
||||
import { DictionaryDetailsDialogComponent } from '../dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component';
|
||||
|
||||
type DialogType = 'confirm' | 'editDossier' | 'assignFile' | 'importRedactions' | 'editDictionaryDetails';
|
||||
type DialogType = 'confirm' | 'editDossier' | 'assignFile' | 'importRedactions';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -29,10 +28,6 @@ export class DossiersDialogService extends DialogService<DialogType> {
|
||||
component: ImportRedactionsDialogComponent,
|
||||
dialogConfig: { disableClose: false },
|
||||
},
|
||||
editDictionaryDetails: {
|
||||
component: DictionaryDetailsDialogComponent,
|
||||
dialogConfig: { disableClose: false },
|
||||
},
|
||||
};
|
||||
|
||||
constructor(protected readonly _dialog: MatDialog) {
|
||||
|
||||
@ -11,7 +11,6 @@ import { EditDossierAttributesComponent } from './dialogs/edit-dossier-dialog/at
|
||||
import { EditDossierTeamComponent } from './dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component';
|
||||
import { DateColumnComponent } from './components/date-column/date-column.component';
|
||||
import { FileAssignService } from './services/file-assign.service';
|
||||
import { DictionaryDetailsDialogComponent } from './dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component';
|
||||
import {
|
||||
CircleButtonComponent,
|
||||
DynamicInputComponent,
|
||||
@ -41,7 +40,7 @@ const components = [
|
||||
DateColumnComponent,
|
||||
DossiersListingActionsComponent,
|
||||
];
|
||||
const dialogs = [EditDossierDialogComponent, AssignReviewerApproverDialogComponent, DictionaryDetailsDialogComponent];
|
||||
const dialogs = [EditDossierDialogComponent, AssignReviewerApproverDialogComponent];
|
||||
|
||||
@NgModule({
|
||||
declarations: [...components, ...dialogs],
|
||||
|
||||
@ -664,13 +664,6 @@
|
||||
},
|
||||
"dev-mode": "DEV",
|
||||
"dictionary": "Wörterbuch",
|
||||
"dictionary-details": {
|
||||
"actions": {
|
||||
"cancel": "",
|
||||
"save": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"dictionary-overview": {
|
||||
"compare": {
|
||||
"compare": "Vergleichen",
|
||||
@ -1130,9 +1123,7 @@
|
||||
"change-successful": "Dossier wurde aktualisiert.",
|
||||
"delete-successful": "Dossier wurde gelöscht.",
|
||||
"dictionary": {
|
||||
"edit": "",
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}",
|
||||
"info": ""
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}"
|
||||
},
|
||||
"general-info": {
|
||||
"form": {
|
||||
@ -2141,8 +2132,7 @@
|
||||
"sign-in-previous-domain": "",
|
||||
"youre-logged-out": ""
|
||||
},
|
||||
"input-placeholder": "",
|
||||
"tenant-does-not-exist": ""
|
||||
"input-placeholder": ""
|
||||
},
|
||||
"time": {
|
||||
"days": "{days} {days, plural, one{Tag} other{Tage}}",
|
||||
|
||||
@ -664,13 +664,6 @@
|
||||
},
|
||||
"dev-mode": "DEV",
|
||||
"dictionary": "Dictionary",
|
||||
"dictionary-details": {
|
||||
"actions": {
|
||||
"cancel": "Cancel",
|
||||
"save": "Save"
|
||||
},
|
||||
"title": "{readOnly, select, false{Edit } other{}}Dossier Dictionary"
|
||||
},
|
||||
"dictionary-overview": {
|
||||
"compare": {
|
||||
"compare": "Compare",
|
||||
@ -1130,9 +1123,7 @@
|
||||
"change-successful": "Dossier {dossierName} was updated.",
|
||||
"delete-successful": "Dossier {dossierName} was deleted.",
|
||||
"dictionary": {
|
||||
"edit": "Edit",
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}",
|
||||
"info": "Info"
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}"
|
||||
},
|
||||
"general-info": {
|
||||
"form": {
|
||||
@ -2141,8 +2132,7 @@
|
||||
"sign-in-previous-domain": "Sign in to a previously used domain",
|
||||
"youre-logged-out": "You have successfully been logged out."
|
||||
},
|
||||
"input-placeholder": "your domain's name",
|
||||
"tenant-does-not-exist": "Selected tenant does not exist."
|
||||
"input-placeholder": "your domain's name"
|
||||
},
|
||||
"time": {
|
||||
"days": "{days} {days, plural, one{day} other{days}}",
|
||||
|
||||
@ -664,13 +664,6 @@
|
||||
},
|
||||
"dev-mode": "DEV",
|
||||
"dictionary": "Wörterbuch",
|
||||
"dictionary-details": {
|
||||
"actions": {
|
||||
"cancel": "",
|
||||
"save": ""
|
||||
},
|
||||
"title": ""
|
||||
},
|
||||
"dictionary-overview": {
|
||||
"compare": {
|
||||
"compare": "Vergleichen",
|
||||
@ -1130,9 +1123,7 @@
|
||||
"change-successful": "Dossier wurde aktualisiert.",
|
||||
"delete-successful": "Dossier wurde gelöscht.",
|
||||
"dictionary": {
|
||||
"edit": "",
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}",
|
||||
"info": ""
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}"
|
||||
},
|
||||
"general-info": {
|
||||
"form": {
|
||||
@ -2141,8 +2132,7 @@
|
||||
"sign-in-previous-domain": "",
|
||||
"youre-logged-out": ""
|
||||
},
|
||||
"input-placeholder": "",
|
||||
"tenant-does-not-exist": ""
|
||||
"input-placeholder": ""
|
||||
},
|
||||
"time": {
|
||||
"days": "{days} {days, plural, one{Tag} other{Tage}}",
|
||||
|
||||
@ -664,13 +664,6 @@
|
||||
},
|
||||
"dev-mode": "DEV",
|
||||
"dictionary": "Dictionary",
|
||||
"dictionary-details": {
|
||||
"actions": {
|
||||
"cancel": "Cancel",
|
||||
"save": "Save"
|
||||
},
|
||||
"title": "{readOnly, select, false{Edit } other{}}Dossier Dictionary"
|
||||
},
|
||||
"dictionary-overview": {
|
||||
"compare": {
|
||||
"compare": "Compare",
|
||||
@ -1130,9 +1123,7 @@
|
||||
"change-successful": "Dossier {dossierName} was updated.",
|
||||
"delete-successful": "Dossier {dossierName} was deleted.",
|
||||
"dictionary": {
|
||||
"edit": "Edit",
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}",
|
||||
"info": "Info"
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}"
|
||||
},
|
||||
"general-info": {
|
||||
"form": {
|
||||
@ -2141,8 +2132,7 @@
|
||||
"sign-in-previous-domain": "Sign in to a previously used domain",
|
||||
"youre-logged-out": "You have successfully been logged out."
|
||||
},
|
||||
"input-placeholder": "your domain's name",
|
||||
"tenant-does-not-exist": "Selected tenant does not exist."
|
||||
"input-placeholder": "your domain's name"
|
||||
},
|
||||
"time": {
|
||||
"days": "{days} {days, plural, one{day} other{days}}",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user