@extends('layouts.master') @section('content')
{{ $reportTitle }}
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
Payroll Definitions for {{ $staffCategory->name }}

Below are the payroll definitions and their mapping status for this staff category.

@if ($definitions->isEmpty())
No payroll definitions found.
@endif @foreach ($definitions as $def) @endforeach
Description Def Code GL Code Type Mapped Actions
{{ $def->short_description ?? $def->description }} {{ $def->code }} {{ $def->gl_code }} {{ ucfirst($def->entry_type) }} {{ $def->mapping_status }} @if(auth()->user()->roles->first()->permissions->contains('name', 'Manage GL Mapping')) @if ($def->mapping_status === 'Yes') @else @endif @endif
@endsection @section('modal') {{-- Map Modals --}} @foreach ($definitions->where('mapping_status', 'No') as $def) @endforeach {{-- Edit Modals --}} @foreach ($definitions->where('mapping_status', 'Yes') as $def) @php $journal = $def->payrollJournals->where('staff_category_id', $staffCategory->id)->first(); @endphp @if ($journal) @endif @endforeach @endsection @section('scripts') @endsection