@section('title', get_setting('site_name') . ' | Staff Branch Transfer') @push('css') @endpush
{{ __('Transfer employees between branches and review tenure history.') }}
| {{ __('Recorded') }} | {{ __('Effective') }} | {{ __('Employee') }} | {{ __('From') }} | {{ __('To') }} | {{ __('Days at From') }} | {{ __('Transfer Reason') }} | {{ __('Status') }} | {{ __('By') }} | {{ __('Action') }} |
|---|---|---|---|---|---|---|---|---|---|
| {{ $row->created_at?->format('Y-m-d') }} | {{ $row->effective_date?->format('Y-m-d') ?? '—' }} |
@if($row->staff)
{{ $row->staff->user?->name ?? 'Staff #'.$row->staff->id }}
{{ $row->staff->user_id }}
@else
—
@endif
|
{{ $row->fromBranch?->name ?? '—' }} | {{ $row->toBranch?->name ?? '—' }} | @if(isset($historyDays[$row->id]) && $historyDays[$row->id] !== null) {{ $historyDays[$row->id] }} days @else — @endif | {{ $row->reason ? \Illuminate\Support\Str::limit($row->reason, 180) : '—' }} |
@php
$status = $row->approval_status ?? 'approved';
$badge = match ($status) {
'pending' => 'badge-warning',
'rejected' => 'badge-danger',
default => 'badge-success',
};
@endphp
{{ ucfirst($status) }}
@if($status === 'approved' && ($row->joining_form_status ?? '') === 'pending')
{{ __('Join form pending') }}
@elseif($status === 'approved' && ($row->joining_form_status ?? '') === 'submitted')
{{ __('Joined') }}
@endif
|
{{ $row->createdBy?->name ?? '—' }} | |
|
{{ __('No Records Yet') }}
|
|||||||||
| {{ __('Employee') }} | {{ __('Current Branch') }} | {{ __('Joined Branch On') }} | {{ __('Days in Current') }} | {{ __('Previous Branch') }} | {{ __('Days in Previous') }} | {{ __('Transfers') }} | |
|---|---|---|---|---|---|---|---|
| {{ $staff->user?->name ?? '—' }} ({{ $staff->user_id }}) | {{ $summary['current']?->branch?->name ?? ($staff->warehouse?->name ?? '—') }} | {{ $summary['current']?->joined_at?->format('Y-m-d') ?? '—' }} |
@php $days = $summary['current_days'] ?? 0; @endphp
{{ $days }} days
@if($summary['current'] ?? null)
{{ $summary['current']->durationLabel() }}
@endif
|
{{ $summary['previous']?->branch?->name ?? '—' }} |
@if($summary['previous'] ?? null)
{{ $summary['previous_days'] }} days
{{ $summary['previous']->durationLabel() }}
@else
—
@endif
|
{{ $summary['transfer_count'] ?? 0 }} | {{ __('History') }} |
| {{ __('No active employees match these filters.') }} | |||||||