@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Movement Applications')) @push('css') @endpush @section('content')
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

{{ __('Movement Applications') }}

{{ __('Manage employee visit and movement requests.') }}

@can('Visit-create') @endcan

{{ $stats['total'] }}

{{ __('Total') }}

{{ $stats['pending'] }}

{{ __('Pending') }}

{{ $stats['approved'] }}

{{ __('Approved') }}

{{ $stats['closed'] }}

{{ __('Closed') }}
{{ __('Applications') }}
{{ __(':count records', ['count' => $visits->total()]) }}
{{ __('Clear') }}
@forelse($visits as $visit) @php $withinDay = $visit->coming_within_day === 0 || $visit->coming_within_day === '0' || $visit->coming_within_day === false ? false : true; @endphp @empty @endforelse
# {{ __('Employee') }} {{ __('Apply date') }} {{ __('Movement') }} {{ __('Purpose') }} {{ __('Period') }} {{ __('Location') }} {{ __('Status') }} {{ __('Action') }}
{{ $visits->firstItem() + $loop->index }}
{{ $visit->staff?->selectOptionLabel() ?? '—' }}
{{ $visit->staff?->warehouse?->name ?? '—' }} @if($visit->staff?->designation?->name) · {{ $visit->staff->designation->name }} @endif
{{ $visit->application_date }}
{{ $visit->movement_date?->format('Y-m-d') ?? '—' }}
{{ $withinDay ? __('Same day') : __(':days days', ['days' => $visit->duration]) }}
{{ \Illuminate\Support\Str::limit($visit->purpose ?? '—', 40) }} @if($withinDay) @else {{ $visit->start_date ?? '—' }} — {{ $visit->end_date ?? '—' }} @endif {{ \Illuminate\Support\Str::limit($visit->location ?? '—', 30) }} @if($visit->status == 1 && $visit->is_closed == 1) {{ __('Closed') }} @elseif($visit->status == 1) {{ __('Approved') }} @else {{ __('Pending') }} @endif
@if($visit->status == 1 && $visit->staff_id) @endif @can('Visit-edit') @endcan @can('Visit-delete') @endcan
{{ __('No movement applications found.') }}
@if($visits->hasPages()) @endif
@endsection @section('modal') @endsection @section('script') @endsection