Merge branch 'release/v1.28.5'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
||||
NEXT_PUBLIC_API_VERSION = "1.28.1"
|
||||
NEXT_PUBLIC_API_VERSION = "1.28.5"
|
||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||
|
||||
|
||||
BIN
public/images/pie-chart.png
Normal file
BIN
public/images/pie-chart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
public/images/rial.png
Normal file
BIN
public/images/rial.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -60,7 +60,8 @@
|
||||
"user-management": "مدیریت کاربر",
|
||||
"role-management": "مدیریت نقش ها",
|
||||
"edit-profile": "ویرایش پروفایل",
|
||||
"loan-history": "کارتابل نظارت"
|
||||
"loan-history": "کارتابل نظارت",
|
||||
"loan-history-province": "کارتابل نظارت استانی"
|
||||
},
|
||||
"secondary": {
|
||||
"passenger-office": "توزیع درخواست",
|
||||
@@ -120,7 +121,12 @@
|
||||
"edit_profile": "ویرایش پروفایل",
|
||||
"expert_management": "مدیریت کارشناسان",
|
||||
"user_management_page": "مدیریت کاربر",
|
||||
"loan_history": "کارتابل نظارت"
|
||||
"loan_history": "کارتابل نظارت",
|
||||
"total_number_loan_offers": "تعداد کل وام های پیشنهادی",
|
||||
"total_amount_proposed_loan": "مبلغ کل وام های پیشنهادی",
|
||||
"total_number_requests": "تعداد کل درخواست ها",
|
||||
"total_amount_approved_loans": "مبلغ کل وام های تصویب شده",
|
||||
"number_approved_loans": "تعداد وام های تصویب شده"
|
||||
},
|
||||
"MuiDatePicker": {
|
||||
"date_picker_birthday": "تاریخ"
|
||||
|
||||
@@ -1,90 +1,246 @@
|
||||
import FullPageLayout from "@/layouts/FullPageLayout";
|
||||
import CenterLayout from "@/layouts/CenterLayout";
|
||||
import {Box, Divider, Stack, Typography} from "@mui/material";
|
||||
import {useEffect, useState} from "react";
|
||||
import {Box, Stack, Typography, Card, CardContent, CardHeader, useTheme, useMediaQuery} from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
import useRequest from "@/lib/app/hooks/useRequest";
|
||||
import {useTranslations} from "next-intl";
|
||||
import {GET_LOAN_STATISTICS} from "@/core/data/apiRoutes";
|
||||
|
||||
const DashboardFirstComponent = () => {
|
||||
const requestServer = useRequest({auth: true, notification: false});
|
||||
const [data, setData] = useState(null);
|
||||
const theme = useTheme();
|
||||
const t = useTranslations();
|
||||
const requestServer = useRequest({ auth: true, notification: false });
|
||||
const [data, setData] = useState(null);
|
||||
const isXL = useMediaQuery(theme.breakpoints.up('xl'));
|
||||
|
||||
useEffect(() => {
|
||||
requestServer(`${process.env.NEXT_PUBLIC_BASE_URL}/dashboard/reports/navgan/statistics`, "get")
|
||||
.then((res) => {
|
||||
setData(res.data.data);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
requestServer(
|
||||
`${GET_LOAN_STATISTICS}`,
|
||||
"get"
|
||||
)
|
||||
.then((res) => {
|
||||
setData(res.data.data);
|
||||
})
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
|
||||
if (!data) return "";
|
||||
if (!data) return "";
|
||||
|
||||
return (<>
|
||||
<FullPageLayout>
|
||||
<CenterLayout>
|
||||
<Box sx={{width: 600}}>
|
||||
<Divider>وام های واجد شرایط</Divider>
|
||||
<Stack
|
||||
sx={{py: 2, px: 1}}
|
||||
direction={"row"}
|
||||
alignItems={"center"}
|
||||
justifyContent={"space-between"}
|
||||
return (
|
||||
<>
|
||||
<FullPageLayout>
|
||||
<CenterLayout>
|
||||
<Stack sx={{ display: 'flex', justifyContent: 'center', gap: '20px' ,width: '100%' , flexDirection: "row",padding: 3, alignItems: 'flex-end',}}>
|
||||
<Card sx={{height:"200px" , width: '20%', boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px", borderRadius: '5px' }}>
|
||||
<CardHeader
|
||||
sx={{
|
||||
height: '50px',
|
||||
backgroundColor: 'rgba(8, 64, 112, 0.08)',
|
||||
color: 'primary.main',
|
||||
textAlign:'center',
|
||||
}}
|
||||
titleTypographyProps={{
|
||||
variant: 'body1',
|
||||
sx: {
|
||||
textAlign: 'center',
|
||||
fontWeight: 'bold',
|
||||
[theme.breakpoints.down('xl')]: {
|
||||
fontSize: '12px',
|
||||
},
|
||||
}
|
||||
}}
|
||||
title={t("Dashboard.total_number_loan_offers")}
|
||||
/>
|
||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent:'center', height: 'calc(100% - 50px)', padding: "0 !important"}}>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: '6px solid',
|
||||
borderColor: 'primary.main',
|
||||
borderRadius: '6px 6px 6px 6px',
|
||||
width: '90%',
|
||||
textAlign:'center',
|
||||
}}
|
||||
>
|
||||
<Typography>تعداد کل</Typography>
|
||||
<Typography variant={"h5"}>
|
||||
{Number(data.totalApprovedLoans).toLocaleString("en")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Divider sx={{mt: 2}}>وام های پیشنهادی</Divider>
|
||||
<Stack
|
||||
sx={{py: 2, px: 1}}
|
||||
direction={"row"}
|
||||
alignItems={"center"}
|
||||
justifyContent={"space-between"}
|
||||
>
|
||||
<Typography>تعداد کل</Typography>
|
||||
<Typography variant={"h5"}>
|
||||
<Typography variant={isXL ? 'h5' : 'h6'} sx={{lineHeight: 1.5 , fontWeight:'bold'}}>
|
||||
{Number(data.proposedCount).toLocaleString("en")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{py: 2, px: 1}}
|
||||
direction={"row"}
|
||||
alignItems={"center"}
|
||||
justifyContent={"space-between"}
|
||||
</Box>
|
||||
<Box component={'img'} sx={{width: '40px', height: '40px', mt:2}}
|
||||
src={'/images/pie-chart.png'}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card sx={{height:"250px" , width: '20%', boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px", borderRadius: '5px' }}>
|
||||
<CardHeader
|
||||
sx={{
|
||||
height: '50px',
|
||||
backgroundColor: 'rgba(8, 64, 112, 0.08)',
|
||||
color: 'primary.main',
|
||||
textAlign:'center',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
titleTypographyProps={{
|
||||
variant: 'body1',
|
||||
sx: {
|
||||
textAlign: 'center',
|
||||
fontWeight: 'bold',
|
||||
[theme.breakpoints.down('xl')]: {
|
||||
fontSize: '12px',
|
||||
},
|
||||
}
|
||||
}}
|
||||
title={t("Dashboard.total_amount_proposed_loan")}
|
||||
/>
|
||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent:'center', height: 'calc(100% - 50px)', padding: "0 !important"}}>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: '6px solid',
|
||||
borderColor: 'primary.main',
|
||||
borderRadius: '6px 6px 6px 6px',
|
||||
width: '90%',
|
||||
textAlign:'center',
|
||||
}}
|
||||
>
|
||||
<Typography>مبلغ کل (میلیون ریال)</Typography>
|
||||
<Typography variant={"h5"}>
|
||||
{Number(data.totalProposedAmount / 1000000).toLocaleString("en")}
|
||||
<Typography variant={isXL ? 'h5' : 'h6'} sx={{ lineHeight: 1.5, fontWeight: 'bold' }}>
|
||||
{(Number(data.totalProposedAmount)/1000000).toLocaleString("en")}
|
||||
<Box component="span" sx={{ fontSize: '9px' , paddingLeft: '3px'}}>
|
||||
{t("million_rial")}
|
||||
</Box>
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Divider sx={{mt: 2}}>وام های تصویب شده</Divider>
|
||||
<Stack
|
||||
sx={{py: 2, px: 1}}
|
||||
direction={"row"}
|
||||
alignItems={"center"}
|
||||
justifyContent={"space-between"}
|
||||
</Box>
|
||||
<Box component={'img'} sx={{width: '40px', height: '40px' , mt:2}}
|
||||
src={'/images/rial.png'}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card sx={{height:"300px", width: '20%', boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px", borderRadius: '5px' }}>
|
||||
<CardHeader
|
||||
sx={{
|
||||
height: '50px',
|
||||
backgroundColor: 'rgba(8, 64, 112, 0.08)',
|
||||
color: 'primary.main',
|
||||
textAlign:'center',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
titleTypographyProps={{
|
||||
variant: 'body1',
|
||||
sx: {
|
||||
textAlign: 'center',
|
||||
fontWeight: 'bold',
|
||||
[theme.breakpoints.down('xl')]: {
|
||||
fontSize: '12px',
|
||||
},
|
||||
}
|
||||
}}
|
||||
title={t("Dashboard.total_number_requests")}
|
||||
/>
|
||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent:'center', height: 'calc(100% - 50px)', padding: "0 !important"}}>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: '6px solid',
|
||||
borderColor: 'primary.main',
|
||||
borderRadius: '6px 6px 6px 6px',
|
||||
width: '90%',
|
||||
textAlign:'center',
|
||||
}}
|
||||
>
|
||||
<Typography>تعداد کل</Typography>
|
||||
<Typography variant={"h5"}>
|
||||
<Typography variant={isXL ? 'h5' : 'h6'} sx={{lineHeight: 1.5 , fontWeight:'bold'}}>
|
||||
{Number(data.totalApprovedLoans).toLocaleString("en")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box component={'img'} sx={{width: '40px', height: '40px' , mt:2}}
|
||||
src={'/images/pie-chart.png'}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card sx={{height:"250px", width: '20%', boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px", borderRadius: '5px' }}>
|
||||
<CardHeader
|
||||
sx={{
|
||||
height: '50px',
|
||||
backgroundColor: 'rgba(8, 64, 112, 0.08)',
|
||||
color: 'primary.main',
|
||||
textAlign:'center',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
titleTypographyProps={{
|
||||
variant: 'body1',
|
||||
sx: {
|
||||
textAlign: 'center',
|
||||
fontWeight: 'bold',
|
||||
[theme.breakpoints.down('xl')]: {
|
||||
fontSize: '12px',
|
||||
},
|
||||
}
|
||||
}}
|
||||
title={t("Dashboard.total_amount_approved_loans")}
|
||||
/>
|
||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent:'center', height: 'calc(100% - 50px)', padding: "0 !important"}}>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: '6px solid',
|
||||
borderColor: 'primary.main',
|
||||
borderRadius: '6px 6px 6px 6px',
|
||||
width: '90%',
|
||||
textAlign:'center',
|
||||
}}
|
||||
>
|
||||
<Typography variant={isXL ? 'h5' : 'h6'} sx={{ lineHeight: 1.5, fontWeight: 'bold' }}>
|
||||
{(Number(data.totalApprovedAmount) / 1000000).toLocaleString("en")}
|
||||
<Box component="span" sx={{ fontSize: '9px' , paddingLeft: '3px' }}>
|
||||
{t("million_rial")}
|
||||
</Box>
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box component={'img'} sx={{width: '40px', height: '40px' , mt:2}}
|
||||
src={'/images/rial.png'}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card sx={{height:"200px", width: '20%', boxShadow: "rgba(0, 0, 0, 0.15) 0px 5px 15px 0px", borderRadius: '5px' }}>
|
||||
<CardHeader
|
||||
sx={{
|
||||
height: '50px',
|
||||
backgroundColor: 'rgba(8, 64, 112, 0.08)',
|
||||
color: 'primary.main',
|
||||
textAlign:'center',
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
titleTypographyProps={{
|
||||
variant: 'body1',
|
||||
sx: {
|
||||
textAlign: 'center',
|
||||
fontWeight: 'bold',
|
||||
[theme.breakpoints.down('xl')]: {
|
||||
fontSize: '12px',
|
||||
},
|
||||
}
|
||||
}}
|
||||
title={t("Dashboard.number_approved_loans")}
|
||||
/>
|
||||
<CardContent sx={{display: 'flex', flexDirection: 'column', alignItems: 'center' , justifyContent:'center', height: 'calc(100% - 50px)' , padding: "0 !important"}}>
|
||||
<Box
|
||||
sx={{
|
||||
borderBottom: '6px solid',
|
||||
borderColor: 'primary.main',
|
||||
borderRadius: '6px 6px 6px 6px',
|
||||
width: '90%',
|
||||
textAlign:'center',
|
||||
alignSelf: 'center',
|
||||
}}
|
||||
>
|
||||
<Typography variant={isXL ? 'h5' : 'h6'} sx={{lineHeight: 1.5 , fontWeight:'bold'}}>
|
||||
{Number(data.approvedCount).toLocaleString("en")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
<Stack
|
||||
sx={{py: 2, px: 1}}
|
||||
direction={"row"}
|
||||
alignItems={"center"}
|
||||
justifyContent={"space-between"}
|
||||
>
|
||||
<Typography>مبلغ کل (میلیون ریال)</Typography>
|
||||
<Typography variant={"h5"}>
|
||||
{Number(data.totalApprovedAmount / 1000000).toLocaleString("en")}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Box>
|
||||
</CenterLayout>
|
||||
</FullPageLayout>
|
||||
</>);
|
||||
</Box>
|
||||
<Box component={'img'} sx={{width: '40px', height: '40px' , mt:2}}
|
||||
src={'/images/pie-chart.png'}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Stack>
|
||||
</CenterLayout>
|
||||
</FullPageLayout>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardFirstComponent;
|
||||
@@ -20,7 +20,7 @@ const PrintFormA = () => {
|
||||
params.set("filters", '[]');
|
||||
params.set("sorting", '[]');
|
||||
requestServer(`${GET_PASSENGER_BOSS}?${params}`, 'get').then((response) => {
|
||||
const _chunkSize = 10
|
||||
const _chunkSize = 6
|
||||
const _data = response.data.data
|
||||
const chunk = Array.from({length: Math.ceil(_data.length / _chunkSize)}, (v, i) =>
|
||||
_data.slice(i * _chunkSize, i * _chunkSize + _chunkSize)
|
||||
|
||||
@@ -42,69 +42,44 @@ const Content = ({data}) => {
|
||||
<th colSpan={2} style={{border: '1px solid'}}>میزان تسهیلات مصوب<br/>(میلیارد ریال)</th>
|
||||
<th colSpan={5} style={{border: '1px solid'}}>وضعیت طرح</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 75
|
||||
}}>درصد
|
||||
پیشرفت<br/>فیزیکی
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 75
|
||||
}}>شهرستان
|
||||
محل<br/>اجرا
|
||||
</th>
|
||||
<th rowSpan={2}
|
||||
style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 75
|
||||
}}>اشتغال<br/>تعهد شده
|
||||
(نفر)
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 80
|
||||
}}>پیش بینی
|
||||
تاریخ<br/>بهره برداری پس<br/>از
|
||||
اخذ تسهیلات
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 55
|
||||
}}>بانک
|
||||
عامل
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 50
|
||||
}}>نرخ سود
|
||||
(درصد)
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 55
|
||||
}}>دوره تنفس
|
||||
(ماه)
|
||||
</th>
|
||||
<th rowSpan={2} style={{
|
||||
writingMode: 'vertical-rl',
|
||||
textOrientation: 'sideways',
|
||||
transform: 'rotate(180deg)',
|
||||
border: '1px solid'
|
||||
transform: "rotate(270deg)", border: '1px solid', width: 75
|
||||
}}>طول
|
||||
دوره<br/>بازپرداخت (ماه)
|
||||
</th>
|
||||
|
||||
@@ -6,7 +6,7 @@ const Items = ({data}) => {
|
||||
|
||||
useEffect(() => {
|
||||
let arr = []
|
||||
for (let i = 0; i < 10; i++) {
|
||||
for (let i = 0; i < 6; i++) {
|
||||
if (data[i]) {
|
||||
let _item = {}
|
||||
_item.name = data[i].name
|
||||
|
||||
@@ -38,7 +38,7 @@ const Content = ({data}) => {
|
||||
<Box
|
||||
sx={{border: 1, bgcolor: '#f0f0f0'}}>
|
||||
<Typography fontSize={14} fontWeight={'bold'} sx={{fontFamily: 'Bnazanin'}} textAlign={'center'}>
|
||||
{`فرم خلاصه اطلاعات تایید شده طرح متقاضی استفاده از تسهیلات موضوع جزء 1 تا 9 بند (الف) تبصره (18) قانون بودجه سال 1402 کل کشور (فرم ب)`}
|
||||
{`فرم خلاصه اطلاعات تایید شده طرح متقاضی استفاده از تسهیلات موضوع جزء 1 تا 9 بند (الف) تبصره (18) قانون بودجه سال 1401 کل کشور (فرم ب)`}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box sx={{mt: .5, border: 1, p: 0.5}}>
|
||||
|
||||
@@ -231,3 +231,7 @@ export const GET_LOAN_DISTRIBUTION = BASE_URL + "/dashboard/reports/navgan/loan_
|
||||
export const GET_LOAN_HISTORY = BASE_URL + "/dashboard/navgan_loans"
|
||||
export const GET_HISTORY_DETAIL = BASE_URL + "/dashboard/navgan_loans"
|
||||
export const EXPORT_LOAN_HISTORY = BASE_URL + "/dashboard/navgan_loans/export"
|
||||
|
||||
// loan statistics
|
||||
export const GET_LOAN_STATISTICS = BASE_URL + "/dashboard/reports/navgan/statistics"
|
||||
|
||||
|
||||
@@ -44,6 +44,15 @@ const sidebarMenu = [
|
||||
selected: false,
|
||||
permission: "view_navgan_loans",
|
||||
},
|
||||
{
|
||||
key: "sidebar.loan-history-province",
|
||||
name: "loan-history",
|
||||
type: "page",
|
||||
route: "/dashboard/loan-history",
|
||||
icon: <SecurityIcon sx={{width: 'inherit', height: 'inherit'}}/>,
|
||||
selected: false,
|
||||
permission: "view_navgan_loans_province",
|
||||
},
|
||||
], [
|
||||
{
|
||||
key: "sidebar.passenger-office-chief",
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function getServerSideProps({req, locale}) {
|
||||
title: "Dashboard.loan_history",
|
||||
isBot,
|
||||
locale,
|
||||
layout: {name: 'DashboardLayout', props: {permissions: ["view_navgan_loans"]}}
|
||||
layout: {name: 'DashboardLayout', props: {permissions: ["view_navgan_loans", "view_navgan_loans_province"]}}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user