diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts
index efc7a6238..b37bfa6ba 100644
--- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts
+++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts
@@ -16,6 +16,7 @@ import { DossierStatsService } from '@services/entity-services/dossier-stats.ser
import { firstValueFrom } from 'rxjs';
import { DossierStateService } from '@services/entity-services/dossier-state.service';
import { DOSSIER_TEMPLATE_ID } from '@utils/constants';
+import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'redaction-edit-dossier-general-info',
@@ -44,6 +45,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
private readonly _router: Router,
private readonly _editDossierDialogRef: MatDialogRef,
private readonly _toaster: Toaster,
+ private readonly _translateService: TranslateService,
) {}
get changed(): boolean {
@@ -71,7 +73,17 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
return this.hasDueDate && this.form.get('dueDate').value === null;
}
- async ngOnInit() {
+ get statusPlaceholder(): string {
+ if (this.states.length === 0) {
+ return this._translateService.instant('edit-dossier-dialog.general-info.form.dossier-status.no-status-placeholder');
+ } else if (this.currentStatus) {
+ return this.currentStatus.name;
+ } else {
+ return this._translateService.instant('edit-dossier-dialog.general-info.form.dossier-status.placeholder');
+ }
+ }
+
+ ngOnInit() {
this.#filterInvalidDossierTemplates();
this.form = this.#getForm();
if (!this.permissionsService.canEditDossier(this.dossier)) {
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index 129817d95..0864eb2d2 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -418,7 +418,7 @@
},
"suggestion": "Would you like to replace the states of the Dossiers with another status?",
"title": "Delete Dossier Status",
- "warning": "The {name} status is assigned to {count} Dossiers."
+ "warning": "The {name} status is assigned to {count} {count, plural, one{Dossier} other{Dossiers}}."
},
"confirm-delete-file-attribute": {
"cancel": "Keep {type, select, single{Attribute} bulk{Attributes} other{}}",
@@ -1010,6 +1010,7 @@
},
"dossier-status": {
"label": "Dossier Status",
+ "no-status-placeholder": "This dossier template has no states",
"placeholder": "Undefined"
},
"due-date": "Due Date",
diff --git a/libs/common-ui b/libs/common-ui
index d4b1bb5c0..f54374859 160000
--- a/libs/common-ui
+++ b/libs/common-ui
@@ -1 +1 @@
-Subproject commit d4b1bb5c07594dbce9d78cf56d26f75334116aaf
+Subproject commit f54374859ec75ea73921b9e6a934bd3747f9721d