@extends('layout')
@section('title', 'بینک')
@section('page_title', 'بینک')
@section('content')
    <div class="row">
        @if(auth()->user()->hasPermissionTo('create bank'))
            <div class="col-md-4">
                <div class="panel panel-card margin-b-30">
                    <div class="panel-body">

                        <form id="add_city_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="text" id="name" autofocus class="form-control" name="name">
                                        <span class="text-danger error" id="name_error"></span>
                                    </div>
                                </div>

                            </div>
                            <div class="row mt-2">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="city_name">اکاؤنٹ نمبر<span class="text-danger">*</span></label>
                                        <input type="text" id="account_number" class="form-control"
                                               name="account_number">
                                        <span class="text-danger error" id="account_number_error"></span>
                                    </div>
                                </div>

                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="">
                                        @csrf
                                        <button name="createCitySubmit" id="submit_btn"
                                                class="btn btn-sm btn-primary btn-lg" type="submit">
                                            محفوظ
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        @endif

        <div class="{{ auth()->user()->hasPermissionTo('create bank')?'col-md-8':'col-md-4' }}">
            <div class="panel panel-card ">
                <div class="panel-body">
                    <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>

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

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

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

@endsection

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