<<<<<<< 8c98d41a67e0ec45e1fd64b04b779360352c1dcf
@extends('Layout.Employeesmaster')
=======
@extends('Layout.employees_master')
>>>>>>> Storing employee info

@section('title', 'Employees')
@section('header-include')
<link rel="stylesheet" href="/js/select3/bootstrapselect.min.css" type="text/css"/>
<link rel="stylesheet" href="/js/select3/bootstrap.min.css" type="text/css"/><style>
form {
  border-radius: 5px; 
  width:100%;   
  background-color: #FFFFFF;
  overflow: hidden;
}

p span {
  color: #F00;
}

p {
  margin: 0px;
  font-weight: 500;
  line-height: 2;
  color:#333;
}

a {
  text-decoration:inherit
}


.form-group {
  overflow: hidden;
  clear: both;
}
 .form-control {
    
    position:relative;
    clear: both;    
    margin-top: 2px;
    display:inline-inline;    
    margin-right: 10px;
}
</style>
@endsection

@section('content')
 
<section id="content">    
<section class="scrollable padder">
        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
          <li><a href="."><i class="fa fa-home"></i> Home</a></li>                    
          <li><a href="/departments">Department</a></li>
          <li class="active">Edit</li>
        </ul>             
        @include('Layout.messages')
        @include('Layout.errors')   
        <form method="post" action="{{ route('departments.update', $department->id) }}">
        @method('PATCH')
        @csrf
            <div class="form-group">
                <label for="name">Department Code</label>
                <input type="text" class="form-control" name="department_code" value={{ $department->department_code }} />
            </div>   
            <div class="form-group">
                <label for="name">Department Name</label>
                <input type="text" class="form-control" name="department_name" value={{ $department->department_name }} />
            </div>   
            <div class=col-md-4 style="width:20%">
                <label for="name">Business Unit</label>
                <select name="business_unit" id="business_unit" class="form-control selectpicker" data-live-search="true" data-size="5" style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
                   @foreach($branches as $branch)
                        <option value="{{$branch->business_unit}}" @if($selectedBusinessunit = $branch->business_unit) {{'selected'}} @endif>{{$branch->business_unit}}</option>
                   @endforeach                
                </select>
            </div>  
            <div class="form-group">
                <label for="name">Department Head</label>
                <input type="text" class="form-control" name="department_head" value={{ $department->department_head }} />
            </div>   
            <div class="form-group">
                <label for="name">City</label>
                <input type="text" class="form-control" name="city" value={{ $department->city }} />
            </div>
            <div class="form-group">
                <label for="name">Address</label>
                <input type="text" class="form-control" name="address_1" value={{ $department->address_1 }} />
            </div>
                <button type="submit" class="btn btn-primary">Update</button>
                <a class="btn btn-default btn-close" href="{{ route('departments.index') }}">Cancel</a>
        </form>
    </section>
</section>
@endsection
@section('footer-include')
<script src="/js/select3/bootstrapselect.min.js"></script>
<script src="/js/select3/bootstrap.min.js"></script>
@endsection