@php use App\Services\StaffSignatureSealService; $staff = $file->staff?->loadMissing(['user', 'designation', 'department', 'warehouse']); $sigSealService = app(StaffSignatureSealService::class); $signatureUrl = $sigSealService->signatureUrl($staff); $sealUrl = $sigSealService->sealUrl($staff); $sigW = \App\Support\EmployeeSignatureSealFeature::signatureWidth(); $sigH = \App\Support\EmployeeSignatureSealFeature::signatureHeight(); $sealW = \App\Support\EmployeeSignatureSealFeature::sealWidth(); $sealH = \App\Support\EmployeeSignatureSealFeature::sealHeight(); $applicantName = $staff?->user?->name ?? $file->creator?->name ?? '—'; $designation = $staff?->designation?->name ?? '—'; $department = $staff?->department?->name ?? '—'; $branch = $staff?->warehouse?->name ?? $file->warehouse?->name ?? '—'; $employeeId = $staff ? $staff->displaySid() : '—'; $fatherName = $staff?->father_name ?? '—'; $mobile = $staff?->mobile_no ?? '—'; $nid = $staff?->nid ?? '—'; $orgName = get_setting('site_name') ?: config('app.name'); $orgAddress = get_setting('contact_address') ?: ''; $printDate = ($file->submitted_at ?? $file->created_at)?->format('d.m.Y') ?? now()->format('d.m.Y'); $toStaff = $file->toStaff?->loadMissing(['user', 'designation', 'warehouse']); $toName = $toStaff?->user?->name ?? __('The Managing Director / Chief Executive'); $toDesignation = $toStaff?->designation?->name ?? null; $toBranch = $toStaff?->warehouse?->name ?? null; $categoryBn = match ($file->category) { 'personal' => 'ব্যক্তিগত', 'workplace' => 'কর্মক্ষেত্র সংক্রান্ত', 'grievance' => 'অভিযোগ / সমস্যা', 'request' => 'অনুরোধ', 'suggestion' => 'পরামর্শ', default => 'অন্যান্য', }; $applicationNote = $file->notes->firstWhere('note_type', \App\Models\EnothiNote::TYPE_APPLICATION); $bodyText = $applicationNote?->body ?? $file->body; $withNoting = ($type ?? 'application') === 'full'; @endphp
{{ __('File No.') }} / নথি নং {{ $file->file_number }} {{ __('Date') }} / তারিখ {{ $printDate }}
{{--
--}} {{--
আবেদনপত্র
--}} {{--
{{ __('Application to Management') }}
--}} {{--
--}}

প্রাপক
{{ $toName }} @if($toDesignation)
{{ $toDesignation }} {{ $toDesignation }} @else
{{ __('The Managing Director / Chief Executive') }}
মাননীয় ব্যবস্থাপনা পরিচালক / প্রধান নির্বাহী @endif
{{ $orgName }} @if($toBranch)
{{ $toBranch }} @elseif($branch !== '—')
{{ $branch }} @endif

বিষয়: {{ $file->subject }}

{{--

--}} {{-- {{ __('Respected Sir') }}, / মাননীয় মহোদয়,--}} {{--

--}} {{--

--}} {{-- আমি নিম্নস্বাক্ষরকারী, {{ $applicantName }},--}} {{-- পিতা / স্বামী: {{ $fatherName }},--}} {{-- {{ $orgName }}-এ {{ $designation }} পদে কর্মরত।--}} {{-- আবেদনের ধরন: {{ $categoryBn }} ({{ \App\Models\EnothiFile::categoryLabel($file->category, $file->enothi_category_id) }}).--}} {{-- নিম্নোক্ত বিষয়ে আপনার সদয় অনুগ্রহ বিচারার জন্য বিনীত আবেদন জানাচ্ছি।--}} {{--

--}} {{--

--}} {{-- I, the undersigned, {{ $applicantName }}, son/daughter/wife of {{ $fatherName }},--}} {{-- serving as {{ $designation }} at {{ $orgName }},--}} {{-- humbly submit this application regarding the matter stated below.--}} {{--

--}} {{----}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
{{ __('Employee ID') }} / কর্মচারী আইডি{{ $employeeId }}{{ __('Designation') }} / পদবী{{ $designation }}
{{ __('Department') }} / বিভাগ{{ $department }}{{ __('Branch') }} / শাখা{{ $branch }}
{{ __('Mobile') }} / মোবাইল{{ $mobile }}{{ __('NID') }} / জাতীয় পরিচয়পত্র{{ $nid }}
{{ __('Application type') }} / আবেদনের ধরন{{ $categoryBn }} — {{ \App\Models\EnothiFile::categoryLabel($file->category, $file->enothi_category_id) }}
--}}
{{ __('Details of Application') }} / আবেদনের বিস্তারিত
{!! nl2br(e($bodyText)) !!}
@if($file->attachments->isNotEmpty())
{{ __('Attachments') }} / সংযুক্তি
@foreach($file->attachments as $i => $att) @endforeach
# {{ __('Document name') }} / নথির নাম
{{ $i + 1 }} {{ $att->original_name }}
@endif

অতএব, বিষয়টি সদয় বিবেচনা করে প্রয়োজনীয় ব্যবস্থা গ্রহণের জন্য বিনীত অনুরোধ জানাচ্ছি।

{{--

--}} {{-- Therefore, I earnestly request your kind consideration and necessary action in this regard.--}} {{--

--}}
@if($signatureUrl || $sealUrl)
@if($signatureUrl) {{ __('Signature') }} @endif @if($sealUrl) {{ __('Seal') }} @endif
@else
@endif
আবেদনকারী
{{ $applicantName }}
{{ $designation }}
@if($branch !== '—')
{{ $branch }}
@endif
তারিখ: {{ $printDate }}
@if($withNoting)
অফিস নথি / মতামত
{{ __('Office Noting') }}
{{ __('File No.') }} {{ $file->file_number }} {{ __('Status') }} {{ \App\Models\EnothiFile::statusLabel($file->status) }}
{{ __('Subject') }} {{ $file->subject }}
@forelse($file->notes->where('note_type', '!=', \App\Models\EnothiNote::TYPE_APPLICATION) as $note) @php $noteStaff = $note->author?->staff; $noteSigUrl = $sigSealService->signatureUrl($noteStaff); $noteSealUrl = $sigSealService->sealUrl($noteStaff); @endphp
{{ $note->author?->name ?? '—' }} @if($note->author?->staff?->designation) ({{ $note->author->staff->designation->name }}) @endif {{ $note->created_at?->format('d.m.Y H:i') }}
{{ \App\Models\EnothiNote::typeLabel($note->note_type) }} @if($note->level) — {{ __('Level') }} {{ $note->level }} @endif
{!! nl2br(e($note->body)) !!}
@if($noteSigUrl || $noteSealUrl)
@if($noteSigUrl) {{ __('Signature') }} @endif @if($noteSealUrl) {{ __('Seal') }} @endif
@endif
{{ __('Signature') }} / স্বাক্ষর: {{ ($noteSigUrl || $noteSealUrl) ? '' : '........................................' }}
@empty @for($i = 1; $i <= 3; $i++)
{{ __('Level') }} {{ $i }} — {{ __('Observation / Recommendation') }}
{{ __('Signature & Date') }} / স্বাক্ষর ও তারিখ: ........................................
@endfor @endforelse
{{ __('Final decision') }} / চূড়ান্ত সিদ্ধান্ত: {{ \App\Models\EnothiFile::statusLabel($file->status) }}
@endif