{% set estado = 0 %}
{% for ultimo in ultimoEstado %}
{% if ultimo.idestados == tickets.0.idestados %}
{% set estado = 1 %}
{% endif %}
{% endfor %}
{% set adjuntos = "" %}
{% set adjuntos = tickets.0.adjuntos %}
{% if estado == 0 or is_granted('ROLE_SUPER_ADMIN') or is_granted("ROLE_DISPACTH_1") %}
{% if (ticketOpciones == true and ticketOpciones|length >1 )or (idproyectos ==6 and tickets.0.idestados == 161 and is_granted('ROLE_CONTROL_CALIDAD') and (tickets.0.idproceso ==1 or tickets.0.idproceso ==2 or tickets.0.idproceso ==4 or tickets.0.idproceso ==61 ))%}
{% if idproyectos ==6 and (tickets.0.idproceso ==1 or tickets.0.idproceso ==2 or tickets.0.idproceso ==4 or tickets.0.idproceso ==61) and is_granted('ROLE_CONTROL_CALIDAD') and tickets.0.idestados == 161 %}
{{'Validar' | trans}} Q/A
{% endif %}
{% for consulta in ticketOpciones %}
{% if consulta.path != 'ticketDetalleNew' and is_granted(consulta.rol) %}
{{consulta.accion | trans}}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if tickets.0.linkdescarga %}
{{ticket.ref}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{{ticket.prioridad | trans}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% if proyectoDatosOpen == true %}
{% if proyectoDatosOpen.idtipoProceso == 1 %}
{{ticket.tipoProceso}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% if is_granted("ROLE_COORDINADOR") == false %}
{{ ticket.nombre}}
{% endif %}
{%if is_granted("ROLE_COORDINADOR")%}{{ticket.padre | trans |upper}}{%else%}{{ticket.estado | trans}}{%endif%}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.idSitio == 1 %}
{{ticket.codigo}}
{{ticket.sitio | upper}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{{ticket.direccion | upper}}
{{ticket.region}}
{% endif %}
{% endif %}
{% if siteTicket is not null %}
{% endif %}
{% if proyectoDatosOpen == true %}
{% if proyectoDatosOpen.userExtSolicita == 1 %}
{{ticket.userExtSolicita}}
{{ticket.tlfExtSolicita}}
{{ticket.emailExtSolicita}}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.fechaFalla == 1 %}
{{ticket.fechaFalla|date('Y-m-d H:i:s')}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true %}
{% if proyectoDatosOpen.idtipofallas == 1 %}
{{ticket.tipoFallas}}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.idfallas == 1 %}
{{ticket.fallas}}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true %}
{% if proyectoDatosOpen.fechaInicioAct == 1 %}
{{ticket.fechaInicioAct|date('Y-m-d H:i:s')}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% if is_granted('ROLE_COORDINADOR') %}
{% endif %}
{% if proyectoDatosOpen == true %}
{% if proyectoDatosOpen.fechaFinPro == 1 %}
{% if ticket.fechaFinPro == true %}
{{ticket.fechaFinPro|date('Y-m-d H:i:s')}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.fechaInicioAct == 1 and proyectoDatosOpen.fechaFinPro == 1 %}
{{ticket.duracion}}
{% endif %}
{% endif %}
{% if is_granted('ROLE_COORDINADOR') %}
{# Total dias>{{ticket.resta}}-Ericsson>{{ticket.diasEricsson}}-Cliente>{{ticket.diasCliente}}-Otros>{{ticket.diasOtros}}-ASP>{{ticket.diasAsp}}#}
{{ticket.tiempoEfectivo}}
{{ticket.tiempoEfectivoCSR}}
{{ticket.tiempoEfectivoASP}}
{% endif %}
{% for ticketsDato in ticketsDatos %}
{% if ticketsDato.type == "selectData" %}
{{ticketsDato.selectDato}}
{% if ticketsDato.descr22 == 1%}
{{'ticketDetail.datos.descripcion' | trans}}: {{ticketsDato.descr2}}
{% endif %}
{% if ticketsDato.costo2 == 1%}
{{'ticketDetail.datos.costo' | trans}}: {{ticketsDato.costo|number_format(2,',','.')}}
{% endif %}
{% elseif(ticketsDato.type == "date") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "datetime") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "text") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "textarea") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "select") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% if red == true and idproceso == 16 and ticketsDato.idetiquetas == 13 %}
{% else %}
{% endif %}
{% endif %}
{% elseif(ticketsDato.type == "longSelect") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "selectMultiple") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "number") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "time") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% elseif(ticketsDato.type == "logTime") %}
{{ticketsDato.valor}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% set tiempoLongTime = ticketsDato.valor|split(':') %}
::
{% endif %}
{% endif %}
{% endfor %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.observacion == 1 %}
{{ticket.observacion}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.comentario == 1 %}
{{ticket.cometarios}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% if proyectoDatosOpen == true%}
{% if proyectoDatosOpen.recomendacion == 1 %}
{{ticket.Recomendaciones}}
{% if (is_granted('ROLE_DISPACTH_1') and estado == 0) or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if estado != 1 or is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_CONTROL_CASOS_5") %}
{% for action in actions %}
{% if action.role %}
{% if is_granted(action.role) %}