title = "production/report-dynamic"
url = "/production/report-dynamic"
layout = "platform_main"
is_hidden = 0

[builderList]
modelClass = "Romanah\Gokbakja\Models\Product"
scope = "scopeGetReport"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"

[production]
==
<?php
function onStart(){
    $this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
    $this["excruiters"] = Romanah\Gokbakja\Models\Excruiter::all();
}
?>
==

{% set records = builderList.records %}
{% set displayColumn = builderList.displayColumn %}
{% set noRecordsMessage = builderList.noRecordsMessage %}
{% set detailsPage = builderList.detailsPage %}
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
{% set detailsUrlParameter = builderList.detailsUrlParameter %}


{% 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="onReportProduction" data-request-flash>
                        <div class="row">

                            <div class="col">
                                <label class="form-label">Ekstruiter Saýlaň</label>
                                <select class="form-control select2" name="excruiter_id" id="excruiter_id">
                                    <option value="0">Saýla</option>
                                    {% for excruiter in excruiters %}
                                    <option value="{{excruiter.id}}">{{excruiter.name}}</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">Smen Saýlaň</label>
                                <select class="form-control select2" name="shift_id" id="shift_id">
                                    <option value="0">Saýla</option>
                                    {% for shift in shifts %}
                                    <option value="{{shift.id}}">{{shift.desc}} - ({{shift.start}} -
                                        {{shift.end}})</option>
                                    {% endfor %}
                                </select>
                            </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 class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <div class="row" id="report_dynamic">

                        <!-- <div class="col-md-6" style="text-align: right;">
                            <button type="button" class="btn btn-primary waves-effect waves-light"
                                data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen">
                                <i class="ri-pie-chart-line align-middle ms-2" style="font-size: 17px;"></i> Jemini Jemle
                            </button>
                        </div> -->
                    </div>

                    {% partial "production/modal-report" %}

                    <!-- <h1 id="calcq">qqq</h1>
                    <h1 id="timeDif">qqq</h1> -->
                    <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>
                                <th style="width: 5%;">№</th>
                                <th>Senesi</th>
                                <th>Smen</th>
                                <th>Ekstrudor</th>
                                <th>Hemmesi</th>
                                <th>HARYTLAR</th>
                                <th>Bellik</th>
                                <!--  <th>Настройки</th> -->
                            </tr>
                        </thead>
                        <tbody id="production_report_datas">





                        </tbody>
                        <tfoot>
                            <tr>
                                <th style="width: 5%;">№</th>
                                <th>Senesi</th>
                                <th>Smen</th>
                                <th>Ekstrudor</th>
                                <th>Hemmesi</th>
                                <th>HARYTLAR</th>
                                <th>Bellik</th>
                                <!--  <th>Настройки</th> -->
                            </tr>
                        </tfoot>
                    </table>
                </div>



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


{% partial 'dataTableJs' %}

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