From d935445ebc1bf2ce5936a2c84ef7de0c39b812be Mon Sep 17 00:00:00 2001 From: Iqbal Date: Sat, 9 May 2026 13:06:55 +0700 Subject: [PATCH] fix: update signature logic for VALEIND with LinkSehat penjamin --- .../Controllers/Api/RequestLogController.php | 40 +++++++++++-------- resources/views/pdf/req_log_page_1.blade.php | 25 +++--------- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php index 45af4fbd..d4e4345d 100755 --- a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php +++ b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php @@ -625,16 +625,20 @@ class RequestLogController extends Controller $ttdImage = null; if ($isVale) { - if ($dataRequestLog->submission_date <= '2025-05-12') { - $ttdNama = 'Dr. Hery Hermas, M.Kes'; - $ttdImage = public_path('images/ttd_dr_vale.png'); + if (trim($data['penjamin']) === 'LinkSehat') { + $ttdNama = 'Fariz Ariyadi'; + $ttdJabatan = 'Chief Executive Officer'; + $ttdImage = public_path('images/ttd_fariz.png'); } else { - $ttdNama = 'dr. Irmawati Baso, S. Ked., MM'; - $ttdImage = public_path('images/ttd_dr_irma_2.png'); + if ($dataRequestLog->submission_date <= '2025-05-12') { + $ttdNama = 'Dr. Hery Hermas, M.Kes'; + $ttdImage = public_path('images/ttd_dr_vale.png'); + } else { + $ttdNama = 'dr. Irmawati Baso, S. Ked., MM'; + $ttdImage = public_path('images/ttd_dr_irma_2.png'); + } + $ttdJabatan = 'Offsite Medical Treatment'; } - - $ttdJabatan = 'Offsite Medical Treatment'; - } else { $ttdNama = 'Fariz Ariyadi'; $ttdJabatan = 'Chief Executive Officer'; @@ -883,16 +887,20 @@ class RequestLogController extends Controller $ttdImage = null; if ($isVale) { - if ($dataRequestLog->submission_date <= '2025-05-12') { - $ttdNama = 'Dr. Hery Hermas, M.Kes'; - $ttdImage = public_path('images/ttd_dr_vale.png'); + if (trim($data['penjamin']) === 'LinkSehat') { + $ttdNama = 'Fariz Ariyadi'; + $ttdJabatan = 'Chief Executive Officer'; + $ttdImage = public_path('images/ttd_fariz.png'); } else { - $ttdNama = 'dr. Irmawati Baso, S. Ked., MM'; - $ttdImage = public_path('images/ttd_dr_irma_2.png'); + if ($dataRequestLog->submission_date <= '2025-05-12') { + $ttdNama = 'Dr. Hery Hermas, M.Kes'; + $ttdImage = public_path('images/ttd_dr_vale.png'); + } else { + $ttdNama = 'dr. Irmawati Baso, S. Ked., MM'; + $ttdImage = public_path('images/ttd_dr_irma_2.png'); + } + $ttdJabatan = 'Offsite Medical Treatment'; } - - $ttdJabatan = 'Offsite Medical Treatment'; - } else { $ttdNama = 'Fariz Ariyadi'; $ttdJabatan = 'Chief Executive Officer'; diff --git a/resources/views/pdf/req_log_page_1.blade.php b/resources/views/pdf/req_log_page_1.blade.php index 5dd19c37..9a555cca 100644 --- a/resources/views/pdf/req_log_page_1.blade.php +++ b/resources/views/pdf/req_log_page_1.blade.php @@ -437,31 +437,18 @@ {{ $dataMember->nama_perusahaan }}
- - @php - if(!empty($dataMember->code_perusahaan) == 'VALEIND' && $dataRequestLog->submission_date <= '2025-05-12') { - $imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(public_path('images/ttd_dr_vale.png'))); - echo ''; - } else if(!empty($dataMember->code_perusahaan) == 'VALEIND'){ - $imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(public_path('images/ttd_dr_irma_2.png'))); - echo ''; - } @endphp
@php - if ($dataMember->code_perusahaan == 'VALEIND' && $dataRequestLog->submission_date <= '2025-05-12') { + if (!empty($ttdNama)) { @endphp - Dr. Hery Hermas, M.Kes - @php - } elseif ($dataMember->code_perusahaan == 'VALEIND') { - @endphp - dr. Irmawati Baso, S. Ked., MM + {{ $ttdNama }} @php } else { @endphp @@ -470,7 +457,7 @@ } @endphp -
Offsite Medical Treatment +
{{ $ttdJabatan ?? 'Offsite Medical Treatment' }}
{{ \Carbon\Carbon::parse($request_logs->approved_at)->format('d M Y') }},