{% extends "@ChillMain/layout.html.twig" %} {% set thirdParty = entity %} {% set name = thirdParty.firstname is not empty ? thirdParty.firstname ~ ' ' ~ thirdParty.name : thirdParty.name %} {% set title_ = 'Show third party %name%'|trans({'%name%' : name }) %} {% block title title_ %} {% block content %}
{% embed '@ChillMain/CRUD/_view_content.html.twig' %} {% block crud_content_header %}

{{ title_ }} {{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}

{% endblock %} {% block crud_content_view_details %}
{{ 'Name'|trans }}
{% if thirdParty.isLeaf == true and thirdParty.civility is not same as null %}{{ thirdParty.civility.name|localize_translatable_string }}{% endif %} {{ thirdParty.firstname ~ ' ' ~ thirdParty.name }}
{% if thirdParty.kind == 'company' %}
{{ 'thirdparty.NameCompany'|trans }}
{% if thirdParty.nameCompany == null %} {{ 'No nameCompany given'|trans }} {% else %} {{ thirdParty.nameCompany }} {% endif %}
{{ 'thirdparty.Acronym'|trans }}
{% if thirdParty.acronym == null %} {{ 'No acronym given'|trans }} {% else %} {{ thirdParty.acronym }} {% endif %}
{% endif %}
{{ 'thirdparty.Categories'|trans }}
{% set types = [] %} {% for t in thirdParty.thirdPartyTypes %} {% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %} {% endfor %} {% for c in thirdParty.categories %} {% set types = types|merge([ c.name|localize_translatable_string ]) %} {% endfor %}
{% if types|length > 0 %} {{ types|join(', ') }} {% else %}

{{ 'thirdparty.no_categories'|trans }}

{% endif %}
{{ 'Phonenumber'|trans }}
{% if thirdParty.telephone == null %} {{ 'thirdparty.No_phonenumber'|trans }} {% else %} {{ thirdParty.telephone|chill_format_phonenumber }} {% endif %}
{{ 'Phonenumber2'|trans }}
{% if thirdParty.telephone2 == null %} {{ 'thirdparty.No_phonenumber'|trans }} {% else %} {{ thirdParty.telephone2|chill_format_phonenumber }} {% endif %}
{{ 'email'|trans }}
{% if thirdParty.email == null %} {{ 'No email given'|trans }} {% else %} {{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }} {% endif %}
{{ 'Address'|trans }}
{% if thirdParty.address == null %} {{ 'No address given'|trans }} {% else %} {{ thirdParty.address|chill_entity_render_box({'with_valid_from': false, 'extended_infos': true }) }} {% endif %}
{{ 'Comment'|trans }}
{% if thirdParty.comment is not empty %}
{{ thirdParty.comment|chill_markdown_to_html }}
{% else %} {{ 'Any comment'|trans }} {% endif %}
{% if thirdParty.kind == 'company' %}
{{ 'Contacts'|trans }}
{% if thirdParty.activeChildren|length == 0 %}

{{ 'No contacts associated'|trans }}

{% else %}
{% for tp in thirdParty.activeChildren %}
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'isConfidential': tp.contactDataAnonymous ? true : false, 'showFusion': true }) }}
{% endfor %}
{% endif %}
{% endif %} {% if askCenter %}
{{ 'Centers'|trans }}
{% set centers = thirdParty|chill_resolve_center %} {% if centers is iterable %} {{ 'The party is visible in those centers'|trans }} : {{ centers|join(', ') }} {% elseif centers is null %} {{ 'The party is not visible in any center'|trans }} {% else %} {{ 'The party is visible in those centers'|trans }} : {{ centers }} {% endif %}
{% endif %}
{% endblock %} {% block content_form_actions_delete %}{% endblock %} {% block content_view_actions_duplicate_link %}{% endblock %} {% endembed %}
{% endblock %}