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

Cambios #92

Open
wants to merge 1 commit into
base: react-admin
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
15,007 changes: 10,260 additions & 4,747 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@mui/icons-material": "^5.4.4",
"@mui/material": "^5.4.4",
"@mui/x-data-grid": "^5.5.1",
"@reduxjs/toolkit": "^1.9.3",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
Expand Down
10 changes: 5 additions & 5 deletions src/components/datatable/Datatable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ const Datatable = () => {
return (
<div className="cellAction">
<Link to="/users/test" style={{ textDecoration: "none" }}>
<div className="viewButton">View</div>
<div className="viewButton">Editar</div>
</Link>
<div
{/* <div
className="deleteButton"
onClick={() => handleDelete(params.row.id)}
>
Delete
</div>
</div> */}
</div>
);
},
Expand All @@ -36,9 +36,9 @@ const Datatable = () => {
return (
<div className="datatable">
<div className="datatableTitle">
Add New User
Tabla Clientes
<Link to="/users/new" className="link">
Add New
Nuevo Cliente
</Link>
</div>
<DataGrid
Expand Down
4 changes: 4 additions & 0 deletions src/components/navbar/navbar.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.navbar {
position: sticky;
top: 0;
left: 0;
height: 50px;
border-bottom: 0.5px solid rgb(231, 228, 228);
display: flex;
align-items: center;
font-size: 14px;
color: #555;
background-color: white;

.wrapper {
width: 100%;
Expand Down
78 changes: 15 additions & 63 deletions src/components/sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
@@ -1,101 +1,53 @@
import "./sidebar.scss";
import DashboardIcon from "@mui/icons-material/Dashboard";
import PersonOutlineIcon from "@mui/icons-material/PersonOutline";
import LocalShippingIcon from "@mui/icons-material/LocalShipping";
import CreditCardIcon from "@mui/icons-material/CreditCard";
import StoreIcon from "@mui/icons-material/Store";
import InsertChartIcon from "@mui/icons-material/InsertChart";
import SettingsApplicationsIcon from "@mui/icons-material/SettingsApplications";
import ExitToAppIcon from "@mui/icons-material/ExitToApp";
import NotificationsNoneIcon from "@mui/icons-material/NotificationsNone";
import SettingsSystemDaydreamOutlinedIcon from "@mui/icons-material/SettingsSystemDaydreamOutlined";
import PsychologyOutlinedIcon from "@mui/icons-material/PsychologyOutlined";
import AccountCircleOutlinedIcon from "@mui/icons-material/AccountCircleOutlined";

import { Link } from "react-router-dom";
import { DarkModeContext } from "../../context/darkModeContext";
import { useContext } from "react";
import { AddBoxSharp } from "@mui/icons-material";

const Sidebar = () => {
const { dispatch } = useContext(DarkModeContext);
return (
<div className="sidebar">
<div className="top">
<Link to="/" style={{ textDecoration: "none" }}>
<span className="logo">lamadmin</span>
<span className="logo">Jessica Cuadrado</span>
</Link>
</div>
<hr />
<div className="center">
<ul>
<p className="title">MAIN</p>
<li>
<DashboardIcon className="icon" />
<span>Dashboard</span>
</li>
<p className="title">LISTS</p>
<Link to="/" style={{ textDecoration: "none" }}>
<li>
<DashboardIcon className="icon" />
<span>Dashboard</span>
</li>
</Link>

<Link to="/users" style={{ textDecoration: "none" }}>
<li>
<PersonOutlineIcon className="icon" />
<span>Users</span>
<span>Clinetes</span>
</li>
</Link>
<Link to="/products" style={{ textDecoration: "none" }}>
<li>
<StoreIcon className="icon" />
<span>Products</span>
<span>Provedores</span>
</li>
</Link>
<li>
<CreditCardIcon className="icon" />
<span>Orders</span>
</li>
<li>
<LocalShippingIcon className="icon" />
<span>Delivery</span>
</li>
<p className="title">USEFUL</p>
<li>
<InsertChartIcon className="icon" />
<span>Stats</span>
</li>
<li>
<NotificationsNoneIcon className="icon" />
<span>Notifications</span>
</li>
<p className="title">SERVICE</p>
<li>
<SettingsSystemDaydreamOutlinedIcon className="icon" />
<span>System Health</span>
</li>
<li>
<PsychologyOutlinedIcon className="icon" />
<span>Logs</span>
</li>
<li>
<SettingsApplicationsIcon className="icon" />
<span>Settings</span>
</li>
<p className="title">USER</p>
<li>
<AccountCircleOutlinedIcon className="icon" />
<span>Profile</span>
<AddBoxSharp className="icon" />
<span>Articulos</span>
</li>

<li>
<ExitToAppIcon className="icon" />
<span>Logout</span>
</li>
</ul>
</div>
<div className="bottom">
<div
className="colorOption"
onClick={() => dispatch({ type: "LIGHT" })}
></div>
<div
className="colorOption"
onClick={() => dispatch({ type: "DARK" })}
></div>
</div>
</div>
);
};
Expand Down
53 changes: 28 additions & 25 deletions src/components/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
border-right: 0.5px solid rgb(230, 227, 227);
min-height: 100vh;
background-color: white;
position: sticky;
top: 0;
left: 0;

.top {
height: 50px;
Expand Down Expand Up @@ -53,38 +56,38 @@
color: #7451f8;
}

span{
font-size: 13px;
font-weight: 600;
color: #888;
margin-left: 10px;
span {
font-size: 13px;
font-weight: 600;
color: #888;
margin-left: 10px;
}
}
}
}

.bottom{
display: flex;
align-items: center;
margin: 10px;
.bottom {
display: flex;
align-items: center;
margin: 10px;

.colorOption{
width: 20px;
height: 20px;
border-radius: 5px;
border: 1px solid #7451f8;
cursor: pointer;
margin: 5px;
.colorOption {
width: 20px;
height: 20px;
border-radius: 5px;
border: 1px solid #7451f8;
cursor: pointer;
margin: 5px;

&:nth-child(1){
background-color: whitesmoke;
}
&:nth-child(2){
background-color: #333;
}
&:nth-child(3){
background-color: darkblue;
}
&:nth-child(1) {
background-color: whitesmoke;
}
&:nth-child(2) {
background-color: #333;
}
&:nth-child(3) {
background-color: darkblue;
}
}
}
}
2 changes: 1 addition & 1 deletion src/components/table/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const List = () => {
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell className="tableCell">Tracking ID</TableCell>
<TableCell className="tableCell">Tracking ID </TableCell>
<TableCell className="tableCell">Product</TableCell>
<TableCell className="tableCell">Customer</TableCell>
<TableCell className="tableCell">Date</TableCell>
Expand Down
37 changes: 21 additions & 16 deletions src/datatablesource.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const userColumns = [
{ field: "id", headerName: "ID", width: 70 },
{
field: "user",
headerName: "User",
field: "name",
headerName: "Nombre",
width: 230,
renderCell: (params) => {
return (
Expand All @@ -14,28 +14,33 @@ export const userColumns = [
},
},
{
field: "email",
headerName: "Email",
field: "lastname",
headerName: "Apellido",
width: 230,
},

{
field: "age",
headerName: "Age",
field: "cedula",
headerName: "Cedula",
width: 100,
},
{
field: "status",
headerName: "Status",
width: 160,
renderCell: (params) => {
return (
<div className={`cellWithStatus ${params.row.status}`}>
{params.row.status}
</div>
);
},
field: "movil",
headerName: "Telefono",
width: 100,
},
// {
// field: "status",
// headerName: "Estado",
// width: 160,
// renderCell: (params) => {
// return (
// <div className={`cellWithStatus ${params.row.status}`}>
// {params.row.status}
// </div>
// );
// },
// },
];

//temporary data
Expand Down
6 changes: 3 additions & 3 deletions src/pages/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const Home = () => {
<div className="home">
<Sidebar />
<div className="homeContainer">
<Navbar />
<div className="widgets">
{/* <Navbar /> */}
{/* <div className="widgets">
<Widget type="user" />
<Widget type="order" />
<Widget type="earning" />
<Widget type="balance" />
</div>
</div> */}
<div className="charts">
<Featured />
<Chart title="Last 6 Months (Revenue)" aspect={2 / 1} />
Expand Down
20 changes: 10 additions & 10 deletions src/pages/list/List.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import "./list.scss"
import Sidebar from "../../components/sidebar/Sidebar"
import Navbar from "../../components/navbar/Navbar"
import Datatable from "../../components/datatable/Datatable"
import "./list.scss";
import Sidebar from "../../components/sidebar/Sidebar";
import Navbar from "../../components/navbar/Navbar";
import Datatable from "../../components/datatable/Datatable";

const List = () => {
return (
<div className="list">
<Sidebar/>
<Sidebar />
<div className="listContainer">
<Navbar/>
<Datatable/>
<Navbar />
<Datatable />
</div>
</div>
)
}
);
};

export default List
export default List;
16 changes: 16 additions & 0 deletions src/pages/single/CardHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Grid, Typography } from "@mui/material";

const CardHeader = () => {
return (
<Grid container spacing={2}>
<Grid item xs={12} mb={6}>
<Typography>Hola</Typography>
</Grid>
<Grid item xs={12} mb={6}>
<Typography>Como estas</Typography>
</Grid>
</Grid>
);
};

export default CardHeader;
Loading