otf: thirdparty corrections

This commit is contained in:
Mathieu Jaumotte 2021-09-29 19:53:28 +02:00
parent 74b649fb2c
commit d8c34c3089
2 changed files with 4 additions and 26 deletions

View File

@ -290,7 +290,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
}));
}
else if (payload.type === 'thirdparty') {
body.name = payload.data.name;
body.name = payload.data.text;
body.email = payload.data.email;
body.phonenumber = payload.data.phonenumber;
body.address = { address_id: payload.data.address.address_id };

View File

@ -19,14 +19,6 @@
</div>
<p v-if="this.options.addInfo === true" class="moreinfo">
<i v-if="thirdparty.birthdate" :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
<time v-if="thirdparty.birthdate" datetime="{{ thirdparty.birthdate.datetime }}" title="{{ birthdate }}">
{{ $t(getGender) + ' ' + $d(birthdate, 'short') }}
</time>
<time v-else-if="thirdparty.deathdate" datetime="{{ thirdparty.deathdate.datetime }}" title="{{ thirdparty.deathdate }}">
{{ birthdate }} - {{ deathdate }}
</time>
<span v-if="options.addAge === true" class="age">{{ thirdparty.age }}</span>
</p>
</div>
</div>
@ -42,9 +34,9 @@
<i class="fa fa-li fa-map-marker"></i>
<address-render-box :address="thirdparty.address" :isMultiline="isMultiline"></address-render-box>
</li>
<li v-if="thirdparty.telephone">
<li v-if="thirdparty.phonenumber">
<i class="fa fa-li fa-mobile"></i>
<a :href="'tel: ' + thirdparty.telephone">{{ thirdparty.telephone }}</a>
<a :href="'tel: ' + thirdparty.phonenumber">{{ thirdparty.phonenumber }}</a>
</li>
<li v-if="thirdparty.email">
<i class="fa fa-li fa-envelope-o"></i>
@ -78,21 +70,7 @@ export default {
} else {
return false
}
},
getGender: function() {
return this.thirdparty.gender === 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
},
getGenderIcon: function() {
return this.thirdparty.gender === 'woman' ? 'fa-venus' : this.thirdparty.gender === 'man' ? 'fa-mars' : 'fa-neuter';
},
birthdate: function(){
var date = new Date(this.thirdparty.birthdate.datetime);
return dateToISO(date);
},
deathdate: function(){
var date = new Date(this.thirdparty.deathdate.datetime);
return dateToISO(date);
},
}
}
}
</script>