update data di service monitoring, dan alarm center benefit summary
This commit is contained in:
@@ -37,7 +37,10 @@ class CorporateManageController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show($corporate_id)
|
public function show($corporate_id)
|
||||||
{
|
{
|
||||||
//
|
$userLogin = Auth::user();
|
||||||
|
$corporate = $userLogin->managedCorporates()->where('corporates.id', $corporate_id)->first();
|
||||||
|
|
||||||
|
return response()->json($corporate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Modules\Client\Http\Controllers\Api;
|
namespace Modules\Client\Http\Controllers\Api;
|
||||||
|
|
||||||
use App\Helpers\Helper;
|
use App\Helpers\Helper;
|
||||||
|
use App\Models\Member;
|
||||||
use App\Services\CorporateMemberService;
|
use App\Services\CorporateMemberService;
|
||||||
use Illuminate\Contracts\Support\Renderable;
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -10,6 +11,7 @@ use Illuminate\Routing\Controller;
|
|||||||
use Modules\Client\Transformers\ClaimReport\MemberResources as ClaimReportMemberResources;
|
use Modules\Client\Transformers\ClaimReport\MemberResources as ClaimReportMemberResources;
|
||||||
use Modules\Client\Transformers\Dashboard\MemberResources as DashboardMemberResources;
|
use Modules\Client\Transformers\Dashboard\MemberResources as DashboardMemberResources;
|
||||||
use Modules\Client\Transformers\Dashboard\MemberAlarmCenterResources as DashboardMemberAlarmResources;
|
use Modules\Client\Transformers\Dashboard\MemberAlarmCenterResources as DashboardMemberAlarmResources;
|
||||||
|
use Modules\Client\Transformers\DataMemberResource;
|
||||||
|
|
||||||
class CorporateMemberController extends Controller
|
class CorporateMemberController extends Controller
|
||||||
{
|
{
|
||||||
@@ -41,4 +43,19 @@ class CorporateMemberController extends Controller
|
|||||||
return response()->json(Helper::paginateResources(DashboardMemberResources::collection($members)));
|
return response()->json(Helper::paginateResources(DashboardMemberResources::collection($members)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function show($corporate_id, $person_id)
|
||||||
|
{
|
||||||
|
$data = Member::with(['claims', 'person', 'employeds', 'currentPlan.benefits'])
|
||||||
|
->where('person_id', $person_id)
|
||||||
|
->whereHas('employeds', function ($query) use ($corporate_id) {
|
||||||
|
$query->where('corporate_id', $corporate_id);
|
||||||
|
})
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$totalClaims = $data->claims->sum('total_claim');
|
||||||
|
$data->total_claims = $totalClaims;
|
||||||
|
|
||||||
|
return response()->json(DataMemberResource::make($data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ 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 App\Models\Encounter;
|
||||||
|
use Modules\Client\Http\Controllers\Api\DataController;
|
||||||
use Modules\Internal\Transformers\EncounterResource;
|
use Modules\Internal\Transformers\EncounterResource;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -33,12 +34,16 @@ Route::prefix('client')->group(function () {
|
|||||||
Route::middleware('auth:sanctum')->group(function () {
|
Route::middleware('auth:sanctum')->group(function () {
|
||||||
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
|
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
|
||||||
Route::get('user', [UserController::class, 'index']);
|
Route::get('user', [UserController::class, 'index']);
|
||||||
|
Route::get('data/{id}', [DataController::class, 'show']);
|
||||||
|
Route::put('data/{id}', [DataController::class, 'update']);
|
||||||
|
|
||||||
Route::get('corporate-manage', [CorporateManageController::class, 'index']);
|
Route::get('corporate-manage', [CorporateManageController::class, 'index']);
|
||||||
|
Route::get('corporate-manage/{corporate_id}', [CorporateManageController::class, 'show']);
|
||||||
Route::prefix('{corporate_id}')->group(function () {
|
Route::prefix('{corporate_id}')->group(function () {
|
||||||
Route::get('policy', [CorporatePolicyController::class, 'index']);
|
Route::get('policy', [CorporatePolicyController::class, 'index']);
|
||||||
Route::get('division', [CorporateDivisionController::class, 'index']);
|
Route::get('division', [CorporateDivisionController::class, 'index']);
|
||||||
Route::get('members', [CorporateMemberController::class, 'index']);
|
Route::get('members', [CorporateMemberController::class, 'index']);
|
||||||
|
Route::get('members/{id}', [CorporateMemberController::class, 'show']);
|
||||||
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/{claim_id}/encounters', [ClaimEncounterController::class, 'getEncounterData']);
|
Route::get('claims/{claim_id}/encounters', [ClaimEncounterController::class, 'getEncounterData']);
|
||||||
@@ -47,10 +52,5 @@ Route::prefix('client')->group(function () {
|
|||||||
Route::post('topup', [TopUpController::class, 'store']);
|
Route::post('topup', [TopUpController::class, 'store']);
|
||||||
});
|
});
|
||||||
Route::get('claims/{id}', [ClaimController::class, 'show']);
|
Route::get('claims/{id}', [ClaimController::class, 'show']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
c<?php
|
<?php
|
||||||
|
|
||||||
namespace Modules\Client\Transformers;
|
namespace Modules\Client\Transformers;
|
||||||
|
|
||||||
@@ -33,8 +33,12 @@ class ClaimShowResource extends JsonResource
|
|||||||
return $itemData;
|
return $itemData;
|
||||||
});
|
});
|
||||||
|
|
||||||
$data['primary_diagnosis'] = $this->diagnoses->filter(function($diagnosis){ return $diagnosis->type == 'primary';})->values();
|
$data['primary_diagnosis'] = $this->diagnoses->filter(function ($diagnosis) {
|
||||||
$data['secondary_diagnosis'] = $this->diagnoses->filter(function($diagnosis){ return $diagnosis->type == 'secondary';})->values();
|
return $diagnosis->type == 'primary';
|
||||||
|
})->values();
|
||||||
|
$data['secondary_diagnosis'] = $this->diagnoses->filter(function ($diagnosis) {
|
||||||
|
return $diagnosis->type == 'secondary';
|
||||||
|
})->values();
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|||||||
81
Modules/Client/Transformers/DataMemberResource.php
Normal file
81
Modules/Client/Transformers/DataMemberResource.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Client\Transformers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
|
class DataMemberResource extends JsonResource
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Transform the resource into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function toArray($request)
|
||||||
|
{
|
||||||
|
// return parent::toArray($request);
|
||||||
|
$data = [
|
||||||
|
'id' => $this->id,
|
||||||
|
'person_id' => $this->person_id,
|
||||||
|
'user_id' => $this->user_id,
|
||||||
|
'member_id' => $this->member_id,
|
||||||
|
'payor_id' => $this->payor_id,
|
||||||
|
'name_prefix' => $this->name_prefix,
|
||||||
|
'name' => $this->name,
|
||||||
|
'name_suffix' => $this->name_suffix,
|
||||||
|
'birth_date' => $this->birth_date,
|
||||||
|
'gender' => $this->gender,
|
||||||
|
'language' => $this->language,
|
||||||
|
'race' => $this->race,
|
||||||
|
'marital_status' => $this->marital_status,
|
||||||
|
'record_type' => $this->record_type,
|
||||||
|
'principal_id' => $this->principal_id,
|
||||||
|
'relation_with_principal' => $this->relation_with_principal,
|
||||||
|
'bpjs_class' => $this->bpjs_class,
|
||||||
|
'nric' => $this->nric,
|
||||||
|
'email' => $this->email,
|
||||||
|
'bank_info' => $this->bank_info,
|
||||||
|
'agent_code' => $this->agent_code,
|
||||||
|
'address1' => $this->address1,
|
||||||
|
'address2' => $this->address2,
|
||||||
|
'address3' => $this->address3,
|
||||||
|
'address4' => $this->address4,
|
||||||
|
'city' => $this->city,
|
||||||
|
'state' => $this->state,
|
||||||
|
'postal_code' => $this->postal_code,
|
||||||
|
'record_mode' => $this->record_mode,
|
||||||
|
'telephone_mobile' => $this->telephone_mobile,
|
||||||
|
'telephone_res' => $this->telephone_res,
|
||||||
|
'telephone_office' => $this->telephone_office,
|
||||||
|
'passport_no' => $this->passport_no,
|
||||||
|
'passport_country' => $this->passport_country,
|
||||||
|
'identification_code' => $this->identification_code,
|
||||||
|
'pre_existing' => $this->pre_existing,
|
||||||
|
'bpjs_id' => $this->bpjs_id,
|
||||||
|
'endorsement_date' => $this->endorsement_date,
|
||||||
|
'members_effective_date' => $this->members_effective_date,
|
||||||
|
'members_expire_date' => $this->members_expire_date,
|
||||||
|
'activation_date' => $this->activation_date,
|
||||||
|
'terminated_date' => $this->terminated_date,
|
||||||
|
'remarks' => $this->remarks,
|
||||||
|
'policy_in_force' => $this->policy_in_force,
|
||||||
|
'start_no_claim' => $this->start_no_claim,
|
||||||
|
'end_no_claim' => $this->end_no_claim,
|
||||||
|
'active' => $this->active,
|
||||||
|
'reason' => $this->reason,
|
||||||
|
'total_claims' => $this->total_claims,
|
||||||
|
'full_name' => $this->full_name,
|
||||||
|
'age' => $this->age,
|
||||||
|
'gender_code' => $this->gender_code,
|
||||||
|
'limit' => [
|
||||||
|
'current' => $this->total_claims ?? 0,
|
||||||
|
'total' => (int)$this->currentPlan->limit_rules ?? 0,
|
||||||
|
'percentage' => (!empty($this->currentPlan->limit_rules ?? 0)) ? (($this->total_claims / $this->currentPlan->limit_rules) * 100) : 0
|
||||||
|
],
|
||||||
|
'benefits' => $this->currentPlan->benefits,
|
||||||
|
|
||||||
|
];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,8 +21,7 @@ import { useState, SyntheticEvent, useContext, useEffect } from 'react';
|
|||||||
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import axios from '../../utils/axios';
|
import axios from '../../utils/axios';
|
||||||
|
import { fDate } from '../../utils/formatTime';
|
||||||
|
|
||||||
|
|
||||||
// sections
|
// sections
|
||||||
// import ListTable from '../../sections/claimreports/ListTable';
|
// import ListTable from '../../sections/claimreports/ListTable';
|
||||||
@@ -107,69 +106,70 @@ const StyledTab = styled((props: StyledTabProps) => <Tab disableRipple {...props
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function ServiceMonitoring() {
|
export default function ServiceMonitoring() {
|
||||||
const { themeStretch } = useSettings();
|
const { themeStretch } = useSettings();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|
||||||
const [value, setValue] = useState(0);
|
const [value, setValue] = useState(0);
|
||||||
const handleChange = (event: SyntheticEvent, newValue: number) => {
|
const handleChange = (event: SyntheticEvent, newValue: number) => {
|
||||||
setValue(newValue);
|
setValue(newValue);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const [data, setData] = useState({});
|
const [data, setData] = useState({});
|
||||||
const [data1, setData1] = useState();
|
const [corporate, setCorporate] = useState();
|
||||||
|
|
||||||
|
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||||
|
const { id } = useParams();
|
||||||
|
const claimId = '2';
|
||||||
|
console.log('id', id);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
const {corporateValue} = useContext(UserCurrentCorporateContext);
|
console.log('fetching data...');
|
||||||
const {id} = useParams();
|
axios
|
||||||
const claimId = '2'
|
.get('/data/' + id)
|
||||||
console.log('id',id);
|
.then((response) => {
|
||||||
|
console.log('data fetched...', response.data);
|
||||||
useEffect (() => {
|
|
||||||
|
|
||||||
console.log('fetching data...')
|
|
||||||
axios.get('/data/'+id )
|
|
||||||
.then(response => {
|
|
||||||
console.log('data fetched...', response.data)
|
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error('error fetching data...', error);
|
console.error('error fetching data...', error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
axios
|
||||||
|
.get('/corporate-manage/' + corporateValue)
|
||||||
|
.then((response) => {
|
||||||
|
console.log('corporate fetched...', response.data);
|
||||||
|
setCorporate(response.data);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('error fetching corporate...', error);
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
console.log('Data:' , data);
|
console.log('Data:', data);
|
||||||
|
|
||||||
const [encounterData, setEncounterData] = useState({});
|
const [encounterData, setEncounterData] = useState({});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('fetching encounter data...');
|
console.log('fetching encounter data...');
|
||||||
axios.get('/claims/${claim_id}/encounters')
|
axios
|
||||||
.then(response => {
|
.get('/claims/${claim_id}/encounters')
|
||||||
|
.then((response) => {
|
||||||
console.log('encounter data fetched...', response.data);
|
console.log('encounter data fetched...', response.data);
|
||||||
setEncounterData(response.data);
|
setEncounterData(response.data);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error('error fetching encounter data...', error);
|
console.error('error fetching encounter data...', error);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page title="Service Monitoring 123456">
|
<Page title="Service Monitoring 123456">
|
||||||
<Container maxWidth={themeStretch ? false : 'xl'}>
|
<Container maxWidth={themeStretch ? false : 'xl'}>
|
||||||
<Stack direction="row" alignItems="center" sx={{ marginBottom: 2 }}>
|
<Stack direction="row" alignItems="center" sx={{ marginBottom: 2 }}>
|
||||||
<IconButton onClick={() =>
|
<IconButton
|
||||||
navigate('/alarm-center')
|
onClick={() => navigate('/alarm-center')}
|
||||||
}
|
sx={{ marginRight: '10px', color: '#424242' }}
|
||||||
sx={{ marginRight: '10px', color: '#424242' }}>
|
>
|
||||||
<Iconify icon="heroicons-outline:arrow-narrow-left" />
|
<Iconify icon="heroicons-outline:arrow-narrow-left" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography variant="h5">Service Monitoring</Typography>
|
<Typography variant="h5">Service Monitoring</Typography>
|
||||||
@@ -206,23 +206,25 @@ export default function ServiceMonitoring() {
|
|||||||
<Stack spacing={2}>
|
<Stack spacing={2}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Nama perusahaan</Typography>
|
<Typography variant="caption">Nama perusahaan</Typography>
|
||||||
<Typography variant="body2">{corporateValue}</Typography>
|
<Typography variant="body2">{corporate?.name}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Nama Lengkap</Typography>
|
<Typography variant="caption">Nama Lengkap</Typography>
|
||||||
<Typography variant="body2">{data.name || 'Loading...'}</Typography>
|
<Typography variant="body2">{data?.name || 'Loading...'}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Tanggal lahir</Typography>
|
<Typography variant="caption">Tanggal lahir</Typography>
|
||||||
<Typography variant="body2">{data.birth_date}</Typography>
|
<Typography variant="body2">
|
||||||
|
{data?.birth_date ? fDate(data?.birth_date) : ''}
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Email</Typography>
|
<Typography variant="caption">Email</Typography>
|
||||||
<Typography variant="body2">{data.email}</Typography>
|
<Typography variant="body2">{data?.email}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">No telepon</Typography>
|
<Typography variant="caption">No telepon</Typography>
|
||||||
<Typography variant="body2">{data.phone}</Typography>
|
<Typography variant="body2">{data?.phone}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import { useEffect, useState, useContext } from 'react';
|
|||||||
import axios from '../../utils/axios';
|
import axios from '../../utils/axios';
|
||||||
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function UserProfile() {
|
export default function UserProfile() {
|
||||||
@@ -27,23 +26,21 @@ export default function UserProfile() {
|
|||||||
const [data, setData] = useState();
|
const [data, setData] = useState();
|
||||||
const [data1, setData1] = useState();
|
const [data1, setData1] = useState();
|
||||||
|
|
||||||
|
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||||
|
const { id } = useParams();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
const {corporateValue} = useContext(UserCurrentCorporateContext);
|
axios
|
||||||
const {id} = useParams();
|
.get(corporateValue + '/members/' + id)
|
||||||
|
.then((response) => {
|
||||||
useEffect (() => {
|
|
||||||
axios.get('/data/'+id )
|
|
||||||
.then(response => {
|
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
console.log('data', data)
|
console.log('data', data);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page title="Profile Peserta Jessica Lie">
|
<Page title="Profile Peserta Jessica Lie">
|
||||||
@@ -52,7 +49,7 @@ export default function UserProfile() {
|
|||||||
{/* <IconButton sx={{ marginRight: '10px', color: '#424242' }} onClick={() => navigate()}>
|
{/* <IconButton sx={{ marginRight: '10px', color: '#424242' }} onClick={() => navigate()}>
|
||||||
<Iconify icon="heroicons-outline:arrow-narrow-left" />
|
<Iconify icon="heroicons-outline:arrow-narrow-left" />
|
||||||
</IconButton> */}
|
</IconButton> */}
|
||||||
<ButtonBack/>
|
<ButtonBack />
|
||||||
<Typography variant="h5">Profil Peserta</Typography>
|
<Typography variant="h5">Profil Peserta</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
@@ -74,7 +71,7 @@ export default function UserProfile() {
|
|||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
{/* Item 1 */}
|
{/* Item 1 */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<CardPolicyNumber />
|
<CardPolicyNumber data={data} />
|
||||||
</Grid>
|
</Grid>
|
||||||
{/* Item 2 */}
|
{/* Item 2 */}
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ export default function Index() {
|
|||||||
params: { ...parameters },
|
params: { ...parameters },
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('member',corporateMembers );
|
console.log('member', corporateMembers);
|
||||||
const corporateTopUpLimit = await axios.get(`${corporateValue}/topup`);
|
const corporateTopUpLimit = await axios.get(`${corporateValue}/topup`);
|
||||||
|
|
||||||
setSearchParams(parameters);
|
setSearchParams(parameters);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import {
|
|||||||
linearProgressClasses,
|
linearProgressClasses,
|
||||||
Grid,
|
Grid,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import { description } from '../../../../../dashboard/src/_mock/text';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -25,203 +27,49 @@ const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function CardBenefitSummary() {
|
export default function CardBenefitSummary({ data }) {
|
||||||
|
const [benefits, setBenefits] = useState([]);
|
||||||
|
console.log('data', data);
|
||||||
|
useEffect(() => {
|
||||||
|
setBenefits(data);
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ marginTop: '1rem' }}>
|
<div style={{ marginTop: '1rem' }}>
|
||||||
<Typography padding={1} variant="subtitle2">
|
<Typography padding={1} variant="subtitle2">
|
||||||
Benefit Summary
|
Benefit Summary
|
||||||
</Typography>
|
</Typography>
|
||||||
<Card>
|
<Card>
|
||||||
|
{/* {Object.entries(benefits?.data).map(([key, value]) => (
|
||||||
|
<div key={key}>
|
||||||
|
<span>Haloo</span>
|
||||||
|
</div>
|
||||||
|
))} */}
|
||||||
|
|
||||||
<Grid container spacing={1} marginTop={1} sx={{ backgroundColor: '#F4F6F8', padding: 1 }}>
|
<Grid container spacing={1} marginTop={1} sx={{ backgroundColor: '#F4F6F8', padding: 1 }}>
|
||||||
{/* Card 1 */}
|
{/* Card 1 */}
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
{benefits?.map((item, key) => (
|
||||||
<Card sx={{ padding: 1 }}>
|
<Grid item xs={12} sm={6} md={6} lg={4} key={key}>
|
||||||
<Stack spacing={1}>
|
<Card sx={{ padding: 1 }}>
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
<Stack spacing={1}>
|
||||||
Rawat Jalan
|
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
||||||
</Typography>
|
{item?.description}
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
<Typography variant="body2" color="#0A0A0A">
|
||||||
</Stack>
|
Yearly Limits
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 2 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Rawat Inap
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<BorderLinearProgress variant="determinate" value={100} />
|
||||||
|
<Stack direction="row" spacing={0.25}>
|
||||||
|
<Typography variant="body2">0</Typography>
|
||||||
|
<Typography>/</Typography>
|
||||||
|
<Typography variant="body2" color="#757575">
|
||||||
|
{item?.pivot['limit_amount']}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Card>
|
||||||
</Card>
|
</Grid>
|
||||||
</Grid>
|
))}
|
||||||
{/* Card 3 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Manfaat Special
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 4 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Manfaat Special
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 5 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Perobatan Mata
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 6 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Perawatan Gigi
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 7 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Kehamilan
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 8 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Laboratorium
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
{/* Card 9 */}
|
|
||||||
<Grid item xs={12} sm={6} md={6} lg={4}>
|
|
||||||
<Card sx={{ padding: 1 }}>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
|
||||||
Manfaat Farmasi
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2" color="#0A0A0A">
|
|
||||||
Yearly Limits
|
|
||||||
</Typography>
|
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
|
||||||
<Stack direction="row" spacing={0.25}>
|
|
||||||
<Typography variant="body2">10.000.000</Typography>
|
|
||||||
<Typography>/</Typography>
|
|
||||||
<Typography variant="body2" color="#757575">
|
|
||||||
10.000.000
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ const rows = [
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function CardClaimHistory() {
|
export default function CardClaimHistory(benefitMember) {
|
||||||
const [page, setPage] = useState(0);
|
const [page, setPage] = useState(0);
|
||||||
const [rowsPerPage, setRowsPerPage] = useState(5);
|
const [rowsPerPage, setRowsPerPage] = useState(5);
|
||||||
|
console.log('benefitMember', benefitMember);
|
||||||
const handleChangePage = (event: React.MouseEvent<HTMLButtonElement> | null, newPage: number) => {
|
const handleChangePage = (event: React.MouseEvent<HTMLButtonElement> | null, newPage: number) => {
|
||||||
setPage(newPage);
|
setPage(newPage);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,21 +9,18 @@ import { UserCurrentCorporateContext } from '../../../contexts/UserCurrentCorpor
|
|||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';
|
import { Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';
|
||||||
import { enqueueSnackbar } from 'notistack';
|
import { enqueueSnackbar } from 'notistack';
|
||||||
|
import { fDate } from '../../../utils/formatTime';
|
||||||
|
|
||||||
|
export default function CardPersonalInformation({ data }) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default function CardPersonalInformation({data}) {
|
|
||||||
/* const [data, setData] = useState(); */
|
/* const [data, setData] = useState(); */
|
||||||
const [openDialog, setOpenDialog] = useState(false);
|
const [openDialog, setOpenDialog] = useState(false);
|
||||||
const [editedData, setEditedData] = useState(null);
|
const [editedData, setEditedData] = useState(null);
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const [weight, setWeight] = useState(data?.last_weight_kg || '');
|
const [weight, setWeight] = useState(data?.last_weight_kg || '');
|
||||||
const [height, setHeight] = useState(data?.last_height_cm || '');
|
const [height, setHeight] = useState(data?.last_height_cm || '');
|
||||||
const [email, setEmail] = useState(data?.email || '' );
|
const [email, setEmail] = useState(data?.email || '');
|
||||||
const [phone, setPhone] = useState(data?.phone || '' );
|
const [phone, setPhone] = useState(data?.phone || '');
|
||||||
const [address, setAddress] = useState(data?.main_address_id || '' );
|
const [address, setAddress] = useState(data?.main_address_id || '');
|
||||||
|
|
||||||
/* const [updatedData, setUpdatedData] = useState(data); */
|
/* const [updatedData, setUpdatedData] = useState(data); */
|
||||||
|
|
||||||
@@ -31,14 +28,12 @@ export default function CardPersonalInformation({data}) {
|
|||||||
setWeight(data?.last_weight_kg || '');
|
setWeight(data?.last_weight_kg || '');
|
||||||
setHeight(data?.last_height_cm || '');
|
setHeight(data?.last_height_cm || '');
|
||||||
setEmail(data?.email || '');
|
setEmail(data?.email || '');
|
||||||
setPhone(data?.phone||'');
|
setPhone(data?.phone || '');
|
||||||
setAddress(data?.main_address_id||'');
|
setAddress(data?.main_address_id || '');
|
||||||
setEditedData(data);
|
setEditedData(data);
|
||||||
setOpenDialog(true);
|
setOpenDialog(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const handleCloseDialog = () => {
|
const handleCloseDialog = () => {
|
||||||
// Close the dialog
|
// Close the dialog
|
||||||
/* setOpenDialog(false); */
|
/* setOpenDialog(false); */
|
||||||
@@ -71,16 +66,8 @@ export default function CardPersonalInformation({data}) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card sx={{ borderRadius: '6px', paddingY: 2 }}>
|
<Card sx={{ borderRadius: '6px', paddingY: 2 }}>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/* Stack 1 */}
|
{/* Stack 1 */}
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
@@ -89,7 +76,9 @@ export default function CardPersonalInformation({data}) {
|
|||||||
sx={{ paddingY: 1, paddingX: 3 }}
|
sx={{ paddingY: 1, paddingX: 3 }}
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle2">Informasi Pribadi</Typography>
|
<Typography variant="subtitle2">Informasi Pribadi</Typography>
|
||||||
<Button startIcon={<Iconify icon="heroicons:pencil-solid" />} onClick={handleEditData}>Edit Data</Button>
|
<Button startIcon={<Iconify icon="heroicons:pencil-solid" />} onClick={handleEditData}>
|
||||||
|
Edit Data
|
||||||
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
{/* Stack 2 */}
|
{/* Stack 2 */}
|
||||||
<Stack direction="row" spacing={2} paddingX={2}>
|
<Stack direction="row" spacing={2} paddingX={2}>
|
||||||
@@ -119,15 +108,15 @@ export default function CardPersonalInformation({data}) {
|
|||||||
<Stack direction="row" paddingY={1} spacing={2} sx={{ flex: '100%' }}>
|
<Stack direction="row" paddingY={1} spacing={2} sx={{ flex: '100%' }}>
|
||||||
<Stack sx={{ width: '60%' }}>
|
<Stack sx={{ width: '60%' }}>
|
||||||
<Typography variant="caption">Nama Lengkap</Typography>
|
<Typography variant="caption">Nama Lengkap</Typography>
|
||||||
<Typography variant="body2"> {data ?. name} </Typography>
|
<Typography variant="body2"> {data?.name} </Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ width: '20%' }}>
|
<Stack sx={{ width: '20%' }}>
|
||||||
<Typography variant="caption">Berat Badan </Typography>
|
<Typography variant="caption">Berat Badan </Typography>
|
||||||
<Typography variant="body2">{data ?. last_weight_kg} kg</Typography>
|
<Typography variant="body2">{data?.last_weight_kg} kg</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ width: '20%' }}>
|
<Stack sx={{ width: '20%' }}>
|
||||||
<Typography variant="caption">Tinggi Badan </Typography>
|
<Typography variant="caption">Tinggi Badan </Typography>
|
||||||
<Typography variant="body2">{data ?. last_height_cm} cm</Typography>
|
<Typography variant="body2">{data?.last_height_cm} cm</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -139,15 +128,18 @@ export default function CardPersonalInformation({data}) {
|
|||||||
<Stack direction="row" spacing={2} sx={{ flex: '100%' }}>
|
<Stack direction="row" spacing={2} sx={{ flex: '100%' }}>
|
||||||
<Stack sx={{ width: '100%' }}>
|
<Stack sx={{ width: '100%' }}>
|
||||||
<Typography variant="caption">Tempat Lahir</Typography>
|
<Typography variant="caption">Tempat Lahir</Typography>
|
||||||
<Typography variant="body2"> {data ?. birth_place} </Typography>
|
<Typography variant="body2"> {data?.birth_place} </Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ width: '100%' }}>
|
<Stack sx={{ width: '100%' }}>
|
||||||
<Typography variant="caption">Tanggal Lahir</Typography>
|
<Typography variant="caption">Tanggal Lahir</Typography>
|
||||||
<Typography variant="body2">{data ?. birth_date}</Typography>
|
<Typography variant="body2">
|
||||||
|
{' '}
|
||||||
|
{data?.birth_date ? fDate(data?.birth_date) : ''}
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ width: '100%' }}>
|
<Stack sx={{ width: '100%' }}>
|
||||||
<Typography variant="caption">Jenis Kelamin</Typography>
|
<Typography variant="caption">Jenis Kelamin</Typography>
|
||||||
<Typography variant="body2">{data ?. gender}</Typography>
|
<Typography variant="body2">{data?.gender}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -157,18 +149,16 @@ export default function CardPersonalInformation({data}) {
|
|||||||
<Stack direction="row" spacing={2} sx={{ flex: '100%' }}>
|
<Stack direction="row" spacing={2} sx={{ flex: '100%' }}>
|
||||||
<Stack sx={{ width: '100%' }}>
|
<Stack sx={{ width: '100%' }}>
|
||||||
<Typography variant="caption">Nomor Telpon</Typography>
|
<Typography variant="caption">Nomor Telpon</Typography>
|
||||||
<Typography variant="body2">{data ?. phone}</Typography>
|
<Typography variant="body2">{data?.phone}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ width: '100%' }}>
|
<Stack sx={{ width: '100%' }}>
|
||||||
<Typography variant="caption">Email</Typography>
|
<Typography variant="caption">Email</Typography>
|
||||||
<Typography variant="body2">{data?. email}</Typography>
|
<Typography variant="body2">{data?.email}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Alamat</Typography>
|
<Typography variant="caption">Alamat</Typography>
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">{data?.main_address_id}</Typography>
|
||||||
{data ?. main_address_id}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
{/* Stack 3.3 */}
|
{/* Stack 3.3 */}
|
||||||
@@ -183,7 +173,7 @@ export default function CardPersonalInformation({data}) {
|
|||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Nomor NIK</Typography>
|
<Typography variant="caption">Nomor NIK</Typography>
|
||||||
<Typography variant="body2">{data ?. nik}</Typography>
|
<Typography variant="body2">{data?.nik}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Button variant="contained" startIcon={<VisibilityIcon />}>
|
<Button variant="contained" startIcon={<VisibilityIcon />}>
|
||||||
@@ -198,65 +188,65 @@ export default function CardPersonalInformation({data}) {
|
|||||||
<Stack direction="row" justifyContent="space-between" spacing={2} sx={{ flex: '100%' }}>
|
<Stack direction="row" justifyContent="space-between" spacing={2} sx={{ flex: '100%' }}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Agama</Typography>
|
<Typography variant="caption">Agama</Typography>
|
||||||
<Typography variant="body2">{data ?. religion}</Typography>
|
<Typography variant="body2">{data?.religion}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Status</Typography>
|
<Typography variant="caption">Status</Typography>
|
||||||
<Typography variant="body2">{data ?. marital_status}</Typography>
|
<Typography variant="body2">{data?.marital_status}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Pendidikan</Typography>
|
<Typography variant="caption">Pendidikan</Typography>
|
||||||
<Typography variant="body2">{data ?. last_education}</Typography>
|
<Typography variant="body2">{data?.last_education}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="caption">Pekerjaan</Typography>
|
<Typography variant="caption">Pekerjaan</Typography>
|
||||||
<Typography variant="body2">{data ?. current_employment}</Typography>
|
<Typography variant="body2">{data?.current_employment}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
{/* Dialog */}
|
{/* Dialog */}
|
||||||
<Dialog open={openDialog} onClose={handleCloseDialog}>
|
<Dialog open={openDialog} onClose={handleCloseDialog}>
|
||||||
<DialogTitle>Edit Data</DialogTitle>
|
<DialogTitle>Edit Data</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Stack spacing={2}>
|
<Stack spacing={2}>
|
||||||
<TextField
|
<TextField
|
||||||
label="Full Name"
|
label="Full Name"
|
||||||
value={editedData ? editedData.name : ''}
|
value={editedData ? editedData.name : ''}
|
||||||
onChange={(e) => setEditedData({ ...editedData, name: e.target.value })}
|
onChange={(e) => setEditedData({ ...editedData, name: e.target.value })}
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label="Weight (kg)"
|
label="Weight (kg)"
|
||||||
value={weight}
|
value={weight}
|
||||||
onChange={(e) => setWeight(e.target.value)}
|
onChange={(e) => setWeight(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label="Height (cm)"
|
label="Height (cm)"
|
||||||
value={height}
|
value={height}
|
||||||
onChange={(e) => setHeight(e.target.value)}
|
onChange={(e) => setHeight(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label="Email Address"
|
label="Email Address"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
label="Phone No."
|
label="Phone No."
|
||||||
value={phone}
|
value={phone}
|
||||||
onChange={(e) => setPhone(e.target.value)}
|
onChange={(e) => setPhone(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/>
|
/>
|
||||||
{/* <TextField
|
{/* <TextField
|
||||||
label="Address"
|
label="Address"
|
||||||
value={address}
|
value={address}
|
||||||
onChange={(e) => setAddress(e.target.value)}
|
onChange={(e) => setAddress(e.target.value)}
|
||||||
@@ -264,18 +254,17 @@ export default function CardPersonalInformation({data}) {
|
|||||||
sx={{ marginTop: '16px' }}
|
sx={{ marginTop: '16px' }}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
|
{/* Add more fields as needed */}
|
||||||
|
</Stack>
|
||||||
|
</DialogContent>
|
||||||
|
|
||||||
{/* Add more fields as needed */}
|
<DialogActions>
|
||||||
</Stack>
|
<Button onClick={handleCloseDialog}>Cancel</Button>
|
||||||
</DialogContent>
|
<Button onClick={handleSaveData} variant="contained" color="primary">
|
||||||
|
Save
|
||||||
<DialogActions>
|
</Button>
|
||||||
<Button onClick={handleCloseDialog}>Cancel</Button>
|
</DialogActions>
|
||||||
<Button onClick={handleSaveData} variant="contained" color="primary">
|
</Dialog>
|
||||||
Save
|
|
||||||
</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Dialog>
|
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
type DataMember = {
|
type DataMember = {
|
||||||
id: number;
|
id: number;
|
||||||
fullName: string;
|
fullName: string;
|
||||||
@@ -65,18 +64,17 @@ type CardPolicyProps = {
|
|||||||
members?: DataMember[];
|
members?: DataMember[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function CardPolicyNumber() {
|
export default function CardPolicyNumber({ data }) {
|
||||||
|
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||||
|
const [policyNumber, setPolicyNumber] = useState('');
|
||||||
|
const [policyData, setPolicyData] = useState<CardPolicyProps>();
|
||||||
|
|
||||||
|
const [limitMember, setLimitMember] = useState();
|
||||||
|
const [benefitMember, setBenefitMember] = useState();
|
||||||
|
|
||||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
/* axios.get(`${corporateValue}/topup`)
|
||||||
const [policyNumber,setPolicyNumber] = useState('');
|
|
||||||
const [policyData, setPolicyData] = useState<CardPolicyProps>();
|
|
||||||
|
|
||||||
/* axios.get(`${corporateValue}/topup`)
|
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
})
|
})
|
||||||
@@ -84,63 +82,68 @@ export default function CardPolicyNumber() {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
}); */
|
}); */
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
axios
|
axios
|
||||||
.get(`${corporateValue}/topup`)
|
.get(`${corporateValue}/topup`)
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
const { data } = response.data; // Access the 'data' object from the response
|
const { data } = response.data; // Access the 'data' object from the response
|
||||||
const { policyNumber } = data; // Access the 'policyNumber' field from the 'data' object
|
const { policyNumber } = data; // Access the 'policyNumber' field from the 'data' object
|
||||||
setPolicyNumber(policyNumber);
|
setPolicyNumber(policyNumber);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
// const corporatePolicyLimit = axios.get(`${corporateValue}/policy`);
|
setLimitMember(data?.limit);
|
||||||
// const corporateTopUpLimit = axios.get(`${corporateValue}/topup`);
|
setBenefitMember(data?.benefits);
|
||||||
// setPolicyData({
|
|
||||||
// limit: corporatePolicyLimit.data.data,
|
|
||||||
// topUpLimit: corporateTopUpLimit.data.data,
|
|
||||||
// });
|
|
||||||
}, [corporateValue]);
|
|
||||||
|
|
||||||
const calculateProgressValue = (current:number,total:number) => {
|
// const corporatePolicyLimit = axios.get(`${corporateValue}/policy`);
|
||||||
return (current/total) * 100;
|
// const corporateTopUpLimit = axios.get(`${corporateValue}/topup`);
|
||||||
|
// setPolicyData({
|
||||||
|
// limit: corporatePolicyLimit.data.data,
|
||||||
|
// topUpLimit: corporateTopUpLimit.data.data,
|
||||||
|
// });
|
||||||
|
}, [corporateValue, data]);
|
||||||
|
|
||||||
|
const calculateProgressValue = (current: number, total: number) => {
|
||||||
|
return (current / total) * 100;
|
||||||
};
|
};
|
||||||
|
const progressValue = calculateProgressValue(limitMember?.current, limitMember?.total);
|
||||||
|
|
||||||
const getMemberLimitUsage = (memberId: string) => {
|
// const getMemberLimitUsage = (memberId: string) => {
|
||||||
if (policyData?.members) {
|
// if (policyData?.members) {
|
||||||
const member = policyData.members.find(member => member.memberId === memberId);
|
// const member = policyData.members.find((member) => member.memberId === memberId);
|
||||||
if (member) {
|
// if (member) {
|
||||||
return member.limit;
|
// return member.limit;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
};
|
// };
|
||||||
|
|
||||||
const renderYearlyLimit = () => {
|
// const renderYearlyLimit = () => {
|
||||||
if (policyData) {
|
// if (policyData) {
|
||||||
const { myLimit } = policyData.limit;
|
// const { myLimit } = policyData.limit;
|
||||||
const { balance, total, percentage } = myLimit;
|
// console.log('myLimit', myLimit);
|
||||||
const progressValue = calculateProgressValue(balance, total);
|
// const { balance, total, percentage } = myLimit;
|
||||||
|
// const progressValue = calculateProgressValue(balance, total);
|
||||||
|
|
||||||
return (
|
// return (
|
||||||
<Stack spacing={1} sx={{ width: '206.5px' }}>
|
// <Stack spacing={1} sx={{ width: '206.5px' }}>
|
||||||
<Typography variant="subtitle2">Yearly Limit</Typography>
|
// <Typography variant="subtitle2">Yearly Limit</Typography>
|
||||||
<BorderLinearProgress variant="determinate" value={progressValue} />
|
// <BorderLinearProgress variant="determinate" value={progressValue} />
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
// <Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
||||||
{balance.toLocaleString()} /{' '}
|
// {balance.toLocaleString()} /{' '}
|
||||||
<Typography variant="body2" color="#757575" component="span">
|
// <Typography variant="body2" color="#757575" component="span">
|
||||||
{total.toLocaleString()}
|
// {total.toLocaleString()}
|
||||||
</Typography>
|
// </Typography>
|
||||||
</Typography>
|
// </Typography>
|
||||||
</Stack>
|
// </Stack>
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
};
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card sx={{ padding: 2 }}>
|
<Card sx={{ padding: 2 }}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack direction="row" alignItems="center" spacing={1} justifyContent="space-between">
|
<Stack direction="row" alignItems="center" spacing={1} justifyContent="space-between">
|
||||||
@@ -153,17 +156,17 @@ export default function CardPolicyNumber() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
<Stack spacing={1} sx={{ width: '206.5px' }}>
|
<Stack spacing={1} sx={{ width: '206.5px' }}>
|
||||||
<Typography variant="subtitle2">Yearly Limit</Typography>
|
<Typography variant="subtitle2">Yearly Limit</Typography>
|
||||||
<BorderLinearProgress variant="determinate" value={100} />
|
<BorderLinearProgress variant="determinate" value={progressValue} />
|
||||||
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
<Typography variant="subtitle2" sx={{ fontWeight: 500 }}>
|
||||||
10.000.000 /{' '}
|
{limitMember?.current}/{' '}
|
||||||
<Typography variant="body2" color="#757575" component="span">
|
<Typography variant="body2" color="#757575" component="span">
|
||||||
10.000.000
|
{limitMember?.total}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
{/* Benefit Summary */}
|
{/* Benefit Summary */}
|
||||||
<CardBenefitSummary />
|
<CardBenefitSummary data={benefitMember} />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { format, getTime, formatDistanceToNow } from 'date-fns';
|
import { format,parseISO, getTime, setHours, setMinutes , formatDistanceToNow } from 'date-fns';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export function fDate(date: Date | string | number) {
|
export function fDate(date: Date | string | number) {
|
||||||
|
console.log(date);
|
||||||
return format(new Date(date), 'dd MMMM yyyy');
|
return format(new Date(date), 'dd MMMM yyyy');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,3 +24,16 @@ export function fToNow(date: Date | string | number) {
|
|||||||
addSuffix: true
|
addSuffix: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// export function fDateString(date) {
|
||||||
|
// const dateObj = parseISO(date);
|
||||||
|
// const formattedDate = format(dateObj, 'dd MMMM yyyy');
|
||||||
|
// return formattedDate;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// export function fFormattedDateString(date : String) {
|
||||||
|
// console.log(date);
|
||||||
|
// const datePart = date.split(' ')[0]; // Memisahkan bagian tanggal
|
||||||
|
// const formattedDate = fDateString(datePart); // Menggunakan fungsi sebelumnya untuk memformat tanggal
|
||||||
|
// return formattedDate;
|
||||||
|
// }
|
||||||
@@ -2,6 +2,6 @@ GENERATE_SOURCEMAP=false
|
|||||||
|
|
||||||
PORT=8083
|
PORT=8083
|
||||||
|
|
||||||
REACT_APP_HOST_API_URL="http://lms.test"
|
REACT_APP_HOST_API_URL="http://127.0.0.1:8000"
|
||||||
|
|
||||||
VITE_API_URL="http://lms.test/api/internal"
|
VITE_API_URL="http://127.0.0.1:8000/api/internal"
|
||||||
|
|||||||
27
frontend/hospital-portal/pnpm-lock.yaml
generated
27
frontend/hospital-portal/pnpm-lock.yaml
generated
@@ -1703,6 +1703,7 @@ packages:
|
|||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [android]
|
os: [android]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@esbuild/linux-loong64/0.15.18:
|
/@esbuild/linux-loong64/0.15.18:
|
||||||
@@ -1711,6 +1712,7 @@ packages:
|
|||||||
cpu: [loong64]
|
cpu: [loong64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@eslint/eslintrc/1.4.1:
|
/@eslint/eslintrc/1.4.1:
|
||||||
@@ -3412,6 +3414,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [android]
|
os: [android]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-android-arm64/0.15.18:
|
/esbuild-android-arm64/0.15.18:
|
||||||
@@ -3420,6 +3423,7 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [android]
|
os: [android]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-darwin-64/0.15.18:
|
/esbuild-darwin-64/0.15.18:
|
||||||
@@ -3428,6 +3432,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-darwin-arm64/0.15.18:
|
/esbuild-darwin-arm64/0.15.18:
|
||||||
@@ -3436,6 +3441,7 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-freebsd-64/0.15.18:
|
/esbuild-freebsd-64/0.15.18:
|
||||||
@@ -3444,6 +3450,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-freebsd-arm64/0.15.18:
|
/esbuild-freebsd-arm64/0.15.18:
|
||||||
@@ -3452,6 +3459,7 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-32/0.15.18:
|
/esbuild-linux-32/0.15.18:
|
||||||
@@ -3460,6 +3468,7 @@ packages:
|
|||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-64/0.15.18:
|
/esbuild-linux-64/0.15.18:
|
||||||
@@ -3468,6 +3477,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-arm/0.15.18:
|
/esbuild-linux-arm/0.15.18:
|
||||||
@@ -3476,6 +3486,7 @@ packages:
|
|||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-arm64/0.15.18:
|
/esbuild-linux-arm64/0.15.18:
|
||||||
@@ -3484,6 +3495,7 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-mips64le/0.15.18:
|
/esbuild-linux-mips64le/0.15.18:
|
||||||
@@ -3492,6 +3504,7 @@ packages:
|
|||||||
cpu: [mips64el]
|
cpu: [mips64el]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-ppc64le/0.15.18:
|
/esbuild-linux-ppc64le/0.15.18:
|
||||||
@@ -3500,6 +3513,7 @@ packages:
|
|||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-riscv64/0.15.18:
|
/esbuild-linux-riscv64/0.15.18:
|
||||||
@@ -3508,6 +3522,7 @@ packages:
|
|||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-linux-s390x/0.15.18:
|
/esbuild-linux-s390x/0.15.18:
|
||||||
@@ -3516,6 +3531,7 @@ packages:
|
|||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-netbsd-64/0.15.18:
|
/esbuild-netbsd-64/0.15.18:
|
||||||
@@ -3524,6 +3540,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [netbsd]
|
os: [netbsd]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-openbsd-64/0.15.18:
|
/esbuild-openbsd-64/0.15.18:
|
||||||
@@ -3532,6 +3549,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [openbsd]
|
os: [openbsd]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-sunos-64/0.15.18:
|
/esbuild-sunos-64/0.15.18:
|
||||||
@@ -3540,6 +3558,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [sunos]
|
os: [sunos]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-windows-32/0.15.18:
|
/esbuild-windows-32/0.15.18:
|
||||||
@@ -3548,6 +3567,7 @@ packages:
|
|||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-windows-64/0.15.18:
|
/esbuild-windows-64/0.15.18:
|
||||||
@@ -3556,6 +3576,7 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild-windows-arm64/0.15.18:
|
/esbuild-windows-arm64/0.15.18:
|
||||||
@@ -3564,6 +3585,7 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/esbuild/0.15.18:
|
/esbuild/0.15.18:
|
||||||
@@ -3594,6 +3616,7 @@ packages:
|
|||||||
esbuild-windows-32: 0.15.18
|
esbuild-windows-32: 0.15.18
|
||||||
esbuild-windows-64: 0.15.18
|
esbuild-windows-64: 0.15.18
|
||||||
esbuild-windows-arm64: 0.15.18
|
esbuild-windows-arm64: 0.15.18
|
||||||
|
dev: false
|
||||||
|
|
||||||
/escalade/3.1.1:
|
/escalade/3.1.1:
|
||||||
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
|
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
|
||||||
@@ -4840,6 +4863,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}
|
resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==}
|
||||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
dev: false
|
||||||
|
|
||||||
/natural-compare-lite/1.4.0:
|
/natural-compare-lite/1.4.0:
|
||||||
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
|
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
|
||||||
@@ -5068,6 +5092,7 @@ packages:
|
|||||||
nanoid: 3.3.4
|
nanoid: 3.3.4
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
/prelude-ls/1.2.1:
|
/prelude-ls/1.2.1:
|
||||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||||
@@ -5538,6 +5563,7 @@ packages:
|
|||||||
/source-map-js/1.0.2:
|
/source-map-js/1.0.2:
|
||||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/source-map-support/0.5.21:
|
/source-map-support/0.5.21:
|
||||||
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
|
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
|
||||||
@@ -5974,6 +6000,7 @@ packages:
|
|||||||
rollup: 2.79.1
|
rollup: 2.79.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents: 2.3.2
|
fsevents: 2.3.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
/webidl-conversions/4.0.2:
|
/webidl-conversions/4.0.2:
|
||||||
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
|
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
|
||||||
|
|||||||
4723
pnpm-lock.yaml
generated
4723
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -31,8 +31,9 @@ Route::prefix('client')->group(function () {
|
|||||||
Route::middleware('auth:sanctum')->group(function () {
|
Route::middleware('auth:sanctum')->group(function () {
|
||||||
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
|
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
|
||||||
Route::get('user', [UserController::class, 'index']);
|
Route::get('user', [UserController::class, 'index']);
|
||||||
Route::get('data/{id}', [DataController::class, 'show']);
|
// Route::get('data/{id}', [DataController::class, 'show']);
|
||||||
Route::put('data/{id}', [DataController::class, 'update' ]);
|
// Route::put('data/{id}', [DataController::class, 'update']);
|
||||||
|
|
||||||
|
|
||||||
Route::get('corporate-manage', [CorporateManageController::class, 'index']);
|
Route::get('corporate-manage', [CorporateManageController::class, 'index']);
|
||||||
Route::prefix('{corporate_id}')->group(function () {
|
Route::prefix('{corporate_id}')->group(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user