Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'master' of https://github.com/Aimeeferreira/react-admin-dashboard #28

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"workbench.editor.languageDetectionHints": {
"untitledEditors": false,
"notebookEditors": false
},
"cSpell.words": [
"acessorios"
]
}
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
# React Admin Dashboard

Build a COMPLETE React Admin Dashboard App | React, Material UI, Data Grid, Light & Dark Mode

Video: https://www.youtube.com/watch?v=wYpCWwD1oz0

For all related questions and discussions about this project, check out the discord: https://discord.gg/2FfPeEk2mX
44,048 changes: 35,080 additions & 8,968 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 24 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@fullcalendar/core": "^5.11.3",
"@fullcalendar/daygrid": "^5.11.3",
"@fullcalendar/interaction": "^5.11.3",
Expand All @@ -14,39 +17,42 @@
"@mui/icons-material": "^5.10.3",
"@mui/material": "^5.10.5",
"@mui/x-data-grid": "^5.17.2",
"@nivo/bar": "^0.80.0",
"@nivo/core": "^0.79.0",
"@nivo/geo": "^0.80.0",
"@nivo/line": "^0.79.1",
"@nivo/pie": "^0.80.0",
"@mui/x-data-grid-pro": "^6.16.3",
"@nivo/bar": "^0.83.0",
"@nivo/core": "^0.83.0",
"@nivo/geo": "^0.83.0",
"@nivo/line": "^0.83.0",
"@nivo/pie": "^0.83.0",
"@reduxjs/toolkit": "^1.8.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"chart.js": "^3.9.1",
"firebase": "^10.5.0",
"formik": "^2.2.9",
"html2canvas": "^1.4.1",
"install": "^0.13.0",
"notistack": "^3.0.1",
"npm": "^10.2.0",
"react": "^18.2.0",
"react-chartjs-2": "^4.3.1",
"react-dom": "^18.2.0",
"react-firebase-hooks": "^5.1.1",
"react-input-mask": "^2.0.4",
"react-pro-sidebar": "^0.7.1",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"swiper": "^10.3.1",
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
},
"scripts": {
"start": "PORT=5000 react-scripts start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -58,5 +64,10 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^8.50.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-react": "^7.33.2"
}
}
Binary file added public/assets/aloha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
Expand All @@ -24,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Trade Stream</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
68 changes: 41 additions & 27 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
import { useState } from "react";
import { Routes, Route } from "react-router-dom";
import Topbar from "./scenes/global/Topbar";
import { Routes, Route, useLocation } from "react-router-dom";
import Sidebar from "./scenes/global/Sidebar";
import TopBar from "./scenes/global/Topbar";
import Home from "./scenes/home";
import Dashboard from "./scenes/dashboard";
import Team from "./scenes/team";
import Invoices from "./scenes/invoices";
import Contacts from "./scenes/contacts";
import Bar from "./scenes/bar";
import Form from "./scenes/form";
import Line from "./scenes/line";
import Pie from "./scenes/pie";
import FAQ from "./scenes/faq";
import Geography from "./scenes/geography";
import Indicacao from "./scenes/indicacao";
import Premios from "./scenes/premios";
import { CssBaseline, ThemeProvider } from "@mui/material";
import { ColorModeContext, useMode } from "./theme";
import Calendar from "./scenes/calendar/calendar";
import Fidelidade from "./scenes/fidelidade";
import Entrar from "./scenes/acesso/entrar";
import Cadastro from "./scenes/acesso/cadastro";
import RedefinirSenha from "./scenes/acesso/senha";

function App() {
const [theme, colorMode] = useMode();
const [isSidebar, setIsSidebar] = useState(true);
const location = useLocation();

const pathsToHideSidebar = ["/", "/entrar", "/cadastro", "/senha"];
const shouldHideSidebar = pathsToHideSidebar.includes(location.pathname);

const pathsToHideTopBar = ["/", "/entrar", "/cadastro", "/senha"];
const shouldHideTopBar = pathsToHideTopBar.includes(location.pathname);

return (
<ColorModeContext.Provider value={colorMode}>
<ThemeProvider theme={theme}>
<CssBaseline />
<div className="app">
<Sidebar isSidebar={isSidebar} />
<main className="content">
<Topbar setIsSidebar={setIsSidebar} />
<Routes>
<Route path="/" element={<Dashboard />} />
<Route path="/team" element={<Team />} />
<Route path="/contacts" element={<Contacts />} />
<Route path="/invoices" element={<Invoices />} />
<Route path="/form" element={<Form />} />
<Route path="/bar" element={<Bar />} />
<Route path="/pie" element={<Pie />} />
<Route path="/line" element={<Line />} />
<Route path="/faq" element={<FAQ />} />
<Route path="/calendar" element={<Calendar />} />
<Route path="/geography" element={<Geography />} />
</Routes>
</main>
</div>
<CssBaseline >
<div className="app">
{!shouldHideSidebar && <Sidebar />}
<main className="content">
{!shouldHideTopBar && <TopBar />}
<Routes>
<Route path="/" element={<Home />} />
<Route path="/entrar" element={<Entrar />} />
<Route path="/cadastro" element={<Cadastro />} />
<Route path="/senha" element={<RedefinirSenha />} />
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/contacts" element={<Contacts />} />
<Route path="/invoices" element={<Invoices />} />
<Route path="/form" element={<Form />} />
<Route path="/bar" element={<Bar />} />
<Route path="/pie" element={<Pie />} />
<Route path="/line" element={<Line />} />
<Route path="/indicacao" element={<Indicacao />} />
<Route path="/premios" element={<Premios />} />
<Route path="/fidelidade" element={<Fidelidade />} />
<Route path="/calendar" element={<Calendar />} />
</Routes>
</main>
</div>
</CssBaseline>
</ThemeProvider>
</ColorModeContext.Provider>
);
Expand Down
20 changes: 20 additions & 0 deletions src/Firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { initializeApp } from "firebase/app";
import { getFirestore } from 'firebase/firestore';
import 'firebase/storage';
import { getAuth, sendPasswordResetEmail, signInWithEmailAndPassword } from 'firebase/auth';
// https://firebase.google.com/docs/web/setup#available-libraries

const firebaseConfig = {
apiKey: "AIzaSyAewUafh9Zc8zRskL8XqEU6BiZ7Jt0ekF0",
authDomain: "plataforma-tcc.firebaseapp.com",
projectId: "plataforma-tcc",
storageBucket: "plataforma-tcc.appspot.com",
messagingSenderId: "596401691762",
appId: "1:596401691762:web:3d3c070ac1806ba80f36eb"
};

const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const db = getFirestore(app);

export { auth, sendPasswordResetEmail, signInWithEmailAndPassword, db };
Binary file added src/Imgs/Clientes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imgs/Empresas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imgs/LogoAT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imgs/inicio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Imgs/variacaoLogoAT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions src/components/BarChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const BarChart = ({ isDashboard = false }) => {
},
legend: {
text: {
fill: colors.grey[100],
fill: "#000099",
fontSize: "15px",
fontWeight: "bold",
},
},
ticks: {
Expand All @@ -39,8 +41,8 @@ const BarChart = ({ isDashboard = false }) => {
},
},
}}
keys={["hot dog", "burger", "sandwich", "kebab", "fries", "donut"]}
indexBy="country"
keys={["roupas", "sapatos", "acessórios", "bolsas"]}
indexBy="cidade"
margin={{ top: 50, right: 130, bottom: 50, left: 60 }}
padding={0.3}
valueScale={{ type: "linear" }}
Expand Down Expand Up @@ -76,15 +78,15 @@ const BarChart = ({ isDashboard = false }) => {
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: isDashboard ? undefined : "country", // changed
legend: isDashboard ? undefined : "Estados",
legendPosition: "middle",
legendOffset: 32,
}}
axisLeft={{
tickSize: 5,
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: isDashboard ? undefined : "food", // changed
legend: isDashboard ? undefined : "Quantidade Total - Categorias",
legendPosition: "middle",
legendOffset: -40,
}}
Expand Down Expand Up @@ -121,7 +123,7 @@ const BarChart = ({ isDashboard = false }) => {
]}
role="application"
barAriaLabel={function (e) {
return e.id + ": " + e.formattedValue + " in country: " + e.indexValue;
return e.id + ": " + e.formattedValue + " na cidade: " + e.indexValue;
}}
/>
);
Expand Down
85 changes: 0 additions & 85 deletions src/components/GeographyChart.jsx

This file was deleted.

Loading