Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -17,6 +17,10 @@ use Modules\Client\Transformers\ClaimShowResource;
|
|||||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||||
|
use Box\Spout\Writer\Common\Creator\WriterEntityFactory;
|
||||||
|
use Box\Spout\Writer\Common\Creator\Style\StyleBuilder;
|
||||||
|
use Box\Spout\Common\Entity\Style\CellAlignment;
|
||||||
|
use Box\Spout\Common\Entity\Style\Color;
|
||||||
|
|
||||||
class ClaimController extends Controller
|
class ClaimController extends Controller
|
||||||
{
|
{
|
||||||
@@ -261,4 +265,243 @@ class ClaimController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function exportAlrmCenter($corporate_id, $start, $end)
|
||||||
|
{
|
||||||
|
$writer = WriterEntityFactory::createXLSXWriter();
|
||||||
|
$writer->openToFile(public_path('files/Report-Data-Alarm-Center-'.$start.'-'.$end.'.xlsx'));
|
||||||
|
|
||||||
|
$header = [
|
||||||
|
'No',
|
||||||
|
'Code',
|
||||||
|
'Provider',
|
||||||
|
'Member ID (BN)',
|
||||||
|
'Member Name',
|
||||||
|
'Member Name Principal',
|
||||||
|
'Plan Code',
|
||||||
|
'Payor ID',
|
||||||
|
'Corporate name',
|
||||||
|
'Policy Number',
|
||||||
|
'Benefit Code',
|
||||||
|
'Benefit Desc',
|
||||||
|
'Amt Incurred',
|
||||||
|
'Amt Approved',
|
||||||
|
'Amt Not Approved',
|
||||||
|
'Excess Paid',
|
||||||
|
'Diagnosis'
|
||||||
|
];
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
|
||||||
|
$headerRow = WriterEntityFactory::createRowFromArray($header, $style);
|
||||||
|
$writer->addRow($headerRow);
|
||||||
|
|
||||||
|
$data = DB::table('request_logs')
|
||||||
|
->leftJoin('members', 'members.id', '=', 'request_logs.member_id')
|
||||||
|
->leftJoin('corporate_employees','corporate_employees.member_id','=','members.id')
|
||||||
|
->where('corporate_employees.corporate_id', '=', $corporate_id)
|
||||||
|
->when($start != 'all' && $end != 'all', function ($query) use ($start, $end) {
|
||||||
|
$query->where('request_logs.submission_date', '>', $start)
|
||||||
|
->where('request_logs.submission_date', '<', $end);
|
||||||
|
})
|
||||||
|
->select(
|
||||||
|
DB::raw('1 AS no'),
|
||||||
|
'request_logs.organization_id',
|
||||||
|
'request_logs.id',
|
||||||
|
'request_logs.member_id',
|
||||||
|
'request_logs.service_code',
|
||||||
|
'request_logs.code',
|
||||||
|
'request_logs.diagnosis'
|
||||||
|
)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
if (isset($data) && count($data) > 0)
|
||||||
|
{
|
||||||
|
$dataRow = array();
|
||||||
|
$no = 0;
|
||||||
|
foreach ($data as $item)
|
||||||
|
{
|
||||||
|
//Provider
|
||||||
|
$dataRumahSakit = DB::table('organizations')
|
||||||
|
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||||
|
->where('organizations.id', '=', $item->organization_id)
|
||||||
|
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||||
|
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||||
|
->first();
|
||||||
|
//Data Member
|
||||||
|
$dataMember = DB::table('members')
|
||||||
|
->where('members.id', '=', $item->member_id)
|
||||||
|
->select(
|
||||||
|
'members.nric',
|
||||||
|
'members.id',
|
||||||
|
'members.principal_id',
|
||||||
|
'members.name',
|
||||||
|
'members.birth_date',
|
||||||
|
'members.member_id',
|
||||||
|
'members.gender',
|
||||||
|
DB::raw('
|
||||||
|
(Select persons.nik FROM persons WHERE persons.id = members.person_id LIMIT 1) AS nik
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
"LinkSehat" AS penjamin
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(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 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 = "'.$item->service_code.'" LIMIT 1) AS jenis_perwatan
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(Select member_policies.policy_id FROM member_policies WHERE member_policies.member_id = members.member_id LIMIT 1) AS no_polis
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(Select member_policies.status FROM member_policies WHERE member_policies.member_id = members.member_id LIMIT 1) AS status_polis
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(Select plans.code FROM member_plans
|
||||||
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
|
WHERE member_plans.member_id = members.id AND plans.service_code = "'.$item->service_code.'" LIMIT 1) AS code_plan
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(Select plans.limit_rules FROM member_plans
|
||||||
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
|
WHERE member_plans.member_id = members.id LIMIT 1) AS limit_rules
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
"IDR" AS mata_uang
|
||||||
|
'),
|
||||||
|
'members.members_effective_date AS mulai',
|
||||||
|
'members.members_expire_date AS akhir'
|
||||||
|
)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
//Nama Karyawan
|
||||||
|
$data['namaKaryawan'] = '';
|
||||||
|
if($dataMember->principal_id)
|
||||||
|
{
|
||||||
|
$dataNamaKaryawan = DB::table('members')
|
||||||
|
->where('members.member_id', '=', $dataMember->principal_id)
|
||||||
|
->select('members.name')
|
||||||
|
->first();
|
||||||
|
$data['namaKaryawan'] = $dataNamaKaryawan->name;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data['namaKaryawan'] = $dataMember->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Data Benefit
|
||||||
|
$dataClaimLog = DB::table('request_log_benefits')
|
||||||
|
->where('request_log_benefits.request_log_id', '=', $item->id)
|
||||||
|
->select(
|
||||||
|
'*',
|
||||||
|
DB::raw('
|
||||||
|
(Select benefits.description FROM benefits
|
||||||
|
WHERE benefits.id = request_log_benefits.benefit_id LIMIT 1) AS benfit
|
||||||
|
'),
|
||||||
|
DB::raw('
|
||||||
|
(Select benefits.code FROM benefits
|
||||||
|
WHERE benefits.id = request_log_benefits.benefit_id LIMIT 1) AS code
|
||||||
|
')
|
||||||
|
)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$check_first_id = 0;
|
||||||
|
if($check_first_id != $item->id)
|
||||||
|
{
|
||||||
|
$no += $item->no;
|
||||||
|
}
|
||||||
|
if (isset($dataClaimLog) && count($dataClaimLog) > 0)
|
||||||
|
{
|
||||||
|
foreach ($dataClaimLog as $item_benefit)
|
||||||
|
{
|
||||||
|
$rowData = [
|
||||||
|
$check_first_id != $item->id ? $no : '',
|
||||||
|
!empty($item->code) ? $item->code : '',
|
||||||
|
!empty($dataRumahSakit->nama_rumahsakit) ? $dataRumahSakit->nama_rumahsakit : '',
|
||||||
|
!empty($dataMember->member_id) ? $dataMember->member_id : '',
|
||||||
|
!empty($dataMember->name) ? $dataMember->name : '',
|
||||||
|
$data['namaKaryawan'],
|
||||||
|
!empty($dataMember->code_plan) ? $dataMember->code_plan : '',
|
||||||
|
'LinkSehat',
|
||||||
|
!empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '',
|
||||||
|
!empty($dataMember->no_polis) ? $dataMember->no_polis : '',
|
||||||
|
!empty($item_benefit->code) ? $item_benefit->code : '',
|
||||||
|
!empty($item_benefit->benfit) ? $item_benefit->benfit : '',
|
||||||
|
!empty($item_benefit->amount_incurred) ? $item_benefit->amount_incurred : '',
|
||||||
|
!empty($item_benefit->amount_approved) ? $item_benefit->amount_approved : '',
|
||||||
|
!empty($item_benefit->amount_not_approved) ? $item_benefit->amount_not_approved : '',
|
||||||
|
!empty($item_benefit->excess_paid) ? $item_benefit->excess_paid : '',
|
||||||
|
!empty($item->diagnosis) ? $item->diagnosis : '',
|
||||||
|
|
||||||
|
];
|
||||||
|
array_push($dataRow,$rowData);
|
||||||
|
|
||||||
|
$check_first_id = $item->id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$rowData = [
|
||||||
|
$check_first_id != $item->id ? $no : '',
|
||||||
|
!empty($item->code) ? $item->code : '',
|
||||||
|
!empty($dataRumahSakit->nama_rumahsakit) ? $dataRumahSakit->nama_rumahsakit : '',
|
||||||
|
!empty($dataMember->member_id) ? $dataMember->member_id : '',
|
||||||
|
!empty($dataMember->name) ? $dataMember->name : '',
|
||||||
|
$data['namaKaryawan'],
|
||||||
|
!empty($dataMember->code_plan) ? $dataMember->code_plan : '',
|
||||||
|
'LinkSehat',
|
||||||
|
!empty($dataMember->nama_perusahaan) ? $dataMember->nama_perusahaan : '',
|
||||||
|
!empty($dataMember->no_polis) ? $dataMember->no_polis : '',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
|
||||||
|
];
|
||||||
|
array_push($dataRow,$rowData);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
//->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
foreach ($dataRow as $rowData) {
|
||||||
|
$row = WriterEntityFactory::createRowFromArray($rowData, $style);
|
||||||
|
$writer->addRow($row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$writer->close();
|
||||||
|
|
||||||
|
return Helper::responseJson([
|
||||||
|
'file_name' => 'Report-Data-Alarm-Center-'. $start.'-'.$end,
|
||||||
|
"file_url" => url('files/Report-Data-Alarm-Center-'. $start.'-'.$end.'.xlsx')
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ Route::prefix('client')->group(function () {
|
|||||||
Route::get('claims/status', [ClaimController::class, 'status']);
|
Route::get('claims/status', [ClaimController::class, 'status']);
|
||||||
Route::get('claims', [ClaimController::class, 'index']);
|
Route::get('claims', [ClaimController::class, 'index']);
|
||||||
Route::get('claims/export', [ClaimController::class, 'export']);
|
Route::get('claims/export', [ClaimController::class, 'export']);
|
||||||
|
Route::get('claims/exportAlrmCenter/{start}/{end}', [ClaimController::class, 'exportAlrmCenter']);
|
||||||
Route::get('claims/{claim_id}/encounters', [ClaimEncounterController::class, 'getEncounterData']);
|
Route::get('claims/{claim_id}/encounters', [ClaimEncounterController::class, 'getEncounterData']);
|
||||||
Route::get('topup', [TopUpController::class, 'index']);
|
Route::get('topup', [TopUpController::class, 'index']);
|
||||||
// Route::get('topup', [TopUpController::class, 'get']);
|
// Route::get('topup', [TopUpController::class, 'get']);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class RequestLogService
|
|||||||
"Total Billing" => "total_billing",
|
"Total Billing" => "total_billing",
|
||||||
"Amount Approval" => "amount_approval",
|
"Amount Approval" => "amount_approval",
|
||||||
"Amount Not Approval" => "amount_not_approval",
|
"Amount Not Approval" => "amount_not_approval",
|
||||||
|
"Final Billing" => "final_billing",
|
||||||
"QC 1" => "status_final_log",
|
"QC 1" => "status_final_log",
|
||||||
"Ingestion Code" => "ingestion_code", // TODO I think this should not be here because if user uploading result then ingestion code and status will be filled
|
"Ingestion Code" => "ingestion_code", // TODO I think this should not be here because if user uploading result then ingestion code and status will be filled
|
||||||
"Ingestion Status" => "ingestion_status",
|
"Ingestion Status" => "ingestion_status",
|
||||||
@@ -54,6 +55,7 @@ class RequestLogService
|
|||||||
"total_billing" => "Total Billing",
|
"total_billing" => "Total Billing",
|
||||||
"amount_approval" => "Amount Approval",
|
"amount_approval" => "Amount Approval",
|
||||||
"amount_not_approval" => "Amount Not Approval",
|
"amount_not_approval" => "Amount Not Approval",
|
||||||
|
"final_billing" => "Final Billing",
|
||||||
"status_final_log" => "QC 1" ,
|
"status_final_log" => "QC 1" ,
|
||||||
"ingestion_code" => "Ingestion Code",
|
"ingestion_code" => "Ingestion Code",
|
||||||
"ingestion_status" => "Ingestion Status",
|
"ingestion_status" => "Ingestion Status",
|
||||||
@@ -73,6 +75,7 @@ class RequestLogService
|
|||||||
"Total Billing",
|
"Total Billing",
|
||||||
"Amount Approval",
|
"Amount Approval",
|
||||||
"Amount Not Approval",
|
"Amount Not Approval",
|
||||||
|
"Final Billing",
|
||||||
"QC 1",
|
"QC 1",
|
||||||
"Ingestion Code",
|
"Ingestion Code",
|
||||||
"Ingestion Status",
|
"Ingestion Status",
|
||||||
@@ -92,6 +95,7 @@ class RequestLogService
|
|||||||
"Total Billing",
|
"Total Billing",
|
||||||
"Amount Approval",
|
"Amount Approval",
|
||||||
"Amount Not Approval",
|
"Amount Not Approval",
|
||||||
|
"Final Billing",
|
||||||
"QC 1",
|
"QC 1",
|
||||||
"Ingestion Code",
|
"Ingestion Code",
|
||||||
"Ingestion Status",
|
"Ingestion Status",
|
||||||
@@ -102,7 +106,11 @@ class RequestLogService
|
|||||||
if ($date_from_row instanceof DateTime) {
|
if ($date_from_row instanceof DateTime) {
|
||||||
return $date_from_row->format('Y-m-d');
|
return $date_from_row->format('Y-m-d');
|
||||||
} else if ($date_from_row != null) {
|
} else if ($date_from_row != null) {
|
||||||
return date('Y-m-d', strtotime($date_from_row));
|
if (strtotime($date_from_row)){
|
||||||
|
return date('Y-m-d', strtotime($date_from_row));
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -134,6 +142,12 @@ class RequestLogService
|
|||||||
'member_id' => $row['member_id'],
|
'member_id' => $row['member_id'],
|
||||||
]), 0, null, $row);
|
]), 0, null, $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dateSubmission = $this->dateParser($row['submission_date']);
|
||||||
|
if (!$dateSubmission){
|
||||||
|
throw new ImportRowException(__('Format Date Invalid'), 0, null, $row);
|
||||||
|
}
|
||||||
|
|
||||||
// Membuat singkatan dari nama rumah sakit
|
// Membuat singkatan dari nama rumah sakit
|
||||||
$singkatan = "";
|
$singkatan = "";
|
||||||
$words = explode(' ', $row['organization_id']);
|
$words = explode(' ', $row['organization_id']);
|
||||||
@@ -169,7 +183,14 @@ class RequestLogService
|
|||||||
];
|
];
|
||||||
|
|
||||||
$code = $this->makeCode($row['code'], $data);
|
$code = $this->makeCode($row['code'], $data);
|
||||||
$status = $row['status_final_log'] == 'Y' ? 'approved' : 'requested';
|
if ($row['status_final_log'] == 'Y'){
|
||||||
|
$status = 'approved';
|
||||||
|
} else if ($row['status_final_log'] == 'C'){
|
||||||
|
$status = 'canceled';
|
||||||
|
} else {
|
||||||
|
$status = 'requested';
|
||||||
|
}
|
||||||
|
|
||||||
$service = Service::where('name', $row['service'])->first();
|
$service = Service::where('name', $row['service'])->first();
|
||||||
if ($service){
|
if ($service){
|
||||||
$serviceCode = $service->code;
|
$serviceCode = $service->code;
|
||||||
@@ -187,40 +208,67 @@ class RequestLogService
|
|||||||
$final_log = 1;
|
$final_log = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($row['catatan']){
|
||||||
|
$data = [
|
||||||
|
'code' => $code,
|
||||||
|
'member_id' => $member->id,
|
||||||
|
'submission_date' => $row['submission_date'],
|
||||||
|
'discharge_date' => $row['submission_date'],
|
||||||
|
'payment_type' => 'cashless',
|
||||||
|
'status' => $status,
|
||||||
|
'status_final_log' => $statusFinalLog,
|
||||||
|
'final_log' =>$final_log,
|
||||||
|
'import_system' =>TRUE,
|
||||||
|
// 'catatan' => $row['catatan'],
|
||||||
|
'keterangan' => $row['keterangan'],
|
||||||
|
'policy_id' => $member->currentPolicy->id ?? null,
|
||||||
|
'organization_id' => $organization_id,
|
||||||
|
'diagnosis' => $row['catatan'],
|
||||||
|
'service_code' => $serviceCode,
|
||||||
|
'approved_final_log_at' => $row['approved_final_log_at'],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$data = [
|
||||||
|
'code' => $code,
|
||||||
|
'member_id' => $member->id,
|
||||||
|
'submission_date' => $row['submission_date'],
|
||||||
|
'discharge_date' => $row['submission_date'],
|
||||||
|
'payment_type' => 'cashless',
|
||||||
|
'status' => $status,
|
||||||
|
'status_final_log' => $statusFinalLog,
|
||||||
|
'final_log' =>$final_log,
|
||||||
|
'import_system' =>TRUE,
|
||||||
|
// 'catatan' => $row['catatan'],
|
||||||
|
'keterangan' => $row['keterangan'],
|
||||||
|
'policy_id' => $member->currentPolicy->id ?? null,
|
||||||
|
'organization_id' => $organization_id,
|
||||||
|
'service_code' => $serviceCode,
|
||||||
|
'approved_final_log_at' => $row['approved_final_log_at'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$requestLog = RequestLog::updateOrCreate(
|
$requestLog = RequestLog::updateOrCreate(
|
||||||
[
|
|
||||||
'code' => $code
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'member_id' => $member->id,
|
],
|
||||||
'submission_date' => $row['submission_date'],
|
$data);
|
||||||
'discharge_date' => $row['submission_date'],
|
|
||||||
'payment_type' => 'cashless',
|
|
||||||
'status' => $status,
|
|
||||||
'status_final_log' => $statusFinalLog,
|
|
||||||
'final_log' =>$final_log,
|
|
||||||
'import_system' =>TRUE,
|
|
||||||
'catatan' => $row['catatan'],
|
|
||||||
'policy_id' => $member->currentPolicy->id ?? null,
|
|
||||||
'organization_id' => $organization_id,
|
|
||||||
'service_code' => $serviceCode,
|
|
||||||
'approved_final_log_at' => $row['approved_final_log_at'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
|
|
||||||
if ($benefit) { // jika tidak ada benefit nya maka belum ngisi benefit nya
|
if ($benefit) { // jika tidak ada benefit nya maka belum ngisi benefit nya
|
||||||
RequestLogBenefit::updateOrCreate(
|
// Delete item
|
||||||
[
|
if ($row['final_billing']){
|
||||||
'request_log_id' => $requestLog->id,
|
RequestLogBenefit::where('request_log_id', '=', $requestLog->id)->delete();
|
||||||
],
|
}
|
||||||
|
|
||||||
|
// Insert Item
|
||||||
|
RequestLogBenefit::create(
|
||||||
[
|
[
|
||||||
'request_log_id' => $requestLog->id,
|
'request_log_id' => $requestLog->id,
|
||||||
'benefit_id' => $benefit->id,
|
'benefit_id' => $benefit->id,
|
||||||
'amount_incurred' => $row['total_billing'],
|
'amount_incurred' => ($row['amount_approval'] ? $row['amount_approval'] : 0) + ($row['amount_not_approval'] ? $row['amount_not_approval'] : 0) ,
|
||||||
'amount_approved' => $row['amount_approval'],
|
'amount_approved' => $row['amount_approval'] ?? 0,
|
||||||
'amount_not_approved' => $row['amount_not_approval'],
|
'amount_not_approved' => $row['amount_not_approval'] ?? 0,
|
||||||
'excess_paid' => $row['amount_not_approval'],
|
'excess_paid' => $row['amount_not_approval'] ?? 0,
|
||||||
'created_by' => auth()->user()->id,
|
'created_by' => auth()->user()->id,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ export default function Table<T>({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
sx={{ p: 2 }}
|
sx={{ p: 2 }}
|
||||||
onClick={() => exportReport.handleExportReport}
|
onClick={() => exportReport.handleExportReport()}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
<Typography variant="inherit" sx={{ marginLeft: 1 }}>
|
<Typography variant="inherit" sx={{ marginLeft: 1 }}>
|
||||||
|
|||||||
@@ -192,10 +192,11 @@ export default function List() {
|
|||||||
|
|
||||||
/* -------------------------------- handle export --------------------------- */
|
/* -------------------------------- handle export --------------------------- */
|
||||||
const handleExportReport = async () => {
|
const handleExportReport = async () => {
|
||||||
|
|
||||||
var filter = Object.fromEntries([...searchParams.entries()]);
|
var filter = Object.fromEntries([...searchParams.entries()]);
|
||||||
|
|
||||||
await axios
|
await axios
|
||||||
.get(corporateValue + '/claims/export', { params: filter })
|
.get(corporateValue + '/claims/exportAlrmCenter/'+(startDateValue ? startDateValue : 'all')+'/'+(endDateValue ? endDateValue : 'all'), { params: filter })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
enqueueSnackbar('Data berhasil di Export', {
|
enqueueSnackbar('Data berhasil di Export', {
|
||||||
variant: 'success',
|
variant: 'success',
|
||||||
|
|||||||
@@ -377,6 +377,9 @@ export default function List() {
|
|||||||
row.status == "declined" ?
|
row.status == "declined" ?
|
||||||
(<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>)
|
(<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>)
|
||||||
:
|
:
|
||||||
|
row.status == "canceled" ?
|
||||||
|
(<Label color='warning'> {capitalizeFirstLetter(row.status)}</Label>)
|
||||||
|
:
|
||||||
(<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>)
|
(<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>)
|
||||||
}
|
}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -317,7 +317,8 @@ function handleChangeTab(event: React.SyntheticEvent, newValue: string) {
|
|||||||
: Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]);
|
: Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]);
|
||||||
|
|
||||||
const response = await axios.get(`/get-request-log`, {
|
const response = await axios.get(`/get-request-log`, {
|
||||||
params: { ...parameters, type: 'request-log' },
|
params: { ...parameters, order: order,
|
||||||
|
orderBy: orderBy, type: 'request-log' },
|
||||||
});
|
});
|
||||||
setData(
|
setData(
|
||||||
response.data.data.map((obj: any) => ({
|
response.data.data.map((obj: any) => ({
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export default defineConfig({
|
|||||||
// This changes the out put dir from dist to build
|
// This changes the out put dir from dist to build
|
||||||
// comment this out if that isn't relevant for your project
|
// comment this out if that isn't relevant for your project
|
||||||
build: {
|
build: {
|
||||||
|
manifest: true,
|
||||||
outDir: 'build',
|
outDir: 'build',
|
||||||
chunkSizeWarningLimit: 100,
|
chunkSizeWarningLimit: 100,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user