diff --git a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue index 8f95a664e..6561f5912 100644 --- a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue +++ b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue @@ -1,9 +1,34 @@ @@ -71,6 +96,25 @@ case 'datetime': return this.i18n.t('repositories.item_card.repository_date_time_value.placeholder'); } + }, + viewPlaceholder() { + switch (this.mode) { + case 'date': + if (this.range) { + return this.i18n.t('repositories.item_card.repository_date_range_value.no_date_range'); + } + return this.i18n.t('repositories.item_card.repository_date_value.no_date'); + case 'time': + if (this.range) { + return this.i18n.t('repositories.item_card.repository_time_range_value.no_time_range'); + } + return this.i18n.t('repositories.item_card.repository_time_value.no_time'); + case 'datetime': + if (this.range) { + return this.i18n.t('repositories.item_card.repository_date_time_range_value.no_date_time_range'); + } + return this.i18n.t('repositories.item_card.repository_date_time_value.no_date_time'); + } } }, methods: {