Merge branch 'origin/production' of https://dev.sismedika.online/febio/aso into origin/production

This commit is contained in:
2024-01-16 09:10:01 +07:00
5 changed files with 87 additions and 31 deletions

View File

@@ -448,6 +448,11 @@ class RequestLogController extends Controller
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
WHERE corporate_employees.member_id = members.id LIMIT 1) AS id_perusahaan
'),
DB::raw('
(Select corporates.code FROM corporates
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
WHERE corporate_employees.member_id = members.id LIMIT 1) AS code_perusahaan
'),
DB::raw('
(Select services.name FROM services
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
@@ -528,7 +533,14 @@ class RequestLogController extends Controller
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 2)
->where('signatures.user_id', '=', $dataRequestLog->approved_by)
->select('files.path')
->select(
'files.path',
DB::raw('
(Select persons.name FROM users
LEFT JOIN persons ON users.person_id = persons.id
WHERE users.id = "'.$dataRequestLog->approved_by.'" LIMIT 1) AS name_approve
')
)
->first();
$data['signatureAd'] = $signatureAd;
@@ -596,6 +608,11 @@ class RequestLogController extends Controller
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
WHERE corporate_employees.member_id = members.id LIMIT 1) AS id_perusahaan
'),
DB::raw('
(Select corporates.code FROM corporates
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
WHERE corporate_employees.member_id = members.id LIMIT 1) AS code_perusahaan
'),
DB::raw('
(Select services.name FROM services
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
@@ -695,7 +712,14 @@ class RequestLogController extends Controller
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 2)
->where('signatures.user_id', '=', $dataRequestLog->approved_by)
->select('files.path')
->select(
'files.path',
DB::raw('
(Select persons.name FROM users
LEFT JOIN persons ON users.person_id = persons.id
WHERE users.id = "'.$dataRequestLog->approved_by.'" LIMIT 1) AS name_approve
')
)
->first();
$data['signatureAd'] = $signatureAd;

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -427,19 +427,19 @@
</table>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
@php
if (!empty($logoPerusahaan->code) === 'VALEIND') {
if (!empty($dataMember->code_perusahaan) == 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '' }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if(!empty($logoPerusahaan->code) === 'PETROLAB') {
} else if(!empty($dataMember->code_perusahaan) == 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '' }}</b><br>
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
@php
@@ -447,7 +447,7 @@
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '' }}</b><br>
@php

View File

@@ -264,16 +264,22 @@
{{ $dataMember->nama_perusahaan }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-2-<?php echo now()->timestamp; ?> ">
@php
<!-- @php
if(!empty($signatureDr->path)) {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $signatureDr->path)));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
}
@endphp -->
@php
if(!empty($dataMember->code_perusahaan) == 'VALEIND') {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(public_path('images/ttd_dr_vale.png')));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
if (!empty($dataMember->code_perusahaan) == 'VALEIND') {
@endphp
<u><b>Dr. Hery Hermas, M.Kes</b></u>
@php
@@ -290,7 +296,7 @@
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-2-<?php echo now()->timestamp; ?> ">
@php
@php
if(!empty($signatureAd->path)) {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $signatureAd->path)));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
@@ -298,8 +304,18 @@
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
(.......................................)<br>
<b>Customer Service Team</b>
@php
if (!empty($signatureAd->name_approve)) {
@endphp
<u><b>{{ $signatureAd->name_approve }}</b></u>
@php
} else {
@endphp
(.......................................)
@php
}
@endphp
<br><b>Customer Service Team</b>
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left1-ttd-<?php echo now()->timestamp; ?> ">
(.......................................)
@@ -309,27 +325,27 @@
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
if (!empty($dataMember->code_perusahaan) == 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>{{ !empty($dataMember->name_perusahaan) ? $dataMember->name_perusahaan : '' }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if(!empty($logoPerusahaan->code) == 'PETROLAB') {
} else if(!empty($dataMember->code_perusahaan) == 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>Alarm Center Petrolab (LinkSehat) Office</b><br>
<b>{{ !empty($dataMember->name_perusahaan) ? $dataMember->name_perusahaan : '' }}</b><br>
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
@php
} else {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>Alarm Center (LinkSehat) Office</b><br>
<b>{{ !empty($dataMember->name_perusahaan) ? $dataMember->name_perusahaan : '' }}</b><br>
@php

View File

@@ -437,16 +437,22 @@
{{ $dataMember->nama_perusahaan }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-2-<?php echo now()->timestamp; ?> ">
@php
<!-- @php
if(!empty($signatureDr->path)) {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $signatureDr->path)));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
}
@endphp -->
@php
if(!empty($dataMember->code_perusahaan) == 'VALEIND') {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(public_path('images/ttd_dr_vale.png')));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
if (!empty($dataMember->code_perusahaan) == 'VALEIND') {
@endphp
<u><b>Dr. Hery Hermas, M.Kes</b></u>
@php
@@ -463,7 +469,7 @@
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-2-<?php echo now()->timestamp; ?> ">
@php
@php
if(!empty($signatureAd->path)) {
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $signatureAd->path)));
echo '<img style="width: 65px; height: 48px;" src="' . $imgSrc . '">';
@@ -471,35 +477,45 @@
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
(.......................................)<br>
<b>Customer Service Team</b>
@php
if (!empty($signatureAd->name_approve)) {
@endphp
<u><b>{{ $signatureAd->name_approve }}</b></u>
@php
} else {
@endphp
(.......................................)
@php
}
@endphp
<br><b>Customer Service Team</b>
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right1-ttd-<?php echo now()->timestamp; ?> ">
<b>{{ $dataMember->name }}</b>
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
if (!empty($dataMember->code_perusahaan) == 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '' }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if(!empty($logoPerusahaan->code) == 'PETROLAB') {
} else if(!empty($dataMember->code_perusahaan) == 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : ''}}</b><br>
<b>Alarm Center Petrolab (LinkSehat) Office</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : ''}}</b><br>
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
@php
} else {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
<b>Alarm Center (LinkSehat) Office</b><br>
<b>{{ !empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '' }}</b><br>
@php