add computed text()

This commit is contained in:
ogerly 2022-04-21 22:32:15 +02:00
parent ff37c1af9d
commit 39517cdf52

View File

@ -3,7 +3,7 @@
<b-row>
<b-col cols="5">
<div class="text-right">
{{ diffNow ? $t('gdd_per_link.valid_until') : $t('form.date') }}
{{ text }}
</div>
</b-col>
<b-col cols="7">
@ -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')
},
},
}
</script>