From 39517cdf52404e136ba149dbc4ecb1be6a2a95b5 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 21 Apr 2022 22:32:15 +0200 Subject: [PATCH] add computed text() --- .../src/components/TransactionRows/DateRow.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/TransactionRows/DateRow.vue b/frontend/src/components/TransactionRows/DateRow.vue index 5f526caaf..5998be134 100644 --- a/frontend/src/components/TransactionRows/DateRow.vue +++ b/frontend/src/components/TransactionRows/DateRow.vue @@ -3,7 +3,7 @@
- {{ diffNow ? $t('gdd_per_link.valid_until') : $t('form.date') }} + {{ text }}
@@ -27,6 +27,20 @@ export default { required: false, default: false, }, + validLink: { + type: Boolean, + required: false, + default: false, + }, + }, + computed: { + text() { + if (this.diffNow) + return this.validLink + ? this.$t('gdd_per_link.validUntil') + : this.$t('gdd_per_link.expiredOn') + return this.$t('form.date') + }, }, }