change edit structure
This commit is contained in:
@@ -14,7 +14,12 @@ const RequestCard = ({item}) => {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px"
|
boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px"
|
||||||
}}>
|
}}>
|
||||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'flex-start' , paddingBottom: '16px !important'}}>
|
<CardContent sx={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
paddingBottom: '16px !important'
|
||||||
|
}}>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
borderLeft: '6px solid',
|
borderLeft: '6px solid',
|
||||||
@@ -23,31 +28,27 @@ const RequestCard = ({item}) => {
|
|||||||
paddingLeft: '10px',
|
paddingLeft: '10px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h6" sx={{lineHeight: 2 , fontWeight:'bold'}}>
|
<Typography variant="h6" sx={{lineHeight: 2, fontWeight: 'bold'}}>
|
||||||
{`${t("LoanFollowUp.loan_unique_code")}: ${item.id}`}
|
{`${t("LoanFollowUp.loan_unique_code")}: ${item.id}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography variant="body1" sx={{lineHeight: 2 , paddingLeft: '20px'}}>
|
<Typography variant="body1" sx={{lineHeight: 2, paddingLeft: '20px'}}>
|
||||||
{`${t("LoanFollowUp.loan_date")}: ${moment(item.created_at).locale("fa").format("HH:mm | YYYY/MM/DD")}`}
|
{`${t("LoanFollowUp.loan_date")}: ${moment(item.created_at).locale("fa").format("HH:mm | YYYY/MM/DD")}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" sx={{lineHeight: 2 , paddingLeft: '20px'}}>
|
<Typography variant="body1" sx={{lineHeight: 2, paddingLeft: '20px'}}>
|
||||||
{`${t("LoanFollowUp.loan_bank_branch")}: ${item.branch_info === null ? '-' : item.branch_info}`}
|
{`${t("LoanFollowUp.loan_bank_branch")}: ${item.branch_info === null ? '-' : item.branch_info}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" sx={{lineHeight: 2 , paddingLeft: '20px'}}>
|
<Typography variant="body1" sx={{lineHeight: 2, paddingLeft: '20px'}}>
|
||||||
{`${t("LoanFollowUp.loan_status")}: `}
|
{`${t("LoanFollowUp.loan_status")}: `}
|
||||||
{item.loan_state}
|
{item.loan_state}
|
||||||
{item.state_id >= 1 && item.state_id <= 6 && <AccessTimeFilledIcon sx={{verticalAlign: 'middle', marginLeft: '4px' , color: '#48a4df'}}/>}
|
{item.state_id >= 1 && item.state_id <= 6 &&
|
||||||
{item.state_id === 8 && <CheckCircleIcon sx={{verticalAlign: 'middle', marginLeft: '4px', color: 'green'}}/>}
|
<AccessTimeFilledIcon sx={{verticalAlign: 'middle', marginLeft: '4px', color: '#48a4df'}}/>}
|
||||||
{item.state_id === 7 && <CancelIcon sx={{verticalAlign: 'middle', marginLeft: '4px', color: 'red'}}/>}
|
{item.state_id === 8 &&
|
||||||
|
<CheckCircleIcon sx={{verticalAlign: 'middle', marginLeft: '4px', color: 'green'}}/>}
|
||||||
|
{item.state_id === 7 &&
|
||||||
|
<CancelIcon sx={{verticalAlign: 'middle', marginLeft: '4px', color: 'red'}}/>}
|
||||||
</Typography>
|
</Typography>
|
||||||
{item.state_id !== 7 && item.state_id !== 8 && (
|
{item.state_id === 7 && (
|
||||||
<Button variant="contained" color="primary" sx={{ alignSelf: 'flex-end' }}>
|
|
||||||
<LinkRouting underline="none" color="inherit" href={`/dashboard/navgan/${item.id}/show`}>
|
|
||||||
{t("LoanFollowUp.loan_details")}
|
|
||||||
</LinkRouting>
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{item.state_id === 7 && (
|
|
||||||
<Typography variant="body1" sx={{
|
<Typography variant="body1" sx={{
|
||||||
lineHeight: 2,
|
lineHeight: 2,
|
||||||
paddingLeft: '20px',
|
paddingLeft: '20px',
|
||||||
@@ -58,6 +59,13 @@ const RequestCard = ({item}) => {
|
|||||||
{`${t("LoanFollowUp.loan_description")}: ${item.latest_history.expert_description}`}
|
{`${t("LoanFollowUp.loan_description")}: ${item.latest_history.expert_description}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
{item.state_id === 8 && item.bank_status === 0 && (
|
||||||
|
<Button variant="contained" color="primary" sx={{alignSelf: 'flex-end'}}>
|
||||||
|
<LinkRouting underline="none" color="inherit" href={`/dashboard/navgan/${item.id}/show`}>
|
||||||
|
{t("LoanFollowUp.loan_details")}
|
||||||
|
</LinkRouting>
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -26,8 +26,7 @@ const ShowLoanForm = () => {
|
|||||||
<Typography>{t("ShowLoan.loading_show_component")}</Typography>
|
<Typography>{t("ShowLoan.loading_show_component")}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
} else if (!(LoanDetails.state_id === 8 && LoanDetails.bank_status === 0)) {
|
||||||
else if(LoanDetails.state_id===8 || LoanDetails.state_id===7) {
|
|
||||||
return (
|
return (
|
||||||
<Stack sx={{alignItems: "center", justifyContent: "center"}} spacing={3}>
|
<Stack sx={{alignItems: "center", justifyContent: "center"}} spacing={3}>
|
||||||
<Typography>{t("ShowLoan.error_message_not_show_state")}</Typography>
|
<Typography>{t("ShowLoan.error_message_not_show_state")}</Typography>
|
||||||
|
|||||||
Reference in New Issue
Block a user