resolve conflict keep env.development
This commit is contained in:
10
frontend/dashboard/.env.development
Normal file
10
frontend/dashboard/.env.development
Normal file
@@ -0,0 +1,10 @@
|
||||
GENERATE_SOURCEMAP=false
|
||||
|
||||
PORT=8000
|
||||
|
||||
REACT_APP_HOST_API_URL="http://lms.test"
|
||||
|
||||
# VITE_API_URL="https://aso-api.linksehat.dev/api/internal"
|
||||
# VITE_API_URL="https://primecenter-api.linksehat.com/api/internal"
|
||||
VITE_API_URL="http://localhost:8000/api/internal"
|
||||
|
||||
@@ -415,7 +415,7 @@ export default function DialogBenefit({requestLog, setOpenDialog, openDialog, cl
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={width}>
|
||||
<Grid item xs={width} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -440,7 +440,7 @@ export default function DialogBenefit({requestLog, setOpenDialog, openDialog, cl
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={width}>
|
||||
<Grid item xs={width} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -464,7 +464,7 @@ export default function DialogBenefit({requestLog, setOpenDialog, openDialog, cl
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={width}>
|
||||
<Grid item xs={width} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -484,7 +484,7 @@ export default function DialogBenefit({requestLog, setOpenDialog, openDialog, cl
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={2}>
|
||||
<Grid item xs={2} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
|
||||
@@ -26,7 +26,7 @@ type DialogDeleteType = {
|
||||
openDialog: boolean;
|
||||
setOpenDialog: any;
|
||||
onSubmit?: void;
|
||||
data: BenefitConfigurationListType|undefined;
|
||||
data: BenefitConfigurationListType|undefined;
|
||||
id: number|undefined;
|
||||
total: any
|
||||
}
|
||||
@@ -39,7 +39,7 @@ type BenefitSelected = {
|
||||
limit_amount: number,
|
||||
}
|
||||
|
||||
export default function DialogEditBenefit({id, data, setOpenDialog, openDialog, onSubmit, total} : DialogDeleteType ) {
|
||||
export default function DialogEditBenefit({id, data, setOpenDialog, openDialog, onSubmit, total} : DialogDeleteType ) {
|
||||
const handleCloseDialog = () => {
|
||||
setOpenDialog(false);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
const amountApproved = parseFloat(watch('amount_approved'));
|
||||
const amountNotApproved = parseFloat(watch('amount_not_approved'));
|
||||
const excessPaid = parseFloat(watch('excess_paid'));
|
||||
|
||||
|
||||
// Hitung total baru
|
||||
const totalAmountIncurred = total.totalAmountIncurred - data?.amount_incurred + amountIncurred;
|
||||
const totalAmountApproved = total.totalAmountApproved - data?.amount_approved + amountApproved;
|
||||
@@ -104,8 +104,8 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
// Konversi nilai ke angka dengan aman
|
||||
let limitAmount = Number(benefitData.limit_amount) || 0;
|
||||
let limitAmountPlan = Number(benefitData.limit_amount_plan) || 0;
|
||||
|
||||
if (limitAmountPlan != 999999999){
|
||||
|
||||
if (limitAmountPlan != 999999999){
|
||||
let realTimeUsage = totalAll().totalAmountApproved;
|
||||
console.log(limitAmountPlan, 'test')
|
||||
if (limitAmountPlan < realTimeUsage) {
|
||||
@@ -162,11 +162,11 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
// // alert('Total Incurred tidak sama dengan Total Approve + Total Not Approve')
|
||||
// // setValue('amount_approved', data?.amount_approved)
|
||||
// }
|
||||
|
||||
|
||||
// Submit Form
|
||||
// =====================================
|
||||
const submitHandler = async (data: BenefitConfigurationListType) => {
|
||||
|
||||
|
||||
const response = await postEditBenefit(id, data);
|
||||
|
||||
if (response == true) {
|
||||
@@ -191,19 +191,19 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
setValue('keterangan', data?.keterangan)
|
||||
setValue('reason', data?.reason)
|
||||
}, [data])
|
||||
|
||||
|
||||
|
||||
|
||||
const getContent = () => (
|
||||
<FormProvider methods={methods} onSubmit={handleSubmit(submitHandler)}>
|
||||
<Stack paddingX={2} paddingY={4}>
|
||||
{/* <Card sx={{padding:2}}> */}
|
||||
<Box sx={{ marginTop:'10px', marginBottom:'10px', py: '8px', px: '12px', border:'1px solid #919EAB52', borderRadius: '6px'}}>
|
||||
<Box sx={{ marginTop:'10px', marginBottom:'10px', py: '8px', px: '12px', border:'1px solid #919EAB52', borderRadius: '6px'}}>
|
||||
<Grid key={id} container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" sx={{ fontWeight: 'bold'}}>
|
||||
{data?.benefit?.description}
|
||||
</Typography>
|
||||
|
||||
|
||||
</Grid>
|
||||
<Grid item xs={2}>
|
||||
<Grid container spacing={2}>
|
||||
@@ -213,7 +213,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} sx={{display: 'flex', gap: 1}}>
|
||||
<RHFTextFieldMoney
|
||||
<RHFTextFieldMoney
|
||||
key={id}
|
||||
id='amount_incurred'
|
||||
name={`amount_incurred`}
|
||||
@@ -228,7 +228,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={2}>
|
||||
<Grid item xs={2} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -252,7 +252,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={2}>
|
||||
<Grid item xs={2} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -276,7 +276,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={2}>
|
||||
<Grid item xs={2} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
@@ -296,7 +296,7 @@ export default function DialogEditBenefit({id, data, setOpenDialog, openDialog,
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={2}>
|
||||
<Grid item xs={2} style={{display: "none"}}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="subtitle1" component="div">
|
||||
|
||||
@@ -666,7 +666,8 @@ export default function DetailRequestFinalLog() {
|
||||
</Grid>
|
||||
|
||||
{/* Surat persetujuan Tindakan */}
|
||||
<Grid item xs={12}>
|
||||
<Grid item xs={12} style={{ display: "none" }}
|
||||
>
|
||||
<Card sx={{ p: 3 }}>
|
||||
<Stack direction="row" justifyContent="space-between" alignItems="flex-start" sx={{ mb: 3 }}>
|
||||
<Typography variant="subtitle1" sx={{ color: '#19BBBB', fontWeight: 'bold' }}>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// mui
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { LoadingButton, TabPanel } from "@mui/lab";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Divider,
|
||||
Grid,
|
||||
LinearProgress,
|
||||
linearProgressClasses,
|
||||
Typography,
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Divider,
|
||||
Grid,
|
||||
LinearProgress,
|
||||
linearProgressClasses,
|
||||
Typography,
|
||||
Paper,
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -34,7 +34,7 @@ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
||||
export default function DialogMember(member:any, handleSubmitSuccess:() => void) {
|
||||
const { localeData }: any = useContext(LanguageContext);
|
||||
const [currentTab, setCurrentTab] = useState('request');
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
useEffect(() => {
|
||||
@@ -77,7 +77,7 @@ export default function DialogMember(member:any, handleSubmitSuccess:() => void)
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const [openRows, setOpenRows] = useState<any>({});
|
||||
|
||||
const handleRowToggle = (index:number) => {
|
||||
@@ -120,6 +120,14 @@ export default function DialogMember(member:any, handleSubmitSuccess:() => void)
|
||||
<Typography sx={{width:'50%'}} variant="body2">Limit Peserta</Typography>
|
||||
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.limit_rules ? fCurrency(member?.limit_rules) : '-'}</Typography>
|
||||
</Stack>
|
||||
<Stack direction="row" justifyContent="space-between">
|
||||
<Typography sx={{width:'50%'}} variant="body2">Limit Terpakai</Typography>
|
||||
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.total_used_limit ? fCurrency(member?.total_used_limit) : '-'}</Typography>
|
||||
</Stack>
|
||||
<Stack direction="row" justifyContent="space-between">
|
||||
<Typography sx={{width:'50%'}} variant="body2">Sisa Limit</Typography>
|
||||
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{ member?.remaining_limit ? fCurrency(member?.remaining_limit) : '-'}</Typography>
|
||||
</Stack>
|
||||
<Stack direction="row" justifyContent="space-between">
|
||||
<Typography sx={{width:'50%'}} variant="body2">NRIC</Typography>
|
||||
<Typography sx={{width:'50%', fontWeight: 'bold'}} variant="body2">{member?.members.nik ?? '-'}</Typography>
|
||||
@@ -193,7 +201,7 @@ export default function DialogMember(member:any, handleSubmitSuccess:() => void)
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
))}
|
||||
</Table>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
</TabPanel>
|
||||
<TabPanel value={currentTab} index={'request'}>
|
||||
|
||||
Reference in New Issue
Block a user