@extends('backend.layouts..master')

@section('title', 'Bank Transaction Entry')

@push('css')

@endpush
<!-- page content -->
@section('content')
    <div class="right_col" role="main">
        <div class="">
            <div class="clearfix"></div>
            @if(Session::has('success'))
                <div class="alert alert-success">
                    {{ Session::get('success') }}
                </div>
            @endif
            @if(Session::has('error'))
                <div class="alert alert-danger">
                    {{ Session::get('error') }}
                </div>
            @endif
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2> Edit Customer Information 
                                <a href="{{route('customer.list')}}" class="btn btn-success"> Customer List</a>
                            </h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            <form action="{{route('customer.update',$customer->id)}}" method="post">
                                {{ csrf_field()}}
                                
                                <div class="row">
                                    <div class="col-sm-3"></div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for="customer_name">Customer Name</label>
                                            <input type="text" value="{{$customer->name}}" class="form-control" name="customer_name" id="customer_name">
                                            <p class="error">{{$errors->first('customer_name')}}</p>
                                        </div>
                                        <div class="form-group">
                                            <label for="customer_phone">Customer Phone</label>
                                            <input type="text" value="{{$customer->phone}}" class="form-control" name="customer_phone" id="customer_phone">
                                            <p class="error">{{$errors->first('customer_phone')}}</p>
                                        </div>
                                        <div class="form-group">
                                            <label for="customer_email">Customer Email</label>
                                            <input type="text" value="{{$customer->email}}" class="form-control" name="customer_email" id="customer_email">
                                            <p class="error">{{$errors->first('customer_email')}}</p>
                                        </div>
                                        <div class="form-group">
                                            <label for="customer_address">Customer Address</label>
                                            <input type="text" value="{{$customer->address}}" class="form-control" name="customer_address" id="customer_address">
                                            <p class="error">{{$errors->first('customer_address')}}</p>
                                        </div>
                                        <div class="box-footer">
                                            <button type="submit" name="btnSave" class="btn btn-primary" >Update Customer</button>
                                        </div>
                                    </div>
                                    <div class="col-sm-3"></div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /page content -->
@endsection
@push('js')

@endpush