Update client Portal

This commit is contained in:
ivan-sim
2024-06-19 10:55:20 +07:00
parent c3341eef8d
commit 533f63c6e7
2 changed files with 17 additions and 4 deletions

View File

@@ -313,9 +313,22 @@ class CorporateMemberController extends Controller
) )
->get(); ->get();
$total_premi = 0;
foreach ($services as $value)
{
if($value->total > 0 && $value->total != 999999999)
{
$total_premi += $value->total;
}
else if($value->total == 999999999)
{
$total_premi = 999999999;
}
}
// Ganti dengan logika Anda untuk mendapatkan data deposit // Ganti dengan logika Anda untuk mendapatkan data deposit
$deposit = [ $deposit = [
'deposit' => $deposit->total_premi, 'deposit' => $total_premi,
'usage' => $usage, 'usage' => $usage,
'services' => $services 'services' => $services
]; ];

View File

@@ -432,12 +432,12 @@ export default function ServiceMonitoring() {
</Grid> </Grid>
<Grid item container xs={12} md={6} spacing={1.5}> <Grid item container xs={12} md={6} spacing={1.5}>
{doesNameExist ? ( {doesNameExist ? (
<Stack direction="column"> <Stack direction="column" style={{width:'100%'}}>
<Box display="flex" flexWrap="wrap" justifyContent="left"> <Box flexWrap="wrap" justifyContent="left">
<Card variant="outlined" sx={{ minWidth: 200, marginBottom: 1, borderRadius: 2, padding: 0 }}> <Card variant="outlined" sx={{ minWidth: 200, marginBottom: 1, borderRadius: 2, padding: 0 }}>
<CardContent> <CardContent>
<Typography variant="h6" component="div"> <Typography variant="h6" component="div">
Limit Total Limit
</Typography> </Typography>
<Typography variant="subtitle2" color="text.secondary"> <Typography variant="subtitle2" color="text.secondary">
Yearly Limits Yearly Limits