finishing feature/dashboard-create-claim-request
This commit is contained in:
@@ -113,48 +113,83 @@ class ClaimRequestController extends Controller
|
|||||||
'updated_at'=> date('Y-m-d H:i:s'),
|
'updated_at'=> date('Y-m-d H:i:s'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->hasFile('laboratorium')) {
|
$storage_path = storage_path() . "/app/public";
|
||||||
foreach ($request->laboratorium[$key] as $file) {
|
|
||||||
$pathFile = File::storeFile('claim-result', $newClaimRequest->id, $file);
|
if (isset($_FILES['file_penunjang'])) {
|
||||||
$newClaimRequest->files()->updateOrCreate([
|
foreach ($_FILES['file_penunjang']['error']["member_" .$member_id] as $key => $value) {
|
||||||
'type' => 'claim-result',
|
if ($value == 0) {
|
||||||
'name' => File::getFileName('claim-result', $newClaimRequest->id, $file),
|
$folder = "claim/";
|
||||||
'original_name' => $file->getClientOriginalName(),
|
$new_file_name = "claim-result-" . time() . "-" . uniqid();
|
||||||
'extension' => $file->getClientOriginalExtension(),
|
$ekstension = "." . explode("/", $_FILES['file_penunjang']['type']["member_" .$member_id][$key])[1];
|
||||||
'path' => $pathFile,
|
$pathFile = $folder . $new_file_name . $ekstension;
|
||||||
'created_by' => auth()->user()->id,
|
|
||||||
'updated_by' => auth()->user()->id,
|
$tmp_name = $_FILES['file_penunjang']['tmp_name']["member_" .$member_id][$key];
|
||||||
]);
|
$full_path = $_FILES['file_penunjang']['full_path']["member_" .$member_id][$key];
|
||||||
|
|
||||||
|
if (move_uploaded_file($tmp_name, $storage_path . "/" . $pathFile)) {
|
||||||
|
$newClaimRequest->files()->updateOrCreate([
|
||||||
|
'type' => 'claim-result',
|
||||||
|
'name' => $new_file_name,
|
||||||
|
'original_name' => $full_path,
|
||||||
|
'extension' => $ekstension,
|
||||||
|
'path' => $pathFile,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
'updated_by' => auth()->user()->id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->hasFile('prescription')) {
|
if (isset($_FILES['file_diagnosa'])) {
|
||||||
foreach ($request->prescription[$key] as $file) {
|
foreach ($_FILES['file_diagnosa']['error']["member_" .$member_id] as $key => $value) {
|
||||||
$pathFile = File::storeFile('claim-diagnosis', $newClaimRequest->id, $file);
|
if ($value == 0) {
|
||||||
$newClaimRequest->files()->updateOrCreate([
|
$folder = "claim/";
|
||||||
'type' => 'claim-diagnosis',
|
$new_file_name = "claim-diagnosis-" . time() . "-" . uniqid();
|
||||||
'name' => File::getFileName('claim-diagnosis', $newClaimRequest->id, $file),
|
$ekstension = "." . explode("/", $_FILES['file_diagnosa']['type']["member_" .$member_id][$key])[1];
|
||||||
'original_name' => $file->getClientOriginalName(),
|
$pathFile = $folder . $new_file_name . $ekstension;
|
||||||
'extension' => $file->getClientOriginalExtension(),
|
|
||||||
'path' => $pathFile,
|
$tmp_name = $_FILES['file_diagnosa']['tmp_name']["member_" .$member_id][$key];
|
||||||
'created_by' => auth()->user()->id,
|
$full_path = $_FILES['file_diagnosa']['full_path']["member_" .$member_id][$key];
|
||||||
'updated_by' => auth()->user()->id,
|
|
||||||
]);
|
if (move_uploaded_file($tmp_name, $storage_path . "/" . $pathFile)) {
|
||||||
|
$newClaimRequest->files()->updateOrCreate([
|
||||||
|
'type' => 'claim-diagnosis',
|
||||||
|
'name' => $new_file_name,
|
||||||
|
'original_name' => $full_path,
|
||||||
|
'extension' => $ekstension,
|
||||||
|
'path' => $pathFile,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
'updated_by' => auth()->user()->id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->hasFile('invoice')) {
|
if (isset($_FILES['file_kondisi'])) {
|
||||||
foreach ($request->invoice[$key] as $file) {
|
foreach ($_FILES['file_kondisi']['error']["member_" .$member_id] as $key => $value) {
|
||||||
$pathFile = File::storeFile('claim-kondisi', $newClaimRequest->id, $file);
|
if ($value == 0) {
|
||||||
$newClaimRequest->files()->updateOrCreate([
|
$folder = "claim/";
|
||||||
'type' => 'claim-kondisi',
|
$new_file_name = "claim-kondisi-" . time() . "-" . uniqid();
|
||||||
'name' => File::getFileName('claim-kondisi', $newClaimRequest->id, $file),
|
$ekstension = "." . explode("/", $_FILES['file_kondisi']['type']["member_" .$member_id][$key])[1];
|
||||||
'original_name' => $file->getClientOriginalName(),
|
$pathFile = $folder . $new_file_name . $ekstension;
|
||||||
'extension' => $file->getClientOriginalExtension(),
|
|
||||||
'path' => $pathFile,
|
$tmp_name = $_FILES['file_kondisi']['tmp_name']["member_" .$member_id][$key];
|
||||||
'created_by' => auth()->user()->id,
|
$full_path = $_FILES['file_kondisi']['full_path']["member_" .$member_id][$key];
|
||||||
'updated_by' => auth()->user()->id,
|
|
||||||
]);
|
if (move_uploaded_file($tmp_name, $storage_path . "/" . $pathFile)) {
|
||||||
|
$newClaimRequest->files()->updateOrCreate([
|
||||||
|
'type' => 'claim-kondisi',
|
||||||
|
'name' => $new_file_name,
|
||||||
|
'original_name' => $full_path,
|
||||||
|
'extension' => $ekstension,
|
||||||
|
'path' => $pathFile,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
'updated_by' => auth()->user()->id,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,10 @@ class DailyMonitoringController extends Controller
|
|||||||
|
|
||||||
$claimList = DB::table('claims')
|
$claimList = DB::table('claims')
|
||||||
->leftJoin('claim_requests', 'claims.claim_request_id', '=', 'claim_requests.id')
|
->leftJoin('claim_requests', 'claims.claim_request_id', '=', 'claim_requests.id')
|
||||||
|
->leftJoin('claim_history_cares', 'claims.id', '=', 'claim_history_cares.claim_id')
|
||||||
->leftJoin('services', 'claim_requests.service_code', '=', 'services.code')
|
->leftJoin('services', 'claim_requests.service_code', '=', 'services.code')
|
||||||
->leftJoin('members', 'claims.member_id', '=', 'members.id')
|
->leftJoin('members', 'claims.member_id', '=', 'members.id')
|
||||||
->select('claims.id AS claim_id','claim_requests.code AS claim_code','services.name AS service_type','claims.status AS claim_status','members.member_id',)
|
->select('claims.id AS claim_id','claim_history_cares.admission_date','claim_history_cares.discharge_date','claim_requests.code AS claim_code','services.name AS service_type','claims.status AS claim_status','members.member_id',)
|
||||||
->where("claims.member_id", "=", $memberDetail->id)
|
->where("claims.member_id", "=", $memberDetail->id)
|
||||||
->orderBy("claims.created_at", "desc")
|
->orderBy("claims.created_at", "desc")
|
||||||
->get();
|
->get();
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default function Claim() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadDataTableData();
|
loadDataTableData();
|
||||||
}, [loadDataTableData])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page title={ `claims | ${memberDetail?.name??'_ _ _'}` } sx={{ px: 2 }}>
|
<Page title={ `claims | ${memberDetail?.name??'_ _ _'}` } sx={{ px: 2 }}>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
<TableRow hover sx={{ '& > td': { borderBottom: '1' } }}>
|
<TableRow hover sx={{ '& > td': { borderBottom: '1' } }}>
|
||||||
<TableCell align="left" />
|
<TableCell align="left" />
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{props.row.admission_dates == "0000-00-00 00:00:00" ?
|
{props.row.admission_date == "0000-00-00 00:00:00" ?
|
||||||
('-')
|
('-')
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
@@ -45,12 +45,12 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="default"
|
color="default"
|
||||||
>
|
>
|
||||||
{fDate(props.row.admission_dates)}
|
{fDate(props.row.admission_date)}
|
||||||
</Label>
|
</Label>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{props.row.discharge_dates == "0000-00-00 00:00:00" ?
|
{props.row.discharge_date == "0000-00-00 00:00:00" ?
|
||||||
('-')
|
('-')
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
@@ -58,7 +58,7 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="default"
|
color="default"
|
||||||
>
|
>
|
||||||
{fDate(props.row.discharge_dates)}
|
{fDate(props.row.discharge_date)}
|
||||||
</Label>
|
</Label>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export type MemberDetailType = {
|
|||||||
*/
|
*/
|
||||||
export type ClaimListType = {
|
export type ClaimListType = {
|
||||||
claim_id : number,
|
claim_id : number,
|
||||||
admission_dates : string,
|
admission_date : string,
|
||||||
discharge_dates : string,
|
discharge_date : string,
|
||||||
claim_code : string,
|
claim_code : string,
|
||||||
claim_status : string,
|
claim_status : string,
|
||||||
service_type : string,
|
service_type : string,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
<TableRow hover sx={{ '& > td': { borderBottom: '1' } }}>
|
<TableRow hover sx={{ '& > td': { borderBottom: '1' } }}>
|
||||||
<TableCell align="left" />
|
<TableCell align="left" />
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{props.row.admission_dates == "0000-00-00 00:00:00" ?
|
{props.row.admission_date == "0000-00-00 00:00:00" ?
|
||||||
('-')
|
('-')
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
@@ -45,12 +45,12 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="default"
|
color="default"
|
||||||
>
|
>
|
||||||
{fDate(props.row.admission_dates)}
|
{fDate(props.row.admission_date)}
|
||||||
</Label>
|
</Label>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{props.row.discharge_dates == "0000-00-00 00:00:00" ?
|
{props.row.discharge_date == "0000-00-00 00:00:00" ?
|
||||||
('-')
|
('-')
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
@@ -58,7 +58,7 @@ export default function ClaimListRow ({ ...props }: Props) {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
color="default"
|
color="default"
|
||||||
>
|
>
|
||||||
{fDate(props.row.discharge_dates)}
|
{fDate(props.row.discharge_date)}
|
||||||
</Label>
|
</Label>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export type MemberDetailType = {
|
|||||||
*/
|
*/
|
||||||
export type ClaimListType = {
|
export type ClaimListType = {
|
||||||
claim_id : number,
|
claim_id : number,
|
||||||
admission_dates : string,
|
admission_date : string,
|
||||||
discharge_dates : string,
|
discharge_date : string,
|
||||||
claim_code : string,
|
claim_code : string,
|
||||||
claim_status : string,
|
claim_status : string,
|
||||||
service_type : string,
|
service_type : string,
|
||||||
|
|||||||
@@ -81,33 +81,33 @@ export default function FormCreate() {
|
|||||||
|
|
||||||
// Function - Handle Btn Upload
|
// Function - Handle Btn Upload
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
const handleChangeInput = (data: MemberListType, type_file: 'invoice'|'prescription'|'laboratorium', file: any) => {
|
const handleChangeInput = (data: MemberListType, type_file: 'kondisi'|'diagnosa'|'penunjang', file: any) => {
|
||||||
let newListChoosed = listChoosed.map((list) => {
|
let newListChoosed = listChoosed.map((list) => {
|
||||||
if (data.id == list.id) {
|
if (data.id == list.id) {
|
||||||
if (type_file == 'invoice') {
|
if (type_file == 'kondisi') {
|
||||||
if (list.invoice_files == undefined) {
|
if (list.file_kondisi == undefined) {
|
||||||
list.invoice_files = [file];
|
list.file_kondisi = [file];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
list.invoice_files.push(file);
|
list.file_kondisi.push(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type_file == 'prescription') {
|
if (type_file == 'diagnosa') {
|
||||||
if (list.prescription_files == undefined) {
|
if (list.file_diagnosa == undefined) {
|
||||||
list.prescription_files = [file];
|
list.file_diagnosa = [file];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
list.prescription_files.push(file);
|
list.file_diagnosa.push(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type_file == 'laboratorium') {
|
if (type_file == 'penunjang') {
|
||||||
if (list.laboratorium_files == undefined) {
|
if (list.file_penunjang == undefined) {
|
||||||
list.laboratorium_files = [file];
|
list.file_penunjang = [file];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
list.laboratorium_files.push(file);
|
list.file_penunjang.push(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,27 +120,27 @@ export default function FormCreate() {
|
|||||||
|
|
||||||
// Function - Handle Remove Fle
|
// Function - Handle Remove Fle
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
const handleRemoveFile = (data: MemberListType, type_file: 'invoice'|'prescription'|'laboratorium', target_index: number) => {
|
const handleRemoveFile = (data: MemberListType, type_file: 'kondisi'|'diagnosa'|'penunjang', target_index: number) => {
|
||||||
let newListChoosed = listChoosed.map((list) => {
|
let newListChoosed = listChoosed.map((list) => {
|
||||||
if (data.id == list.id) {
|
if (data.id == list.id) {
|
||||||
if (type_file == 'invoice') {
|
if (type_file == 'kondisi') {
|
||||||
list.invoice_files = list.invoice_files?.filter((file: any, index: number) =>{
|
list.file_kondisi = list.file_kondisi?.filter((file: any, index: number) =>{
|
||||||
if (target_index !== index) {
|
if (target_index !== index) {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type_file == 'prescription') {
|
if (type_file == 'diagnosa') {
|
||||||
list.prescription_files = list.prescription_files?.filter((file: any, index: number) =>{
|
list.file_diagnosa = list.file_diagnosa?.filter((file: any, index: number) =>{
|
||||||
if (target_index !== index) {
|
if (target_index !== index) {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type_file == 'laboratorium') {
|
if (type_file == 'penunjang') {
|
||||||
list.laboratorium_files = list.laboratorium_files?.filter((file: any, index: number) =>{
|
list.file_penunjang = list.file_penunjang?.filter((file: any, index: number) =>{
|
||||||
if (target_index !== index) {
|
if (target_index !== index) {
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
@@ -282,59 +282,59 @@ export default function FormCreate() {
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{/* Invoice */}
|
{/* File Kondisi */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="h6">Real Invoice</Typography>
|
<Typography variant="h6">Condition Document</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{row.invoice_files && row.invoice_files.map((file, index) => (
|
{row.file_kondisi && row.file_kondisi.map((file, index) => (
|
||||||
<Grid item xs={12} key={index}>
|
<Grid item xs={12} key={index}>
|
||||||
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'invoice', index)} />
|
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'kondisi', index)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
||||||
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'invoice', file)} />
|
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'kondisi', file)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{/* Prescription */}
|
{/* File Diagnosa */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="h6">Doctor's Prescription and Another Documents</Typography>
|
<Typography variant="h6">Diagnosis Document</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{row.prescription_files && row.prescription_files.map((file, index) => (
|
{row.file_diagnosa && row.file_diagnosa.map((file, index) => (
|
||||||
<Grid item xs={12} key={index}>
|
<Grid item xs={12} key={index}>
|
||||||
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'prescription', index)} />
|
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'diagnosa', index)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
||||||
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'prescription', file)} />
|
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'diagnosa', file)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{/* Laboratorium */}
|
{/* File Penunjang */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="h6">Laboratory Results</Typography>
|
<Typography variant="h6">Supporting Result Document</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
{row.laboratorium_files && row.laboratorium_files.map((file, index) => (
|
{row.file_penunjang && row.file_penunjang.map((file, index) => (
|
||||||
<Grid item xs={12} key={index}>
|
<Grid item xs={12} key={index}>
|
||||||
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'laboratorium', index)} />
|
<FormCreateFilesUpload file={file} handleRemoveFileProp={() => handleRemoveFile(row, 'penunjang', index)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
||||||
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'laboratorium', file)} />
|
<FormCreateBtnUpload handleChangeInputProp={(file) => handleChangeInput(row, 'penunjang', file)} />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -33,21 +33,27 @@ export const addClaimRequest = async ( data: MemberListType[] ): Promise<boolean
|
|||||||
formData.append(`member_id[${index}]`, row.id.toString());
|
formData.append(`member_id[${index}]`, row.id.toString());
|
||||||
formData.append(`service_code[${index}]`, row.patien_type??'');
|
formData.append(`service_code[${index}]`, row.patien_type??'');
|
||||||
|
|
||||||
if (row.invoice_files != undefined) {
|
if (row.file_kondisi != undefined) {
|
||||||
row.invoice_files.forEach((file, file_index) => {
|
row.file_kondisi.forEach((file, file_index) => {
|
||||||
formData.append(`invoice[${index}][${file_index}]`, file);
|
console.log(file);
|
||||||
|
|
||||||
|
formData.append(`file_kondisi[member_${row.id}][${file_index}]`, file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.prescription_files != undefined) {
|
if (row.file_diagnosa != undefined) {
|
||||||
row.prescription_files.forEach((file, file_index) => {
|
row.file_diagnosa.forEach((file, file_index) => {
|
||||||
formData.append(`prescription[${index}][${file_index}]`, file);
|
console.log(file);
|
||||||
|
|
||||||
|
formData.append(`file_diagnosa[member_${row.id}][${file_index}]`, file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.laboratorium_files != undefined) {
|
if (row.file_penunjang != undefined) {
|
||||||
row.laboratorium_files.forEach((file, file_index) => {
|
row.file_penunjang.forEach((file, file_index) => {
|
||||||
formData.append(`laboratorium[${index}][${file_index}]`, file);
|
console.log(file);
|
||||||
|
|
||||||
|
formData.append(`file_penunjang[member_${row.id}][${file_index}]`, file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ export type MemberListType = {
|
|||||||
id : string,
|
id : string,
|
||||||
member_id : string,
|
member_id : string,
|
||||||
name : string,
|
name : string,
|
||||||
patien_type? : string,
|
patien_type? : string,
|
||||||
invoice_files? : any[],
|
file_kondisi? : any[],
|
||||||
laboratorium_files? : any[],
|
file_diagnosa? : any[],
|
||||||
prescription_files? : any[]
|
file_penunjang? : any[]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user