title = "sewer/report"
url = "/sewer/report"
layout = "platform_main"
is_hidden = 0

[sewer]
==
<?php
function onStart(){
    $this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
    $this["sewerMachines"] = Romanah\Gokbakja\Models\SewerMachine::get();

    $this["sewers"] = Romanah\Gokbakja\Models\Employee::where("status", 1)->where("is_sewer", 1)->get();

    $this["widths"] = Romanah\Gokbakja\Models\SewerProduction::groupBy("width")->get();
    $this["heights"] = Romanah\Gokbakja\Models\SewerProduction::groupBy("height")->get();
    $this["colors"] = Romanah\Gokbakja\Models\BagColor::get();

}
?>
==
{% put styles %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />
<link href="{{'assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
    type="text/css" />

<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
{% endput %}


<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <form data-request="onReportSewer" data-request-flash>
                        <div class="row">

                            <div class="col">
                                <label class="form-label">Smen Saýlaň</label>
                                <select class="form-control select2" name="shift_id">
                                    <option value="0">Saýla</option>
                                    {% for shift in shifts %}
                                    <option value="{{shift.id}}">{{shift.desc}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <label class="form-label">Stanok Saýlaň</label>
                                <select class="form-control select2" name="sewer_machine_id">
                                    <option value="0">Saýla</option>
                                    {% for sewerMachine in sewerMachines %}
                                    <option value="{{sewerMachine.id}}">{{sewerMachine.name}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <label class="form-label">Reňk Saýlaň</label>
                                <select class="form-control select2" name="color_id">
                                    <option value="0">Saýla</option>
                                    {% for color in colors %}
                                    <option value="{{color.id}}">{{color.name}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <label class="form-label">Halta Ini</label>
                                <select class="form-control select2" name="width">
                                    <option value="0">Saýla</option>
                                    {% for width in widths %}
                                    <option value="{{width.width}}">{{width.width}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <label class="form-label">Halta Boyy</label>
                                <select class="form-control select2" name="height">
                                    <option value="0">Saýla</option>
                                    {% for height in heights %}
                                    <option value="{{height.height}}">{{height.height}}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col">
                                <div>
                                    <label class="form-label">Seneleri Saýlaň</label>

                                    <div class="input-daterange input-group" id="datepicker6"
                                        data-date-format="d.m.yyyy" data-date-autoclose="true" data-provide="datepicker"
                                        data-date-container='#datepicker6'>
                                        <input type="text" class="form-control" name="start"
                                            placeholder="Başlanýan sene" />
                                        <input type="text" class="form-control" name="end"
                                            placeholder="Gutarýan sene" />
                                    </div>
                                </div>
                            </div>
                            <div class="col">
                                <label class="form-label">Status Saýlaň</label>
                                <select class="form-control select2" name="status">
                                    <option value="0">Saýla</option>

                                    <option value="working">Işlenilýär</option>
                                    <option value="complated">Tamamlandy</option>

                                </select>
                            </div>
                            <div class="col">
                                <label class="form-label">Halta Gram</label>
                                <input name="bag_gram" type="number" class="form-control" placeholder="Halta gramy">
                            </div>


                            <div class="col">
                                <button type="submit" class="btn btn-primary waves-effect waves-light"
                                    style="margin-top: 30px;width: 100%;">Hasabat</button>
                            </div>

                        </div>
                    </form>

                </div>
            </div>
        </div>

    </div>
    <div class="row">


    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <div class="row" id="all_amount">
                        <div class="col-md-6">
                            <h3 class="card-title" style="font-size: 22px;color: #1e2038;">Tikinçiler Boýunça Umumy</h3>
                            <p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
                        </div>

                    </div>


                    <table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
                        style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'>
                        <thead>
                            <tr>
                                <td rowspan="2">No</td>
                                <th rowspan="2">Senesi</th>
                                <th rowspan="2">Önümçilik No</th>
                                <th colspan="2" style="background: #ccd9e3;">Berilen Rulon</th>
                                <th colspan="3" style="background: #c7e4fd;">Halta Maglumaty</th>
                                <th colspan="3" style="background: bisque;">Tikilen Halta</th>
                                <th colspan="2" style="background: #ffbbbb;">Ulanylan Rulon</th>
                                <th rowspan="2">Status</th>
                                <th rowspan="2">Bellik</th>
                            </tr>
                            <tr>


                                <th>Rulon Görnüş</th>
                                <th>Çig mal mukdary</th>
                                <th>Halta Görnüş</th>

                                <th>Stanok</th>
                                <th>Gram</th>

                                <th>Halta (arassa)</th>
                                <th>BRAK Halta</th>
                                <th>Sürülmedik</th>
                                <th>Ulanylan</th>
                                <th>Galyndy</th>


                                <!--  <th>Настройки</th> -->
                            </tr>
                        </thead>
                        <tbody id="sewer_report_datas">


                        </tbody>
                        <tfoot>
                            <tr>
                                <th style="width: 5%;">№</th>
                                <th>Senesi</th>
                                <th>Önümçilik No</th>
                                <th style="background: #ccd9e3;">Rulon Görnüş</th>
                                <th style="background: #ccd9e3;">Çig mal mukdary</th>
                                <th style="background: #c7e4fd;">Halta Görnüş</th>
                                <th style="background: #c7e4fd;">Stanok</th>
                                <th style="background: #c7e4fd;">Gram</th>
                                <th style="background: bisque;">Halta (arassa)</th>
                                <th style="background: bisque;">BRAK Halta</th>
                                <th style="background: bisque;">Sürülmedik</th>
                                <th style="background: #ffbbbb;">Ulanylan</th>
                                <th style="background: #ffbbbb;">Galyndy</th>
                                <th>Status</th>
                                <th>Bellik</th>
                            </tr>
                        </tfoot>
                    </table>
                </div>



            </div>
        </div>
    </div>
</div>


{% partial 'dataTableJs' %}
{% put scripts %}
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %}
