diff --git a/src/pages/dashboard/ModalUser/PurchaseTab.tsx b/src/pages/dashboard/ModalUser/PurchaseTab.tsx index f21eb18..bfc9951 100644 --- a/src/pages/dashboard/ModalUser/PurchaseTab.tsx +++ b/src/pages/dashboard/ModalUser/PurchaseTab.tsx @@ -25,7 +25,6 @@ const COLUMNS: GridColDef[] = [ { field: "amount", headerName: "Кол-во", - type: "number", width: 70, sortable: false, }, diff --git a/src/pages/dashboard/ModalUser/TransactionsTab.tsx b/src/pages/dashboard/ModalUser/TransactionsTab.tsx new file mode 100644 index 0000000..4ce0bfb --- /dev/null +++ b/src/pages/dashboard/ModalUser/TransactionsTab.tsx @@ -0,0 +1,138 @@ +import { DataGrid } from "@mui/x-data-grid"; +import { Typography, useTheme } from "@mui/material"; + +import type { GridColDef } from "@mui/x-data-grid"; + +const COLUMNS: GridColDef[] = [ + { + field: "date", + headerName: "Дата", + width: 130, + sortable: false, + }, + { + field: "time", + headerName: "Время", + width: 90, + sortable: false, + }, + { + field: "amount", + headerName: "Сумма", + width: 140, + sortable: false, + }, + { + field: "email", + headerName: "Email", + width: 280, + sortable: false, + }, + { + field: "status", + headerName: "Статус", + width: 100, + sortable: false, + renderCell: ({ value }) => ( + + {value ? "accepted" : "timeout"} + + ), + }, +]; + +const ROWS = [ + { + id: "row_1", + date: "19.02.2023", + time: "17:01", + amount: "2 065 руб.", + email: "emailexample@gmail.com", + status: true, + }, + { + id: "row_2", + date: "28.02.2023", + time: "10:43", + amount: "21 250 руб.", + email: "verylongemailexample@gmail.com", + status: true, + }, + { + id: "row_3", + date: "04.03.2023", + time: "21:09", + amount: "108 065 руб.", + email: "emailexample@gmail.com", + status: false, + }, +]; + +export const TransactionsTab = () => { + const theme = useTheme(); + + return ( + + ); +}; diff --git a/src/pages/dashboard/ModalUser/index.tsx b/src/pages/dashboard/ModalUser/index.tsx index 14f470d..3351116 100644 --- a/src/pages/dashboard/ModalUser/index.tsx +++ b/src/pages/dashboard/ModalUser/index.tsx @@ -12,6 +12,7 @@ import { import { UserTab } from "./UserTab"; import { PurchaseTab } from "./PurchaseTab"; +import { TransactionsTab } from "./TransactionsTab"; import { authStore } from "@root/stores/auth"; import theme from "@root/theme"; @@ -101,6 +102,7 @@ const ModalUser = () => { textAlign: "center", fontSize: "18px", padding: "12px", + color: theme.palette.common.white, background: "#9A9AAF", }} > @@ -164,6 +166,7 @@ const ModalUser = () => { /> )} {value === 1 && } + {value === 2 && }