title = "orders/new"
url = "/orders/new"
layout = "platform_main"
is_hidden = 0

[order]
==
<?php
function onStart(){
    $this["employees"] = Romanah\Gokbakja\Models\Employee::where('status', 1)->get();
    $this["clients"] = Romanah\Gokbakja\Models\Client::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="collapse multi-collapse" id="multiCollapseExample1">
                <form data-request="onCreateOrder" data-request-flash data-request-validate>
                    <div class="card">
                        <div class="card-body">
                            <div class="row">
                                <div class="col">
                                    <label class="form-label">Klent Saýlaň</label>
                                    <select class="form-control select2" name="client_id">
                                        <option value="0">Saýla</option>
                                        {% for client in clients %}
                                        <option value="{{client.id}}">{{client.name}} ({{client.country}})</option>
                                        {% endfor %}
                                    </select>
                                </div>

                                <!-- <div class="col">
                                    <div>
                                        <label class="form-label">Mukdary (kg)</label>
                                        <input type="number" name="amount" step="0.01" class="form-control"
                                            placeholder="Sargyt edilen halta kg-da">
                                    </div>
                                </div> -->

                                <div class="col">
                                    <div>
                                        <label class="form-label">Bellik</label>
                                        <input type="text" name="note" class="form-control" placeholder="Bellik">
                                    </div>
                                </div>


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

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

    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body">
                    <div class="row">
                        <div class="col-md-6">
                            <h3 class="card-title" style="font-size: 22px;color: #1e2038;">Sargytlar</h3>
                            <p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
                        </div>
                        <div class="col-md-6" style="text-align: right;">
                            <a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1"
                                role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Täze
                                Maglumat</a>
                        </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>
                                <th style="width: 5%;">№</th>
                                <th>Sargyt No</th>
                                <th>Klent</th>
                                <th>Ýurdy</th>
                                <th>Mukdary</th>
                                <th>Bahasy</th>
                                <th>Tölenen</th>
                                <th>Bergisi</th>
                                <th>Senesi</th>
                                <th>Bellik</th>
                                <th>Sazlamalar</th>
                            </tr>
                        </thead>
                        <tbody id="order_datas">
                            {% component 'order' %}
                        </tbody>
                        <tfoot>
                            <tr>
                                <th style="width: 5%;">№</th>
                                <th>Sargyt No</th>
                                <th>Klent</th>
                                <th>Ýurdy</th>
                                <th>Mukdary</th>
                                <th>Bahasy</th>
                                <th>Tölenen</th>
                                <th>Bergisi</th>
                                <th>Senesi</th>
                                <th>Bellik</th>
                                <th>Sazlamalar</th>
                            </tr>
                        </tfoot>
                    </table>
                </div>

                <!-- <div class="modal fade bs-example-modal-sm-1" tabindex="-1" role="dialog"
                    aria-labelledby="mySmallModalLabel" aria-hidden="true">
                    <div class="modal-dialog modal-sm">
                        <div class="modal-content" id="modal-form">



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

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

{% put scripts %}

<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>

{% endput %}

{% partial 'dataTableJs' %}
