onthefly button added to view person or thirdparty + badge changed if thirdparty is a contact

This commit is contained in:
Julie Lenaerts 2022-01-31 14:39:40 +01:00
parent 222dae3c32
commit f358e78734
2 changed files with 28 additions and 4 deletions

View File

@ -32,10 +32,14 @@
{% elseif resource.thirdparty is not null %}
<div class="denomination h3">
<span class="name">{{ resource.thirdparty }}</span>
<span class="badge rounded-pill bg-thirdparty">
<span class="badge rounded-pill bg-thirdparty">
{% if resource.thirdparty.parent is not null %}
{{ 'Contact person'|trans|capitalize }}
{% else %}
{{ 'thirdparty'|trans|capitalize }}
<i class="fa fa-fw fa-user-md"></i>
</span>
{% endif %}
<i class="fa fa-fw fa-user-md"></i>
</span>
</div>
{% else %}
<div class="denomination h3">
@ -56,7 +60,7 @@
</section>
</div>
{% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', resource.person) %}
{% if is_granted('CHILL_PERSON_UPDATE', resource.personOwner) %}
<div class="item-row separator">
<div class="item-col">
<ul class="record_actions">
@ -72,6 +76,25 @@
class="btn btn-sm btn-delete"
title="{{ 'Delete'|trans }}"></a>
</li>
<li>
{% if resource.person is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: false,
targetEntity: { name: 'person', id: resource.person.id },
} %}
</span>
{% endif %}
{% if resource.thirdparty is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: false,
targetEntity: { name: 'thirdparty', id: resource.thirdparty.id },
parent: resource.thirdparty.parent
} %}
</span>
{% endif %}
</li>
</ul>
</div>
</div>

View File

@ -237,6 +237,7 @@ no comment found: "Aucun commentaire"
Select a type: "Choisissez un type"
Select a person: "Choisissez un usager"
Select a thirdparty: "Choisissez un tiers"
Contact person: "Personne de contact"
# pickAPersonType