@extends('backEnd.master') @section('title') @lang('hr.departments') @endsection @section('mainContent') @lang('hr.departments') @lang('common.dashboard') @lang('hr.human_resource') @lang('hr.departments') @if(isset($department)) @if(userPermission("department-store")) @lang('common.add') @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 @lang('hr.department_name') * @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 @isset($department) @lang('hr.update_department') @else @lang('hr.save_department') @endisset {{ Form::close() }} @lang('hr.department_list') @lang('hr.department') @lang('common.action') @foreach($departments as $department) {{$department->name}} @if(userPermission('department-edit')) @lang('common.edit') @endif @if(userPermission('department-delete')) @lang('common.delete') @endif @lang('hr.delete_department') × @lang('common.are_you_sure_to_delete') @lang('common.cancel') {{ Form::open(['route' => array('department-delete',$department->id), 'method' => 'DELETE', 'enctype' => 'multipart/form-data']) }} @lang('common.delete') {{ Form::close() }} @endforeach @endsection @include('backEnd.partials.data_table_js')