Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fafebcd
Prueba1
Cucho145U Dec 16, 2020
6ee815f
TraduccionProduicto
Cucho145U Dec 21, 2020
dc02a29
Traduci departamento
prami31 Dec 22, 2020
666b63b
Traduccion de los filtros departamento y precio
prami31 Dec 23, 2020
b59675b
Merge pull request #2 from Cucho145U/mili-roxana
Cucho145U Dec 23, 2020
5251919
Correcciones manuel-alex
Cucho145U Dec 23, 2020
ef71964
Cambio consultas
Cucho145U Dec 23, 2020
75d946a
Traduccion
RosmelDeza Dec 29, 2020
1cf74c8
Traduccion
RosmelDeza Dec 29, 2020
f589ef1
Traduccion
RosmelDeza Dec 29, 2020
f9fe302
Traduccion
RosmelDeza Dec 29, 2020
1efe419
Traduccion
RosmelDeza Dec 29, 2020
0715808
Update package.json
RosmelDeza Dec 29, 2020
3c587aa
Update package-lock.json
RosmelDeza Dec 29, 2020
fd39ce7
Merge pull request #3 from Cucho145U/RosmelD-FrankC
Cucho145U Dec 29, 2020
5d8008e
Traduccion Ingles - Español
FrankCM-ia Dec 29, 2020
c627644
Traduccion Ingles - Español
FrankCM-ia Dec 29, 2020
5821238
Traduccion inlges - español
FrankCM-ia Dec 29, 2020
6873d33
Traduccion ingles - español
FrankCM-ia Dec 29, 2020
d0d032d
Traduccion ingles - español
FrankCM-ia Dec 29, 2020
d9dfbf2
Merge pull request #4 from Cucho145U/RosmelD-FrankC
Cucho145U Dec 30, 2020
014d3ff
cambio servidor
Cucho145U Jan 6, 2021
d2bcc59
Traduccion Ingles - Español
FrankCM-ia Jan 6, 2021
b89b316
Traduccion Ingles - Español
FrankCM-ia Jan 6, 2021
3f54399
Traduccion ingles - español
FrankCM-ia Jan 6, 2021
d1e0718
Traduccion ingles - español
FrankCM-ia Jan 6, 2021
b8b3204
Traduccion ingles - español
FrankCM-ia Jan 6, 2021
83981aa
cambio servidor 2
Cucho145U Jan 8, 2021
82aa5c7
Merge pull request #5 from Cucho145U/RosmelD-FrankC
Cucho145U Jan 19, 2021
edd6092
Merge branch 'master' of https://github.com/Cucho145U/Ecommerce-Reactjs
Cucho145U Jan 19, 2021
7e54005
Update package.json
Cucho145U Jan 19, 2021
15b406e
Update index.js
Cucho145U Jan 19, 2021
95a66f1
cambio pruba tutorial 6 min
Cucho145U Jan 22, 2021
dc69642
Avance Monzon-Mila-Elizon-Rosmel
alexojo2020 Jan 25, 2021
2a444e2
Merge branch 'master' of https://github.com/Cucho145U/Ecommerce-Reactjs
Cucho145U Jan 25, 2021
463d88a
Update
alexojo2020 Jan 25, 2021
e0cb970
Merge branch 'master' of https://github.com/Cucho145U/Ecommerce-Reactjs
alexojo2020 Jan 25, 2021
13710e8
Eso es todo
alexojo2020 Jan 25, 2021
3b10788
roxanabot
nitanilla Jan 25, 2021
c39251f
Merge branch 'master' of https://github.com/Cucho145U/Ecommerce-Reactjs
nitanilla Jan 25, 2021
1cc2d8d
Prueba
SHJAndre Feb 10, 2021
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
503 changes: 323 additions & 180 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dependencies": {
"axios": "^0.18.0",
"bootstrap": "^4.3.1",
"node-sass": "^4.12.0",
"express": "^4.17.1",
"node-sass": "^4.14.1",
"react": "^16.8.6",
"react-bootstrap": "^1.0.0-beta.8",
"react-dom": "^16.8.6",
Expand Down
Empty file added roxanabot.txt.txt
Empty file.
12 changes: 12 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require('path');
const express = require('express');
const app = express();
const publicPath = path.join(__dirname, '..', 'public');
const port = process.env.PORT || 3000;
app.use(express.static(publicPath));
app.get('*', (req, res) => {
res.sendFile(path.join(publicPath, 'index.html'));
});
app.listen(port, () => {
console.log('Server is up!');
});
5 changes: 5 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { connect } from 'react-redux'
import { registerNav } from './modules/Navigation'
import { insertToken } from './redux/action/tokenAction'
import LoginContainer from './pages/loginsignin/LoginContainer'


import IngreseProducto from './pages/ingreseProducto/SigninContainer'

import SigninContainer from './pages/loginsignin/SigninContainer'
import DashboardContainer from './pages/dashboard/DashboardContainer'
import ProductOverview from './pages/productOverview/ProductOverviewContainer'
Expand All @@ -25,6 +29,7 @@ class App extends Component {
<Route path="/login" component={LoginContainer} />
<Route key="productOverview" path="/product-overview" component={ProductOverview} />,
{this.props.token && [
<Route key="IngreseProducto" path="/ingrese" component={IngreseProducto} />,
<Route key="ShoppingBagContainer" path="/bag" component={ShoppingBagContainer} />,
<Route key="Checkout" path="/checkout" component={CheckoutContainer} />,
<Route key="success" path="/success_page" component={CheckoutSuccessContainer} />,
Expand Down
2 changes: 1 addition & 1 deletion src/components/autoComplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class AutoComplete extends Component {
onFocus={this.handleFocus}
onBlur={this.handleBlur}
value={this.state.val}
placeholder="Search"
placeholder="Buscar"
/>
<div className={styles.sugges_outbox}>
{
Expand Down
4 changes: 2 additions & 2 deletions src/components/header/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export default function Menu({
</div>
)}
</div>
{/* all product */}
{/* Todos los productos */}
<div className={styles.tag}
onClick={() => {
getAllProducts()
jumpTo('/dashboard')
}}
>
All Product
Todos los productos
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Search({
search(input_value).then(res => jumpTo('/dashboard'))
}}
>
Search
Buscar
</button>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/components/header/components/UserHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ export default function UserHeader({ user_token }) {
{(user_token && Object.keys(user_token).length > 0)
?
<div className={styles.loggout}>
<NavDropdown title={`hello, ${user_token.user_name}`}>
<NavDropdown title={`Hola ${user_token.user_name}`}>
<NavDropdown.Item onClick={Auth.logout} href='/'>
logout
Salir
</NavDropdown.Item>
<NavDropdown.Item onClick={() => jumpTo('/ingrese')}>
Ingresar Producto
</NavDropdown.Item>
</NavDropdown>
</div>
:
<div className={styles.loggout}>
<div className={styles.login} onClick={() => jumpTo('/login')}>
Login
Ingresar
</div>
</div>
}
Expand Down
5 changes: 3 additions & 2 deletions src/modules/serverCall/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import axios from 'axios'
import qs from 'qs'
import paypalConfig from '../../configs/paypalConfig'

const URL = 'https://zack-ecommerce-nodejs.herokuapp.com'
// const URL = 'http://localhost:4000'
//const URL = 'https://zack-ecommerce-nodejs.herokuapp.com'
//const URL = 'http://localhost:4000'
const URL = 'https://ecomerce-node-unsaac1.herokuapp.com/'

const serverCall = (config) => {
//header authorization
Expand Down
16 changes: 8 additions & 8 deletions src/pages/dashboard/components/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default class Filter extends Component {
constructor(props) {
super(props)
this.FILTER_CONFIG = {
order: ['Ascending', 'Descending'],
department: ['Men', 'Women'],
price: ['Less Than $29', '$29 - $39', '$39 - $49', '$49 - $89', 'Greater Than $89']
order: ['Ascendente', 'Descendente'],
department: ['Varones', 'Mujeres'],
price: ['Menor que S/.29', 'S/.29 - S/.39', 'S/.39 - S/.49', 'S/.49 - S/.89', 'Mayor que S/.89']
}
this.initialState = {}
this.state = this.initialState
Expand Down Expand Up @@ -70,14 +70,14 @@ export default class Filter extends Component {
<div className={styles.outbox}>
<div className={styles.box}>
<div className={styles.title}>
FILTERS
FILTROS
<div className={styles.title_border}></div>
</div>
<div className={styles.content}>
{/* order */}
<div className={styles.block}>
<div className={styles.sub_title}>
ORDER
ORDEN
</div>
{this.FILTER_CONFIG['order'].map(n =>
<Checkbox
Expand All @@ -92,7 +92,7 @@ export default class Filter extends Component {
{/* department */}
<div className={styles.block}>
<div className={styles.sub_title}>
DEPARTMENT
DEPARTAMENTO
</div>
{this.FILTER_CONFIG['department'].map(n =>
<Checkbox
Expand All @@ -107,7 +107,7 @@ export default class Filter extends Component {
{/* price */}
<div className={styles.block}>
<div className={styles.sub_title}>
PRICE
PRECIO
</div>
{this.FILTER_CONFIG['price'].map(n =>
<Checkbox
Expand All @@ -121,7 +121,7 @@ export default class Filter extends Component {
</div>
</div>
<div className={styles.clear_btn} onClick={this.clearAllFilter}>
<button>Clear All</button>
<button>Limpiar Todo</button>
</div>
{/* filter tags */}
<div className={styles.tags}>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/dashboard/utils/generateFilterString.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default (state) => {
for (const v of state[name]) {
temp = v
}
if (temp.toUpperCase() === 'ASCENDING') {
if (temp.toUpperCase() === 'ASCENDENTE') {
order = 'order=price'
}
if (temp.toUpperCase() === 'DESCENDING') {
if (temp.toUpperCase() === 'DESCENDENTE') {
order = 'order=-price'
}
}
Expand All @@ -40,10 +40,10 @@ export default (state) => {
if (name === 'price') {
let _price_str_arr = []
for (let p of state[name]) {
if (p.match(/less/i)) {
if (p.match(/menor/i)) {
p = p.replace(/[\D]+/i, '0 - ')
}
if (p.match(/greater/i)) {
if (p.match(/mayor/i)) {
p = p.replace(/[\D]+/i, '').concat(' - 999')
}
_price_str_arr = _price_str_arr.concat(p.match(/[\d]+/g))
Expand Down
86 changes: 86 additions & 0 deletions src/pages/ingresarProducto/IngresarProducto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import React from 'react'
import Header from '../../components/header/headerContainer'
import styles from './stylesheets/ingresarProducto.module.sass'
import { Form,Col,Button,FormLabel,FormControl,InputGroup, FormGroup} from 'react-bootstrap'

export default function IngresarProducto() {
return (
<div className={styles.outbox}>
<Header />
<div className={styles.box}>
<div className={styles.content}>
<div className={styles.title}>
Ingrese producto
</div>
<div className={styles.form}>
<FormGroup controlId="formNombreProducto">
<FormLabel>Nombre</FormLabel>
<FormControl placeholder="" />
</FormGroup>

<FormGroup controlId="formDescripcion">
<FormLabel>Descripción</FormLabel>
<FormControl placeholder="" />
</FormGroup>

<FormGroup controlId="formLinkImagen">
<FormLabel>Link de la imagen</FormLabel>
<FormControl placeholder="" />
</FormGroup>

<Form.Row>
<Col>
<Form.Group controlId="">
<Form.Label>Tallas</Form.Label>
<Form.Control placeholder="" />
</Form.Group>

<Form.Group>
<Form.Label>Color</Form.Label>
<Form.Control placeholder="" />
</Form.Group>
</Col>

<Col>
<FormGroup controlId="formPrecio">
<FormLabel>Precio</FormLabel>
<InputGroup className="mb-2">
<InputGroup.Prepend>
<InputGroup.Text>S/.</InputGroup.Text>
</InputGroup.Prepend>
<FormControl id="inlineFormInputGroup" placeholder="" />
</InputGroup>
</FormGroup>

<Form.Group>
<Form.Label>Cantidad</Form.Label>
<Form.Control type="number" placeholder="" />
</Form.Group>
</Col>

</Form.Row>

<Form.Group as={Col} controlId="formGridState">
<Form.Label>Departamento-Categoría</Form.Label>
<Form.Control as="select" defaultValue="Elige...">
<option>Mujeres - Basicos</option>
<option>Mujeres - Chaqueta</option>
<option>Varones - Prendas de punto</option>
<option>Varones - Jeans</option>
<option>Varones - Camperas</option>
<option>Niños - Niña</option>
<option>Niños - Niño</option>
</Form.Control>
</Form.Group>


<Button variant="primary" type="submit">
Registrar
</Button>

</div>
</div>
</div>
</div>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@import url('https://fonts.googleapis.com/css?family=Comfortaa');
@import '../../../modules/mediaQuery/app'


.outbox
min-width: max-content
min-width: 386px
min-height: 100vh
display: flex
justify-content: center
background: rgb(244, 244, 244)
font-size: 1rem

.box
width: 100%
margin-top: 12vh
display: flex
justify-content: center
align-items: center


.content
padding: 3%
margin: 4em
background: white
min-width: max-content
justify-content: center
align-items: center


.title
color: blue
font-size: 2rem
font-family: 'Comfortaa', cursive;
margin-bottom: 5vh


.table
width: max-content

.process_box
width: 100%
display: flex
flex-direction: column
align-items: flex-end

.total
font-size: 20px
font-weight: bold




// @include media-breakpoint-down(md)
// .box
// max-width: 70%
// @include media-breakpoint-down(sm)
// .box
// max-width: 90%
// .title
// font-size: 1.5rem

Loading