{% extends 'base.html.twig' %} {% block title %}{{ 'Plan execution list'|trans }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %}
{{ 'validate_actions.not_started'|trans }}
{{ number_actions_by_status['not_started'] }}
{{ 'validate_actions.started'|trans }}
{{ number_actions_by_status['started'] }}
{{ 'validate_actions.validation_pending'|trans }}
{{ number_actions_by_status['pending'] }}
{{ 'validate_actions.expired'|trans }}
{{ number_actions_by_status['expired'] }}
{{ 'validate_actions.finished'|trans }}
{{ number_actions_by_status['finished'] }}
{{ 'validate_actions.total'|trans }}
{{ number_actions_by_status['total'] }}

{{ 'validate_actions.actions_by_department_and_contract'|trans }}

{% for department in departments %} {% if department.rowid in departments_number_actions|keys %}
{{department.name}}
 
{% for pc in partner_contracts %}
{{ pc.code }}
{% endfor %}
{% for code, action_number in departments_number_actions[department.rowid] %}
{{ action_number["not_started"] }} {{ 'n_of_m'|trans }} {{action_number["total"] }}
{% endfor %}
{% for code, action_number in departments_number_actions[department.rowid] %}
{{ action_number["started"] }} {{ 'n_of_m'|trans }} {{action_number["total"]}}
{% endfor %}
{% for code, action_number in departments_number_actions[department.rowid] %}
{{ action_number["pending"] }} {{ 'n_of_m'|trans }} {{action_number["total"] }}
{% endfor %}
{% for code, action_number in departments_number_actions[department.rowid] %}
{{ action_number["expired"] }} {{ 'n_of_m'|trans }} {{action_number["total"] }}
{% endfor %}
{% for code, action_number in departments_number_actions[department.rowid] %}
{{ action_number["finished"] }} {{ 'n_of_m'|trans }} {{action_number["total"] }}
{% endfor %}
{% endif %} {% endfor %}
{% if datatable_ajax == false %} {% set conditions = { 'off': { title: 'validate_actions.action_date_not_reached'|trans }, 'red': { title: 'validate_actions.action_deadline_reached'|trans }, 'amber': { title: 'validate_actions.action_started'|trans }, 'green': { title: 'validate_actions.action_finished'|trans }} %} {% set titlesbytimingperiod = { 'before': { 'not_started': 'The action planned start date has not been reached.', 'started': 'The action planned start date has not been reached, but the action has been started.', 'pending': 'The action planned start date has not been reached, but the action needs to be validated.', 'finished': 'The action planned start date has not been reached, but the action has been finished.' }, 'in': { 'not_started': 'The action should be started.', 'started': 'The action has been started.', 'pending': 'The action needs to be validated.', 'finished': 'The action has been finished.' }, 'after': { 'not_started': 'The action deadline has been reached, not marked as started.', 'started': 'The action deadline has been reached, but validation has never been requested.', 'pending': 'The action deadline has been reached, but never has been validated.', 'finished': '-' }} %} {% for action_company_entity in actions_company_entities %} {% set action = action_company_entity.fkAction %} {% set bmandatory = ((action.getFkLevel().getCode() == "europe" or action.getFkLevel().getCode() == "market") and action.getMandatory() == 1) %} {% set action_company_entity_status = action_company_entity.fkActionStatus.code %} {% if action_company_entity_status == "finished" %} {% set condition = "green" %} {% elseif current_date < action.getTimingFrom() and action_company_entity_status != "started" and action_company_entity_status != "pending" %} {% set condition = "off" %} {% elseif current_date > action.getTimingTo() and (action_company_entity_status != "finished") %} {% set condition = "red" %} {% else %} {% set condition = "amber" %} {% endif %} {% if current_date < action.timingfrom %} {% set timingperiod = 'before' %} {% elseif ((current_date >= action.timingfrom) and (current_date <= action.timingto)) %} {% set timingperiod = 'in' %} {% else %} {% set timingperiod = 'after' %} {% endif %} {% endfor %} {% endif %}
{{ 'Validate'|trans }} {{ 'Title'|trans }} {{ 'Description'|trans }} {{ 'Timing'|trans }} {{ 'Warn on'|trans }} {{ 'Contacts'|trans }}
{{ action.rowid }}
{% if action.fklevel.code == "europe" %}
{% if bmandatory %} {%endif %}
{% elseif action.fklevel.code == "market" %}
{% if bmandatory %} {%endif %}
{% else %}
{% endif %}
{{action.fkDepartment.code|upper}}
{% if action.partnerContracts|length == 3 %}
{{'all'|trans}}
{% else %} {%for pc in action.partnerContracts %}
{{pc.code}}
{% endfor %} {% endif %}
{% if action_company_entity_status == "started" or action_company_entity_status == "pending" or action_company_entity_status == "finished" %} {% endif %} {% if action_company_entity_status == "pending" or action_company_entity_status == "finished" %} {% endif %}
{% if action_company_entity_status == "finished" %}
{% endif %}
{{bmandatory}}
{{ action.title }} {{ action.description }} {{ action.getTimingStringNormalize() }} {{ action.getNotificationFromString() }} {{ (action_company_entity.fkContact) ? action_company_entity.fkContact.name : "" }}
{% if (app.user.hasRole("ROLE_MARKET") or app.user.hasRole("ROLE_EUROPE")) and privileges.canAction({"user": app.user, "plan": plan, "role": "ROLE_VALIDATE"}) %}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}