Merge branch 'release/v2.8.0'
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
||||||
NEXT_PUBLIC_API_VERSION = "2.7.2"
|
NEXT_PUBLIC_API_VERSION = "2.8.0"
|
||||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||||
|
|
||||||
|
|||||||
@@ -637,6 +637,35 @@
|
|||||||
"button-revise": "ارسال",
|
"button-revise": "ارسال",
|
||||||
"description": "توضیحات خود را وارد نمائید"
|
"description": "توضیحات خود را وارد نمائید"
|
||||||
},
|
},
|
||||||
|
"ComebackLoanDetailDialog": {
|
||||||
|
"comeback-loan-detail": "علت عودت بانک",
|
||||||
|
"Table_head_loan_id": "کد یکتا وام",
|
||||||
|
"Table_head_comeback_name": "علت عودت",
|
||||||
|
"Table_head_comeback_comment": "توضیحات",
|
||||||
|
"Table_head_comeback_date": "تاریخ"
|
||||||
|
},
|
||||||
|
"BankPaymentDialog": {
|
||||||
|
"bank-payment": "پرداخت بانک",
|
||||||
|
"Table_head_loan_id": "کد یکتا وام",
|
||||||
|
"Table_head_installment_number": "شماره قسط واریز شده",
|
||||||
|
"Table_head_remaining_facility": "تسهیلات باقیمانده",
|
||||||
|
"Table_head_paid_facility": "تسهیلات پرداخت شده",
|
||||||
|
"button-cancel": "بستن",
|
||||||
|
"Table_head_paid_date": "تاریخ"
|
||||||
|
},
|
||||||
|
"ApprovedBankLoanDialog": {
|
||||||
|
"approved-bank-loan": "انعقاد قرارداد بانک",
|
||||||
|
"Table_head_loan_id": "کد یکتا وام",
|
||||||
|
"Table_head_approved_date": "تاریخ تصویب بانک",
|
||||||
|
"Table_head_approved_facility_bank": "مبلغ مصوب تسهیلات سهم بانک",
|
||||||
|
"Table_head_approved_facility_gov": "مبلغ مصوب تسهیلات سهم دولت",
|
||||||
|
"Table_head_approved_facility_person": "مبلغ مصوب تسهیلات سهم متقاضی",
|
||||||
|
"Table_head_contract_date": "تاریخ قرارداد بانک",
|
||||||
|
"Table_head_contract_facility_bank": "مبلغ قرارداد تسهیلات سهم بانک",
|
||||||
|
"Table_head_contract_facility_gov": "مبلغ قرارداد تسهیلات سهم دولت",
|
||||||
|
"Table_head_contract_facility_person": "مبلغ قرارداد تسهیلات سهم متقاضی",
|
||||||
|
"Table_head_due_date": "تاریخ سررسید اول قسط"
|
||||||
|
},
|
||||||
"ReferReasonDialog": {
|
"ReferReasonDialog": {
|
||||||
"refer_reason": "علت ارجاع",
|
"refer_reason": "علت ارجاع",
|
||||||
"button-cancel" : "بازگشت",
|
"button-cancel" : "بازگشت",
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
import {
|
||||||
|
Box,
|
||||||
|
DialogContent,
|
||||||
|
LinearProgress,
|
||||||
|
Paper,
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableContainer,
|
||||||
|
TableHead,
|
||||||
|
TableRow,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import useRequest from "@/lib/app/hooks/useRequest";
|
||||||
|
import { GET_APPROVED_BANK_LOAN } from "@/core/data/apiRoutes";
|
||||||
|
import moment from "jalali-moment";
|
||||||
|
|
||||||
|
const ApprovedBankLoanContent = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const requestServer = useRequest({ auth: true, notification: false });
|
||||||
|
const [ApprovedBankDetail, setApprovedBankDetail] = useState([]);
|
||||||
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
|
const [error, setError] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
requestServer(`${GET_APPROVED_BANK_LOAN}/${rowId}`, "get")
|
||||||
|
.then((res) => {
|
||||||
|
setApprovedBankDetail(res.data.data);
|
||||||
|
setIsLoading(false);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
setError(true);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
{error ? (
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
padding: 2,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("LoanHistory.Table_history_error")}
|
||||||
|
</Typography>
|
||||||
|
) : isLoading ? (
|
||||||
|
<LinearProgress sx={{ width: "100%" }} />
|
||||||
|
) : (
|
||||||
|
<Paper
|
||||||
|
elevation={0}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
overflow: "hidden",
|
||||||
|
"*::-webkit-scrollbar": {
|
||||||
|
width: "0.5em",
|
||||||
|
},
|
||||||
|
"*::-webkit-scrollbar-thumb": {
|
||||||
|
backgroundColor: "primary.main",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TableContainer sx={{ maxHeight: 600 }}>
|
||||||
|
<Table stickyHeader sx={{ minWidth: 800 }}>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>{t("ApprovedBankLoanDialog.Table_head_approved_date")}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_approved_facility_bank")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_approved_facility_gov")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_approved_facility_person")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>{t("ApprovedBankLoanDialog.Table_head_contract_date")}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_contract_facility_bank")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_contract_facility_gov")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{t("ApprovedBankLoanDialog.Table_head_contract_facility_person")}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>{t("ApprovedBankLoanDialog.Table_head_due_date")}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow sx={{ "&:last-child td, &:last-child th": { border: 0 } }}>
|
||||||
|
<TableCell>
|
||||||
|
{ApprovedBankDetail.approved_date
|
||||||
|
? moment(ApprovedBankDetail.approved_date)
|
||||||
|
.locale("fa")
|
||||||
|
.format("HH:mm | yyyy/MM/DD")
|
||||||
|
: null}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>{ApprovedBankDetail.approved_facility_bank}</TableCell>
|
||||||
|
<TableCell> {ApprovedBankDetail.approved_facility_gov}</TableCell>
|
||||||
|
<TableCell> {ApprovedBankDetail.approved_facility_person}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{ApprovedBankDetail.contract_date
|
||||||
|
? moment(ApprovedBankDetail.contract_date)
|
||||||
|
.locale("fa")
|
||||||
|
.format("HH:mm | yyyy/MM/DD")
|
||||||
|
: null}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell> {ApprovedBankDetail.contract_facility_bank}</TableCell>
|
||||||
|
<TableCell> {ApprovedBankDetail.contract_facility_gov}</TableCell>
|
||||||
|
<TableCell> {ApprovedBankDetail.contract_facility_person}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{ApprovedBankDetail.due_date
|
||||||
|
? moment(ApprovedBankDetail.due_date)
|
||||||
|
.locale("fa")
|
||||||
|
.format("HH:mm | yyyy/MM/DD")
|
||||||
|
: null}
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
|
</Paper>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default ApprovedBankLoanContent;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import { Button, Dialog, DialogActions, DialogTitle, IconButton, Tooltip } from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useState } from "react";
|
||||||
|
import GavelIcon from "@mui/icons-material/Gavel";
|
||||||
|
import ApprovedBankLoanContent from "./ApprovedBankLoanContent";
|
||||||
|
|
||||||
|
const ApprovedBankLoan = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const [openApprovedBankLoanDialog, setOpenApprovedBankLoanDialog] = useState(false);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Tooltip title={t("ApprovedBankLoanDialog.approved-bank-loan")}>
|
||||||
|
<IconButton color="primary" onClick={() => setOpenApprovedBankLoanDialog(true)}>
|
||||||
|
<GavelIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
<Dialog
|
||||||
|
maxWidth={"xl"}
|
||||||
|
fullWidth
|
||||||
|
open={openApprovedBankLoanDialog}
|
||||||
|
PaperProps={{
|
||||||
|
sx: {
|
||||||
|
boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DialogTitle>{t("ApprovedBankLoanDialog.approved-bank-loan")}</DialogTitle>
|
||||||
|
<ApprovedBankLoanContent rowId={rowId} />
|
||||||
|
<DialogActions>
|
||||||
|
<Button
|
||||||
|
onClick={() => setOpenApprovedBankLoanDialog(false)}
|
||||||
|
variant="outlined"
|
||||||
|
color="secondary"
|
||||||
|
autoFocus
|
||||||
|
>
|
||||||
|
{t("CouncilHistory.button-cancel")}
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default ApprovedBankLoan;
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
import {
|
||||||
|
Box,
|
||||||
|
DialogContent,
|
||||||
|
LinearProgress,
|
||||||
|
Paper,
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableContainer,
|
||||||
|
TableHead,
|
||||||
|
TableRow,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import useRequest from "@/lib/app/hooks/useRequest";
|
||||||
|
import { GET_BANK_PAYMENT } from "@/core/data/apiRoutes";
|
||||||
|
import moment from "jalali-moment";
|
||||||
|
|
||||||
|
const BankPaymentContent = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const requestServer = useRequest({ auth: true, notification: false });
|
||||||
|
const [BankPaymentDetail, setBankPaymentDetail] = useState([]);
|
||||||
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
|
const [error, setError] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
requestServer(`${GET_BANK_PAYMENT}/${rowId}`, "get")
|
||||||
|
.then((res) => {
|
||||||
|
setBankPaymentDetail(res.data.data);
|
||||||
|
setIsLoading(false);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
setError(true);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
{error ? (
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
padding: 2,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("LoanHistory.Table_history_error")}
|
||||||
|
</Typography>
|
||||||
|
) : isLoading ? (
|
||||||
|
<LinearProgress sx={{ width: "100%" }} />
|
||||||
|
) : (
|
||||||
|
<Paper
|
||||||
|
elevation={0}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
overflow: "hidden",
|
||||||
|
"*::-webkit-scrollbar": {
|
||||||
|
width: "0.5em",
|
||||||
|
},
|
||||||
|
"*::-webkit-scrollbar-thumb": {
|
||||||
|
backgroundColor: "primary.main",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TableContainer sx={{ maxHeight: 600 }}>
|
||||||
|
<Table stickyHeader sx={{ minWidth: 800 }}>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>{t("BankPaymentDialog.Table_head_installment_number")}</TableCell>
|
||||||
|
<TableCell>{t("BankPaymentDialog.Table_head_remaining_facility")}</TableCell>
|
||||||
|
<TableCell>{t("BankPaymentDialog.Table_head_paid_facility")}</TableCell>
|
||||||
|
<TableCell>{t("BankPaymentDialog.Table_head_paid_date")}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow sx={{ "&:last-child td, &:last-child th": { border: 0 } }}>
|
||||||
|
<TableCell>{BankPaymentDetail.installment_number}</TableCell>
|
||||||
|
<TableCell> {BankPaymentDetail.paid_facility}</TableCell>
|
||||||
|
<TableCell> {BankPaymentDetail.remaining_facility}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{BankPaymentDetail.paid_date
|
||||||
|
? moment(BankPaymentDetail.paid_date)
|
||||||
|
.locale("fa")
|
||||||
|
.format("HH:mm | yyyy/MM/DD")
|
||||||
|
: null}
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
|
</Paper>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default BankPaymentContent;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import { Button, Dialog, DialogActions, DialogTitle, IconButton, Tooltip } from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useState } from "react";
|
||||||
|
import PaidIcon from "@mui/icons-material/Paid";
|
||||||
|
import BankPaymentContent from "./BankPaymentContent";
|
||||||
|
|
||||||
|
const BankPayment = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const [openBankPaymentDialog, setOpenBankPaymentDialog] = useState(false);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Tooltip title={t("BankPaymentDialog.bank-payment")}>
|
||||||
|
<IconButton color="primary" onClick={() => setOpenBankPaymentDialog(true)}>
|
||||||
|
<PaidIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
<Dialog
|
||||||
|
maxWidth={"xl"}
|
||||||
|
fullWidth
|
||||||
|
open={openBankPaymentDialog}
|
||||||
|
PaperProps={{
|
||||||
|
sx: {
|
||||||
|
boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DialogTitle>{t("BankPaymentDialog.bank-payment")}</DialogTitle>
|
||||||
|
<BankPaymentContent rowId={rowId} />
|
||||||
|
<DialogActions>
|
||||||
|
<Button
|
||||||
|
onClick={() => setOpenBankPaymentDialog(false)}
|
||||||
|
variant="outlined"
|
||||||
|
color="secondary"
|
||||||
|
autoFocus
|
||||||
|
>
|
||||||
|
{t("CouncilHistory.button-cancel")}
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default BankPayment;
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import {
|
||||||
|
Box,
|
||||||
|
DialogContent,
|
||||||
|
LinearProgress,
|
||||||
|
Paper,
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableContainer,
|
||||||
|
TableHead,
|
||||||
|
TableRow,
|
||||||
|
Typography,
|
||||||
|
} from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import useRequest from "@/lib/app/hooks/useRequest";
|
||||||
|
import { GET_COMEBACK_LOAN_DETAIL } from "@/core/data/apiRoutes";
|
||||||
|
import moment from "jalali-moment";
|
||||||
|
|
||||||
|
const ComebackLoanDetailContent = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const requestServer = useRequest({ auth: true, notification: false });
|
||||||
|
const [ComebackLoanDetail, setComebackLoanDetail] = useState([]);
|
||||||
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
|
const [error, setError] = useState(false);
|
||||||
|
useEffect(() => {
|
||||||
|
requestServer(`${GET_COMEBACK_LOAN_DETAIL}/${rowId}`, "get")
|
||||||
|
.then((res) => {
|
||||||
|
setComebackLoanDetail(res.data.data);
|
||||||
|
setIsLoading(false);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
setError(true);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
{error ? (
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
padding: 2,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("LoanHistory.Table_history_error")}
|
||||||
|
</Typography>
|
||||||
|
) : isLoading ? (
|
||||||
|
<LinearProgress sx={{ width: "100%" }} />
|
||||||
|
) : (
|
||||||
|
<Paper
|
||||||
|
elevation={0}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
overflow: "hidden",
|
||||||
|
"*::-webkit-scrollbar": {
|
||||||
|
width: "0.5em",
|
||||||
|
},
|
||||||
|
"*::-webkit-scrollbar-thumb": {
|
||||||
|
backgroundColor: "primary.main",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TableContainer sx={{ maxHeight: 600 }}>
|
||||||
|
<Table stickyHeader sx={{ minWidth: 800 }}>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>{t("ComebackLoanDetailDialog.Table_head_comeback_name")}</TableCell>
|
||||||
|
<TableCell>{t("ComebackLoanDetailDialog.Table_head_comeback_comment")}</TableCell>
|
||||||
|
<TableCell>{t("ComebackLoanDetailDialog.Table_head_comeback_date")}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow sx={{ "&:last-child td, &:last-child th": { border: 0 } }}>
|
||||||
|
<TableCell>{ComebackLoanDetail.comeback_name}</TableCell>
|
||||||
|
<TableCell> {ComebackLoanDetail.comeback_comment}</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
{ComebackLoanDetail.comeback_date
|
||||||
|
? moment(ComebackLoanDetail.comeback_date)
|
||||||
|
.locale("fa")
|
||||||
|
.format("HH:mm | yyyy/MM/DD")
|
||||||
|
: null}
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
|
</Paper>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default ComebackLoanDetailContent;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import { Button, Dialog, DialogActions, DialogTitle, IconButton, Tooltip } from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
import { useState } from "react";
|
||||||
|
import SyncAltIcon from "@mui/icons-material/SyncAlt";
|
||||||
|
import ComebackLoanDetailContent from "./ComebackLoanDetailContent";
|
||||||
|
|
||||||
|
const ComebackLoanDetail = ({ rowId }) => {
|
||||||
|
const t = useTranslations();
|
||||||
|
const [openComebackLoanDetailDialog, setOpenComebackLoanDetailDialog] = useState(false);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Tooltip title={t("ComebackLoanDetailDialog.comeback-loan-detail")}>
|
||||||
|
<IconButton color="primary" onClick={() => setOpenComebackLoanDetailDialog(true)}>
|
||||||
|
<SyncAltIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
<Dialog
|
||||||
|
maxWidth={"xl"}
|
||||||
|
fullWidth
|
||||||
|
open={openComebackLoanDetailDialog}
|
||||||
|
PaperProps={{
|
||||||
|
sx: {
|
||||||
|
boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DialogTitle>{t("ComebackLoanDetailDialog.comeback-loan-detail")}</DialogTitle>
|
||||||
|
<ComebackLoanDetailContent rowId={rowId} />
|
||||||
|
<DialogActions>
|
||||||
|
<Button
|
||||||
|
onClick={() => setOpenComebackLoanDetailDialog(false)}
|
||||||
|
variant="outlined"
|
||||||
|
color="secondary"
|
||||||
|
autoFocus
|
||||||
|
>
|
||||||
|
{t("CouncilHistory.button-cancel")}
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default ComebackLoanDetail;
|
||||||
@@ -2,12 +2,26 @@ import { Box } from "@mui/material";
|
|||||||
import ReferPassengerBoss from "@/components/dashboard/loan-followup/Form/ReferPassengerBoss";
|
import ReferPassengerBoss from "@/components/dashboard/loan-followup/Form/ReferPassengerBoss";
|
||||||
import UserInfoForm from "./Form/UserInfoForm";
|
import UserInfoForm from "./Form/UserInfoForm";
|
||||||
import PlanningCouncilForm from "@/components/dashboard/loan-followup/Form/PlanningCouncilForm";
|
import PlanningCouncilForm from "@/components/dashboard/loan-followup/Form/PlanningCouncilForm";
|
||||||
|
import ComebackLoanDetail from "@/components/dashboard/loan-followup/Form/ComebackLoanDetail";
|
||||||
|
import BankPayment from "@/components/dashboard/loan-followup/Form/BankPayment";
|
||||||
|
import ApprovedBankLoan from "@/components/dashboard/loan-followup/Form/ApprovedBankLoan";
|
||||||
|
|
||||||
const TableRow = ({ row, mutate }) => {
|
const TableRow = ({ row, mutate }) => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: "flex", flexWrap: "nowrap", gap: "8px" }}>
|
<Box sx={{ display: "flex", flexWrap: "nowrap", gap: "8px" }}>
|
||||||
<UserInfoForm rowId={row.getValue("id")} row={row} />
|
<UserInfoForm rowId={row.getValue("id")} row={row} />
|
||||||
<PlanningCouncilForm rowId={row.getValue("id")} />
|
{[11, 12, 13, 14, 15, 16].includes(row.original.state_id) && (
|
||||||
|
<PlanningCouncilForm rowId={row.getValue("id")} />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{row.original.state_id === 16 && <ComebackLoanDetail rowId={row.getValue("id")} />}
|
||||||
|
|
||||||
|
{row.original.state_id === 15 && <BankPayment rowId={row.getValue("id")} />}
|
||||||
|
|
||||||
|
{row.original.state_id === 14 || row.original.state_id === 15 ? (
|
||||||
|
<ApprovedBankLoan rowId={row.getValue("id")} />
|
||||||
|
) : null}
|
||||||
|
|
||||||
{row.original.state_id === 11 || row.original.state_id === 16 ? (
|
{row.original.state_id === 11 || row.original.state_id === 16 ? (
|
||||||
<ReferPassengerBoss rowId={row.getValue("id")} mutate={mutate} />
|
<ReferPassengerBoss rowId={row.getValue("id")} mutate={mutate} />
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ export const EXPORT_PASSENGER_BOSS_DETAILS = BASE_URL + "/dashboard/province_wor
|
|||||||
export const GET_LOAN_FOLLOWUP = BASE_URL + "/dashboard/vezarat_loan_tracking/";
|
export const GET_LOAN_FOLLOWUP = BASE_URL + "/dashboard/vezarat_loan_tracking/";
|
||||||
export const REFER_LOAN_FOLLOWUP_PASSENGERBOSS = BASE_URL + "/dashboard/vezarat_loan_tracking/refer";
|
export const REFER_LOAN_FOLLOWUP_PASSENGERBOSS = BASE_URL + "/dashboard/vezarat_loan_tracking/refer";
|
||||||
export const GET_HISTORY_COUNCIL = BASE_URL + "/dashboard/vezarat_loan_tracking/planning_council_loan";
|
export const GET_HISTORY_COUNCIL = BASE_URL + "/dashboard/vezarat_loan_tracking/planning_council_loan";
|
||||||
|
export const GET_COMEBACK_LOAN_DETAIL = BASE_URL + "/dashboard/vezarat_loan_tracking/comeback_loan";
|
||||||
|
export const GET_BANK_PAYMENT = BASE_URL + "/dashboard/vezarat_loan_tracking/bank_payment_loan";
|
||||||
|
export const GET_APPROVED_BANK_LOAN = BASE_URL + "/dashboard/vezarat_loan_tracking/approved_loan";
|
||||||
|
|
||||||
//transportation assistance
|
//transportation assistance
|
||||||
export const GET_TRANSPORTATION_ASSISTANCE = BASE_URL + "/dashboard/transportation_assistant/show";
|
export const GET_TRANSPORTATION_ASSISTANCE = BASE_URL + "/dashboard/transportation_assistant/show";
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ const MuiLayout = ({ children, isBot }) => {
|
|||||||
borderRadius: "4px",
|
borderRadius: "4px",
|
||||||
},
|
},
|
||||||
" input[type='number']::-webkit-inner-spin-button,input[type='number']::-webkit-outer-spin-button ":
|
" input[type='number']::-webkit-inner-spin-button,input[type='number']::-webkit-outer-spin-button ":
|
||||||
{
|
{
|
||||||
"-webkit-appearance": "none",
|
"-webkit-appearance": "none",
|
||||||
margin: 0,
|
margin: 0,
|
||||||
},
|
},
|
||||||
" input[type='number']": {
|
" input[type='number']": {
|
||||||
"-moz-appearance": "textfield",
|
"-moz-appearance": "textfield",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user