@extends('backEnd.master') @section('title') @lang('hr.departments') @endsection @section('mainContent')
@if(isset($department)) @if(userPermission("department-store")) @endif @endif
@if(isset($department)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => array('department-update',$department->id), 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else @if(userPermission("department-store")) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'department-store', 'method' => 'POST', 'enctype' => 'multipart/form-data']) }} @endif @endif

@if(isset($department)) @lang('hr.edit_department') @else @lang('hr.add_department') @endif

@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@php $tooltip = ""; if(userPermission("department-store")){ $tooltip = ""; }elseif(isset($department) && userPermission('department-edit')){ $tooltip = ""; }else{ $tooltip = "You have no permission to add"; } @endphp
{{ Form::close() }}

@lang('hr.department_list')

@foreach($departments as $department) @endforeach
@lang('hr.department') @lang('common.action')
{{$department->name}} @if(userPermission('department-edit')) @lang('common.edit') @endif @if(userPermission('department-delete')) @lang('common.delete') @endif
@endsection @include('backEnd.partials.data_table_js')