PR#7
Conversation
reloadercf
left a comment
There was a problem hiding this comment.
Ely & Liz, Me gusto mucho que su proyecto cumple con todas las funcionalidades técnicas, tengo 3 recomendaciones: la primera es la consistencia de la información, recuerden que el código tiene que ser fácil de interpretar para cualquier persona y la segunda recomendación es modularizar aun más su código, la recomendación en esto es separar las responsabilidades e implementar el uso de helpers, la tercer recomendación es incorporar más el uso de GitHub, veo solo 6 commits y eso no permite visualizar del todo el trabajo de las 2, la recomendación es que exploten al máximo las funcionalidades de GitHub, quiero destacar que hicieron TEST, eso esta cool.
| @@ -0,0 +1,36 @@ | |||
| favicon.ico,499162500000,d96ddbc4933b04e12c738ab39f469573143949ca2c39eda0a49d16f83d40c319 | |||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
|
|
There was a problem hiding this comment.
tus imágenes pueden ir en una carpeta llamada assets/img
| import React, { Fragment, useState, useEffect } from 'react'; | ||
| import coffeMilk from './imgs/coffeMilk.png'; | ||
| import coffe from './imgs/coffe.png'; | ||
| import sandwich from './imgs/sandwich.png'; | ||
| import juice from './imgs/juice.png'; | ||
| import simpleBurguer from './imgs/simpleBurguer.png'; | ||
| import doubleBurguer from './imgs/doubleBurguer.png'; | ||
| import frenchFries from './imgs/frenchFries.png'; | ||
| import onion from './imgs/onion.png'; | ||
| import smallWater from './imgs/smallWater.png'; | ||
| import bigWater from './imgs/bigWater.png'; | ||
| import smallSoda from './imgs/smallSoda.png'; | ||
| import bigSoda from './imgs/bigSoda.png'; | ||
|
|
||
|
|
||
| import { db } from './firebase/firebase-config' | ||
| import Routes from './components/Routes.js'; |
There was a problem hiding this comment.
| import React, { Fragment, useState, useEffect } from 'react'; | |
| import coffeMilk from './imgs/coffeMilk.png'; | |
| import coffe from './imgs/coffe.png'; | |
| import sandwich from './imgs/sandwich.png'; | |
| import juice from './imgs/juice.png'; | |
| import simpleBurguer from './imgs/simpleBurguer.png'; | |
| import doubleBurguer from './imgs/doubleBurguer.png'; | |
| import frenchFries from './imgs/frenchFries.png'; | |
| import onion from './imgs/onion.png'; | |
| import smallWater from './imgs/smallWater.png'; | |
| import bigWater from './imgs/bigWater.png'; | |
| import smallSoda from './imgs/smallSoda.png'; | |
| import bigSoda from './imgs/bigSoda.png'; | |
| import { db } from './firebase/firebase-config' | |
| import Routes from './components/Routes.js'; | |
| import React, { Fragment, useState, useEffect } from 'react'; | |
| import { db } from './firebase/firebase-config' | |
| import Routes from './components/Routes.js'; | |
| import coffeMilk from './imgs/coffeMilk.png'; | |
| import coffe from './imgs/coffe.png'; | |
| import sandwich from './imgs/sandwich.png'; | |
| import juice from './imgs/juice.png'; | |
| import simpleBurguer from './imgs/simpleBurguer.png'; | |
| import doubleBurguer from './imgs/doubleBurguer.png'; | |
| import frenchFries from './imgs/frenchFries.png'; | |
| import onion from './imgs/onion.png'; | |
| import smallWater from './imgs/smallWater.png'; | |
| import bigWater from './imgs/bigWater.png'; | |
| import smallSoda from './imgs/smallSoda.png'; | |
| import bigSoda from './imgs/bigSoda.png'; | |
Primero las dependencias
|
|
||
| function App() { | ||
| const [breakfasts, saveBreakfast] = useState([ | ||
| { id: 1, dish: "Café con leche", img: coffeMilk, price: 7, quantity: 1 }, | ||
| { id: 2, dish: "Café americano", img: coffe, price: 5, quantity: 1 }, | ||
| { id: 3, dish: "Sandwich de jamón y queso", img: sandwich, price: 10, quantity: 1 }, | ||
| { id: 4, dish: "Jugo de frutas natural", img: juice, price: 7, quantity: 1 } | ||
| ]) | ||
| const [lunchs, saveLunch] = useState([ | ||
| { id: 5, idItem: 0, dish: "Hamburguesa simple", img: simpleBurguer, price: 10, addittions: [], quantity: 1 }, | ||
| { id: 6, idItem: 0, dish: "Hamburguesa doble", img: doubleBurguer, price: 15, addittions: [], quantity: 1 }, | ||
| { id: 7, dish: "Papas fritas", img: frenchFries, price: 5, quantity: 1 }, | ||
| { id: 8, dish: "Aros de cebolla", img: onion, price: 5, quantity: 1 }, | ||
| { id: 9, dish: "Agua 500ml", img: smallWater, price: 5, quantity: 1 }, | ||
| { id: 10, dish: "Agua 750ml", img: bigWater, price: 7, quantity: 1 }, | ||
| { id: 11, dish: "Soda 500ml", img: smallSoda, price: 7, quantity: 1 }, | ||
| { id: 12, dish: "Soda 750ml", img: bigSoda, price: 7, quantity: 1 }, | ||
| ]) | ||
|
|
There was a problem hiding this comment.
| function App() { | |
| const [breakfasts, saveBreakfast] = useState([ | |
| { id: 1, dish: "Café con leche", img: coffeMilk, price: 7, quantity: 1 }, | |
| { id: 2, dish: "Café americano", img: coffe, price: 5, quantity: 1 }, | |
| { id: 3, dish: "Sandwich de jamón y queso", img: sandwich, price: 10, quantity: 1 }, | |
| { id: 4, dish: "Jugo de frutas natural", img: juice, price: 7, quantity: 1 } | |
| ]) | |
| const [lunchs, saveLunch] = useState([ | |
| { id: 5, idItem: 0, dish: "Hamburguesa simple", img: simpleBurguer, price: 10, addittions: [], quantity: 1 }, | |
| { id: 6, idItem: 0, dish: "Hamburguesa doble", img: doubleBurguer, price: 15, addittions: [], quantity: 1 }, | |
| { id: 7, dish: "Papas fritas", img: frenchFries, price: 5, quantity: 1 }, | |
| { id: 8, dish: "Aros de cebolla", img: onion, price: 5, quantity: 1 }, | |
| { id: 9, dish: "Agua 500ml", img: smallWater, price: 5, quantity: 1 }, | |
| { id: 10, dish: "Agua 750ml", img: bigWater, price: 7, quantity: 1 }, | |
| { id: 11, dish: "Soda 500ml", img: smallSoda, price: 7, quantity: 1 }, | |
| { id: 12, dish: "Soda 750ml", img: bigSoda, price: 7, quantity: 1 }, | |
| ]) | |
| import Data from './utils/Data.js' | |
| function App() { | |
| items: [], | ||
| totalProducts: 0, | ||
| total: 0, | ||
| state: "pending" |
There was a problem hiding this comment.
| state: "pending" | |
| state: "pending" //all status | |
|
|
||
|
|
||
| {/* Show error if the form is empty when click send the kitchen */} | ||
| {error ? <p className="error-form">Todos los campos son obligatorios</p> : null} |
There was a problem hiding this comment.
| {error ? <p className="error-form">Todos los campos son obligatorios</p> : null} | |
| {error && <p className="error-form">Todos los campos son obligatorios</p> : null} |
| color: $white; | ||
| a{ | ||
| text-decoration: none; | ||
|
|
||
| p{ | ||
| margin-top: 0; | ||
| color: $white; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
| color: $white; | |
| a{ | |
| text-decoration: none; | |
| p{ | |
| margin-top: 0; | |
| color: $white; | |
| } | |
| } | |
| color: $white; | |
| a{ | |
| text-decoration: none; | |
| p{ | |
| margin-top: 0; | |
| color: $white; | |
| } | |
| } | |
| select{ | ||
| @include select; | ||
| width: 60%; | ||
| align-self: center; | ||
|
|
||
| } | ||
| i{ | ||
| align-self: end; | ||
| color: #EB60DD; | ||
| font-size: 50px; | ||
| } | ||
| } |
There was a problem hiding this comment.
| select{ | |
| @include select; | |
| width: 60%; | |
| align-self: center; | |
| } | |
| i{ | |
| align-self: end; | |
| color: #EB60DD; | |
| font-size: 50px; | |
| } | |
| } | |
| select{ | |
| @include select; | |
| width: 60%; | |
| align-self: center; | |
| } | |
| i{ | |
| align-self: end; | |
| color: #EB60DD; | |
| font-size: 50px; | |
| } | |
| } |
| const Add = ({ idItem, dish, order, breakfasts, lunchs, setOrder }) => { | ||
|
|
||
|
|
||
| const addQuantity = (id) => { |
There was a problem hiding this comment.
| const addQuantity = (id) => { | |
| const handleaddQuantity = (id) => { |
| @@ -0,0 +1,163 @@ | |||
| import React from 'react'; | |||
| import ReactDOM from 'react-dom'; | |||
|
|
|||
Depuration code
Pull request from Ely Flores and Liz Rivera