{% extends 'wgcomm/base.html' %}

{% block title %}
    Console
{% endblock %}
{% block tail %}
    <script src="{{ url_for('static',filename='wgcomm/js/console-center.js') }}"></script>
    <script src="static/wgcomm/js/table-data.js"></script>
{% endblock %}
{% block tail_min %}
    <script src="{{ url_for('static',filename='wgcomm/js/console-center.min.js') }}"></script>
    <script src="static/wgcomm/js/table-data.min.js"></script>
{% endblock %}

{% block main_content %}

    <!--app-content open-->
    <div class="app-content main-content mt-0" id="allpage">
        <div class="side-app">
            <!-- CONTAINER -->
            <div class="main-container container-fluid">
                <!-- PAGE-HEADER -->
                <div class="page-header">
                    <div>
                        <h1 class="page-title">Remote Control</h1>
                    </div>
                    <div class="ms-auto pageheader-btn">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">Console</li>
                            <li class="breadcrumb-item"><a href="javascript:void(0);">Remote Control</a></li>
                        </ol>
                    </div>
                </div>
                <!-- PAGE-HEADER END -->
                {% with messages = get_flashed_messages() %}
                    {% if messages %}
                        <div class="form-group">
                            <ul>
                                {% for message in messages %}
                                    <li class="text-danger">{{ message }}</li>
                                {% endfor %}
                            </ul>
                        </div>
                    {% endif %}
                {% endwith %}
                <!--ROW OPENED-->
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-body">
                                {#                                <button href="#"#}
                                {#                                        class="btn btn-primary" id="btnswipe_getselected"#}
                                {#                                        data-id="DownloadSwipe"#}
                                {#                                        data-name="DownloadSwipe"#}
                                {#                                        data-url="/console_swipe_getselected">#}
                                {#                                    <i class="fe fe-plus-square"></i>DownloadSwipe#}
                                {#                                </button>#}
                                <button href="#"
                                        class="btn btn-primary" id="btnremoteopendoor_getselected"
                                        data-id="RemoteOpenDoor"
                                        data-name="RemoteOpenDoor"
                                        data-url="/console_remoteopendoor_getselected">
                                    <i class="fe fe-unlock"></i>Remote Open
                                </button>
                                <button href="#"
                                        class="btn btn-primary" id="btncheckcontroller_getselected"
                                        data-id="check controller"
                                        data-name="check controller"
                                        data-url="/console_checkcontroller_getselected">
                                    <i class="fe fe-settings"></i>Check
                                </button>

                                <button href="#"
                                        class="btn btn-primary" id="btnadjusttime_getselected"
                                        data-id="Adjust Time"
                                        data-name="Adjust Time"
                                        data-url="/console_adjusttime_getselected">
                                    <i class="fe fe-clock"></i>Adjust Time
                                </button>
                                <button href="#"
                                        class="btn btn-primary" id="btnclearinfo"
                                        data-id="Clear Info"
                                        data-name="Clear Info"
                                        data-url="/console_clearinfo_getselected">
                                    <i class="fe fe-trash"></i>Clear Info
                                </button>
                                <p class="card-text text-warning" id="opSelectedResultInfo" hidden>
                                </p>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-12 col-xl-12">
                        <div class="col-md-12">
                            <div class="card">
                                <div id="calendar2" class="fc fc-media-screen fc-direction-ltr fc-theme-standard">
                                    <div class="card-body">
                                        <div class="fc-view-harness fc-view-harness-active" style="height: 500px;">
                                            <div class="fc-list  fc-list-sticky fc-listMonth-view fc-view">
                                                <div class="fc-scroller fc-scroller-liquid" id="logscroll"
                                                     style="overflow: hidden auto;">
                                                    <div class="table-responsive">
                                                        {#                                        <table  id="responsive-datatableDoor"#}
                                                        {#                                               class="table editable-table table-nowrap table-bordered  wp-100 active-tb">#}
                                                        <table class="table table-bordered text-nowrap border-bottom wp-100  active-tb"
                                                               id="responsive-datatableDoor">
                                                            <thead class="table-head">
                                                            <tr>
                                                                <th class="bg-transparent border-bottom-0 no-btn"
                                                                    style="max-width: 4px">
                                                                    <div class="custom-checkbox custom-control">
                                                                        <input type="checkbox"
                                                                               data-bs-checkboxes="mygroup"
                                                                               class="custom-control-input"
                                                                               id="chkalldoor">
                                                                        <label for="chkalldoor"
                                                                               class="custom-control-label"></label>
                                                                    </div>
                                                                </th>
                                                                <th class="bg-transparent border-bottom-0"
                                                                    style="width: 20%">Door</th>
                                                                <th class="bg-transparent border-bottom-0">Information</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody class="table-body">
                                                            {% for con in objlistDoor %}
                                                                <tr>
                                                                    <td id="rwchk{{ con.f_DoorID }}">
                                                                        <div class="d-flex align-items-stretch">
                                                                            <div class="custom-checkbox custom-control">
                                                                                <input type="checkbox"
                                                                                       data-bs-checkboxes="mygroup"
                                                                                       class="custom-control-input call-checkbox"
                                                                                       id="ckd{{ con.f_DoorID }}">
                                                                                <label for="ckd{{ con.f_DoorID }}"
                                                                                       class="custom-control-label"></label>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td class="text-muted fs-15 fw-semibold text-start">{{ con.f_DoorName }}</td>
                                                                    <td class="text-muted fs-15 fw-semibold text-start"
                                                                        id="info{{ con.f_DoorID }}">
                                                                    </td>
                                                                </tr>
                                                            {% endfor %}
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--ROW CLOSED-->

            </div>
        </div>
    </div>
    <!-- CONTAINER CLOSED -->
{% endblock %}
