Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging
This commit is contained in:
@@ -336,7 +336,7 @@ class ClaimController extends Controller
|
||||
$dataRumahSakit = DB::table('organizations')
|
||||
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||
->where('organizations.id', '=', $item->organization_id)
|
||||
// ->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||
->first();
|
||||
//Data Member
|
||||
|
||||
@@ -27,25 +27,30 @@ class RequestLogController extends Controller
|
||||
'service_code' => $request->service_code,
|
||||
'organization_id' => $request->organization_id,
|
||||
'organization_name' => $request->organization_name,
|
||||
'address_provider' => $request->address_provider
|
||||
'address_provider' => $request->address_provider,
|
||||
'submission_date' => $request->submission_date,
|
||||
];
|
||||
$validator = Validator::make($request->all(), [
|
||||
'member_id' => 'required',
|
||||
'service_code' => 'required'
|
||||
'service_code' => 'required',
|
||||
'submission_date' => 'required'
|
||||
], [
|
||||
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
||||
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
||||
'submission_date.required' => trans('Validation.required',['attribute' => 'Submission Date']),
|
||||
]);
|
||||
if($request->organization_id)
|
||||
{
|
||||
$validator = Validator::make($request->all(), [
|
||||
'organization_id' => 'required',
|
||||
'member_id' => 'required',
|
||||
'service_code' => 'required'
|
||||
'service_code' => 'required',
|
||||
'submission_date' => 'required'
|
||||
], [
|
||||
'organization_id.required' => trans('Validation.required',['attribute' => 'Provider ID']),
|
||||
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
||||
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
||||
'submission_date.required' => trans('Validation.required',['attribute' => 'Submission Date']),
|
||||
]);
|
||||
}
|
||||
if ($validator->fails())
|
||||
@@ -312,12 +317,15 @@ class RequestLogController extends Controller
|
||||
public function requestFinalLog(Request $request)
|
||||
{
|
||||
$data = [
|
||||
'request_logs_id' => $request->request_logs_id
|
||||
'request_logs_id' => $request->request_logs_id,
|
||||
'discharge_date' => $request->discharge_date,
|
||||
];
|
||||
$validator = Validator::make($request->all(), [
|
||||
'request_logs_id' => 'required'
|
||||
'request_logs_id' => 'required',
|
||||
'discharge_date' => 'required'
|
||||
], [
|
||||
'request_logs_id.required' => trans('Validation.required',['attribute' => 'Request Logs ID'])
|
||||
'request_logs_id.required' => trans('Validation.required',['attribute' => 'Request Logs ID']),
|
||||
'discharge_date.required' => trans('Validation.required',['attribute' => 'Discharge Date'])
|
||||
]);
|
||||
if ($validator->fails())
|
||||
{
|
||||
@@ -331,7 +339,8 @@ class RequestLogController extends Controller
|
||||
->where('request_logs.id', '=', $request->request_logs_id)
|
||||
->update([
|
||||
'status_final_log' => 'requested',
|
||||
'final_log' => 1
|
||||
'final_log' => 1,
|
||||
'discharge_date' => $request->discharge_date,
|
||||
]);
|
||||
if ($request->hasFile('result_files')) {
|
||||
foreach ($request->result_files as $file) {
|
||||
@@ -502,7 +511,7 @@ class RequestLogController extends Controller
|
||||
$dataRumahSakit = DB::table('organizations')
|
||||
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||
->where('organizations.id', '=', $dataRequestLog->organization_id)
|
||||
// ->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||
->first();
|
||||
|
||||
@@ -681,7 +690,7 @@ class RequestLogController extends Controller
|
||||
$dataRumahSakit = DB::table('organizations')
|
||||
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||
->where('organizations.id', '=', $dataRequestLog->organization_id)
|
||||
// ->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||
->first();
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class RequestLogController extends Controller
|
||||
member: $member,
|
||||
paymentType: 'cashless',
|
||||
serviceCode: $request->service_code,
|
||||
submissionDate: null,
|
||||
submissionDate: $request->submission_date,
|
||||
// status: 'approved',
|
||||
status: 'requested', // di nonaktifkan dulu auto approved
|
||||
organization_id: $request->organization_id,
|
||||
@@ -145,7 +145,7 @@ class RequestLogController extends Controller
|
||||
member: $member,
|
||||
paymentType: 'cashless',
|
||||
serviceCode: $request->service_code,
|
||||
submissionDate: null,
|
||||
submissionDate: $request->submission_date,
|
||||
status: 'requested',
|
||||
organization_id: $request->organization_id,
|
||||
source: $request->source
|
||||
|
||||
@@ -26,7 +26,7 @@ class RequestLogService{
|
||||
$member,
|
||||
$paymentType,
|
||||
$serviceCode,
|
||||
$submissionDate = null,
|
||||
$submissionDate,
|
||||
$status, $organization_id = null,
|
||||
$source
|
||||
)
|
||||
@@ -48,7 +48,7 @@ class RequestLogService{
|
||||
$requestLogData = [
|
||||
'code' => $code,
|
||||
'member_id' => $member->id,
|
||||
'submission_date' => $submissionDate ?? now(),
|
||||
'submission_date' => $submissionDate ? $submissionDate : now(),
|
||||
'status' => $status,
|
||||
'payment_type' => $paymentType,
|
||||
'service_code' => $serviceCode,
|
||||
|
||||
206
database/seeders/UpdateTarifLMSSeeder.php
Normal file
206
database/seeders/UpdateTarifLMSSeeder.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\OLDLMS\Healthcare;
|
||||
use App\Models\OLDLMS\JadwalDokter;
|
||||
use App\Models\OLDLMS\Speciality;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UpdateTarifLMSSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// [
|
||||
// [
|
||||
// "sKodeRS" => "A",
|
||||
// "sHealthCare" => "Rumah Sakit Awal Bros Sudirman Pekanbaru",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "B",
|
||||
// "sHealthCare" => "Rumah Sakit Awal Bros Batam",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "BW",
|
||||
// "sHealthCare" => "Primaya Hospital Bhakti Wara",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "C",
|
||||
// "sHealthCare" => "Primaya Hospital Tangerang",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "D",
|
||||
// "sHealthCare" => "Primaya Hospital Bekasi Barat",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "E",
|
||||
// "sHealthCare" => "Primaya Evasari Hospital",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "F",
|
||||
// "sHealthCare" => "Primaya Hospital Makassar",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "G",
|
||||
// "sHealthCare" => "Rumah Sakit Awal Bros Ujung Batu",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "I",
|
||||
// "sHealthCare" => "Rumah Sakit Awal Bros Panam",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "K",
|
||||
// "sHealthCare" => "Rumah Sakit Awal Bros Ahmad Yani",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "M",
|
||||
// "sHealthCare" => "Primaya Hospital Bekasi Timur",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "N",
|
||||
// "sHealthCare" => "Primaya Hospital Betang Pambelum",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "O",
|
||||
// "sHealthCare" => "Primaya Hospital Inco Sorowako",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "P",
|
||||
// "sHealthCare" => "Primaya Hospital Bekasi Utara",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "PK",
|
||||
// "sHealthCare" => "Primaya Hospital Pasar Kemis",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "Q",
|
||||
// "sHealthCare" => "Primaya Hospital Karawang",
|
||||
// ],
|
||||
// [
|
||||
// "sKodeRS" => "SK",
|
||||
// "sHealthCare" => "Primaya Hospital Sukabumi",
|
||||
// ],
|
||||
// ]
|
||||
|
||||
$dataTarifs = [
|
||||
// [
|
||||
// 'adm_rajal' => 0,
|
||||
|
||||
// 'appt_umum' => null,
|
||||
// 'walkin_umum' => null,
|
||||
// 'telekonsul_umum' => null,
|
||||
|
||||
// 'appt_spesialis' => 250000,
|
||||
// 'walkin_spesialis' => 250000,
|
||||
// 'telekonsul_spesialis' => 213000,
|
||||
|
||||
// 'appt_subspesialis' => 345000,
|
||||
// 'walkin_subspesialis' => 345000,
|
||||
// 'telekonsul_subspesialis' => 293000,
|
||||
|
||||
// 'applied_to' => ['A', 'KODERSLMS']
|
||||
// ],
|
||||
[
|
||||
'adm_rajal' => 55000,
|
||||
|
||||
'appt_umum' => 120000,
|
||||
'walkin_umum' => 120000,
|
||||
'telekonsul_umum' => 102000,
|
||||
|
||||
'appt_spesialis' => 250000,
|
||||
'walkin_spesialis' => 250000,
|
||||
'telekonsul_spesialis' => 213000,
|
||||
|
||||
'appt_subspesialis' => 345000,
|
||||
'walkin_subspesialis' => 345000,
|
||||
'telekonsul_subspesialis' => 293000,
|
||||
|
||||
'applied_to' => ['P']
|
||||
]
|
||||
];
|
||||
|
||||
$spesialisUmum = Speciality::where('sSlug', 'general-practitioner')->first();
|
||||
|
||||
foreach ($dataTarifs as $tarif) {
|
||||
$healthcareAppliedIds = Healthcare::whereIn('sKodeRS', $tarif['applied_to'])->pluck('nID');
|
||||
|
||||
// [MARK] : UMUM
|
||||
// Update Tarif Dokter Umum
|
||||
$updateUmum = [];
|
||||
if ($tarif['walkin_umum'] != null) {
|
||||
$updateUmum['nBiaya'] = $tarif['walkin_umum'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if ($tarif['telekonsul_umum'] != null) {
|
||||
$updateUmum['nBiayaTC'] = $tarif['telekonsul_umum'] + $tarif['adm_rajal'];
|
||||
$updateUmum['nBiayaATC'] = $tarif['telekonsul_umum'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if (count($updateUmum)) {
|
||||
// $updateUmum['dUpdateOn'] = now();
|
||||
// Updating
|
||||
$dokUmum = JadwalDokter::query()
|
||||
->where('nIDSpesialis', $spesialisUmum->nID)
|
||||
->whereIn('nIDHealthCare', $healthcareAppliedIds)
|
||||
->withTrashed()
|
||||
->update($updateUmum);
|
||||
$this->command->info('Updating : Dokter Umum');
|
||||
}
|
||||
|
||||
// [MARK] : SPESIALIS
|
||||
// Update Tarif Dokter Spesialis
|
||||
$updateSpesialis = [];
|
||||
if ($tarif['walkin_spesialis'] != null) {
|
||||
$updateSpesialis['nBiaya'] = $tarif['walkin_spesialis'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if ($tarif['telekonsul_spesialis'] != null) {
|
||||
$updateSpesialis['nBiayaTC'] = $tarif['telekonsul_spesialis'] + $tarif['adm_rajal'];
|
||||
$updateSpesialis['nBiayaATC'] = $tarif['telekonsul_spesialis'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if (count($updateSpesialis)) {
|
||||
// $updateSpesialis['dUpdateOn'] = now();
|
||||
// Updating
|
||||
$dokSpesialis = JadwalDokter::query()
|
||||
->whereNot(function ($q) use ($spesialisUmum) {
|
||||
$q->where('nIDSpesialis', $spesialisUmum->nID);
|
||||
})
|
||||
->where('sIsSubSpesialis', 0)
|
||||
->whereIn('nIDHealthCare', $healthcareAppliedIds)
|
||||
->withTrashed()
|
||||
->update($updateSpesialis);
|
||||
$this->command->info('Updating : Dokter Spesialis');
|
||||
}
|
||||
|
||||
|
||||
// [MARK] : SUBSPESIALIS
|
||||
// Update Tarif Dokter Sub Spesialis
|
||||
$updateSubSpesialis = [];
|
||||
if ($tarif['walkin_subspesialis'] != null) {
|
||||
$updateSubSpesialis['nBiaya'] = $tarif['walkin_subspesialis'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if ($tarif['telekonsul_subspesialis'] != null) {
|
||||
$updateSubSpesialis['nBiayaTC'] = $tarif['telekonsul_subspesialis'] + $tarif['adm_rajal'];
|
||||
$updateSubSpesialis['nBiayaATC'] = $tarif['telekonsul_subspesialis'] + $tarif['adm_rajal'];
|
||||
}
|
||||
if (count($updateSubSpesialis)) {
|
||||
// $updateSubSpesialis['dUpdateOn'] = now();
|
||||
|
||||
// Updating
|
||||
$dokSubSpesialis = JadwalDokter::query()
|
||||
->whereNot(function ($q) use ($spesialisUmum) {
|
||||
$q->where('nIDSpesialis', $spesialisUmum->nID);
|
||||
})
|
||||
->where('sIsSubSpesialis', 1)
|
||||
->whereIn('nIDHealthCare', $healthcareAppliedIds)
|
||||
->withTrashed()
|
||||
->update($updateSubSpesialis);
|
||||
$this->command->info('Updating : Dokter Sub Spesialis');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,9 @@
|
||||
"txtDialogMember3" : "Detail",
|
||||
"txtDialogMember4" : "Please select services",
|
||||
"txtDialogMember5" : "Submission Date",
|
||||
"txtDialogMember6" : "Please select submission date",
|
||||
"txtWarningDischargeDate" : "Please select discharge date",
|
||||
"txtCreateAt" : "Create at",
|
||||
"txtDateBirth" : "Date of Birth",
|
||||
"txtGender" : "Gender",
|
||||
"txtMaritalStatus" : "Marital Status",
|
||||
@@ -45,5 +48,6 @@
|
||||
"txtYouHave" : "You have",
|
||||
"txtUnm" : "unread messages",
|
||||
"txtNew" : "New",
|
||||
"txtBeforeThat" : "Before that"
|
||||
"txtBeforeThat" : "Before that",
|
||||
"txtDischargeDate" : "Discharge Date"
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
"txtDialogMember3" : "Detail",
|
||||
"txtDialogMember4" : "Mohon pilih layanan",
|
||||
"txtDialogMember5" : "Tanggal Pengajuan",
|
||||
"txtDialogMember6" : "Mohon pilih tanggal pengajuan",
|
||||
"txtWarningDischargeDate" : "Mohon pilih tanggal keluar",
|
||||
"txtCreateAt" : "Tanggal Buat",
|
||||
"txtDateBirth" : "Tanggal Lahir",
|
||||
"txtGender" : "Jenis Kelamin",
|
||||
"txtMaritalStatus" : "Status Perkawinan",
|
||||
@@ -45,5 +48,6 @@
|
||||
"txtYouHave" : "Anda memiliki",
|
||||
"txtUnm" : "pesan yang belum dibaca",
|
||||
"txtNew" : "Baru",
|
||||
"txtBeforeThat" : "Sebelum"
|
||||
"txtBeforeThat" : "Sebelum",
|
||||
"txtDischargeDate" : "Tanggal Keluar"
|
||||
}
|
||||
|
||||
@@ -12,9 +12,14 @@ import { useRef, useState, useContext } from 'react';
|
||||
import { makeFormData } from '@/utils/jsonToFormData';
|
||||
import { format } from 'date-fns';
|
||||
import { LanguageContext } from '@/contexts/LanguageContext';
|
||||
import { DatePicker, LocalizationProvider, MobileDatePicker } from '@mui/x-date-pickers';
|
||||
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
||||
import TextField from '@mui/material/TextField';
|
||||
|
||||
export default function DialogFinalLog({ member, getData, onClose, handleSubmitSuccess }: any) {
|
||||
const { localeData }: any = useContext(LanguageContext);
|
||||
//Submission date
|
||||
const [dischargeDate, setDischargeDate] = useState<string>(format(new Date(), "yyyy MMM d HH:mm:ss"));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Files Diagnosa
|
||||
@@ -84,12 +89,18 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
||||
|
||||
const [submitLoading, setSubmitLoading] = useState(false);
|
||||
function submitRequestFinalLog() {
|
||||
if(dischargeDate == '')
|
||||
{
|
||||
enqueueSnackbar(localeData.txtWarningDischargeDate, { variant: 'warning' });
|
||||
return false;
|
||||
}
|
||||
setSubmitLoading(true);
|
||||
const formData = makeFormData({
|
||||
request_logs_id: member.id,
|
||||
result_files: fileHasilPenunjangs,
|
||||
diagnosa_files: fileDiagnosas,
|
||||
kondisi_files: fileKondisis
|
||||
kondisi_files: fileKondisis,
|
||||
discharge_date: fPostFormat(dischargeDate, 'yyyy-MM-dd HH:mm:ss'),
|
||||
});
|
||||
axios
|
||||
.post('/request-final-log', formData)
|
||||
@@ -313,6 +324,23 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Stack direction="row" spacing={2}>
|
||||
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||
<Typography variant='subtitle1'>{localeData.txtDischargeDate} *</Typography>
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||
<DatePicker
|
||||
label={localeData.txtDischargeDate}
|
||||
value={dischargeDate}
|
||||
onChange={(newValue:any) => {
|
||||
setDischargeDate( (newValue));
|
||||
}}
|
||||
inputFormat="dd-MM-yyyy"
|
||||
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||
/>
|
||||
</LocalizationProvider>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<LoadingButton
|
||||
variant="contained"
|
||||
sx={{ marginTop: 2, p: 2, backgroundColor: '#19BBBB' }}
|
||||
|
||||
@@ -19,6 +19,9 @@ import { LanguageContext } from '@/contexts/LanguageContext';
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Button from '@mui/material/Button';
|
||||
import { DatePicker, LocalizationProvider, MobileDatePicker } from '@mui/x-date-pickers';
|
||||
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
||||
import { fPostFormat } from '@/utils/formatTime';
|
||||
|
||||
interface MemberType {
|
||||
members: any;
|
||||
@@ -33,6 +36,8 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
||||
const { localeData }: any = useContext(LanguageContext);
|
||||
const [serviceCode, setServiceCode] = useState<string>('');
|
||||
const [idProvider, setIdProvider] = useState<number>(0);
|
||||
//Submission date
|
||||
const [submissionDate, setSubmissionDate] = useState<string>(format(new Date(), "yyyy MMM d HH:mm:ss"));
|
||||
|
||||
const [submitLoading, setSubmitLoading] = useState<boolean>(false);
|
||||
function submitRequest() {
|
||||
@@ -46,13 +51,19 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
||||
enqueueSnackbar(localeData.txtDialogMember4, { variant: 'warning' });
|
||||
return false;
|
||||
}
|
||||
if(submissionDate == '')
|
||||
{
|
||||
enqueueSnackbar(localeData.txtDialogMember6, { variant: 'warning' });
|
||||
return false;
|
||||
}
|
||||
setSubmitLoading(true);
|
||||
const formData = {
|
||||
member_id: member.members.id,
|
||||
service_code: serviceCode,
|
||||
organization_id: idProvider,
|
||||
organization_name : name,
|
||||
address_provider: alamat
|
||||
address_provider: alamat,
|
||||
submission_date: fPostFormat(submissionDate, 'yyyy-MM-dd HH:mm:ss')
|
||||
};
|
||||
axios
|
||||
.post('/request-log', formData)
|
||||
@@ -103,7 +114,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
||||
<Stack direction="column" spacing={2}>
|
||||
<Stack direction="row" justifyContent={'end'} sx={{ marginBottom: 2 }} spacing={2}>
|
||||
<Typography variant='body2' sx={{color: '#757575'}}>
|
||||
{localeData.txtDialogMember5}
|
||||
{localeData.txtCreateAt}
|
||||
</Typography>
|
||||
<Typography variant='body2' sx={{fontWeight:'bold'}}>{format(new Date(), "d MMM yyyy")}</Typography>
|
||||
</Stack>
|
||||
@@ -177,6 +188,23 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Stack direction="row" spacing={2}>
|
||||
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||
<Typography variant='subtitle1'>{localeData.txtDialogMember5} *</Typography>
|
||||
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||
<DatePicker
|
||||
label={localeData.txtDialogMember5}
|
||||
value={submissionDate}
|
||||
onChange={(newValue:any) => {
|
||||
setSubmissionDate( (newValue));
|
||||
}}
|
||||
inputFormat="dd-MM-yyyy"
|
||||
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||
/>
|
||||
</LocalizationProvider>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
<Card sx={{ p: 1, background: '#f4f6f8'}}>
|
||||
<Stack direction="row">
|
||||
<Avatar
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function TableListFinalLog() {
|
||||
const [data, setData] = useState([]);
|
||||
|
||||
// Download LOG
|
||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any) {
|
||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any, provider:any) {
|
||||
return axios
|
||||
.get(`download-final-log/${request_log_id}`, {
|
||||
responseType: 'blob',
|
||||
@@ -46,7 +46,7 @@ export default function TableListFinalLog() {
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
// GL Akhir-010124-OP-00001234 Ratih-LinkSehat
|
||||
const namaFile = 'GL Akhir-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||
const namaFile = 'GL Akhir-'+provider+'-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||
const url = URL.createObjectURL(response.data);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
@@ -369,7 +369,7 @@ export default function TableListFinalLog() {
|
||||
View
|
||||
</MenuItem>
|
||||
{obj.status === 'approved' ? (
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name)}>
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name, obj.provider)}>
|
||||
<Iconify icon="eva:download-fill" />
|
||||
Download Final LOG
|
||||
</MenuItem>
|
||||
|
||||
@@ -42,15 +42,14 @@ export default function TableList() {
|
||||
const [data, setData] = useState([]);
|
||||
|
||||
// Download LOG
|
||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any) {
|
||||
async function handleDownloadLog(request_log_id: any, service_code:any, no_polis:any, full_name:any, provider:any) {
|
||||
return axios
|
||||
.get(`download-log/${request_log_id}`, {
|
||||
responseType: 'blob',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
// GL Awal-010124-OP-00001234 Ratih-LinkSehat
|
||||
const namaFile = 'GL Awal-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||
const namaFile = 'GL Awal-'+provider+'-'+getFormattedToday()+'-'+service_code+'-'+no_polis+'-'+full_name+'-LinkSehat.pdf';
|
||||
const url = URL.createObjectURL(response.data);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
@@ -368,7 +367,7 @@ export default function TableList() {
|
||||
View
|
||||
</MenuItem>
|
||||
{obj.status === 'approved' ? (
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name)}>
|
||||
<MenuItem onClick={() => handleDownloadLog(obj.id, obj.service_code, obj.no_polis, obj.full_name, obj.provider)}>
|
||||
<Iconify icon="eva:download-fill" />
|
||||
Download LOG
|
||||
</MenuItem>
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<td style="width: 29%;">{{ wordwrap($request_logs->code,15,"<br>\n")}}</td>
|
||||
<td style="width: 20%;">Tanggal</td>
|
||||
<td style="width: 1%;">:</td>
|
||||
<td style="width: 29%;">{{ \Carbon\Carbon::parse($request_logs->submission_date)->format('d M Y') }}</td>
|
||||
<td style="width: 29%;">{{ \Carbon\Carbon::parse($request_logs->created_at)->format('d M Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kepada</td>
|
||||
@@ -354,7 +354,7 @@
|
||||
<tr>
|
||||
<td>Periode Jaminan</td>
|
||||
<td>:</td>
|
||||
<td>{{ \Carbon\Carbon::parse($request_logs->submission_date)->format('d M Y') }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($request_logs->submission_date)->format('d M Y') . ($request_logs->discharge_date ? ' - ' . \Carbon\Carbon::parse($request_logs->discharge_date)->format('d M Y') : '') }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mata Uang</td>
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
<td style="width: 29%;">{{ wordwrap($request_logs->code, 15, "<br>\n") }}</td>
|
||||
<td style="width: 20%;">Tanggal</td>
|
||||
<td style="width: 1%;">:</td>
|
||||
<td style="width: 29%;">{{ \Carbon\Carbon::parse($request_logs->submission_date)->format('d M Y') }}
|
||||
<td style="width: 29%;">{{ \Carbon\Carbon::parse($request_logs->created_at)->format('d M Y') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user