Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2024-01-10 08:50:07 +07:00
6 changed files with 148 additions and 1 deletions

View File

@@ -386,6 +386,11 @@ class RequestLogController extends Controller
(Select corporates.name FROM corporates
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
WHERE corporate_employees.member_id = members.id LIMIT 1) AS nama_perusahaan
'),
DB::raw('
(Select corporates.id FROM corporates
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 services.name FROM services
@@ -451,6 +456,27 @@ class RequestLogController extends Controller
$data['logoPerusahaan'] = $logoPerusahaan;
$signatureDr = DB::table('signatures')
->leftJoin('corporate_manager', 'corporate_manager.user_id', '=', 'signatures.user_id')
->leftJoin('files', 'files.fileable_id', '=', 'signatures.id')
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 1)
->where('corporate_manager.corporate_id', '=', $dataMember->id_perusahaan)
->select('files.path')
->first();
$data['signatureDr'] = $signatureDr;
$signatureAd = DB::table('signatures')
->leftJoin('files', 'files.fileable_id', '=', 'signatures.id')
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 2)
->where('signatures.user_id', '=', $dataRequestLog->approved_by)
->select('files.path')
->first();
$data['signatureAd'] = $signatureAd;
$pdf = new Dompdf();
$options = new Options();
@@ -508,6 +534,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 nama_perusahaan
'),
DB::raw('
(Select corporates.id FROM corporates
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 services.name FROM services
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
@@ -591,6 +622,27 @@ class RequestLogController extends Controller
$data['logoPerusahaan'] = $logoPerusahaan;
$signatureDr = DB::table('signatures')
->leftJoin('corporate_manager', 'corporate_manager.user_id', '=', 'signatures.user_id')
->leftJoin('files', 'files.fileable_id', '=', 'signatures.id')
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 1)
->where('corporate_manager.corporate_id', '=', $dataMember->id_perusahaan)
->select('files.path')
->first();
$data['signatureDr'] = $signatureDr;
$signatureAd = DB::table('signatures')
->leftJoin('files', 'files.fileable_id', '=', 'signatures.id')
->where('files.fileable_type', '=', 'App\Models\Signature')
->where('signatures.type', '=', 2)
->where('signatures.user_id', '=', $dataRequestLog->approved_by)
->select('files.path')
->first();
$data['signatureAd'] = $signatureAd;
$pdf = new Dompdf();
$options = new Options();

View File

@@ -116,7 +116,8 @@ class RequestLogController extends Controller
paymentType: 'cashless',
serviceCode: $request->service_code,
submissionDate: null,
status: 'approved',
// status: 'approved',
status: 'requested', // di nonaktifkan dulu auto approved
organization_id: $request->organization_id,
source: $request->source
);

View File

@@ -943,6 +943,8 @@ class MemberEnrollmentService
// Hapus Member plan terkait
$member->memberPlans()->delete();
//Update plan
$plans = explode(",",$row['plan_id']);
if (count($plans) > 0) {

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('signatures', function (Blueprint $table) {
$table->id();
$table->bigInteger('user_id');
$table->integer('type')->nullable()->comment('1=Offsite Medical Treatment, 2=Customer Service Team');
$table->bigInteger('created_by')->nullable();
$table->bigInteger('updated_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('signatures');
}
};

View File

@@ -158,6 +158,12 @@
left: 10px;
text-align: left;
}
.bottom-left-ttd-2-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 225px;
left: 30px;
text-align: left;
}
.bottom-right-ttd-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 200px;
@@ -171,6 +177,12 @@
right: 10px;
text-align: left;
}
.bottom-right-ttd-2-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 225px;
right: 30px;
text-align: left;
}
.bottom-left1-ttd-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 100px;
@@ -251,6 +263,14 @@
Hormat Kami,<br>
{{ $dataMember->nama_perusahaan }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-2-<?php echo now()->timestamp; ?> ">
@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
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
@@ -269,6 +289,14 @@
{{ \Carbon\Carbon::parse(now())->format('d M Y') }},<br>
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-2-<?php echo now()->timestamp; ?> ">
@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 . '">';
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
(.......................................)<br>
<b>Customer Service Team</b>

View File

@@ -163,6 +163,12 @@
left: 10px;
text-align: left;
}
.bottom-left-ttd-2-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 225px;
left: 30px;
text-align: left;
}
.bottom-right-ttd-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 200px;
@@ -177,6 +183,13 @@
text-align: left;
}
.bottom-right-ttd-2-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 225px;
right: 30px;
text-align: left;
}
.bottom-right1-ttd-<?php echo now()->timestamp; ?> {
color: #000000;
bottom: 100px;
@@ -423,6 +436,14 @@
Hormat Kami,<br>
{{ $dataMember->nama_perusahaan }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-2-<?php echo now()->timestamp; ?> ">
@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
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
@php
if (!empty($logoPerusahaan->code) == 'VALEIND') {
@@ -441,6 +462,14 @@
{{ \Carbon\Carbon::parse(now())->format('d M Y') }},<br>
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-2-<?php echo now()->timestamp; ?> ">
@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 . '">';
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
(.......................................)<br>
<b>Customer Service Team</b>