Using thirdparty renderbox to display intervening thirdparties

This commit is contained in:
Julie Lenaerts 2021-12-09 12:35:52 +01:00
parent decc18596b
commit 119a9981af
2 changed files with 33 additions and 45 deletions

View File

@ -148,9 +148,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div v-else class="flex-table"> <div v-else class="flex-table">
<!-- <p>{{ handlingThirdParty.text }}</p>
<address-render-box :address="handlingThirdParty.address"></address-render-box> -->
<third-party-render-box <third-party-render-box
:thirdparty="handlingThirdParty" :thirdparty="handlingThirdParty"
:options="{ :options="{
@ -164,8 +162,7 @@
}"></third-party-render-box> }"></third-party-render-box>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button :title="$t('remove_handling_thirdparty')" class="btn btn-remove" <button :title="$t('remove_handling_thirdparty')" class="btn btn-remove" @click="removeHandlingThirdParty"/>
@click="removeHandlingThirdParty"></button>
</li> </li>
</ul> </ul>
</div> </div>
@ -180,32 +177,22 @@
</div> </div>
<div v-else> <div v-else>
<!-- <div class="flex-bloc mb-3"> <div class="flex-bloc mb-3">
<third-party-render-box <third-party-render-box
:v-for="t in thirdParties" v-for="thirdparty in thirdParties"
:thirdparty="t" :key="thirdparty.id"
:thirdparty="thirdparty"
:options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }" :options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }"
> >
<template v-slot:record-actions> <template v-slot:record-actions>
<ul class="record_actions"> <ul class="record_actions">
<li><on-the-fly :id="t.id" action="show"></on-the-fly></li> <li>
<li><on-the-fly :id="t.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly"></on-the-fly></li> <button :title="$t('remove_thirdparty')" class="btn btn-remove" @click="removeThirdParty(thirdparty)" />
<li><button class="btn btn-sm btn-remove" :title="$t('action.remove')" @click.prevent="$emit('remove', resource)"></button></li> </li>
</ul> </ul>
</template> </template>
</third-party-render-box> </third-party-render-box>
</div> --> </div>
<ul>
<li v-for="t in thirdParties">
<p>{{ t.text }}</p>
<address-render-box :address="t.address"></address-render-box>
<ul class="record_actions">
<button :title="$t('remove_thirdparty')" class="btn btn-remove"
@click="removeThirdParty(t)"></button>
</ul>
</li>
</ul>
</div> </div>
<ul class="record_actions"> <ul class="record_actions">
@ -222,17 +209,17 @@
</ul> </ul>
</div> </div>
<div> <div>
<pick-template <pick-template
entityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork" entityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
:templates="this.templatesAvailablesForAction" :templates="this.templatesAvailablesForAction"
:entityId="work.id" :entityId="work.id"
:beforeMove="beforeGenerateTemplate"> :beforeMove="beforeGenerateTemplate">
<template v-slot:title> <template v-slot:title>
<h3>{{ $t('Generate doc') }}</h3> <h3>{{ $t('Generate doc') }}</h3>
</template> </template>
</pick-template> </pick-template>
</div> </div>
<div v-if="errors.length > 0" id="errors" class="alert alert-danger flashbag"> <div v-if="errors.length > 0" id="errors" class="alert alert-danger flashbag">
<p>{{ $t('fix_these_errors') }}</p> <p>{{ $t('fix_these_errors') }}</p>
@ -460,8 +447,8 @@ export default {
this.$store.dispatch('submit'); this.$store.dispatch('submit');
}, },
beforeGenerateTemplate() { beforeGenerateTemplate() {
console.log('before generate'); console.log('before generate');
return Promise.resolve(); return Promise.resolve();
} }
} }
}; };
@ -477,15 +464,15 @@ div#workEditor {
grid-template-columns: 50%; grid-template-columns: 50%;
column-gap: 0rem; column-gap: 0rem;
grid-template-areas: grid-template-areas:
"title title" "title title"
"startDate endDate" "startDate endDate"
"comment comment" "comment comment"
"objectives objectives" "objectives objectives"
"evaluations evaluations" "evaluations evaluations"
"persons persons" "persons persons"
"handling handling" "handling handling"
"tparties tparties" "tparties tparties"
"errors errors"; "errors errors";
#title { #title {
grid-area: title; } grid-area: title; }

View File

@ -97,6 +97,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
</section> </section>