{% extends 'base.html.twig' %} {% block title %}{{ 'Plan execution list'|trans }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block breadcrumb_buttons %} {% endblock %} {% block body %}
{% if can_validate == 2 %}
{{ 'actionchoose.pending_valitation'|trans|upper }}
{% elseif can_validate == 4 %}
{{ 'actionchoose.validate'|trans|upper }}
{% elseif can_validate == 5 %}
{{ 'actionchoose.rejected'|trans|upper }}
{% endif %} {% if plan%}
{% if active_plans is not empty and active_plans|length > 1 %} {% elseif plan %} {{plan.title}} {% endif %}
{{ "Mandatory actions"|trans }}
{{ number_mandatory_actions }}
{{ "Actions currently selected"|trans }}
{% for pc in partner_contracts %}
{{ pc.code }}
{% endfor %}
{% for code, number_selected_action_pc in number_selected_actions %}
{{ number_selected_action_pc }}
{% endfor %}
{{ "Actions needed to complete plan"|trans }}
{% for pc in partner_contracts %}
{{ pc.code }}
{% endfor %}
{% for code, number_needed_actions_pc in number_needed_actions %}
{{ (number_needed_actions_pc > 0)?number_needed_actions_pc:0 }}
{% endfor %}
{{ 'choose_actions.actions_by_department_and_contract'|trans }}
{% for department in departments %}
{{department.name}}
 
{% for pc in partner_contracts %}
{{ pc.code }}
{% endfor %}
Selected
{% for code, department_action_selected_pc in department.actions_selected %}
{{ department_action_selected_pc }} {{ 'n_of_m'|trans }} {{ department.actions_needed_max}} ({{ department.actions_needed_min}} {{ 'n_min'|trans }})
{% endfor %}
Needed
{% for code, department_actions_needed_pc in department.actions_needed %}
{{ (department_actions_needed_pc > 0)?department_actions_needed_pc:0 }} {{ 'n_more'|trans }}
{% endfor %}
{% endfor %}
{% if datatable_ajax == false %} {% for action in actions %} {% set bmandatory = (( action.fklevel.code == "europe" or action.fklevel.code == "market") and action.mandatory == 1) %} {% endfor %} {% endif %}
{{ 'choose_actions.selected'|trans }} {{ 'choose_actions.title'|trans }} {{ 'choose_actions.description'|trans }} {{ 'choose_actions.timing'|trans }} {{ 'choose_actions.warn_on'|trans }} {{ 'choose_actions.responsible_person'|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 apc in action.partnerContracts %}
{{apc.code}}
{% endfor %} {% endif %}
{% set max_action_reached = 0 %} {% for apc in action.partnerContracts %} {% for key, value in departments[action.fkDepartment.rowid].max_actions_reached_pc %} {% if key == apc.code and value == 1 %} {% set max_action_reached = 1 %} {% endif %} {% endfor %} {% endfor %}
{{bmandatory}}
{{ action.title }} {{ action.description }} {{ action.getTimingStringNormalize() }} {{ action.getNotificationFromString() }}
{% if app.user.hasRole("ROLE_PARTNER") and privileges.canAction({"user": app.user, "plan": plan, "role": "ROLE_CREATE"}) and can_validate != 2 and can_validate != 4%} {% endif %}
{% if app.user.hasRole("ROLE_PARTNER") and (can_validate == 1 or can_validate == 5) %}
{% endif %} {% if is_granted("ROLE_MARKET") and is_granted("ROLE_APPROVE") and can_validate == 2 and privileges.canAction({"user": app.user, "plan": plan, "role": "ROLE_APPROVE"})%}
{% endif %}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}