mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
AccompanyingCourse: fix errors with renderbox into Resources
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<person-render-box
|
||||
:options="{
|
||||
addInfo : true,
|
||||
addId : true,
|
||||
addId : false,
|
||||
addEntity: false,
|
||||
addLink: false,
|
||||
addAltNames: true,
|
||||
|
@@ -1,63 +1,54 @@
|
||||
<template>
|
||||
<third-party-render-box
|
||||
:options="{
|
||||
addLink : false,
|
||||
addId : false,
|
||||
addEntity: true,
|
||||
addInfo: true
|
||||
}"
|
||||
:thirdparty="resource.resource"
|
||||
<person-render-box
|
||||
v-if="resource.resource.type === 'person'"
|
||||
:person="resource.resource"
|
||||
:options="{ addInfo : true, addId : false, addEntity: true, addLink: false, addAltNames: true, addAge : false, hLevel : 1 }"
|
||||
>
|
||||
<template v-slot:record-actions>
|
||||
<ul class="record_actions">
|
||||
<button-location
|
||||
v-if="hasCurrentHouseholdAddress"
|
||||
v-bind:person="participation.person">
|
||||
</button-location>
|
||||
<li>
|
||||
<on-the-fly
|
||||
v-bind:type="resource.resource.type"
|
||||
v-bind:id="resource.resource.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
v-bind:type="resource.resource.type"
|
||||
v-bind:id="resource.resource.id"
|
||||
action="edit">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-remove"
|
||||
v-bind:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', resource)">
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
<template v-slot:record-actions>
|
||||
<ul class="record_actions">
|
||||
<button-location v-if="hasCurrentHouseholdAddress" :person="resource.resource"></button-location>
|
||||
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="show"></on-the-fly></li>
|
||||
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="edit"></on-the-fly></li>
|
||||
<li><button class="btn btn-sm btn-remove" :title="$t('action.remove')" @click.prevent="$emit('remove', resource)"></button></li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
</person-render-box>
|
||||
<third-party-render-box
|
||||
v-if="resource.resource.type === 'thirdparty'"
|
||||
:thirdparty="resource.resource"
|
||||
:options="{ addLink : false, addId : false, addEntity: true, addInfo: true }"
|
||||
>
|
||||
<template v-slot:record-actions>
|
||||
<ul class="record_actions">
|
||||
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="show"></on-the-fly></li>
|
||||
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="edit"></on-the-fly></li>
|
||||
<li><button class="btn btn-sm btn-remove" :title="$t('action.remove')" @click.prevent="$emit('remove', resource)"></button></li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
</third-party-render-box>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
||||
import ButtonLocation from '../ButtonLocation.vue';
|
||||
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue'
|
||||
import PersonRenderBox from 'ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue';
|
||||
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue';
|
||||
|
||||
export default {
|
||||
name: 'ResourceItem',
|
||||
components: {
|
||||
OnTheFly,
|
||||
ButtonLocation,
|
||||
PersonRenderBox,
|
||||
ThirdPartyRenderBox
|
||||
},
|
||||
props: ['resource'],
|
||||
emits: ['remove'],
|
||||
computed: {
|
||||
hasCurrentHouseholdAddress() {
|
||||
if ( this.resource.resource.type === 'person'
|
||||
&& this.resource.resource.current_household_address !== null ) {
|
||||
if ( this.resource.resource.current_household_address !== null ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user