{% extends 'base.html.twig' %} {% block importmap %} {{ importmap(['app','module', 'input','tab']) }} {% endblock %} {% import 'email/_module_item.html.twig' as email_item %} {% import 'phone/_module_item.html.twig' as phone_item %} {% import 'file/_module_item.html.twig' as file_item %} {% set data = form.vars.data %} {% set isEdit = isNotNull(form, ['vars', 'data', 'id']) %} {% block title %} {% if isEdit %} Contact - {{ data.lastname }} {{ data.firstname }} {% else %} Contact - Nouveau {% endif %} {% endblock %} {% block body %} Retour à la liste {% if isEdit %}

Contact : {{ data.lastname }} {{ data.firstname }}

{% else %}

Nouveau contact

{% endif %} {{ form_start(form, {'attr' : {'id' : form.vars.id}}) }}
{% if isEdit %} {% endif %}
{% if isNotNull(form.vars ,['data', 'contactHighlightColor']) %}
{{ form.vars.data.contactHighlightLabel }}
{% endif %} {{ form_widget(form.id) }}
{{ form_widget(form.customerCode) }} {{ form_label(form.customerCode) }}
{{ form_widget(form.enterprise) }} {{ form_label(form.enterprise) }}
{{ form_widget(form.contactHighlight) }} {{ form_label(form.contactHighlight) }}
{{ form_widget(form.isArchive) }} {{ form_label(form.isArchive) }}
{{ form_widget(form.title) }} {{ form_label(form.title) }}
{{ form_widget(form.lastname) }} {{ form_label(form.lastname) }}
{{ form_widget(form.firstname) }} {{ form_label(form.firstname) }}
{{ form_widget(form.address, {'attr' : {'data-autocomplete_postalcode' : form.postalCode.vars.id, 'data-autocomplete_city' : form.city.vars.id}}) }} {{ form_label(form.address) }}
{{ form_widget(form.postalCode) }} {{ form_label(form.postalCode) }}
{{ form_widget(form.city) }} {{ form_label(form.city) }}
{{ form_widget(form.distance) }} {{ form_label(form.distance) }}
{{ form_widget(form.distancePrice) }} {{ form_label(form.distancePrice) }}
{{ form_widget(form.duration) }} {{ form_label(form.duration) }}
{% if isEdit is defined %}
{% endif %}
Téléphone(s)
{% for phone in form.phones %} {{ phone_item.getRow({phone: phone}) }} {% endfor %}
Email(s)
{% for email in form.emails %} {{ email_item.getRow({email: email}) }} {% endfor %}
{{ form_widget(form.comment) }} {{ form_label(form.comment) }}
Équipements {% include 'contact/_stuffs.html.twig' %} {% if isEdit %}
Devis
{% for estimateFile in form.estimateFiles %} {{ file_item.getRow({file: estimateFile}) }} {% endfor %}
Facture(s)
{% for billFile in form.billFiles %} {{ file_item.getRow({file: billFile}) }} {% endfor %}
Rapport(s)
{% for reportFile in form.reportFiles %} {{ file_item.getRow({file: reportFile}) }} {% endfor %}
Autre(s)
{% for otherFile in form.otherFiles %} {{ file_item.getRow({file: otherFile}) }} {% endfor %}
{% endif %}
{{ form_row(form._token) }} {{ form_end(form,{render_rest: false}) }} {% if isEdit %} {{ include('_modal.html.twig', {'modalId' : 'modal-communication', 'contentHTML' : subFormCommunication, 'formtarget': 'communication_sub'}) }} {{ include('_modal.html.twig', {'modalId' : 'modal-miseenservice', 'contentHTML' : subFormMiseenservice, 'formtarget': 'miseenservice_sub'}) }} {{ include('_modal.html.twig', {'modalId' : 'modal-entretien', 'contentHTML' : subFormEntretien, 'formtarget': 'entretien_sub'}) }} {{ include('_modal.html.twig', {'modalId' : 'modal-depannage', 'contentHTML' : subFormDepannage, 'formtarget': 'depannage_sub'}) }} {{ include('_modal.html.twig', {'modalId' : 'modal-rappel', 'contentHTML' : subFormRappel, 'formtarget': 'rappel_sub'}) }}
{% for item in data.communications %} {% include '_index_module_item.html.twig' with { 'one' : item.subject, 'two' : (item.communicationType ? item.communicationType : '') ~ " " ~ (item.dateProcess|datefr('l d F Y')) ~ " " ~ (item.dateProcess|datefr('H:i')), 'three' : (item.description), 'four' : '' ~ ux_icon('lucide:edit') ~ '', } %} {% endfor %}
{% for item in data.miseenservices %} {% include '_index_module_item.html.twig' with { 'one' : item.label, 'two' : item.type|capitalize ~ " " ~ item.dateStart|datefr('l d F Y'), 'three' : (item.description), 'four' : '' ~ ux_icon('lucide:edit') ~ '', } %} {% endfor %}
{% for item in data.entretiens %} {% include '_index_module_item.html.twig' with { 'one' : item.label, 'two' : item.type|capitalize ~ " " ~ item.dateStart|datefr('l d F Y'), 'three' : (item.description), 'four' : '' ~ ux_icon('lucide:edit') ~ '', } %} {% endfor %}
{% for item in data.depannages %} {% include '_index_module_item.html.twig' with { 'one' : item.label, 'two' : item.type|capitalize ~ " " ~ item.dateStart|datefr('l d F Y'), 'three' : (item.description), 'four' : '' ~ ux_icon('lucide:edit') ~ '', } %} {% endfor %}
{% for item in data.rappels %} {% include '_index_module_item.html.twig' with { 'one' : item.label, 'two' : item.type|capitalize ~ " " ~ item.dateStart|datefr('l d F Y'), 'three' : (item.description), 'four' : '' ~ ux_icon('lucide:edit') ~ '', } %} {% endfor %}
{% endif %} {% endblock %} {% block javascripts %} {% endblock %}