@extends('contentNavbarLayout') @section('title', 'View ' . $recordType->name . ' Records') @section('content')
{{-- Header --}}

{{ $recordType->name }} Records

@hasPermission('document.records.add') Add New Record @endhasPermission

List of documents available for this record type

{{-- Flash Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Search Bar + Advanced Search --}}
{{-- BASIC SEARCH --}}
{{-- ADVANCED SEARCH BUTTON --}}
{{-- ADVANCED SEARCH MODAL --}} {{-- RECORDS TABLE --}} @if($records->isEmpty())

No records found for this type.

@else
@hasAnyPermission(['document.records.view', 'document.records.edit', 'document.records.delete']) @endhasAnyPermission @foreach($records as $index => $record) {{-- ACTIONS --}} @hasAnyPermission(['document.records.view', 'document.records.edit', 'document.records.delete']) @endhasAnyPermission {{-- DETAILS MODAL --}} @endforeach
No. Title Description Created AtActions
{{ $index + 1 }} {{ $record->title ?? 'Untitled' }} {{ $record->description ?? 'Untitled' }} {{ $record->created_at ?? '-' }} {{-- View Details --}} {{-- View Document --}} @hasPermission('document.records.view') View @endhasPermission {{-- Edit --}} @hasPermission('document.records.edit') Edit @endhasPermission {{-- Delete --}} @hasPermission('document.records.delete')
@csrf @method('DELETE')
@endhasPermission
{{-- PAGINATION --}}
Showing {{ $records->firstItem() }} to {{ $records->lastItem() }} of {{ $records->total() }} entries
{{ $records->appends(request()->query())->links() }}
@endif Back
@endsection