Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
"browser": true,
"es2021": true
},
"extends": ["plugin:react/recommended", "prettier"],
"extends": ["plugin:react/recommended"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "prettier"],
"plugins": ["react"],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],

"react/display-name": "off",
"default-param-last": "off",
"react/react-in-jsx-scope": "off",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This free MUI & React Dashboard is coming with prebuilt design blocks, so the de
switching from our pages to the real website is very easy to be done.

Special thanks go to:

- [Nepcha Analytics](https://nepcha.com?ref=readme) for the analytics tool. Nepcha is already integrated with Material Dashboard React. You can use it to gain insights into your sources of traffic.

**Documentation built by Developers**
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"@emotion/styled": "11.10.8",
"@mui/icons-material": "5.11.16",
"@mui/material": "5.12.3",
"axios": "^1.6.0",
"chart.js": "4.3.0",
"chroma-js": "2.4.2",
"cross-env": "^7.0.3",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-chartjs-2": "5.2.0",
Expand All @@ -33,8 +35,10 @@
"yup": "1.1.1"
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build",

"start": "cross-env GENERATE_SOURCEMAP=false react-scripts start",
"build": "cross-env GENERATE_SOURCEMAP=false react-scripts build",

"test": "react-scripts test",
"eject": "react-scripts eject",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start"
Expand Down
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function App() {
<Sidenav
color={sidenavColor}
brand={(transparentSidenav && !darkMode) || whiteSidenav ? brandDark : brandWhite}
brandName="Material Dashboard 2"
brandName="Co-share"
routes={routes}
onMouseEnter={handleOnMouseEnter}
onMouseLeave={handleOnMouseLeave}
Expand All @@ -167,7 +167,7 @@ export default function App() {
{layout === "vr" && <Configurator />}
<Routes>
{getRoutes(routes)}
<Route path="*" element={<Navigate to="/dashboard" />} />
<Route path="*" element={<Navigate to="/reclamation" />} />
</Routes>
</ThemeProvider>
</CacheProvider>
Expand All @@ -179,7 +179,7 @@ export default function App() {
<Sidenav
color={sidenavColor}
brand={(transparentSidenav && !darkMode) || whiteSidenav ? brandDark : brandWhite}
brandName="Material Dashboard 2"
brandName="Co-share"
routes={routes}
onMouseEnter={handleOnMouseEnter}
onMouseLeave={handleOnMouseLeave}
Expand All @@ -191,7 +191,7 @@ export default function App() {
{layout === "vr" && <Configurator />}
<Routes>
{getRoutes(routes)}
<Route path="*" element={<Navigate to="/dashboard" />} />
<Route path="*" element={<Navigate to="/reclamation" />} />
</Routes>
</ThemeProvider>
);
Expand Down
Binary file added src/assets/images/dd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions src/examples/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ function Footer({ company, links }) {
&copy; {new Date().getFullYear()}, made with
<MDBox fontSize={size.md} color="text" mb={-0.5} mx={0.25}>
<Icon color="inherit" fontSize="inherit">
favorite
Co-lance
</Icon>
</MDBox>
by
<Link href={href} target="_blank">
<MDTypography variant="button" fontWeight="medium">
&nbsp;{name}&nbsp;
{" "}
4Twin 2 Co-lance Team{" "}
</MDTypography>
</Link>
for a better web.
Expand All @@ -90,9 +91,7 @@ function Footer({ company, links }) {
mt: 0,
},
})}
>
{renderLinks()}
</MDBox>
></MDBox>
</MDBox>
);
}
Expand Down
13 changes: 0 additions & 13 deletions src/examples/Sidenav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,6 @@ function Sidenav({ color, brand, brandName, routes, ...rest }) {
}
/>
<List>{renderRoutes}</List>
<MDBox p={2} mt="auto">
<MDButton
component="a"
href="https://www.creative-tim.com/product/material-dashboard-pro-react"
target="_blank"
rel="noreferrer"
variant="gradient"
color={sidenavColor}
fullWidth
>
upgrade to pro
</MDButton>
</MDBox>
</SidenavRoot>
);
}
Expand Down
55 changes: 55 additions & 0 deletions src/layouts/Forums/data/forumsTableData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import MDBox from "components/MDBox";
import MDTypography from "components/MDTypography";
import PropTypes from "prop-types";

export default function forumsTableData(forums) {
const ForumInfo = ({ title, questions, user }) => (
<MDBox lineHeight={1} textAlign="left">
<MDTypography display="block" variant="button" fontWeight="medium">
{title}
</MDTypography>
<MDTypography variant="caption">User: {user}</MDTypography>
</MDBox>
);

ForumInfo.propTypes = {
title: PropTypes.string.isRequired,
questions: PropTypes.string.isRequired,
user: PropTypes.string.isRequired,
};

const QuestionInfo = ({ questions }) => (
<MDBox lineHeight={1} textAlign="left">
<MDTypography variant="caption">Questions: {questions}</MDTypography>
</MDBox>
);

QuestionInfo.propTypes = {
questions: PropTypes.string.isRequired,
};

const formatRows = forums.map((forum) => ({
forumInfo: (
<ForumInfo
title={forum.title}
questions={forum.questions}
user={forum.user}
/>
),
questions: <QuestionInfo questions={forum.questions} />,
action: (
<MDTypography component="a" href="#" variant="caption" color="text" fontWeight="medium">
Edit
</MDTypography>
),
}));

return {
columns: [
{ Header: "forum", accessor: "forumInfo", width: "45%", align: "left" },
{ Header: "questions", accessor: "questions", width: "20%", align: "left" },
{ Header: "action", accessor: "action", align: "center" },
],
rows: formatRows,
};
}
52 changes: 52 additions & 0 deletions src/layouts/Forums/data/forumsTableDataRelations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from "react";
import MDBox from "components/MDBox";
import MDTypography from "components/MDTypography";
import MDBadge from "components/MDBadge";
import PropTypes from "prop-types";

export default function forumsTableDataRelations(forums) {
const ForumInfo = ({ title, questions }) => (
<MDBox lineHeight={1} textAlign="left">
<MDTypography display="block" variant="button" fontWeight="medium">
{title}
</MDTypography>
<MDTypography variant="caption">{questions}</MDTypography>
</MDBox>
);
ForumInfo.propTypes = {
title: PropTypes.string.isRequired,
questions: PropTypes.string.isRequired,
};

const OwnerInfo = ({ userName, userEmail }) => (
<MDBox lineHeight={1} textAlign="left">
<MDTypography display="block" variant="caption" fontWeight="medium">
{userName}
</MDTypography>
<MDTypography variant="caption">{userEmail}</MDTypography>
</MDBox>
);
OwnerInfo.propTypes = {
userName: PropTypes.string.isRequired,
userEmail: PropTypes.string.isRequired,
};

const formatRows = forums.map((forum) => ({
forumInfo: <ForumInfo title={forum.title} questions={forum.questions} />,
owner: <OwnerInfo userName={forum.userName} userEmail={forum.userEmail} />,
action: (
<MDTypography component="a" href="#" variant="caption" color="text" fontWeight="medium">
Edit
</MDTypography>
),
}));

return {
columns: [
{ Header: "Forum", accessor: "forumInfo", width: "30%", align: "left" },
{ Header: "Owner", accessor: "owner", width: "30%", align: "left" },
{ Header: "Action", accessor: "action", align: "center" },
],
rows: formatRows,
};
}
Loading