feat: VerificationTab
This commit is contained in:
parent
e43b96bf50
commit
a2ee3168b1
@ -1,5 +1,4 @@
|
|||||||
import { DataGrid } from "@mui/x-data-grid";
|
import { DataGrid } from "@mui/x-data-grid";
|
||||||
import { useTheme } from "@mui/material";
|
|
||||||
|
|
||||||
import type { GridColDef } from "@mui/x-data-grid";
|
import type { GridColDef } from "@mui/x-data-grid";
|
||||||
|
|
||||||
@ -54,10 +53,7 @@ const ROWS = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const PurchaseTab = () => {
|
export const PurchaseTab = () => (
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DataGrid
|
<DataGrid
|
||||||
rows={ROWS}
|
rows={ROWS}
|
||||||
columns={COLUMNS}
|
columns={COLUMNS}
|
||||||
@ -103,4 +99,3 @@ export const PurchaseTab = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DataGrid } from "@mui/x-data-grid";
|
import { DataGrid } from "@mui/x-data-grid";
|
||||||
import { Typography, useTheme } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
|
|
||||||
import type { GridColDef } from "@mui/x-data-grid";
|
import type { GridColDef } from "@mui/x-data-grid";
|
||||||
|
|
||||||
@ -86,10 +86,7 @@ const ROWS = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const TransactionsTab = () => {
|
export const TransactionsTab = () => (
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DataGrid
|
<DataGrid
|
||||||
rows={ROWS}
|
rows={ROWS}
|
||||||
columns={COLUMNS}
|
columns={COLUMNS}
|
||||||
@ -135,4 +132,3 @@ export const TransactionsTab = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
|
||||||
|
38
src/pages/dashboard/ModalUser/VerificationTab.tsx
Normal file
38
src/pages/dashboard/ModalUser/VerificationTab.tsx
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { Box, Typography } from "@mui/material";
|
||||||
|
|
||||||
|
import type { File } from "./index";
|
||||||
|
|
||||||
|
type VerificationTabProps = {
|
||||||
|
files: File[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const VerificationTab = ({ files }: VerificationTabProps) => (
|
||||||
|
<Box sx={{ padding: "25px" }}>
|
||||||
|
{files.map(({ name, url }, index) => (
|
||||||
|
<Box sx={{ marginBottom: "25px" }}>
|
||||||
|
<Typography sx={{ fontWeight: "bold", fontSize: "18px" }}>
|
||||||
|
{index + 1}.{" "}
|
||||||
|
{name === "inn"
|
||||||
|
? "Скан ИНН организации (выписка из ЕГЮРЛ)"
|
||||||
|
: name === "rule"
|
||||||
|
? "Устав организации"
|
||||||
|
: name === "certificate"
|
||||||
|
? "Свидетельство о регистрации НКО"
|
||||||
|
: `Скан документа ${index + 1}`}
|
||||||
|
</Typography>
|
||||||
|
<Typography>
|
||||||
|
<a
|
||||||
|
style={{
|
||||||
|
color: "#7E2AEA",
|
||||||
|
textDecoration: "none",
|
||||||
|
fontSize: "18px",
|
||||||
|
}}
|
||||||
|
href={url}
|
||||||
|
>
|
||||||
|
{url.split("/").pop()?.split(".")?.[0]}
|
||||||
|
</a>
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
))}
|
||||||
|
</Box>
|
||||||
|
);
|
@ -13,6 +13,7 @@ import {
|
|||||||
import { UserTab } from "./UserTab";
|
import { UserTab } from "./UserTab";
|
||||||
import { PurchaseTab } from "./PurchaseTab";
|
import { PurchaseTab } from "./PurchaseTab";
|
||||||
import { TransactionsTab } from "./TransactionsTab";
|
import { TransactionsTab } from "./TransactionsTab";
|
||||||
|
import { VerificationTab } from "./VerificationTab";
|
||||||
|
|
||||||
import { authStore } from "@root/stores/auth";
|
import { authStore } from "@root/stores/auth";
|
||||||
import theme from "@root/theme";
|
import theme from "@root/theme";
|
||||||
@ -34,7 +35,7 @@ const TABS = [
|
|||||||
const baseUrl =
|
const baseUrl =
|
||||||
process.env.NODE_ENV === "production" ? "" : "https://hub.pena.digital";
|
process.env.NODE_ENV === "production" ? "" : "https://hub.pena.digital";
|
||||||
|
|
||||||
type File = {
|
export type File = {
|
||||||
name: "inn" | "rule" | "egrule" | "certificate";
|
name: "inn" | "rule" | "egrule" | "certificate";
|
||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
@ -167,6 +168,7 @@ const ModalUser = () => {
|
|||||||
)}
|
)}
|
||||||
{value === 1 && <PurchaseTab />}
|
{value === 1 && <PurchaseTab />}
|
||||||
{value === 2 && <TransactionsTab />}
|
{value === 2 && <TransactionsTab />}
|
||||||
|
{value === 3 && <VerificationTab files={user?.files || []} />}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user