@extends('layout')
@section('title', 'یاد دہانی کی فہرست')
@section('page_title', 'یاد دہانی کی فہرست')
@section('content')
    <div class="row">
        <div class="col-md-4">
            <div class="panel panel-card margin-b-30">
                <div class="panel-body">

                    <form id="add_todo_form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="city_name">تاریخ: <span class="text-danger">*</span></label>
                                    <input type="date" id="date" autofocus class="form-control change_focus"
                                           data-id="task_1" name="task_date">
                                    <span class="text-danger error" id="task_date_error"></span>
                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <label for="">ٹاسک:</label>
                                <table class="table" id="todo_table">
                                    <tr>
                                        <td>
                                            <input type="text" name="task[]" id="task_1" onkeydown="invokeFunc(2)"
                                                   class="form-control" required>
                                        </td>
                                        <td>
                                            <button type="button" class="btn btn-sm btn-info" onclick="addRow()">
                                                <span class="tooltip1"> <span class="tooltiptext"></span>
                                                    <i class="fa fa-plus-circle"></i>
                                                </span>
                                            </button>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>

                        <div class="row mt-3">
                            <div class="col-md-12">
                                <div class="">
                                    @csrf
                                    <input type="hidden" name="count" value="1" id="row_count">
                                    <button id="submit_btn" class="btn btn-sm btn-primary btn-lg"
                                            type="submit">
                                        محفوظ
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>

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

        <div class="col-md-8">
            <div class="panel panel-card">
                <div class="panel-body">
                    <form id="filter_task_form">
                        <div class="row mt-2">
                            <div class="col-md-6">
                                <div class="input-group">
                                    <span class="input-group-addon">فلٹر تاریخ</span>
                                    <input type="date" id="filter_date" name="filter_date" value="{{date('Y-m-d')}}"
                                           class="form-control">
                                </div>
                                <span class="text-danger error" id="filter_date_error"></span>
                            </div>
                            <div class="col-md-6">
                                @csrf
                                <button id="filter_btn" class="btn btn-sm btn-warning btn-lg"
                                        type="submit">
                                    فلٹر
                                </button>
                            </div>
                        </div>
                    </form>
                    <div class="row mt-2">
                        <div class="col-md-12">
                            <table id="cities_table" class="table table-bordered" cellspacing="0" width="100%">
                                <thead class="bg-gold text-white">
                                <tr style="white-space: nowrap">
                                    <th>#</th>
                                    <th>تاسک تاریخ</th>
                                    <th>ٹاسک</th>
                                    <th>ایکشن</th>
                                </tr>
                                </thead>
                                <tbody id="todo_table_body">

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <div class="modal fade" id="editBrokerModal" tabindex="-1" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content panel-card" id="editBrokerData">

            </div>
        </div>
    </div>
@endsection

@section('javascript')
    @include('todos.js')
@endsection
