download link

This commit is contained in:
2024-11-20 12:50:47 +03:30
parent f8b9dff63d
commit 8f33f3eb43
3 changed files with 60 additions and 29 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,8 @@
import { Box, Button, Checkbox, FormControlLabel, FormGroup, Stack, Typography } from "@mui/material";
import { Box, Button, Checkbox, FormControlLabel, FormGroup, Link, Stack, Typography } from "@mui/material";
import { CenterLayout } from "@witel/webapp-builder";
import { useTranslations } from "next-intl";
import { useState } from "react";
import DownloadIcon from "@mui/icons-material/Download";
const CheckRules = ({ setRulesChecked }) => {
const t = useTranslations();
@@ -97,15 +98,13 @@ const CheckRules = ({ setRulesChecked }) => {
},
{
title: "بازپرداخت",
subtitles: [
"دوره مشارکت حداکثر 6 ماهه ، تنفس حداکثر 4 ماهه و دوره بازپرداخت تسهیلات سرمایه 5 سال است.",
],
subtitles: ["دوره مشارکت حداکثر 6 ماهه ، تنفس حداکثر 4 ماهه و دوره بازپرداخت تسهیلات سرمایه 5 سال است."],
},
{
title: "واریز تسهیلات",
subtitles: [
"مبلغ وام اتوبوس طی 2 مرحله به حساب متقاضی واریز گردد.",
"مبلغ وام مینی بوس و میدل باس طی یک مرحله به حساب متقاضی واریز گردد."
"مبلغ وام مینی بوس و میدل باس طی یک مرحله به حساب متقاضی واریز گردد.",
],
},
{
@@ -125,16 +124,18 @@ const CheckRules = ({ setRulesChecked }) => {
const renderRuleContent = (content) => {
if (typeof content === "string") {
return (
<Box component="li" sx={{mb:0.5}}>
<Box key={content.index} component="li" sx={{ mb: 0.5 }}>
<Typography variant="body2">{content}</Typography>
</Box>
);
}
return (
<Box component="li" sx={{mb:0.5}}>
<Typography variant="body2" sx={{mb:0.5}}>{content.title}</Typography>
<Box key={content.index} component="li" sx={{ mb: 0.5 }}>
<Typography variant="body2" sx={{ mb: 0.5 }}>
{content.title}
</Typography>
<Box component="ul" sx={{ listStyleType: "circle", paddingLeft: "1.5rem" }}>
{content.subtitles.map((sub, index) => renderRuleContent(sub))}
{content.subtitles.map((sub, index) => renderRuleContent(sub, index))}
</Box>
</Box>
);
@@ -155,17 +156,45 @@ const CheckRules = ({ setRulesChecked }) => {
</Typography>
<Box component="ul" sx={{ listStyleType: "none", paddingLeft: "1.5rem", mb: 3 }}>
{rules.map((rule, index) => (
<Box component="li" sx={{mb:2}} key={index}>
<Typography variant="subtitle1" sx={{ fontWeight: "bold",mb:1 }}>
<Box component="li" sx={{ mb: 2 }} key={index}>
<Typography variant="subtitle1" sx={{ fontWeight: "bold", mb: 1 }}>
{rule.title}
</Typography>
<ul style={{ listStyleType: "disc", paddingLeft: "1.5rem" }}>
{rule.subtitles.map((sub, subIndex) => renderRuleContent(sub))}
{rule.subtitles.map((sub, index) => renderRuleContent(sub, index))}
</ul>
</Box>
))}
</Box>
<FormGroup sx={{ display: "flex", alignItems: "center", justifyContent: "center", mt : 5 }}>
<Stack>
<Typography variant="subtitle1" sx={{ fontWeight: "bold", fontSize: "1.1rem", mb: 2 }}>
مستندات
</Typography>
<Stack direction={"row"} spacing={4}>
<Button size={"small"} variant="contained" startIcon={<DownloadIcon />} sx={{ mb: 3 }}>
<Link
variant="subtitle1"
color={"white"}
download
underline="none"
href={"/files/قراردا عامليت.tif-.tif"}
>
قرارداد عاملیت
</Link>
</Button>
<Button size={"small"} variant="contained" startIcon={<DownloadIcon />} sx={{ mb: 3 }}>
<Link
variant="subtitle1"
color={"white"}
download
underline="none"
href={"/files/شيوه نامه تبصره 18-1402.pdf"}
>
شیوه نامه تبصره 18
</Link>
</Button>
</Stack>
<FormGroup sx={{ display: "flex", alignItems: "center", justifyContent: "center", mt: 5 }}>
<FormControlLabel
control={
<Checkbox
@@ -174,7 +203,8 @@ const CheckRules = ({ setRulesChecked }) => {
/>
}
label={t("LoanRequest.accept_all_rules")}
sx={{ textAlign: "center",
sx={{
textAlign: "center",
"& .MuiTypography-root": {
fontSize: "1rem", // Adjust font size
fontWeight: 500, // Adjust font weight (e.g., 400 for normal, 700 for bold)
@@ -182,6 +212,7 @@ const CheckRules = ({ setRulesChecked }) => {
}}
/>
</FormGroup>
</Stack>
<Stack alignItems={"center"} mt={2}>
<Button
variant="contained"