Skip to content

Commit

Permalink
Merge pull request #38 from Juanpi92/statistic
Browse files Browse the repository at this point in the history
feat(EditProduct.jsx) Creating edit product component and functionality
  • Loading branch information
Juanpi92 authored Sep 15, 2023
2 parents 62af69b + c51ef74 commit 6e28a7a
Show file tree
Hide file tree
Showing 22 changed files with 332 additions and 522 deletions.
8 changes: 6 additions & 2 deletions src/components/AdminProductsList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ const ProductsActionBar = ({ product, setProductToShow }) => {
};

const ProductListItem = ({ product, setDataToEdit }) => {
const { setLoader } = useContext(AppContext);
const { setShowProductModal, setIsAddProduct, setLoader } =
useContext(AppContext);
let { id, name, type, portion, price, src } = product;
const state = useSelector((state) => state);
const userAdmin = state.user;
const dispatch = useDispatch();

const handleDelete = async (id) => {
try {
const options = {
Expand All @@ -113,7 +115,7 @@ const ProductListItem = ({ product, setDataToEdit }) => {
setLoader(false);
} catch (error) {
setLoader(false);
console.log(error);
alert("Ocurreu um error");
}
};
return (
Expand All @@ -127,6 +129,8 @@ const ProductListItem = ({ product, setDataToEdit }) => {
className="option_icon"
onClick={() => {
setDataToEdit(product);
setShowProductModal(true);
setIsAddProduct(false);
}}
/>
<ClearOutlined
Expand Down
65 changes: 0 additions & 65 deletions src/components/CartCompras.css

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/CartComprasAdmin.css

This file was deleted.

42 changes: 0 additions & 42 deletions src/components/CartComprasAdmin.jsx

This file was deleted.

54 changes: 0 additions & 54 deletions src/components/CartItemProductAdmin.jsx

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/CartModalComprasAdmin.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/components/CartProductAdmin.css

This file was deleted.

30 changes: 21 additions & 9 deletions src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import React from "react";
import "./styles.css";
import { FacebookOutlined, Instagram, Twitter } from "@mui/icons-material";
import { useNavigate } from "react-router-dom";

function Footer() {
const navigate = useNavigate();
return (
<footer className="footer" style={{ backgroundColor: '#046a38' }}>
<footer className="footer" style={{ backgroundColor: "#046a38" }}>
<div className="container">
<div className="footer-content">
<div className="footer-about">
<h1 className='header-logo-title'>
<h1 className="header-logo-title">
VEGETANIZAND
<img src={'./imagenes/new-logo.png'} alt="Vegetanizando logo" className="app-logo" />
<img
src={"./imagenes/new-logo.png"}
alt="Vegetanizando logo"
className="app-logo"
/>
</h1>
</div>
<div className="social-links">
Expand All @@ -30,20 +36,26 @@ function Footer() {
<div className="contact-links">
<p className="description">Contato</p>
<ul>
<li><i className="fa-solid fa-house"></i> Coliseo 18. Maracanã. Rio de Janeiro. RJ. CEP: 105682-21</li>
<li><i className="fa-solid fa-phone"></i> 21 970657890</li>
<li><i className="fa-solid fa-envelope"></i> [email protected]</li>
<li>
<i className="fa-solid fa-house"></i> Coliseo 18. Maracanã. Rio
de Janeiro. RJ. CEP: 105682-21
</li>
<li>
<i className="fa-solid fa-phone"></i> 21 970657890
</li>
<li>
<i className="fa-solid fa-envelope"></i> [email protected]
</li>
</ul>
</div>
</div>

</div>
<div className="footer-bar">
<div className="container">
<div className="copyright">
Vegetanizando © 2023. All Rights Reserved.
</div>
<div className="developed-by">
<div className="developed-by" onClick={() => navigate("/admin")}>
Desenvolvido por Label Soluções em TI
</div>
</div>
Expand All @@ -52,4 +64,4 @@ function Footer() {
);
}

export default Footer;
export default Footer;
23 changes: 11 additions & 12 deletions src/components/Footer/styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.footer {
background-color: #046a38;
color: #fff;
Expand All @@ -24,7 +23,7 @@
.social-links,
.contact-links {
flex: 1;
text-align: center;
text-align: center;
}

.header-logo-title {
Expand All @@ -41,7 +40,7 @@
.social-icons {
display: flex;
gap: 10px;
justify-content: center;
justify-content: center;
}

.social-icons a {
Expand All @@ -53,8 +52,8 @@
.description {
font-weight: bold;
font-size: 18px;
margin: 0;
padding: 10px 0;
margin: 0;
padding: 10px 0;
}

ul {
Expand All @@ -67,20 +66,20 @@ li {
}

.fa-solid {
font-family: 'Font Awesome 5 Free';
font-family: "Font Awesome 5 Free";
font-weight: 900;
}

.fa-house::before {
content: '\f015';
content: "\f015";
}

.fa-phone::before {
content: '\f095';
content: "\f095";
}

.fa-envelope::before {
content: '\f0e0';
content: "\f0e0";
}

.footer-bar {
Expand All @@ -103,17 +102,17 @@ li {
.developed-by {
font-size: 14px;
text-align: right;
cursor: pointer;
}


@media (max-width: 768px) {
.footer {
padding-bottom: 4rem;
}

.footer-content {
flex-direction: column;
align-items: center;
align-items: center;
}

.header-logo-title {
Expand All @@ -124,4 +123,4 @@ li {
.app-logo {
margin-left: 0;
}
}
}
Loading

0 comments on commit 6e28a7a

Please sign in to comment.