commit
This commit is contained in:
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
namespace Modules\Client\Http\Controllers\Api;
|
namespace Modules\Client\Http\Controllers\Api;
|
||||||
|
|
||||||
|
use App\Helpers\Helper;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\ClaimRequest;
|
||||||
|
|
||||||
class ClaimReportController extends Controller
|
class ClaimReportController extends Controller
|
||||||
{
|
{
|
||||||
@@ -12,52 +14,39 @@ class ClaimReportController extends Controller
|
|||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function claimStatus($corporateId)
|
||||||
{
|
{
|
||||||
}
|
$requesteds = ClaimRequest::query()
|
||||||
|
->whereHas('member', function ($query) use ($corporateId) {
|
||||||
|
$query->whereHas('employeds', function ($corporateEmployee) use ($corporateId) {
|
||||||
|
$corporateEmployee->where('corporate_id', $corporateId);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
->where('status', 'requested')
|
||||||
|
->get();
|
||||||
|
$approveds = ClaimRequest::query()
|
||||||
|
->whereHas('member', function ($query) use ($corporateId) {
|
||||||
|
$query->whereHas('employeds', function ($corporateEmployee) use ($corporateId) {
|
||||||
|
$corporateEmployee->where('corporate_id', $corporateId);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
->where('status', 'approved')
|
||||||
|
->get();
|
||||||
|
|
||||||
/**
|
$rejecteds = ClaimRequest::query()
|
||||||
* Store a newly created resource in storage.
|
->whereHas('member', function ($query) use ($corporateId) {
|
||||||
*
|
$query->whereHas('employeds', function ($corporateEmployee) use ($corporateId) {
|
||||||
* @param \Illuminate\Http\Request $request
|
$corporateEmployee->where('corporate_id', $corporateId);
|
||||||
* @return \Illuminate\Http\Response
|
});
|
||||||
*/
|
})
|
||||||
public function store(Request $request)
|
->whereHas('claim', fn ($query) => $query->where('status', 'declined'))
|
||||||
{
|
->where('status', 'approved')
|
||||||
//
|
->get();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
return Helper::responseJson([
|
||||||
* Display the specified resource.
|
'requesteds' => count($requesteds),
|
||||||
*
|
'approveds' => count($approveds),
|
||||||
* @param int $id
|
'rejecteds' => count($rejecteds)
|
||||||
* @return \Illuminate\Http\Response
|
]);
|
||||||
*/
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function update(Request $request, $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,9 @@ use Modules\Client\Http\Controllers\Api\UserController;
|
|||||||
use Modules\Client\Http\Controllers\Api\ClaimController;
|
use Modules\Client\Http\Controllers\Api\ClaimController;
|
||||||
use Modules\Client\Http\Controllers\Api\TopUpController;
|
use Modules\Client\Http\Controllers\Api\TopUpController;
|
||||||
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
||||||
use App\Models\Encounter;
|
use Modules\Client\Http\Controllers\Api\ClaimReportController;
|
||||||
use Modules\Client\Http\Controllers\Api\ClaimRequestController;
|
use Modules\Client\Http\Controllers\Api\ClaimRequestController;
|
||||||
use Modules\Client\Http\Controllers\Api\DataController;
|
use Modules\Client\Http\Controllers\Api\DataController;
|
||||||
use Modules\Internal\Transformers\EncounterResource;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -54,6 +53,7 @@ Route::prefix('client')->group(function () {
|
|||||||
Route::get('topup', [TopUpController::class, 'index']);
|
Route::get('topup', [TopUpController::class, 'index']);
|
||||||
// Route::get('topup', [TopUpController::class, 'get']);
|
// Route::get('topup', [TopUpController::class, 'get']);
|
||||||
Route::post('topup', [TopUpController::class, 'store']);
|
Route::post('topup', [TopUpController::class, 'store']);
|
||||||
|
Route::get('claim-report/claim-status', [ClaimReportController::class, 'claimStatus']);
|
||||||
});
|
});
|
||||||
Route::get('claims/{id}', [ClaimController::class, 'show']);
|
Route::get('claims/{id}', [ClaimController::class, 'show']);
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class CorporateMemberService
|
|||||||
$limit = $request->has('perPage') ? $request->input('perPage') : 10;
|
$limit = $request->has('perPage') ? $request->input('perPage') : 10;
|
||||||
|
|
||||||
return Member::query()
|
return Member::query()
|
||||||
|
->joinClaimRequests('right')
|
||||||
->joinCorporateEmployees('left')
|
->joinCorporateEmployees('left')
|
||||||
->joinCorporateDivisions('left')
|
->joinCorporateDivisions('left')
|
||||||
->with('currentPlan')
|
->with('currentPlan')
|
||||||
@@ -61,6 +62,11 @@ class CorporateMemberService
|
|||||||
->orWhere('members.name', 'like', "%" . $search . "%");
|
->orWhere('members.name', 'like', "%" . $search . "%");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
->when($request->input('division'), function (Builder $division, $value) {
|
||||||
|
$division->whereHas('division', function (Builder $corporateEmployee) use ($value) {
|
||||||
|
$corporateEmployee->where('division_id', $value);
|
||||||
|
});
|
||||||
|
})
|
||||||
->when($request->has('orderBy'), function (Builder $query) use ($request) {
|
->when($request->has('orderBy'), function (Builder $query) use ($request) {
|
||||||
$orderBy = match ($request->orderBy) {
|
$orderBy = match ($request->orderBy) {
|
||||||
'memberId' => 'member_id',
|
'memberId' => 'member_id',
|
||||||
@@ -74,7 +80,7 @@ class CorporateMemberService
|
|||||||
$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', 'members.active'])
|
->select(['members.id', 'members.person_id', 'members.member_id', 'members.name', 'corporate_divisions.name AS division_name', 'members.active', 'claim_requests.id', 'claim_requests.member_id', 'claim_requests.submission_date'])
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ GENERATE_SOURCEMAP=false
|
|||||||
|
|
||||||
PORT=8083
|
PORT=8083
|
||||||
|
|
||||||
REACT_APP_HOST_API_URL="http://localhost:8000"
|
REACT_APP_HOST_API_URL="http://aso.test"
|
||||||
|
|
||||||
VITE_API_URL="http://localhost:8000/api/client"
|
VITE_API_URL="http://aso.test/api/client"
|
||||||
|
|||||||
@@ -20,12 +20,20 @@ import List from './List';
|
|||||||
import ClaimItems from '../Claims/components/ClaimItems';
|
import ClaimItems from '../Claims/components/ClaimItems';
|
||||||
import DiagnosisHistory from '../Claims/components/DiagnosisHistory';
|
import DiagnosisHistory from '../Claims/components/DiagnosisHistory';
|
||||||
import Documents from '../Claims/components/Documents';
|
import Documents from '../Claims/components/Documents';
|
||||||
|
// theme
|
||||||
|
import palette from '../../theme/palette';
|
||||||
|
|
||||||
|
interface ClaimStatusType {
|
||||||
|
name: string;
|
||||||
|
value: number;
|
||||||
|
color: string;
|
||||||
|
}
|
||||||
|
|
||||||
export default function Drugs() {
|
export default function Drugs() {
|
||||||
const { themeStretch } = useSettings();
|
const { themeStretch } = useSettings();
|
||||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||||
|
|
||||||
const [listClaimStatusItems, setListClaimStatusItems] = useState([]);
|
const [listClaimStatusItems, setListClaimStatusItems] = useState<ClaimStatusType[]>([]);
|
||||||
const [listAllMemberByClaimStatus, setListAllMemberByClaimStatus] = useState([]);
|
const [listAllMemberByClaimStatus, setListAllMemberByClaimStatus] = useState([]);
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
@@ -127,6 +135,26 @@ export default function Drugs() {
|
|||||||
(async () => {
|
(async () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
|
const claimStatus = await axios.get(`${corporateValue}/claim-report/claim-status`);
|
||||||
|
|
||||||
|
setListClaimStatusItems([
|
||||||
|
{
|
||||||
|
name: 'Requested',
|
||||||
|
value: claimStatus.data.data.requesteds,
|
||||||
|
color: palette.dark.primary.dark,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Approval',
|
||||||
|
value: claimStatus.data.data.approveds,
|
||||||
|
color: palette.dark.warning.dark,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Rejected',
|
||||||
|
value: claimStatus.data.data.rejecteds,
|
||||||
|
color: palette.dark.error.dark,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const parameters =
|
const parameters =
|
||||||
Object.keys(appliedParams).length !== 0
|
Object.keys(appliedParams).length !== 0
|
||||||
? appliedParams
|
? appliedParams
|
||||||
@@ -142,7 +170,6 @@ export default function Drugs() {
|
|||||||
|
|
||||||
setSearchParams(parameters);
|
setSearchParams(parameters);
|
||||||
|
|
||||||
setListClaimStatusItems(claim.data.data.allClaimStatus);
|
|
||||||
setListAllMemberByClaimStatus(claim.data.data.allMembersByClaimStatus.data);
|
setListAllMemberByClaimStatus(claim.data.data.allMembersByClaimStatus.data);
|
||||||
setPaginationTable(claim.data.data.allMembersByClaimStatus);
|
setPaginationTable(claim.data.data.allMembersByClaimStatus);
|
||||||
|
|
||||||
@@ -158,7 +185,7 @@ export default function Drugs() {
|
|||||||
<CardClaimStatus data={listClaimStatusItems} />
|
<CardClaimStatus data={listClaimStatusItems} />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
<List/>
|
<List />
|
||||||
|
|
||||||
{/* <TableList
|
{/* <TableList
|
||||||
headCells={headCells}
|
headCells={headCells}
|
||||||
|
|||||||
@@ -13,135 +13,134 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
TableSortLabel,
|
TableSortLabel,
|
||||||
Box,
|
Box,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import DialogDetailClaim from '../../sections/dashboard/DialogDetailClaim';
|
import DialogDetailClaim from '../../sections/dashboard/DialogDetailClaim';
|
||||||
import { visuallyHidden } from '@mui/utils';
|
import { visuallyHidden } from '@mui/utils';
|
||||||
import { MoreVert as MoreVertIcon } from '@mui/icons-material';
|
import { MoreVert as MoreVertIcon } from '@mui/icons-material';
|
||||||
/* ---------------------------------- axios --------------------------------- */
|
/* ---------------------------------- axios --------------------------------- */
|
||||||
// import axios from 'axios';
|
// import axios from 'axios';
|
||||||
import axios from '../../utils/axios';
|
import axios from '../../utils/axios';
|
||||||
/* ---------------------------------- react --------------------------------- */
|
/* ---------------------------------- react --------------------------------- */
|
||||||
import { useContext, useEffect, useState } from 'react';
|
import { useContext, useEffect, useState } from 'react';
|
||||||
|
|
||||||
/* -------------------------------- component ------------------------------- */
|
/* -------------------------------- component ------------------------------- */
|
||||||
import Iconify from '../../components/Iconify';
|
import Iconify from '../../components/Iconify';
|
||||||
import BaseTablePagination from '../../components/BaseTablePagination';
|
import BaseTablePagination from '../../components/BaseTablePagination';
|
||||||
import TableComponent from '../../components/Table';
|
import TableComponent from '../../components/Table';
|
||||||
import { Navigate } from 'react-router-dom';
|
import { Navigate } from 'react-router-dom';
|
||||||
|
|
||||||
/* ---------------------------------- hooks --------------------------------- */
|
/* ---------------------------------- hooks --------------------------------- */
|
||||||
import useMap from '../../hooks/useMap';
|
import useMap from '../../hooks/useMap';
|
||||||
/* ---------------------------------- theme --------------------------------- */
|
/* ---------------------------------- theme --------------------------------- */
|
||||||
import palette from '../../theme/palette';
|
import palette from '../../theme/palette';
|
||||||
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||||
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
||||||
import { useSearchParams, useNavigate } from 'react-router-dom';
|
import { useSearchParams, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
/* ---------------------------------- types --------------------------------- */
|
||||||
|
|
||||||
/* ---------------------------------- types --------------------------------- */
|
// type PaginationTableProps = {
|
||||||
|
// current_page: number;
|
||||||
|
// from: number;
|
||||||
|
// last_page: number;
|
||||||
|
// links: [];
|
||||||
|
// path: string;
|
||||||
|
// per_page: number;
|
||||||
|
// to: number;
|
||||||
|
// total: number;
|
||||||
|
// };
|
||||||
|
|
||||||
// type PaginationTableProps = {
|
// type DataTableProps = {
|
||||||
// current_page: number;
|
// fullName: string;
|
||||||
// from: number;
|
// memberId: string;
|
||||||
// last_page: number;
|
// service: string;
|
||||||
// links: [];
|
// start_date: string;
|
||||||
// path: string;
|
// end_date: string;
|
||||||
// per_page: number;
|
// status: boolean | number;
|
||||||
// to: number;
|
// };
|
||||||
// total: number;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// type DataTableProps = {
|
// /* -------------------------------------------------------------------------- */
|
||||||
// fullName: string;
|
|
||||||
// memberId: string;
|
|
||||||
// service: string;
|
|
||||||
// start_date: string;
|
|
||||||
// end_date: string;
|
|
||||||
// status: boolean | number;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// /* -------------------------------------------------------------------------- */
|
// /* -------------------------- enchanced table head -------------------------- */
|
||||||
|
|
||||||
// /* -------------------------- enchanced table head -------------------------- */
|
// type Order = 'asc' | 'desc';
|
||||||
|
|
||||||
// type Order = 'asc' | 'desc';
|
// interface HeadCell {
|
||||||
|
// id: string;
|
||||||
|
// label: string;
|
||||||
|
// }
|
||||||
|
|
||||||
// interface HeadCell {
|
// const headCells: readonly HeadCell[] = [
|
||||||
// id: string;
|
// {
|
||||||
// label: string;
|
// id: 'name',
|
||||||
// }
|
// label: 'Name',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 'member_id',
|
||||||
|
// label: 'Member ID',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 'service',
|
||||||
|
// label: 'Service',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 'start_date',
|
||||||
|
// label: 'Start Date',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 'end_date',
|
||||||
|
// label: 'End Date',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 'status',
|
||||||
|
// label: 'Status',
|
||||||
|
// },
|
||||||
|
// ];
|
||||||
|
|
||||||
// const headCells: readonly HeadCell[] = [
|
// interface EnhancedTableProps {
|
||||||
// {
|
// onRequestSort: (event: React.MouseEvent<unknown>, property: string) => void;
|
||||||
// id: 'name',
|
// order: Order;
|
||||||
// label: 'Name',
|
// orderBy: string;
|
||||||
// },
|
// }
|
||||||
// {
|
|
||||||
// id: 'member_id',
|
|
||||||
// label: 'Member ID',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 'service',
|
|
||||||
// label: 'Service',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 'start_date',
|
|
||||||
// label: 'Start Date',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 'end_date',
|
|
||||||
// label: 'End Date',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 'status',
|
|
||||||
// label: 'Status',
|
|
||||||
// },
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// interface EnhancedTableProps {
|
// function EnhancedTableHead(props: EnhancedTableProps) {
|
||||||
// onRequestSort: (event: React.MouseEvent<unknown>, property: string) => void;
|
// const { order, orderBy, onRequestSort } = props;
|
||||||
// order: Order;
|
// const createSortHandler = (property: string) => (event: React.MouseEvent<unknown>) => {
|
||||||
// orderBy: string;
|
// onRequestSort(event, property);
|
||||||
// }
|
// };
|
||||||
|
|
||||||
// function EnhancedTableHead(props: EnhancedTableProps) {
|
// return (
|
||||||
// const { order, orderBy, onRequestSort } = props;
|
// <TableHead>
|
||||||
// const createSortHandler = (property: string) => (event: React.MouseEvent<unknown>) => {
|
// <TableRow>
|
||||||
// onRequestSort(event, property);
|
// <TableCell align="center">No</TableCell>
|
||||||
// };
|
// {headCells.map((headCell) => (
|
||||||
|
// <TableCell
|
||||||
|
// key={headCell.id}
|
||||||
|
// sortDirection={orderBy === headCell.id ? order : false}
|
||||||
|
// align="center"
|
||||||
|
// >
|
||||||
|
// <TableSortLabel
|
||||||
|
// active={orderBy === headCell.id}
|
||||||
|
// direction={orderBy === headCell.id ? order : 'asc'}
|
||||||
|
// onClick={createSortHandler(headCell.id)}
|
||||||
|
// >
|
||||||
|
// {headCell.label}
|
||||||
|
// {orderBy === headCell.id ? (
|
||||||
|
// <Box component="span" sx={visuallyHidden}>
|
||||||
|
// {order === 'desc' ? 'sorted descending' : 'sorted ascending'}
|
||||||
|
// </Box>
|
||||||
|
// ) : null}
|
||||||
|
// </TableSortLabel>
|
||||||
|
// </TableCell>
|
||||||
|
// ))}
|
||||||
|
// </TableRow>
|
||||||
|
// </TableHead>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
// return (
|
/* -------------------------------------------------------------------------- */
|
||||||
// <TableHead>
|
|
||||||
// <TableRow>
|
|
||||||
// <TableCell align="center">No</TableCell>
|
|
||||||
// {headCells.map((headCell) => (
|
|
||||||
// <TableCell
|
|
||||||
// key={headCell.id}
|
|
||||||
// sortDirection={orderBy === headCell.id ? order : false}
|
|
||||||
// align="center"
|
|
||||||
// >
|
|
||||||
// <TableSortLabel
|
|
||||||
// active={orderBy === headCell.id}
|
|
||||||
// direction={orderBy === headCell.id ? order : 'asc'}
|
|
||||||
// onClick={createSortHandler(headCell.id)}
|
|
||||||
// >
|
|
||||||
// {headCell.label}
|
|
||||||
// {orderBy === headCell.id ? (
|
|
||||||
// <Box component="span" sx={visuallyHidden}>
|
|
||||||
// {order === 'desc' ? 'sorted descending' : 'sorted ascending'}
|
|
||||||
// </Box>
|
|
||||||
// ) : null}
|
|
||||||
// </TableSortLabel>
|
|
||||||
// </TableCell>
|
|
||||||
// ))}
|
|
||||||
// </TableRow>
|
|
||||||
// </TableHead>
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
export default function List() {
|
||||||
|
|
||||||
export default function List() {
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||||
@@ -224,7 +223,6 @@ import {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const searchs = {
|
const searchs = {
|
||||||
searchText: searchText,
|
searchText: searchText,
|
||||||
setSearchText: setSearchText,
|
setSearchText: setSearchText,
|
||||||
@@ -270,7 +268,6 @@ import {
|
|||||||
label: '',
|
label: '',
|
||||||
isSort: false,
|
isSort: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const [open, setOpen] = useState<HTMLElement | null>(null);
|
const [open, setOpen] = useState<HTMLElement | null>(null);
|
||||||
@@ -298,8 +295,6 @@ import {
|
|||||||
}; */
|
}; */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
@@ -312,21 +307,18 @@ import {
|
|||||||
: Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]);
|
: Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]);
|
||||||
|
|
||||||
const response = await axios.get(`${corporateValue}/members`, {
|
const response = await axios.get(`${corporateValue}/members`, {
|
||||||
params: { ...parameters },
|
params: { ...parameters, type: 'claim-report' },
|
||||||
});
|
});
|
||||||
|
|
||||||
setData(
|
setData(
|
||||||
response.data.data.map((obj: any) => {
|
response.data.data.map((obj: any) => ({
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
...obj,
|
...obj,
|
||||||
|
|
||||||
/* memberId: <Button onClick={() => navigate ('user-profile/:id')}>{obj.memberId}</Button>, */
|
/* memberId: <Button onClick={() => navigate ('user-profile/:id')}>{obj.memberId}</Button>, */
|
||||||
status:
|
status:
|
||||||
obj.status === 1 ? (
|
obj.status === 1 ? (
|
||||||
|
<Button
|
||||||
<Button onClick={() => navigate('dialog-detail')}
|
onClick={() => navigate('dialog-detail')}
|
||||||
/* startIcon={<Iconify icon="ic:round-check" />} */
|
/* startIcon={<Iconify icon="ic:round-check" />} */
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: 'rgba(84, 214, 44, 0.16)',
|
backgroundColor: 'rgba(84, 214, 44, 0.16)',
|
||||||
@@ -341,7 +333,6 @@ import {
|
|||||||
>
|
>
|
||||||
Request
|
Request
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
startIcon={<Iconify icon="fa6-solid:clock" />}
|
startIcon={<Iconify icon="fa6-solid:clock" />}
|
||||||
@@ -364,9 +355,7 @@ import {
|
|||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
), */
|
), */
|
||||||
|
}))
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
);
|
||||||
|
|
||||||
setPaginationTable(response.data);
|
setPaginationTable(response.data);
|
||||||
@@ -397,8 +386,5 @@ import {
|
|||||||
// filters={filters}
|
// filters={filters}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default function CardClaimStatus({ data }: PropsCardClaimStatus) {
|
|||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
{data
|
{data
|
||||||
? data.map(({ name, value, color }: ClaimStatusType, key) => (
|
? data.map(({ name, value, color }: ClaimStatusType, key) => (
|
||||||
<Grid item key={key} xs={6} sm={3}>
|
<Grid item key={key} xs={6} sm={4}>
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
paddingX: 1,
|
paddingX: 1,
|
||||||
@@ -71,7 +71,7 @@ export default function CardClaimStatus({ data }: PropsCardClaimStatus) {
|
|||||||
</Grid>
|
</Grid>
|
||||||
))
|
))
|
||||||
: defaultData.map(({ name, value, color }: ClaimStatusType, key) => (
|
: defaultData.map(({ name, value, color }: ClaimStatusType, key) => (
|
||||||
<Grid item key={key} xs={6} sm={3}>
|
<Grid item key={key} xs={6} sm={4}>
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
paddingX: 1,
|
paddingX: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user