
{% extends 'base.html.twig' %}

{% block preloader %}{% endblock %}

{% block title %}Mis Servicios{% endblock %}

{% block body %}

<div class="container pb-5">

    <h2 class="my-4 text-primary">
        Servicios
    </h2>

    <div class="row">

            <div class="col-md-12 mb-3">
                <div class="card">

                    <div class="tab-area card-header bg-primary">
                        <ul class="nav nav-pills nav-tabs nav-fill card-header-tabs">

                            <li class="nav-item mr-3">
                                <a data-toggle="list" role="tab" class="nav-link active" href="#hosting-area">
                                    <i class="fas fa-hdd" aria-hidden="true"></i>
                                    Hostings
                                </a>
                            </li>
                            <li class="nav-item mr-3">
                                <a data-toggle="list" class="nav-link" href="#dominios-area">
                                    <i class="fas fa-globe" aria-hidden="true"></i>
                                    Dominios
                                </a>
                            </li>
                            <li class="nav-item mr-3">
                                <a data-toggle="list" class="nav-link" href="#ordenes-area">
                                    <i class="fas fa-clipboard-list" aria-hidden="true"></i>
                                    Ordenes
                                </a>
                            </li>
                        </ul>
                    </div>

<div class="card-body tab-content">

<div class="tab-pane fade show active" id="hosting-area" role="tabpanel">
    <div class="row">

{% if hostings is not empty %}

    {% for index, hosting in hostings %}

    <div class="col-md-6 mb-3">

<div class="mb-4">
    <div class="card">

        <div class="card-header bg-light text-center">
            <strong><i class="fas fa-hdd" aria-hidden="true"></i> Hosting #{{ hosting.id }}</strong>
        </div>

        <ul class="list-group list-group-flush">
            <li class="list-group-item" >

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Plan</strong>
                    </div>
                    <div class="text-primary">
                        {{ hosting.plan }}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Dominio a usar</strong>
                    </div>
                    <div class="text-primary">
                        {{ hosting.detalleA }}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Estatus</strong>
                    </div>
                    <div class="text-primary">
                        {% include 'all/hosting/_estatus.html.twig' with {'estatus':hosting.estatus} %}
                    </div>
                </div>
            </li>


            <li class="list-group-item">
                <h5 class="card-title text-primary text-d">Orden Vigente</h5>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Correlativo</strong>
                    </div>
                    <div class="text-primary">
                        <a class="not-decoration" href="{{ path('orden_ver', {'id': hosting.ordA}) }}" title="Ver">
                            {{ hosting.correlativoA }}
                            <i class="fas fa-eye fa-lg"></i>
                        </a>
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Periodo</strong>
                    </div>
                    <div class="text-primary">
                        {{ hosting.inicioA|date("d/m/Y") }} al {{ hosting.finA|date("d/m/Y") }}
                    </div>
                </div>

            </li>

        {% if hosting.correlativoU is not empty %}

            <li class="list-group-item">
                <h5 class="card-title text-primary text-d">Ultima Orden</h5>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Correlativo</strong>
                    </div>
                    <div class="text-primary">
                        <a class="not-decoration" href="{{ path('orden_ver', {'id': hosting.ordU}) }}" title="Ver">
                            {{ hosting.correlativoU }}
                            <i class="fas fa-eye fa-lg"></i>
                        </a>
                    </div>
                </div>
                <hr/>

            {% if hosting.inicioU is not empty %}
                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Periodo</strong>
                    </div>
                    <div class="text-primary">
                        {{ hosting.inicioU|date("d/m/Y") }} al {{ hosting.finU|date("d/m/Y") }}
                    </div>
                </div>
                <hr/>
            {% endif %}

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Fecha Solicitud</strong>
                    </div>
                    <div class="text-primary">
                        {{ hosting.creadoU|date('d/m/Y') }}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Estatus</strong>
                    </div>
                    <div class="text-primary">
                        {% include 'all/orden/_estatusOH.html.twig' with {'estatus':hosting.estatusU} %}
                    </div>
                </div>

            </li>
        {% endif %}

        </ul>

    </div>
</div>

    </div>



    {% endfor %}

{% else %}

    <div>
        <strong>No tiene / No aplica</strong>
    </div>

{% endif %}

    </div>
</div>



<div class="tab-pane fade" id="dominios-area" role="tabpanel">
    <div class="row">

{% if dominios is not empty %}

    {% for index, dominio in dominios %}

<div class="col-md-6 mb-3">

<div class="mb-4">
    <div class="card">

        <div class="card-header bg-light text-center">
            <strong><i class="fas fa-globe" aria-hidden="true"></i> Dominio #{{ dominio.id }}</strong>
        </div>

        <ul class="list-group list-group-flush">
            <li class="list-group-item" >

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Nombre</strong>
                    </div>
                    <div class="text-primary">
                        {{ dominio.nombre }}.{{ dominio.extension }}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Estatus</strong>
                    </div>
                    <div class="text-primary">
                        {% include 'all/dominio/_estatus.html.twig' with {'estatus':dominio.estatus} %}
                    </div>
                </div>

            </li>


            <li class="list-group-item">
                <h5 class="card-title text-primary text-d">Orden Vigente</h5>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Correlativo</strong>
                    </div>
                    <div class="text-primary">
                        <a class="not-decoration" href="{{ path('orden_ver', {'id': dominio.ordA}) }}" title="Ver">
                            {{ dominio.correlativoA }}
                            <i class="fas fa-eye fa-lg"></i>
                        </a>
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Periodo</strong>
                    </div>
                    <div class="text-primary">
                        {{ dominio.inicioA|date("d/m/Y") }} al {{ dominio.finA|date("d/m/Y") }}
                    </div>
                </div>
            </li>

        {% if dominio.correlativoU is not empty %}

            <li class="list-group-item">
                <h5 class="card-title text-primary text-d">Ultima Orden</h5>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Correlativo</strong>
                    </div>
                    <div class="text-primary">
                        <a class="not-decoration" href="{{ path('orden_ver', {'id': dominio.ordU}) }}" title="Ver">
                            {{ dominio.correlativoU }}
                            <i class="fas fa-eye fa-lg"></i>
                        </a>
                    </div>
                </div>
                <hr/>

            {% if dominio.inicioU is not empty %}
                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Periodo</strong>
                    </div>
                    <div class="text-primary">
                        {{ dominio.inicioU|date("d/m/Y") }} al {{ dominio.finU|date("d/m/Y") }}
                    </div>
                </div>
                <hr/>
            {% endif %}

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Fecha Solicitud</strong>
                    </div>
                    <div class="text-primary">
                        {{ dominio.creadoU|date('d/m/Y') }}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Estatus</strong>
                    </div>
                    <div class="text-primary">
                        {% include 'all/orden/_estatusOD.html.twig' with {'estatus':dominio.estatusU} %}
                    </div>
                </div>
            </li>
        {% endif %}

        </ul>

    </div>
</div>

</div>

    {% endfor %}

{% else %}

    <div>
        <strong>No tiene / No aplica</strong>
    </div>

{% endif %}

    </div>
</div><!--Fin area Dominio-->


<div class="tab-pane fade" id="ordenes-area" role="tabpanel">
    <div class="row">

{% if ordenes is not empty %}

    {% for index, orden in ordenes %}

<div class="col-md-6 mb-3">

<div class="mb-4">
    <div class="card">

        <div class="card-header bg-light text-center">
            <strong><i class="fas fa-clipboard-list" aria-hidden="true"></i> orden #{{ orden.correlativo }}</strong>
        </div>

        <ul class="list-group list-group-flush">
            <li class="list-group-item" >

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Correlativo</strong>
                    </div>
                    <div class="text-primary">
                        <a class="not-decoration" href="{{ path('orden_ver', {'id': orden.id}) }}" title="Ver">
                            {{ orden.correlativo }}
                            <i class="fas fa-eye fa-lg"></i>
                        </a>
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Estatus</strong>
                    </div>
                    <div class="text-primary">
                        {% include 'all/orden/_estatus.html.twig' with {'estatus':orden.estatus} %}
                    </div>
                </div>
                <hr/>

                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Fecha Solicitud</strong>
                    </div>
                    <div class="text-primary">
                        {{ orden.createdAt|date('d/m/Y') }}
                    </div>
                </div>

            {% if orden.fechaCierre is not empty %}
                <hr/>
                <div class="d-flex justify-content-between">
                    <div>
                        <strong>Fecha Procesado</strong>
                    </div>
                    <div class="text-primary">
                        {{ orden.fechaCierre|date('d/m/Y') }}
                    </div>
                </div>
            {% endif %}

            </li>
        </ul>

    </div>
</div>

</div>

    {% endfor %}

{% else %}

        <div>
            <strong>No tiene / No aplica</strong>
        </div>

{% endif %}

</div><!--Fin Col-6 de Ordenes -->

</div><!--Fin area Ordenes-->

</div><!--Fin area Card-Body-->

</div><!--Fin area Card-->

</div><!--Fin Colm-12-->

</div><!--Fin Row Total -->
</div><!--Fin Container Total -->

{% endblock %}

