@extends('layouts.app') @section('title', 'Salary Components') @section('breadcrumb') @endsection @section('content') @php $subTypeMap = [ 'earning' => \App\Support\SalaryComponentOptions::subTypes('earning'), 'deduction' => \App\Support\SalaryComponentOptions::subTypes('deduction'), ]; @endphp @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif
All Salary Components
@forelse($components as $component) @empty @endforelse
Component Type Sub Type Expense A/C COA Type Liability A/C Liability COA Type Status Actions
{{ $component->name }} {{ $component->typeLabel() }} {{ $component->subTypeLabel() }} {{ $component->expenseAccount?->name ?? '—' }} {{ $component->expenseCoaTypeLabel() }} {{ $component->liabilityAccount?->name ?? '—' }} {{ $component->liabilityCoaTypeLabel() }} {{ $component->is_active ? 'Active' : 'Inactive' }} @if(auth()->user()->hasPermission('payroll','edit'))
@csrf @method('PATCH')
@csrf @method('DELETE')
@endif
No salary components found.
@if($components->hasPages())
{{ $components->links() }}
@endif
@if(auth()->user()->hasPermission('payroll','edit')) @include('payroll.salary-components._form-modal', [ 'modalId' => 'scAddModal', 'title' => 'New Salary Component', 'formAction' => route('payroll.salary-components.store'), 'formId' => 'scAddForm', 'canCreateCoaAccount' => $canCreateCoaAccount, ]) @include('payroll.salary-components._form-modal', [ 'modalId' => 'scEditModal', 'title' => 'Edit Salary Component', 'formAction' => '#', 'formId' => 'scEditForm', 'isEdit' => true, 'canCreateCoaAccount' => $canCreateCoaAccount, ]) @if($canCreateCoaAccount) @include('payroll.salary-components._coa-quick-add-modal') @endif @if($canCreateCoaAccount) @endif @endif @endsection @push('scripts') @if($canCreateCoaAccount ?? false) @endif @endpush