update requeset
This commit is contained in:
@@ -53,7 +53,7 @@ class ClaimRequestController extends Controller
|
|||||||
'title' => 'New Claim Requested',
|
'title' => 'New Claim Requested',
|
||||||
'description' => "Claim Requested for Member : {$member->member_id} - ({$member->full_name})",
|
'description' => "Claim Requested for Member : {$member->member_id} - ({$member->full_name})",
|
||||||
'type' => 'info',
|
'type' => 'info',
|
||||||
'system_origin' => 'hospital-portal'
|
'system_origin' => 'client-portal'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->hasFile('result_files')) {
|
if ($request->hasFile('result_files')) {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class MemberResources extends JsonResource
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
|
'codeRequest' => $this->code,
|
||||||
'memberId' => $this->member_id,
|
'memberId' => $this->member_id,
|
||||||
'fullName' => $this->full_name,
|
'fullName' => $this->full_name,
|
||||||
'division' => $this->division_name ?? '',
|
'division' => $this->division_name ?? '',
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Modules\Internal\Transformers;
|
namespace Modules\Internal\Transformers;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class ClaimRequestResource extends JsonResource
|
class ClaimRequestResource extends JsonResource
|
||||||
{
|
{
|
||||||
@@ -15,7 +16,7 @@ class ClaimRequestResource extends JsonResource
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
$filesGroupByType = $this->files->mapToGroups(function($file) {
|
$filesGroupByType = $this->files->mapToGroups(function($file) {
|
||||||
return [$file->type => $file];
|
return [Str::slug($file->type, '_') => $file];
|
||||||
});
|
});
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|||||||
@@ -70,16 +70,17 @@ class CorporateMemberService
|
|||||||
$orderBy = match ($request->orderBy) {
|
$orderBy = match ($request->orderBy) {
|
||||||
'memberId' => 'member_id',
|
'memberId' => 'member_id',
|
||||||
'fullName' => 'name',
|
'fullName' => 'name',
|
||||||
|
'codeRequest' => 'code',
|
||||||
default => ''
|
default => ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (in_array($orderBy, ['member_id', 'name', 'active'])) {
|
if (in_array($orderBy, ['member_id', 'name', 'active', 'code'])) {
|
||||||
$query->getQuery()->orderBy($orderBy, $request->order);
|
$query->getQuery()->orderBy($orderBy, $request->order);
|
||||||
} elseif ($request->orderBy === 'division') {
|
} elseif ($request->orderBy === 'division') {
|
||||||
$query->getQuery()->orderBy('corporate_divisions.name', $request->order);
|
$query->getQuery()->orderBy('corporate_divisions.name', $request->order);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->select(['members.id', 'members.person_id', 'members.member_id', 'members.name', 'corporate_divisions.name AS division_name', 'claim_requests.status'])
|
->select(['members.id', 'members.person_id', 'members.member_id', 'members.name', 'corporate_divisions.name AS division_name', 'claim_requests.status', 'claim_requests.code'])
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ export default function Drugs() {
|
|||||||
label: 'Member ID',
|
label: 'Member ID',
|
||||||
isSort: true,
|
isSort: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'codeRequest',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Code Request',
|
||||||
|
isSort: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'fullName',
|
id: 'fullName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ export default function List() {
|
|||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ------------------------------ handle order ------------------------------ */
|
/* ------------------------------ handle order ------------------------------ */
|
||||||
const [order, setOrder] = useState<Order>('asc');
|
const [order, setOrder] = useState<Order>('desc');
|
||||||
const [orderBy, setOrderBy] = useState('fullName');
|
const [orderBy, setOrderBy] = useState('codeRequest');
|
||||||
|
|
||||||
const orders = {
|
const orders = {
|
||||||
order: order,
|
order: order,
|
||||||
@@ -112,6 +112,12 @@ export default function List() {
|
|||||||
label: 'Member ID',
|
label: 'Member ID',
|
||||||
isSort: true,
|
isSort: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'codeRequest',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Code Request',
|
||||||
|
isSort: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'fullName',
|
id: 'fullName',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@@ -123,13 +129,13 @@ export default function List() {
|
|||||||
id: 'division',
|
id: 'division',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Divisi',
|
label: 'Divisi',
|
||||||
isSort: true,
|
isSort: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'status',
|
id: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
isSort: true,
|
isSort: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'action',
|
id: 'action',
|
||||||
|
|||||||
@@ -195,7 +195,8 @@ export default function List() {
|
|||||||
<TableCell align="left">{row.member?.current_policy?.code}</TableCell>
|
<TableCell align="left">{row.member?.current_policy?.code}</TableCell>
|
||||||
<TableCell align="left">{row.submission_date}</TableCell>
|
<TableCell align="left">{row.submission_date}</TableCell>
|
||||||
<TableCell align="left">{row.service_name}</TableCell>
|
<TableCell align="left">{row.service_name}</TableCell>
|
||||||
<TableCell align="left">{row.payment_type_name}</TableCell>
|
{/* <TableCell align="left">{row.payment_type_name}</TableCell> */}
|
||||||
|
<TableCell align="left">{'-'}</TableCell>
|
||||||
<TableCell align="right">
|
<TableCell align="right">
|
||||||
<Chip label={row.status} />
|
<Chip label={row.status} />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@@ -236,17 +237,58 @@ export default function List() {
|
|||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography fontWeight={600}>Berkas Hasil Penunjang</Typography>
|
<Typography fontWeight={600}>Berkas Hasil Penunjang</Typography>
|
||||||
{row.files_by_type?.result &&
|
{/* {row.files_by_type?.claim_kondisi &&
|
||||||
row.files_by_type?.result.map((file, index) => (
|
row.files_by_type?.claim_kondisi.map((file, index) => (
|
||||||
<Stack direction="row" key={index}>
|
<Stack direction="row" key={index}>
|
||||||
<Typography sx={{ marginRight: 2 }}>-</Typography>{' '}
|
<Typography sx={{ marginRight: 2 }}>-</Typography>{' '}
|
||||||
<a href={file.url} target="_blank">
|
<a href={file.url} target="_blank">
|
||||||
{file.name}
|
{file.name}
|
||||||
</a>
|
</a>
|
||||||
</Stack>
|
</Stack>
|
||||||
))}
|
))} */}
|
||||||
|
|
||||||
{!row.files_by_type?.result && <Typography>Tidak ada berkas</Typography>}
|
{row.files_by_type?.claim_kondisi && (
|
||||||
|
<>
|
||||||
|
<Typography fontWeight={600} sx={{ marginRight: 4 }}> - Kondisi</Typography>
|
||||||
|
{row.files_by_type?.claim_kondisi.map((file, index) => (
|
||||||
|
|
||||||
|
<Stack direction="row" key={index}>
|
||||||
|
<a href={file.url} target="_blank">
|
||||||
|
{file.name}
|
||||||
|
</a>
|
||||||
|
</Stack>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{row.files_by_type?.claim_diagnosis && (
|
||||||
|
<>
|
||||||
|
<Typography fontWeight={600} sx={{ marginRight: 4 }}> - Diagnosa</Typography>
|
||||||
|
{row.files_by_type?.claim_diagnosis.map((file, index) => (
|
||||||
|
|
||||||
|
<Stack direction="row" key={index}>
|
||||||
|
<a href={file.url} target="_blank">
|
||||||
|
{file.name}
|
||||||
|
</a>
|
||||||
|
</Stack>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{row.files_by_type?.claim_result && (
|
||||||
|
<>
|
||||||
|
<Typography fontWeight={600} sx={{ marginRight: 4 }}> - Hasil</Typography>
|
||||||
|
{row.files_by_type?.claim_result.map((file, index) => (
|
||||||
|
|
||||||
|
<Stack direction="row" key={index}>
|
||||||
|
<a href={file.url} target="_blank">
|
||||||
|
{file.name}
|
||||||
|
</a>
|
||||||
|
</Stack>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{(!row.files_by_type?.claim_result && !row.files_by_type?.claim_diagnosis && !row.files_by_type?.claim_kondisi)&& <Typography>Tidak ada berkas</Typography>}
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export default function List() {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="left">{row.claim_request?.code}</TableCell>
|
<TableCell align="left">{row.claim_request?.code}</TableCell>
|
||||||
<TableCell align="left">{row.code}</TableCell>
|
{/* <TableCell align="left">{row.code}</TableCell> */}
|
||||||
<TableCell align="left">{row.member?.full_name}</TableCell>
|
<TableCell align="left">{row.member?.full_name}</TableCell>
|
||||||
<TableCell align="left">{row.plan?.code}</TableCell>
|
<TableCell align="left">{row.plan?.code}</TableCell>
|
||||||
<TableCell align="left">{row.claim_request?.service?.name}</TableCell>
|
<TableCell align="left">{row.claim_request?.service?.name}</TableCell>
|
||||||
@@ -234,9 +234,9 @@ export default function List() {
|
|||||||
<TableCell style={headStyle} align="left">
|
<TableCell style={headStyle} align="left">
|
||||||
Code Request
|
Code Request
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell style={headStyle} align="left">
|
{/* <TableCell style={headStyle} align="left">
|
||||||
Code Claim
|
Code Claim
|
||||||
</TableCell>
|
</TableCell> */}
|
||||||
<TableCell style={headStyle} align="left">
|
<TableCell style={headStyle} align="left">
|
||||||
Member Name
|
Member Name
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Reference in New Issue
Block a user