templates/company/blocks/_message_alert.html.twig line 1

Open in your IDE?
  1. {% if is_company_completed == true 
  2.     and entitites_needed_to_be_filled.company is empty
  3.     and entitites_needed_to_be_filled.contacts is empty
  4.     and entitites_needed_to_be_filled.billing_addresses is empty
  5.     and entitites_needed_to_be_filled.delivery_addresses is empty %}
  6.     <div class="alert alert-success text-left" role="alert">
  7.         <h4 class="alert-heading">
  8.             <i class="fas fa-check-circle"></i> Fiche finalisée
  9.         </h4>
  10.         <hr>
  11.         {% if is_granted('ROLE_COMMERCIAL') %}
  12.             <p class="mb-0">Vous pouvez dès maintenant envoyer votre fiche à la comptabilité.</p>
  13.             <span>
  14.                 <a href="{{ path('company_to_accountant', {'id': company.id}) }}" class="btn btn-primary"
  15.                     onclick="return confirm('Voulez-vous envoyer la fiche à la compta {{ company.name }} par mail ?');">
  16.                     <i class="fa fa-envelope" aria-hidden="true"></i>
  17.                     <span>
  18.                         Valider la fiche et l'envoyer à la compta
  19.                     </span>
  20.                 </a>
  21.             </span>
  22.         {% elseif not is_granted('ROLE_COMMERCIAL') and not is_granted('ROLE_ACCOUNTANT') %}
  23.             <p class="mb-0">Vous pouvez dès maintenant envoyer votre fiche au commercial.</p>
  24.             <span>
  25.                 <a href="{{ path('company_submit_info', {'id': company.id}) }}" class="btn btn-primary"> 
  26.                     <i class="fa fa-envelope" aria-hidden="true"></i>
  27.                     Soumettre les informations au commercial pour validation
  28.                 </a>
  29.             </span>
  30.         {% endif %}
  31.         
  32.     </div>
  33. {% else %}
  34.     <div class="alert alert-warning text-left" role="alert">
  35.         <h5 class="alert-heading">
  36.             <i class="fas fa-exclamation-triangle"></i> 
  37.             {% if is_granted('ROLE_COMMERCIAL') %}
  38.                 Il vous reste des éléments à remplir pour envoyer votre fiche à la comptabilité:
  39.             {% elseif not is_granted('ROLE_COMMERCIAL') and not is_granted('ROLE_ACCOUNTANT') %}
  40.                 Il vous reste des éléments à remplir pour demander la validation au commercial :
  41.             {% endif %}
  42.         </h5>
  43.         <hr>
  44.         {% if missing_contact %}
  45.             <p class="mb-0">
  46.                 Il vous reste au moins un contact à renseigner 
  47.                 <a href="{{ path('contact_new', {'id_company': company.id}) }}" class="alert-link">(cliquez ici)</a>
  48.             </p>
  49.         {% endif %}
  50.         {% if missing_billing_address %}
  51.             <p class="mb-0">
  52.                 Il vous reste au moins une adresse de facturation à renseigner 
  53.                 <a href="{{ path('billing_address_new', {'id_company': company.id}) }}" class="alert-link">(cliquez ici)</a>
  54.             </p>
  55.         {% endif %}
  56.         {% if missing_delivery_address %}
  57.             <p class="mb-0">
  58.                 Il vous reste au moins une adresse de livraison à renseigner 
  59.                 <a href="{{ path('delivery_address_new', {'id_company': company.id}) }}" class="alert-link">(cliquez ici)</a>
  60.             </p>
  61.         {% endif %}
  62.         {% if entitites_needed_to_be_filled.company is not empty %}
  63.             <p class="mb-0">
  64.                 Cette fiche "société" ne semble pas complète :
  65.                 <a href="{{ path('company_edit', {'id': entitites_needed_to_be_filled.company} ) }}" class="alert-link">(cliquez ici)</a>
  66.             </p>
  67.         {% endif %}
  68.         {% if entitites_needed_to_be_filled.contacts is not empty %}
  69.             {% for contact in entitites_needed_to_be_filled.contacts %}
  70.                     <p class="mb-0">
  71.                         Cette fiche "contact" ne semble pas complète :
  72.                         <a href="{{ path('contact_edit', {'id': contact} ) }}" class="alert-link">(cliquez ici)</a>
  73.                     </p>
  74.             {% endfor %}
  75.         {% endif %}
  76.         {% if entitites_needed_to_be_filled.billing_addresses is not empty %}
  77.             {% for billing_address in entitites_needed_to_be_filled.billing_addresses %}
  78.                     <p class="mb-0">
  79.                         Cette fiche "facturation" ne semble pas complète :
  80.                         <a href="{{ path('billing_address_edit', {'id': billing_address} ) }}" class="alert-link">(cliquez ici)</a>
  81.                     </p>
  82.             {% endfor %}
  83.         {% endif %}
  84.         {% if entitites_needed_to_be_filled.delivery_addresses is not empty %}
  85.             {% for delivery_address in entitites_needed_to_be_filled.delivery_addresses %}
  86.                     <p class="mb-0">
  87.                         Cette fiche "livraison" ne semble pas complète :
  88.                         <a href="{{ path('delivery_address_edit', {'id': delivery_address} ) }}" class="alert-link">(cliquez ici)</a>
  89.                     </p>
  90.             {% endfor %}
  91.         {% endif %}
  92.     </div>
  93. {% endif %}