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

@if (isset($editData)) @lang('system_settings.edit_holiday') @else @lang('system_settings.add_holiday') @endif

@if ($errors->has('holiday_title')) {{ $errors->first('holiday_title') }} @endif
{{$errors->first('from_date')}}
{{$errors->first('to_date')}}
@if ($errors->has('details')) {{ $errors->first('details') }} @endif
@if ($errors->has('upload_file_name')) {{ $errors->first('upload_file_name') }} @endif (PDF,DOC,DOCX,JPG,JPEG,PNG,TXT are allowed for upload)
@php $tooltip = ''; if (userPermission("holiday-store")) { $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp
{{ Form::close() }}

@lang('system_settings.holiday_list')

@if (isset($holidays)) @foreach ($holidays as $key => $value) @php $start = strtotime($value->from_date); $end = strtotime($value->to_date); $days_between = ceil(abs($end - $start) / 86400); $days = $days_between + 1; @endphp @endforeach @endif
@lang('common.sl') @lang('system_settings.holiday_title') @lang('system_settings.from_date') @lang('system_settings.to_date') @lang('common.days') @lang('system_settings.details') @lang('common.action')
{{ $key + 1 }} {{ $value->holiday_title }} {{ $value->from_date != '' ? dateConvert($value->from_date) : '' }} {{ $value->to_date != '' ? dateConvert($value->to_date) : '' }} {{ $days == 1 ? $days . ' day' : $days . ' days' }} {{ Illuminate\Support\Str::limit(@$value->details, 50) }} @if (userPermission("holiday-edit")) @lang('common.edit') @endif @if (userPermission("delete-holiday-data-view")) @lang('common.delete') @endif @if ($value->upload_image_file != '') @lang('common.download') @endif
@endsection @include('backEnd.partials.data_table_js') @include('backEnd.partials.date_picker_css_js')