widget addPersons: fix persons without birthdate

This commit is contained in:
Julien Fastré 2021-06-29 22:40:23 +02:00
parent e4adafafc8
commit 028c3e0c31

View File

@ -4,7 +4,7 @@
<span class="name"> <span class="name">
{{ item.result.text }} {{ item.result.text }}
</span> </span>
<span class="birthday"> <span class="birthday" v-if="hasBirthdate">
{{ $d(item.result.birthdate.datetime, 'short') }} {{ $d(item.result.birthdate.datetime, 'short') }}
</span> </span>
@ -31,6 +31,11 @@ export default {
components: { components: {
OnTheFly OnTheFly
}, },
props: ['item'] props: ['item'],
computed: {
hasBirthdate() {
return this.item.result.birthdate !== null;
}
}
} }
</script> </script>