mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
Merge branch 'master' into person_renderbox_thirdparty_onthefly
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
// CURRENTLY NOT IN USE
|
||||
|
||||
<template>
|
||||
|
||||
<li v-if="address" class="chill-entity entity-address">
|
||||
<i v-if="options.with_picto == true" class="fa fa-fw fa-map-marker"></i>
|
||||
<span v-if="options.render == 'list' || options.render == 'list'" :class="'address ' + {'multiline' : options.multiline === true}">
|
||||
|
||||
|
||||
<!-- if address.street is not empty -->
|
||||
<p v-if="address.street" class="street">{{ address.street }}
|
||||
<!-- if address.streetNumber is not empty -->
|
||||
<span v-if="address.streetNumber" class="streetnumber">{{ address.streetNumber }}</span>
|
||||
</p>
|
||||
|
||||
<!-- if options['extended_infos'] -->
|
||||
<div v-if="options.extended_infos == true">
|
||||
<span v-if="address.floor" class="floor">{{ address.floor }}</span>
|
||||
<span v-if="address.corridor" class="corridor">{{ address.corridor }}</span>
|
||||
<span v-if="address.steps" class="steps">{{ address.steps }}</span>
|
||||
<span v-if="address.buildingName" class="buildingName">{{ address.buildingName }}</span>
|
||||
<span v-if="address.flat" class="flat">{{ address.flat }}</span>
|
||||
<span v-if="address.distribution" class="distribution">{{ address.distribution }}</span>
|
||||
<span v-if="address.extra" class="extra">{{ address.extra }}</span>
|
||||
</div>
|
||||
|
||||
<!-- if address.postCode is not empty -->
|
||||
<div v-if="address.postCode">
|
||||
<p class="postcode">
|
||||
<span class="code">{{ address.postCode.code }}</span>
|
||||
<span class="name">{{ address.postCode.name }}</span>
|
||||
</p>
|
||||
<p class="country">{{ address.postCode.country.name }}</p>
|
||||
</div>
|
||||
|
||||
</span>
|
||||
</li>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default{
|
||||
name: "AddressRenderBox",
|
||||
props: ['address', 'options']
|
||||
}
|
||||
|
||||
</script>
|
@@ -44,47 +44,67 @@
|
||||
</div>
|
||||
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
<div class="action">
|
||||
<slot name="record-actions"></slot>
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
|
||||
<li v-if="person.current_household_address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="person.current_household_address" :isMultiline="isMultiline"></address-render-box>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<li v-if="person.current_household_id">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box v-if="person.current_household_address"
|
||||
:address="person.current_household_address"
|
||||
:isMultiline="isMultiline">
|
||||
</address-render-box>
|
||||
<p v-else class="chill-no-data-statement">
|
||||
{{ $t('renderbox.household_without_address') }}
|
||||
</p>
|
||||
<a v-if="options.addHouseholdLink === true"
|
||||
:href="getCurrentHouseholdUrl"
|
||||
:title="$t('persons_associated.show_household_number', {id: person.current_household_id})">
|
||||
<span class="badge rounded-pill bg-chill-beige">
|
||||
<i class="fa fa-fw fa-home"></i><!--{{ $t('persons_associated.show_household') }}-->
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.mobilenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + person.mobilenumber">{{ person.mobilenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<li v-if="person.phonenumber">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<a :href="'tel: ' + person.phonenumber">{{ person.phonenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<li v-if="person.mobilenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a :href="'tel: ' + person.mobilenumber">{{ person.mobilenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<li v-if="person.phonenumber">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<a :href="'tel: ' + person.phonenumber">{{ person.phonenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.center && options.addCenter">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person.center.name }}
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<slot name="custom-zone"></slot>
|
||||
<li v-if="person.center && options.addCenter">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person.center.name }}
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
<slot name="custom-zone"></slot>
|
||||
|
||||
</ul>
|
||||
|
||||
<slot name="record-actions"></slot>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -119,7 +139,7 @@ export default {
|
||||
components: {
|
||||
AddressRenderBox
|
||||
},
|
||||
props: ['person', 'options', 'render'],
|
||||
props: ['person', 'options', 'render', 'returnPath'],
|
||||
computed: {
|
||||
getGenderTranslation: function() {
|
||||
return this.person.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||
@@ -155,12 +175,12 @@ export default {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
altNameLabel: function(){
|
||||
altNameLabel: function() {
|
||||
for(let i = 0; i < this.person.altNames.length; i++){
|
||||
return this.person.altNames[i].label
|
||||
}
|
||||
},
|
||||
altNameKey: function(){
|
||||
altNameKey: function() {
|
||||
for(let i = 0; i < this.person.altNames.length; i++){
|
||||
return this.person.altNames[i].key
|
||||
}
|
||||
@@ -168,7 +188,7 @@ export default {
|
||||
getUrl: function() {
|
||||
return `/fr/person/${this.person.id}/general`;
|
||||
},
|
||||
getAge: function(){
|
||||
getAge: function() {
|
||||
if(this.person.birthdate && !this.person.deathdate){
|
||||
const birthday = new Date(this.person.birthdate.datetime)
|
||||
const now = new Date()
|
||||
@@ -184,6 +204,10 @@ export default {
|
||||
// todo: change this
|
||||
return "Age unknown"
|
||||
}
|
||||
},
|
||||
getCurrentHouseholdUrl: function() {
|
||||
let returnPath = this.returnPath ? `?returnPath=${this.returnPath}` : ``;
|
||||
return `/fr/person/household/${this.person.current_household_id}/summary${returnPath}`
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,17 +215,6 @@ export default {
|
||||
|
||||
<style lang='scss'>
|
||||
|
||||
span.fa-holder {
|
||||
width: 1em;
|
||||
margin: -10px 0.3em -8px 0;
|
||||
i:last-child {
|
||||
font-weight: 900;
|
||||
color: white;
|
||||
font-size: 70%;
|
||||
font-family: "Open Sans Extrabold";
|
||||
}
|
||||
}
|
||||
|
||||
.lastname:before{
|
||||
content: " "
|
||||
}
|
||||
|
Reference in New Issue
Block a user