@extends('layout')
@section('title', 'ملازمین')
@section('page_title', 'ملازمین')

@section('content')
    <div class="row">
        @if(auth()->user()->hasPermissionTo('create employee'))
            <div class="col-md-4">
                <div class="panel panel-card margin-b-30">
                    <div class="panel-body">
                        <form id="add_driver_form">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="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 class="col-md-12">
                                    <div class="form-group">
                                        <label for="cnic">شناختی کارڈ نمبر <span class="text-danger">*</span></label>
                                        <input type="text" id="cnic" autofocus class="form-control" name="cnic">
                                        <span class="text-danger error" id="cnic_error"></span>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="mobile_number">موبائل نمبر: <span class="text-danger">*</span></label>
                                        <input type="text" id="mobile_number" autofocus class="form-control" name="mobile_number">
                                        <span class="text-danger error" id="mobile_number_error"></span>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="salary">تنخواہ: <span class="text-danger">*</span></label>
                                        <input type="text" id="salary" autofocus class="form-control" name="salary">
                                        <span class="text-danger error" id="salary_error"></span>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="commission">کمیشن:</label>
                                        <input type="number" id="commission" class="form-control" name="commission" step="0.01">
                                        <span class="text-danger error" id="commission_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 employee')? 'col-md-8': 'col-md-12' }}">
            <div class="panel panel-card ">
                <div class="panel-body">
                    <table id="driver_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>
                            <th>تنخواہ</th>
                            <th>کمیشن</th>
                            <th>ایکشن</th>
                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    {{-- Edit Employee Modal--}}
    <div class="modal fade" id="editEmpModal" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg">
            <div class="modal-content panel-card" id="editEmpData">

            </div>
        </div>
    </div>
@endsection
@section('javascript')
    @include('employees.js')
@endsection
