{% import '@OroUI/macros.html.twig' as UI %} {% import '@OroEntityConfig/macros.html.twig' as entityConfig %} {% import '@OroAddress/macros.html.twig' as address %} {% import '@OroChannel/macros.html.twig' as channel %} {% import '@OroSales/macros.html.twig' as sales %}
{{ UI.renderProperty('oro.sales.b2bcustomer.name.label'|trans, entity.name) }} {{ channel.renderChannelProperty(entity, 'oro.sales.b2bcustomer.data_channel.label') }} {%- if is_granted('oro_account_view') and entity.account -%} {% set accountView = '' ~ UI.renderEntityViewLabel(entity.account, 'name', 'oro.account.entity_label') ~ '' %} {%- else -%} {% set accountView = UI.renderEntityViewLabel(entity.account, 'name') %} {%- endif -%} {{ UI.renderHtmlProperty('oro.sales.b2bcustomer.account.label'|trans, accountView) }} {{ UI.renderHtmlProperty('oro.contact.phones.label'|trans, entity.phones.count ? sales.renderCollectionWithPrimaryElement(entity.phones, false, entity) : null) }} {{ UI.renderHtmlProperty('oro.contact.emails.label'|trans, entity.emails.count ? sales.renderCollectionWithPrimaryElement(entity.emails, true, entity) : null) }} {{ UI.renderHtmlProperty( 'oro.sales.b2bcustomer.contact.label'|trans, UI.entityViewLink(entity.contact, entity.contact ? entity.contact|oro_format_name : '', 'oro_contact_view') ) }} {% if entity.billingAddress is not empty %} {{ UI.renderHtmlProperty('oro.sales.b2bcustomer.billing_address.label'|trans, address.renderAddress(entity.billingAddress, true)) }} {% endif %} {% if entity.shippingAddress is not empty %} {{ UI.renderHtmlProperty('oro.sales.b2bcustomer.shipping_address.label'|trans, address.renderAddress(entity.shippingAddress, true)) }} {% endif %}
{{ entityConfig.renderDynamicFields(entity) }}