From 01cf4713153b2f401099c850763fb7a493650349 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Sun, 9 Jul 2023 23:11:11 +0300 Subject: [PATCH] RED-7020 - Remove Edit Dossier Dictionary dialog --- .../dictionary-details-dialog.component.html | 25 ------------ .../dictionary-details-dialog.component.ts | 39 ------------------- .../edit-dossier-dictionary.component.html | 9 ----- .../edit-dossier-dictionary.component.ts | 7 ---- .../services/dossiers-dialog.service.ts | 7 +--- .../shared-dossiers/shared-dossiers.module.ts | 3 +- apps/red-ui/src/assets/i18n/redact/de.json | 14 +------ apps/red-ui/src/assets/i18n/redact/en.json | 14 +------ apps/red-ui/src/assets/i18n/scm/de.json | 14 +------ apps/red-ui/src/assets/i18n/scm/en.json | 14 +------ 10 files changed, 10 insertions(+), 136 deletions(-) delete mode 100644 apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.html delete mode 100644 apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.ts diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.html deleted file mode 100644 index 8a83d08e7..000000000 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.html +++ /dev/null @@ -1,25 +0,0 @@ -
-
{{ 'dictionary-details.title' | translate : { readOnly: data.readOnly } }}
- -
- -
- -
- - -
-
- - -
diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.ts deleted file mode 100644 index 2a793184e..000000000 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/dictionary-details-dialog/dictionary-details-dialog.component.ts +++ /dev/null @@ -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, - ) { - 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 { - await this._addEditEntityComponent.save(); - this._dialogRef.close(true); - } -} diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.html index 8c23e65e9..e60075d6a 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.html @@ -10,15 +10,6 @@ - -
- -
{ - await this.#updateDossierDictionary(); - }); - } - async #updateDossierDictionary() { const { dossierId, dossierTemplateId } = this.dossier; this.dossierDictionary = await this._dictionaryService.loadDossierDictionary(dossierTemplateId, dossierId); diff --git a/apps/red-ui/src/app/modules/shared-dossiers/services/dossiers-dialog.service.ts b/apps/red-ui/src/app/modules/shared-dossiers/services/dossiers-dialog.service.ts index 708bb9cfb..4ec625777 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/services/dossiers-dialog.service.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/services/dossiers-dialog.service.ts @@ -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 { component: ImportRedactionsDialogComponent, dialogConfig: { disableClose: false }, }, - editDictionaryDetails: { - component: DictionaryDetailsDialogComponent, - dialogConfig: { disableClose: false }, - }, }; constructor(protected readonly _dialog: MatDialog) { diff --git a/apps/red-ui/src/app/modules/shared-dossiers/shared-dossiers.module.ts b/apps/red-ui/src/app/modules/shared-dossiers/shared-dossiers.module.ts index b285f93e9..885cfbd15 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/shared-dossiers.module.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/shared-dossiers.module.ts @@ -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], diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 87314194d..aa85fbac9 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -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}}", diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 4da79ce07..0c5c768e4 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -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}}", diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index 38db993c9..94cbae7e1 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -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}}", diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index d89f46b0b..aa7231b6b 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -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}}",