From 9ddceebdcce9f9f2169e8bcbb9ae11512f0b3cdd Mon Sep 17 00:00:00 2001 From: ulferts Date: Mon, 24 Jun 2024 12:02:39 +0200 Subject: [PATCH] display placeholder in case of no time entry activity --- .../widgets/time-entries/list/time-entries-list.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.ts b/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.ts index 27bdcddba5ae..d7ea932a681d 100644 --- a/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.ts +++ b/frontend/src/app/shared/components/grids/widgets/time-entries/list/time-entries-list.component.ts @@ -31,6 +31,7 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo title: this.i18n.t('js.modals.destroy_time_entry.title'), }, noResults: this.i18n.t('js.grid.widgets.time_entries_list.no_results'), + placeholder: this.i18n.t('js.placeholders.default'), }; public entries:TimeEntryResource[] = []; @@ -84,7 +85,7 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo } public activityName(entry:TimeEntryResource):string { - return entry.activity.name; + return entry.activity ? entry.activity.name : this.text.placeholder; } public projectName(entry:TimeEntryResource):string {