From fafebcd70038935a1c791ca9eb2b618428a662cb Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Tue, 15 Dec 2020 21:59:31 -0500 Subject: [PATCH 01/33] Prueba1 Direccion --- src/modules/serverCall/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/serverCall/index.js b/src/modules/serverCall/index.js index 2dc1ef6..ff27361 100644 --- a/src/modules/serverCall/index.js +++ b/src/modules/serverCall/index.js @@ -4,8 +4,8 @@ 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 serverCall = (config) => { //header authorization From 6ee815f9596464d2b3d20b7ce6e38193f180470e Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Mon, 21 Dec 2020 16:53:57 -0500 Subject: [PATCH 02/33] TraduccionProduicto se tradujo el producto --- src/pages/productOverview/ProductOverview.js | 4 ++-- src/pages/productOverview/components/Variants.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/productOverview/ProductOverview.js b/src/pages/productOverview/ProductOverview.js index b4fbdee..a449f78 100644 --- a/src/pages/productOverview/ProductOverview.js +++ b/src/pages/productOverview/ProductOverview.js @@ -85,8 +85,8 @@ export default class ProductOverview extends Component { />
- - + +
diff --git a/src/pages/productOverview/components/Variants.js b/src/pages/productOverview/components/Variants.js index a8cae29..e833859 100644 --- a/src/pages/productOverview/components/Variants.js +++ b/src/pages/productOverview/components/Variants.js @@ -7,7 +7,7 @@ export default function Variants({ color, size, variants, selectedSize, handleCl return (
- COLOUR: + COLOR:
{color} @@ -19,7 +19,7 @@ export default function Variants({ color, size, variants, selectedSize, handleCl
- SIZES: + TALLAS:
Date: Mon, 21 Dec 2020 20:06:56 -0500 Subject: [PATCH 03/33] Traduci departamento --- src/pages/dashboard/components/Filter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/dashboard/components/Filter.js b/src/pages/dashboard/components/Filter.js index bb3e7c9..7ed564f 100644 --- a/src/pages/dashboard/components/Filter.js +++ b/src/pages/dashboard/components/Filter.js @@ -11,8 +11,8 @@ export default class Filter extends Component { super(props) this.FILTER_CONFIG = { order: ['Ascending', 'Descending'], - department: ['Men', 'Women'], - price: ['Less Than $29', '$29 - $39', '$39 - $49', '$49 - $89', 'Greater Than $89'] + department: ['Varones', 'Mujeres'], + price: ['Menos que $29', '$29 - $39', '$39 - $49', '$49 - $89', 'Greater Than $89'] } this.initialState = {} this.state = this.initialState @@ -92,7 +92,7 @@ export default class Filter extends Component { {/* department */}
- DEPARTMENT + DEPARTAMENTO
{this.FILTER_CONFIG['department'].map(n => Date: Tue, 22 Dec 2020 20:57:57 -0500 Subject: [PATCH 04/33] Traduccion de los filtros departamento y precio --- src/pages/dashboard/components/Filter.js | 6 +++--- src/pages/dashboard/utils/generateFilterString.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/dashboard/components/Filter.js b/src/pages/dashboard/components/Filter.js index 7ed564f..fc4fa88 100644 --- a/src/pages/dashboard/components/Filter.js +++ b/src/pages/dashboard/components/Filter.js @@ -12,7 +12,7 @@ export default class Filter extends Component { this.FILTER_CONFIG = { order: ['Ascending', 'Descending'], department: ['Varones', 'Mujeres'], - price: ['Menos que $29', '$29 - $39', '$39 - $49', '$49 - $89', 'Greater Than $89'] + 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 @@ -107,7 +107,7 @@ export default class Filter extends Component { {/* price */}
- PRICE + PRECIO
{this.FILTER_CONFIG['price'].map(n =>
- +
{/* filter tags */}
diff --git a/src/pages/dashboard/utils/generateFilterString.js b/src/pages/dashboard/utils/generateFilterString.js index 277aab7..98859a3 100644 --- a/src/pages/dashboard/utils/generateFilterString.js +++ b/src/pages/dashboard/utils/generateFilterString.js @@ -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)) From 525191990c05e35c495a049967ad2c7304c3a72a Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Wed, 23 Dec 2020 15:25:32 -0500 Subject: [PATCH 05/33] Correcciones manuel-alex correcciones por hacer mal mi trabajo --- src/pages/dashboard/components/Filter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/dashboard/components/Filter.js b/src/pages/dashboard/components/Filter.js index fc4fa88..796d7c5 100644 --- a/src/pages/dashboard/components/Filter.js +++ b/src/pages/dashboard/components/Filter.js @@ -10,7 +10,7 @@ export default class Filter extends Component { constructor(props) { super(props) this.FILTER_CONFIG = { - order: ['Ascending', 'Descending'], + 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'] } @@ -70,14 +70,14 @@ export default class Filter extends Component {
- FILTERS + FILTROS
{/* order */}
- ORDER + ORDEN
{this.FILTER_CONFIG['order'].map(n => Date: Wed, 23 Dec 2020 15:28:16 -0500 Subject: [PATCH 06/33] Cambio consultas Para consultar --- src/pages/dashboard/utils/generateFilterString.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/dashboard/utils/generateFilterString.js b/src/pages/dashboard/utils/generateFilterString.js index 98859a3..aa08101 100644 --- a/src/pages/dashboard/utils/generateFilterString.js +++ b/src/pages/dashboard/utils/generateFilterString.js @@ -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' } } From 75d946af3e2398a3aa88377b1dd20fce84477593 Mon Sep 17 00:00:00 2001 From: RosmelDeza <171058@unsaac.edu.pe> Date: Mon, 28 Dec 2020 19:34:21 -0500 Subject: [PATCH 07/33] Traduccion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduccion de español a ingles --- src/pages/loginsignin/utils/validation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/loginsignin/utils/validation.js b/src/pages/loginsignin/utils/validation.js index bef6fc9..b05bbb1 100644 --- a/src/pages/loginsignin/utils/validation.js +++ b/src/pages/loginsignin/utils/validation.js @@ -15,28 +15,28 @@ class Validation { export const validateExistence = new Validation( 'input should have value', text => /\S/.test(text), - 'Required' + 'Llene el campo' ) export const validateEmail = new Validation( 'input should be an email', text => !!text.match(/[\w-]+@([\w-]+\.)+[\w-]+/i), - 'invalid email' + 'Correo Electronico' ) export const validateLength = (min_len, max_len) => { const regex = new RegExp(`(?=.{${min_len},${max_len}})`, 'g') return new Validation( 'input should within certain length', text => !!text.match(regex), - `password has to be ${min_len}-${max_len} letter` + `La contraseña debe tener entre ${min_len} y ${max_len} caracteres` ) } export const validateLowerCase = new Validation( 'input should have an uppercase', text => !!text.match(/(?=.*[A-Z])/g), - 'at least one upper case' + 'La contraseña debe tener al menos una mayuscula' ) export const validateUpperCase = new Validation( 'input should have lowercase', text => !!text.match(/(?=.*[a-z])/g), - 'at least one lower case' + 'La contraseña debe tener al menos una minuscula' ) \ No newline at end of file From 1cf74c84aa9e144dc84de43bf31a050aeb0c8089 Mon Sep 17 00:00:00 2001 From: RosmelDeza <171058@unsaac.edu.pe> Date: Mon, 28 Dec 2020 19:34:47 -0500 Subject: [PATCH 08/33] Traduccion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduccion español Ingles --- src/pages/loginsignin/Signin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/loginsignin/Signin.js b/src/pages/loginsignin/Signin.js index 121b810..50d7f68 100644 --- a/src/pages/loginsignin/Signin.js +++ b/src/pages/loginsignin/Signin.js @@ -34,9 +34,9 @@ export default function Signin({signin,signin_loading,signin_error}) {
Date: Mon, 28 Dec 2020 19:34:57 -0500 Subject: [PATCH 09/33] Traduccion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduccion español Ingles --- src/pages/loginsignin/LoginSignin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/loginsignin/LoginSignin.js b/src/pages/loginsignin/LoginSignin.js index b486b88..de2864b 100644 --- a/src/pages/loginsignin/LoginSignin.js +++ b/src/pages/loginsignin/LoginSignin.js @@ -58,7 +58,7 @@ export default class LoginSignin extends Component { console.log('valid fail'); return } - if (this.props.title === 'Login') { + if (this.props.title === 'Iniciar Sesion') { const { email, password } = this.inputText this.props.submitAction(email, password) .then(res => { @@ -74,7 +74,7 @@ export default class LoginSignin extends Component { return error }) } - if (this.props.title === 'Signin') { + if (this.props.title === 'Registrarse') { const { fullname, email, password, verifyPassword } = this.inputText this.props.submitAction(fullname, email, password, verifyPassword) .then(res => { From f9fe302691d0e38a3e896c7e14baf5222f034f55 Mon Sep 17 00:00:00 2001 From: RosmelDeza <171058@unsaac.edu.pe> Date: Mon, 28 Dec 2020 19:35:05 -0500 Subject: [PATCH 10/33] Traduccion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduccion español Ingles --- src/pages/loginsignin/Login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/loginsignin/Login.js b/src/pages/loginsignin/Login.js index 22655cf..8dc2ecd 100644 --- a/src/pages/loginsignin/Login.js +++ b/src/pages/loginsignin/Login.js @@ -25,8 +25,8 @@ export default function Login({ postToken, login_loading, login_error }) {
Date: Mon, 28 Dec 2020 19:35:18 -0500 Subject: [PATCH 11/33] Traduccion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduccion español Ingles --- src/components/header/components/Menu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/header/components/Menu.js b/src/components/header/components/Menu.js index 08754e6..027f504 100644 --- a/src/components/header/components/Menu.js +++ b/src/components/header/components/Menu.js @@ -24,14 +24,14 @@ export default function Menu({
)}
- {/* all product */} + {/* Todos los productos */}
{ getAllProducts() jumpTo('/dashboard') }} > - All Product + Todos los productos
) From 07158081124730325aaba6b0ab2be035bec38852 Mon Sep 17 00:00:00 2001 From: RosmelDeza <171058@unsaac.edu.pe> Date: Mon, 28 Dec 2020 19:35:32 -0500 Subject: [PATCH 12/33] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d5924f4..de71b2a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dependencies": { "axios": "^0.18.0", "bootstrap": "^4.3.1", - "node-sass": "^4.12.0", + "node-sass": "^4.14.1", "react": "^16.8.6", "react-bootstrap": "^1.0.0-beta.8", "react-dom": "^16.8.6", From 3c587aab492ce119ce88955676f38588a17373bb Mon Sep 17 00:00:00 2001 From: RosmelDeza <171058@unsaac.edu.pe> Date: Mon, 28 Dec 2020 19:35:37 -0500 Subject: [PATCH 13/33] Update package-lock.json . --- package-lock.json | 185 +++++++++++++++++++++++----------------------- 1 file changed, 92 insertions(+), 93 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90c9c82..6de11c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5512,9 +5512,9 @@ "optional": true }, "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "requires": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", @@ -5710,9 +5710,9 @@ } }, "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "requires": { "glob": "~7.1.1", "lodash": "~4.17.10", @@ -6203,9 +6203,9 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==" }, "indent-string": { "version": "2.1.0", @@ -6296,11 +6296,6 @@ "loose-envify": "^1.0.0" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -6419,12 +6414,9 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -7689,9 +7681,9 @@ } }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==" + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" }, "js-levenshtein": { "version": "1.1.6", @@ -7889,14 +7881,6 @@ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -8627,9 +8611,9 @@ } }, "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "requires": { "async-foreach": "^0.1.3", "chalk": "^1.1.1", @@ -8638,14 +8622,14 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", - "sass-graph": "^2.2.4", + "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, @@ -8676,6 +8660,11 @@ "which": "^1.2.9" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -11290,88 +11279,98 @@ } }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", + "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "yargs": "^13.3.2" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { - "number-is-nan": "^1.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "lcid": "^1.0.0" + "ansi-regex": "^4.1.0" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -12336,12 +12335,12 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "requires": { "block-stream": "*", - "fstream": "^1.0.2", + "fstream": "^1.0.12", "inherits": "2" } }, From 5d8008e80194bd496f825ecece59178ab89d89e4 Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Tue, 29 Dec 2020 11:58:57 -0500 Subject: [PATCH 14/33] =?UTF-8?q?Traduccion=20Ingles=20-=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit search - buscar --- src/components/autoComplete/AutoComplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/autoComplete/AutoComplete.js b/src/components/autoComplete/AutoComplete.js index 09119be..955e703 100644 --- a/src/components/autoComplete/AutoComplete.js +++ b/src/components/autoComplete/AutoComplete.js @@ -49,7 +49,7 @@ export default class AutoComplete extends Component { onFocus={this.handleFocus} onBlur={this.handleBlur} value={this.state.val} - placeholder="Search" + placeholder="Buscar" />
{ From c627644eab5055d0633369fcc6ceef241b788dbb Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:00:20 -0500 Subject: [PATCH 15/33] =?UTF-8?q?Traduccion=20Ingles=20-=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Search - Buscar --- src/components/header/components/Search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/header/components/Search.js b/src/components/header/components/Search.js index 0d7fd22..21776d7 100644 --- a/src/components/header/components/Search.js +++ b/src/components/header/components/Search.js @@ -23,7 +23,7 @@ export default function Search({ search(input_value).then(res => jumpTo('/dashboard')) }} > - Search + Buscar
From 5821238ec204f4dc6d05ea04a2ae2b5f5e363efc Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:01:30 -0500 Subject: [PATCH 16/33] =?UTF-8?q?Traduccion=20inlges=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hello, - hola logout - salir login - ingresar --- src/components/header/components/UserHeader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/header/components/UserHeader.js b/src/components/header/components/UserHeader.js index 24ffad0..df5e48f 100644 --- a/src/components/header/components/UserHeader.js +++ b/src/components/header/components/UserHeader.js @@ -13,16 +13,16 @@ export default function UserHeader({ user_token }) { {(user_token && Object.keys(user_token).length > 0) ?
- + - logout + Salir
:
jumpTo('/login')}> - Login + Ingresar
} From 6873d33dd537026bdf9faab4eea6c09ddb052440 Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:02:43 -0500 Subject: [PATCH 17/33] =?UTF-8?q?Traduccion=20ingles=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/loginsignin/components/FormInput.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/loginsignin/components/FormInput.js b/src/pages/loginsignin/components/FormInput.js index 8a25e85..40ea5ee 100644 --- a/src/pages/loginsignin/components/FormInput.js +++ b/src/pages/loginsignin/components/FormInput.js @@ -4,6 +4,7 @@ import capitalizeString from '../utils/capitalizeString' export default function FormInput({ + //title, name, validations, errorMessage, @@ -13,13 +14,13 @@ export default function FormInput({ return (
- +
-1 ? 'password' : 'text'} name={name} - placeholder={name} + placeholder={''} onBlur={(e) => onBlur(e, validate(validations, e.target.value))} onFocus={onFocus} /> From d0d032dfce86ea8b80d858886816c744d09dbe9a Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:03:11 -0500 Subject: [PATCH 18/33] =?UTF-8?q?Traduccion=20ingles=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit faltaba un '?' --- src/pages/loginsignin/Login.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/loginsignin/Login.js b/src/pages/loginsignin/Login.js index 8dc2ecd..79f3c10 100644 --- a/src/pages/loginsignin/Login.js +++ b/src/pages/loginsignin/Login.js @@ -11,10 +11,12 @@ import { const INPUT_CONFIG = [ { + title: "Email", name: "email", validations: [validateExistence, validateEmail] }, { + //title: "Contraseña", name: "password", validations: [validateExistence, validateLength(6, 15), validateLowerCase, validateUpperCase] } @@ -26,7 +28,7 @@ export default function Login({ postToken, login_loading, login_error }) { Date: Wed, 6 Jan 2021 01:51:41 -0500 Subject: [PATCH 19/33] cambio servidor --- package-lock.json | 318 +++++++++++++++++++++++--------- package.json | 3 +- server/server.js | 12 ++ src/modules/serverCall/index.js | 3 +- 4 files changed, 247 insertions(+), 89 deletions(-) create mode 100644 server/server.js diff --git a/package-lock.json b/package-lock.json index 6de11c3..3d9a7a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2277,22 +2277,27 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "requires": { - "bytes": "3.0.0", + "bytes": "3.1.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2301,18 +2306,37 @@ "ms": "2.0.0" } }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -3502,9 +3526,12 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" }, "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } }, "content-type": { "version": "1.0.4", @@ -3520,9 +3547,9 @@ } }, "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" }, "cookie-signature": { "version": "1.0.6", @@ -5019,42 +5046,51 @@ } }, "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "requires": { - "accepts": "~1.3.5", + "accepts": "~1.3.7", "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", "content-type": "~1.0.4", - "cookie": "0.3.1", + "cookie": "0.4.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.1.1", + "finalhandler": "~1.1.2", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", + "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -5068,10 +5104,48 @@ "ms": "2.0.0" } }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -5317,16 +5391,16 @@ } }, "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" }, "dependencies": { @@ -5342,6 +5416,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -10274,12 +10353,19 @@ } }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + } } }, "prr": { @@ -10401,23 +10487,42 @@ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -11506,9 +11611,9 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -11517,12 +11622,12 @@ "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "range-parser": "~1.2.1", + "statuses": "~1.5.0" }, "dependencies": { "debug": { @@ -11531,17 +11636,51 @@ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" } } }, @@ -11580,14 +11719,14 @@ } }, "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" + "parseurl": "~1.3.3", + "send": "0.17.1" } }, "set-blocking": { @@ -12552,6 +12691,11 @@ "repeat-string": "^1.6.1" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, "topo": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", @@ -12645,25 +12789,25 @@ } }, "type-is": { - "version": "1.6.17", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.17.tgz", - "integrity": "sha512-jYZzkOoAPVyQ9vlZ4xEJ4BBbHC4a7hbY1xqyCPe6AiQVVqfbZEulJm0VpqK4B+096O1VQi0l6OBGH210ejx/bA==", + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" }, "dependencies": { "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "requires": { - "mime-db": "1.40.0" + "mime-db": "1.44.0" } } } diff --git a/package.json b/package.json index de71b2a..42f4320 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dependencies": { "axios": "^0.18.0", "bootstrap": "^4.3.1", + "express": "^4.17.1", "node-sass": "^4.14.1", "react": "^16.8.6", "react-bootstrap": "^1.0.0-beta.8", @@ -18,7 +19,7 @@ "redux-thunk": "^2.3.0" }, "scripts": { - "start": "react-scripts start", + "start": "node server/server.js", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/server/server.js b/server/server.js new file mode 100644 index 0000000..b74d18d --- /dev/null +++ b/server/server.js @@ -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!'); +}); \ No newline at end of file diff --git a/src/modules/serverCall/index.js b/src/modules/serverCall/index.js index ff27361..f7d42d0 100644 --- a/src/modules/serverCall/index.js +++ b/src/modules/serverCall/index.js @@ -5,7 +5,8 @@ import qs from 'qs' import paypalConfig from '../../configs/paypalConfig' //const URL = 'https://zack-ecommerce-nodejs.herokuapp.com' -const URL = 'http://localhost:4000' +//const URL = 'http://localhost:4000' +const URL = 'https://ecomerce-node-unsaac1.herokuapp.com/' const serverCall = (config) => { //header authorization From d2bcc59b600fa03641c5d2f9046fe92d42602ad7 Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Wed, 6 Jan 2021 11:38:38 -0500 Subject: [PATCH 20/33] =?UTF-8?q?Traduccion=20Ingles=20-=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agregar un paremtro al map : title --- src/pages/loginsignin/components/Base.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/loginsignin/components/Base.js b/src/pages/loginsignin/components/Base.js index 29e9cad..3d29881 100644 --- a/src/pages/loginsignin/components/Base.js +++ b/src/pages/loginsignin/components/Base.js @@ -21,10 +21,11 @@ export default function Base({
{title}
{ - inputs.map(({ name, validations }) => + inputs.map(({ title,name, validations }) => Date: Wed, 6 Jan 2021 11:40:23 -0500 Subject: [PATCH 21/33] =?UTF-8?q?Traduccion=20Ingles=20-=20Espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agregar un parametro al FormInput: title --- src/pages/loginsignin/components/FormInput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/loginsignin/components/FormInput.js b/src/pages/loginsignin/components/FormInput.js index 40ea5ee..d978594 100644 --- a/src/pages/loginsignin/components/FormInput.js +++ b/src/pages/loginsignin/components/FormInput.js @@ -4,7 +4,7 @@ import capitalizeString from '../utils/capitalizeString' export default function FormInput({ - //title, + title, name, validations, errorMessage, @@ -14,13 +14,13 @@ export default function FormInput({ return (
- +
-1 ? 'password' : 'text'} name={name} - placeholder={''} + placeholder={title} onBlur={(e) => onBlur(e, validate(validations, e.target.value))} onFocus={onFocus} /> From 3f54399d50b4dd849e00b40bdd92eeed47b0409d Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Wed, 6 Jan 2021 11:43:48 -0500 Subject: [PATCH 22/33] =?UTF-8?q?Traduccion=20ingles=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agregar la traduccion del titulo en title --- src/pages/loginsignin/Login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/loginsignin/Login.js b/src/pages/loginsignin/Login.js index 79f3c10..cdbb92a 100644 --- a/src/pages/loginsignin/Login.js +++ b/src/pages/loginsignin/Login.js @@ -11,12 +11,12 @@ import { const INPUT_CONFIG = [ { - title: "Email", + title: "Correo Electronico", name: "email", validations: [validateExistence, validateEmail] }, { - //title: "Contraseña", + title: "Contraseña", name: "password", validations: [validateExistence, validateLength(6, 15), validateLowerCase, validateUpperCase] } From d1e0718136d5fbed7d6ae90e1d10e7f39985868f Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Wed, 6 Jan 2021 11:44:47 -0500 Subject: [PATCH 23/33] =?UTF-8?q?Traduccion=20ingles=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit agregar los titulos traducidos en title --- src/pages/loginsignin/Signin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/loginsignin/Signin.js b/src/pages/loginsignin/Signin.js index 50d7f68..b70305b 100644 --- a/src/pages/loginsignin/Signin.js +++ b/src/pages/loginsignin/Signin.js @@ -11,18 +11,22 @@ import { const INPUT_CONFIG = [ { + title: "Nombre Completo", name: "fullname", // validations: [validateLength()] }, { + title: "Correo Electronico", name: "email", validations: [validateExistence, validateEmail] }, { + title: "Contraseña", name: "password", validations: [validateExistence, validateLength(6, 15), validateLowerCase, validateUpperCase] }, { + title: "Verificar Contraseña", name: "verifyPassword", validations: [validateExistence, validateLength(6, 15), validateLowerCase, validateUpperCase] }, From b8b3204e62161e507d3cb3ed3be6316d72cb5387 Mon Sep 17 00:00:00 2001 From: FrankCM-ia <59652945+FrankCM-ia@users.noreply.github.com> Date: Wed, 6 Jan 2021 12:16:18 -0500 Subject: [PATCH 24/33] =?UTF-8?q?Traduccion=20ingles=20-=20espa=C3=B1ol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cambiar el mensaje del signin y login por Click aqui --- src/pages/loginsignin/LoginSignin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/loginsignin/LoginSignin.js b/src/pages/loginsignin/LoginSignin.js index de2864b..b26e17f 100644 --- a/src/pages/loginsignin/LoginSignin.js +++ b/src/pages/loginsignin/LoginSignin.js @@ -104,7 +104,7 @@ export default class LoginSignin extends Component { footer_content={ } From 83981aac5b8908f55da62d788c6ff6af206e34a3 Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Thu, 7 Jan 2021 20:51:36 -0500 Subject: [PATCH 25/33] cambio servidor 2 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 42f4320..0ed1c08 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "start": "node server/server.js", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "postinstall": "ng build" }, "eslintConfig": { "extends": "react-app" From 7e54005887dbaf6471b06dc817af41146f089c22 Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Mon, 18 Jan 2021 21:44:13 -0500 Subject: [PATCH 26/33] Update package.json normalidad --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0ed1c08..3d15ec1 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,10 @@ "redux-thunk": "^2.3.0" }, "scripts": { - "start": "node server/server.js", + "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject", - "postinstall": "ng build" + "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" From 15b406ef17bdc6b6a978e9e989be9ddf86485db8 Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Mon, 18 Jan 2021 22:02:01 -0500 Subject: [PATCH 27/33] Update index.js Local host de servidor --- src/modules/serverCall/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/serverCall/index.js b/src/modules/serverCall/index.js index f7d42d0..9f9aa8e 100644 --- a/src/modules/serverCall/index.js +++ b/src/modules/serverCall/index.js @@ -5,8 +5,8 @@ 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://ecomerce-node-unsaac1.herokuapp.com/' +const URL = 'http://localhost:4000' +//const URL = 'https://ecomerce-node-unsaac1.herokuapp.com/' const serverCall = (config) => { //header authorization From 95a66f1bd5538e8453123223cb3e18e9732227d1 Mon Sep 17 00:00:00 2001 From: Cucho145U <170748@unsaac.edu.pe> Date: Fri, 22 Jan 2021 15:01:28 -0500 Subject: [PATCH 28/33] cambio pruba tutorial 6 min --- src/modules/serverCall/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/serverCall/index.js b/src/modules/serverCall/index.js index 9f9aa8e..f7d42d0 100644 --- a/src/modules/serverCall/index.js +++ b/src/modules/serverCall/index.js @@ -5,8 +5,8 @@ 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://ecomerce-node-unsaac1.herokuapp.com/' +//const URL = 'http://localhost:4000' +const URL = 'https://ecomerce-node-unsaac1.herokuapp.com/' const serverCall = (config) => { //header authorization From dc6964297dfef543c3e8a13d1a061ceb33b54502 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 24 Jan 2021 19:53:54 -0500 Subject: [PATCH 29/33] Avance Monzon-Mila-Elizon-Rosmel Avande de Ingreso de Producto --- src/App.js | 5 + .../header/components/UserHeader.js | 3 + .../ingresarProducto/IngresarProducto.js | 86 +++++++++++++ .../stylesheets/ingresarProducto.module.sass | 62 +++++++++ src/pages/ingreseProducto/LoginSignin.js | 119 ++++++++++++++++++ src/pages/ingreseProducto/Signin.js | 77 ++++++++++++ src/pages/ingreseProducto/SigninContainer.js | 13 ++ src/pages/ingreseProducto/components/Base.js | 44 +++++++ .../ingreseProducto/components/Button.js | 25 ++++ .../ingreseProducto/components/FormInput.js | 53 ++++++++ .../ingreseProducto/components/footer.js | 15 +++ .../stylesheets/base.module.sass | 22 ++++ .../stylesheets/formInput.module.sass | 28 +++++ .../stylesheets/loginsignin.module.sass | 22 ++++ .../ingreseProducto/utils/capitalizeString.js | 7 ++ src/pages/ingreseProducto/utils/validation.js | 42 +++++++ src/pages/loginsignin/components/FormInput.js | 7 +- 17 files changed, 629 insertions(+), 1 deletion(-) create mode 100644 src/pages/ingresarProducto/IngresarProducto.js create mode 100644 src/pages/ingresarProducto/stylesheets/ingresarProducto.module.sass create mode 100644 src/pages/ingreseProducto/LoginSignin.js create mode 100644 src/pages/ingreseProducto/Signin.js create mode 100644 src/pages/ingreseProducto/SigninContainer.js create mode 100644 src/pages/ingreseProducto/components/Base.js create mode 100644 src/pages/ingreseProducto/components/Button.js create mode 100644 src/pages/ingreseProducto/components/FormInput.js create mode 100644 src/pages/ingreseProducto/components/footer.js create mode 100644 src/pages/ingreseProducto/stylesheets/base.module.sass create mode 100644 src/pages/ingreseProducto/stylesheets/formInput.module.sass create mode 100644 src/pages/ingreseProducto/stylesheets/loginsignin.module.sass create mode 100644 src/pages/ingreseProducto/utils/capitalizeString.js create mode 100644 src/pages/ingreseProducto/utils/validation.js diff --git a/src/App.js b/src/App.js index 1b43e5a..993f88f 100644 --- a/src/App.js +++ b/src/App.js @@ -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' @@ -25,6 +29,7 @@ class App extends Component { , {this.props.token && [ + , , , , diff --git a/src/components/header/components/UserHeader.js b/src/components/header/components/UserHeader.js index df5e48f..79f80af 100644 --- a/src/components/header/components/UserHeader.js +++ b/src/components/header/components/UserHeader.js @@ -17,6 +17,9 @@ export default function UserHeader({ user_token }) { Salir + jumpTo('/ingrese')}> + Ingrese Producto +
: diff --git a/src/pages/ingresarProducto/IngresarProducto.js b/src/pages/ingresarProducto/IngresarProducto.js new file mode 100644 index 0000000..a80af3d --- /dev/null +++ b/src/pages/ingresarProducto/IngresarProducto.js @@ -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 ( +
+
+
+
+
+ Ingrese producto +
+
+ + Nombre + + + + + Descripción + + + + + Link de la imagen + + + + + + + Tallas + + + + + Color + + + + + + + Precio + + + S/. + + + + + + + Cantidad + + + + + + + + Departamento-Categoría + + + + + + + + + + + + + + +
+
+
+
+ ) + } \ No newline at end of file diff --git a/src/pages/ingresarProducto/stylesheets/ingresarProducto.module.sass b/src/pages/ingresarProducto/stylesheets/ingresarProducto.module.sass new file mode 100644 index 0000000..dcc7e06 --- /dev/null +++ b/src/pages/ingresarProducto/stylesheets/ingresarProducto.module.sass @@ -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 + \ No newline at end of file diff --git a/src/pages/ingreseProducto/LoginSignin.js b/src/pages/ingreseProducto/LoginSignin.js new file mode 100644 index 0000000..b62645e --- /dev/null +++ b/src/pages/ingreseProducto/LoginSignin.js @@ -0,0 +1,119 @@ +import React, { Component } from 'react' +import styles from './stylesheets/loginsignin.module.sass' +import Base from './components/Base' +import capitalizeString from './utils/capitalizeString' +import jumpTo from '../../modules/Navigation' +import LoadingAnimation from '../../components/loadingAnimation' +import Header from '../../components/header/headerContainer' + + +export default class LoginSignin extends Component { + constructor(props) { + super(props) + this.state = {} + this.inputText = {} + for (const input of props.INPUT_CONFIG) { + this.state[input.name] = { errorMsg: '' } + this.inputText[input.name] = '' + } + } + //validate input when blur + handleBlur = (e, validResult) => { + const name = e.target.name + this.inputText[name] = e.target.value + if (!validResult.isValid) { + this.setState({ + [name]: { errorMsg: validResult.errorMsg } + }) + } else { + this.setState({ + [name]: { errorMsg: '' } + }) + } + } + // when focus, clear error message + handleFocus = (e) => { + const name = e.target.name + this.setState({ + [name]: { errorMsg: '' } + }) + } + //submit actions + handleClick = () => { + //validate all input + let canSubmit = true + for (const input of this.props.INPUT_CONFIG) { + if (!!!input.validations) continue + for (const v of input.validations) { + let checkResult = v.check(this.inputText[input.name]) + canSubmit = canSubmit && checkResult + if (!checkResult) { + this.setState({ + [input.name]: { errorMsg: v.errMsg } + }) + break + } + } + } + if (!canSubmit) { + console.log('valid fail'); + return + } + if (this.props.title === 'Iniciar Sesion') { + const { email, password } = this.inputText + this.props.submitAction(email, password) + .then(res => { + jumpTo('/dashboard') + // console.log(res) + // console.log('loginsignin res'); + return res + }) + .catch(error => { + // console.log('loginsignin error') + // console.log(error.response) + alert(error.response.data.error.message) + return error + }) + } + if (this.props.title === 'Registrarse') { + const { fullname, email, password, verifyPassword } = this.inputText + this.props.submitAction(fullname, email, password, verifyPassword) + .then(res => { + jumpTo('/login') + }) + .catch(error => { + alert(error.response.data.error.message) + return error + }) + } + } + render() { + return ( +
+
+
+
+ +
+ {this.props.loading && + + } + + {this.props.footer_text} +
+ } + /> +
+
+ ) + } +} diff --git a/src/pages/ingreseProducto/Signin.js b/src/pages/ingreseProducto/Signin.js new file mode 100644 index 0000000..8026836 --- /dev/null +++ b/src/pages/ingreseProducto/Signin.js @@ -0,0 +1,77 @@ +import React from 'react' +import LoginSignin from './LoginSignin' +import { + validateExistence, + validateEmail, + validateLength, + validateLowerCase, + validateUpperCase +} from './utils/validation' + + +const INPUT_CONFIG = [ + { + title: "Nombre", + name: "fullname", + + }, + { + title: "Descripcion", + name: "descripcion", + + }, + { + title: "Link de la imagen", + name: "imagen", + + }, + { + title: "Tallas", + name: "tallas", + }, + { + title: "Precio", + name: "precio", + + }, + { + title: "Color", + name: "color", + + }, + { + title: "Cantidad", + name: "cantidad", + + }, + { + title: "Sexo", + name: "sexo", + + }, + { + title: "Categoria", + name: "categoria", + + }, +] + + +export default function Signin({signin,signin_loading,signin_error}) { + return ( +
+ +
+ ) +} + + + diff --git a/src/pages/ingreseProducto/SigninContainer.js b/src/pages/ingreseProducto/SigninContainer.js new file mode 100644 index 0000000..c681ca8 --- /dev/null +++ b/src/pages/ingreseProducto/SigninContainer.js @@ -0,0 +1,13 @@ +import Signin from './Signin' +import { connect } from 'react-redux' +import { signin } from '../../redux/action/signinAction' + +const mapDispatchToProps = { + signin +} +const mapStoreToProps = state => ({ + signin_loading: state.signin.signin_loading, + signin_error: state.signin.error +}) + +export default connect(mapStoreToProps, mapDispatchToProps)(Signin) diff --git a/src/pages/ingreseProducto/components/Base.js b/src/pages/ingreseProducto/components/Base.js new file mode 100644 index 0000000..22ec400 --- /dev/null +++ b/src/pages/ingreseProducto/components/Base.js @@ -0,0 +1,44 @@ +import styles from '../stylesheets/base.module.sass' +import React from 'react' +import FormInput from './FormInput' +import Button from './Button' +import Footer from './footer' + + +export default function Base({ + title, + inputs, + onInputBlur, + onInputFocus, + onInputChange, + onSubmit, + errorMsg, + button_title, + footer_content +}) { + return ( +
+ +
{title}
+
+ { + inputs.map(({ title,name, validations }) => + + ) + } +
+ ) +} + + diff --git a/src/pages/ingreseProducto/components/Button.js b/src/pages/ingreseProducto/components/Button.js new file mode 100644 index 0000000..89dd676 --- /dev/null +++ b/src/pages/ingreseProducto/components/Button.js @@ -0,0 +1,25 @@ +import React from 'react' + +const outStyle={ + width:'80%', + height:'30px', + marginBottom:'10px', + marginTop:'5px' +} +const btnStyle={ + width:'100%', + height:'100%', + borderRadius:'7px', + background:'rgb(0,100,255)', + color:'white', + fontFamily:'Roboto sans-serif', + fontSize:'15px' +} + +export default function Button({ button_title,onClick }) { + return ( +
+ +
+ ) +} diff --git a/src/pages/ingreseProducto/components/FormInput.js b/src/pages/ingreseProducto/components/FormInput.js new file mode 100644 index 0000000..d05e1a8 --- /dev/null +++ b/src/pages/ingreseProducto/components/FormInput.js @@ -0,0 +1,53 @@ +import React from 'react' +import styles from '../stylesheets/formInput.module.sass' +import capitalizeString from '../utils/capitalizeString' + +/*Construye los inputs*/ +export default function FormInput({ + title, + name, + validations, + errorMessage, + onBlur, + onFocus, +}) { + return ( +
+
+ +
+ +
+ onBlur(e, validate(validations, e.target.value))} + /* Ejecuta una funcion cuando el usuario se enfoca en el campo de entrada*/ + onFocus={onFocus} + /> +
+
+ {errorMessage} +
+
+ ) +} + +const validate = (validations, val) => { + if (validations) { + for (const validation of validations) { + if (!validation.check(val)) { + return { + isValid: false, + errorMsg: validation.errMsg + } + } + } + } + return { isValid: true } +} + diff --git a/src/pages/ingreseProducto/components/footer.js b/src/pages/ingreseProducto/components/footer.js new file mode 100644 index 0000000..4491331 --- /dev/null +++ b/src/pages/ingreseProducto/components/footer.js @@ -0,0 +1,15 @@ +import React from 'react' + +const style={ + fontSize:'15px', + marginBottom:'30px' +} + +export default function footer({content}) { + return ( +
+ {content} +
+ ) +} + diff --git a/src/pages/ingreseProducto/stylesheets/base.module.sass b/src/pages/ingreseProducto/stylesheets/base.module.sass new file mode 100644 index 0000000..38b50e9 --- /dev/null +++ b/src/pages/ingreseProducto/stylesheets/base.module.sass @@ -0,0 +1,22 @@ +.outbox + display: flex + flex-direction: column + align-items: center + background: white + +.logo + width: 200px + height: 130px + background: rgb(238,130,238) + font-size: 50px + color: white + +.title_style + color: blue + width: 80% + font-size: 20px + +.border_style + width: 80% + border-bottom: 1px solid blue + margin-bottom: 5px diff --git a/src/pages/ingreseProducto/stylesheets/formInput.module.sass b/src/pages/ingreseProducto/stylesheets/formInput.module.sass new file mode 100644 index 0000000..9f6690d --- /dev/null +++ b/src/pages/ingreseProducto/stylesheets/formInput.module.sass @@ -0,0 +1,28 @@ +@import url('https://fonts.googleapis.com/css?family=Open+Sans') + +.outbox + display: flex + flex-direction: column + width: 70% + // height: 70px + margin-bottom: 5px + +.label + font-family: 'Open Sans', sans-serif + font-size: 15px + label + margin: 0 + +.input + width: 100% + margin-bottom: 3px + input + width: 100% + height: 100% + border-radius: 5px + border: 1px solid grey + padding: 0 0.5rem + +.errMsg + color: red + font-size: 15px \ No newline at end of file diff --git a/src/pages/ingreseProducto/stylesheets/loginsignin.module.sass b/src/pages/ingreseProducto/stylesheets/loginsignin.module.sass new file mode 100644 index 0000000..6749fc8 --- /dev/null +++ b/src/pages/ingreseProducto/stylesheets/loginsignin.module.sass @@ -0,0 +1,22 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto') + +.header + +.outbox + min-width: max-content + min-width: 500px + 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 + + + diff --git a/src/pages/ingreseProducto/utils/capitalizeString.js b/src/pages/ingreseProducto/utils/capitalizeString.js new file mode 100644 index 0000000..e46242a --- /dev/null +++ b/src/pages/ingreseProducto/utils/capitalizeString.js @@ -0,0 +1,7 @@ + + +const capitalizeString=(str)=>{ + return str.charAt(0).toUpperCase()+str.slice(1) +} + +export default capitalizeString \ No newline at end of file diff --git a/src/pages/ingreseProducto/utils/validation.js b/src/pages/ingreseProducto/utils/validation.js new file mode 100644 index 0000000..b05bbb1 --- /dev/null +++ b/src/pages/ingreseProducto/utils/validation.js @@ -0,0 +1,42 @@ +class Validation { + constructor(assertion, rule, errMsg) { + this.assertion = assertion + this.rule = rule + this.errMsg = errMsg + } + check(text) { + return this.rule(text) + } + errMsg() { + return this.errMsg + } +} + +export const validateExistence = new Validation( + 'input should have value', + text => /\S/.test(text), + 'Llene el campo' +) +export const validateEmail = new Validation( + 'input should be an email', + text => !!text.match(/[\w-]+@([\w-]+\.)+[\w-]+/i), + 'Correo Electronico' +) +export const validateLength = (min_len, max_len) => { + const regex = new RegExp(`(?=.{${min_len},${max_len}})`, 'g') + return new Validation( + 'input should within certain length', + text => !!text.match(regex), + `La contraseña debe tener entre ${min_len} y ${max_len} caracteres` + ) +} +export const validateLowerCase = new Validation( + 'input should have an uppercase', + text => !!text.match(/(?=.*[A-Z])/g), + 'La contraseña debe tener al menos una mayuscula' +) +export const validateUpperCase = new Validation( + 'input should have lowercase', + text => !!text.match(/(?=.*[a-z])/g), + 'La contraseña debe tener al menos una minuscula' +) \ No newline at end of file diff --git a/src/pages/loginsignin/components/FormInput.js b/src/pages/loginsignin/components/FormInput.js index d978594..12a569d 100644 --- a/src/pages/loginsignin/components/FormInput.js +++ b/src/pages/loginsignin/components/FormInput.js @@ -2,7 +2,7 @@ import React from 'react' import styles from '../stylesheets/formInput.module.sass' import capitalizeString from '../utils/capitalizeString' - +/*Construye los inputs*/ export default function FormInput({ title, name, @@ -16,12 +16,17 @@ export default function FormInput({
+
-1 ? 'password' : 'text'} name={name} + /* texto que va en la parte interior del input como referencia */ placeholder={title} + /* Ejecuta una funcion cuando el usuario abandona el campo de entrada*/ onBlur={(e) => onBlur(e, validate(validations, e.target.value))} + /* Ejecuta una funcion cuando el usuario se enfoca en el campo de entrada*/ onFocus={onFocus} />
From 463d88a1b9c808690c0a480796bddedf68e079de Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 24 Jan 2021 20:11:56 -0500 Subject: [PATCH 30/33] Update Verificando Pull --- src/components/header/components/UserHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/header/components/UserHeader.js b/src/components/header/components/UserHeader.js index 79f80af..6c0b25a 100644 --- a/src/components/header/components/UserHeader.js +++ b/src/components/header/components/UserHeader.js @@ -18,7 +18,7 @@ export default function UserHeader({ user_token }) { Salir jumpTo('/ingrese')}> - Ingrese Producto + Ingresar Producto
From 13710e8d40a171d50ff4133a010f94fd76a1f35a Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 25 Jan 2021 16:45:31 -0500 Subject: [PATCH 31/33] Eso es todo ... --- src/pages/ingreseProducto/LoginSignin.js | 13 +++---------- src/pages/ingreseProducto/Signin.js | 7 +++---- src/pages/loginsignin/LoginSignin.js | 6 ++++-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/pages/ingreseProducto/LoginSignin.js b/src/pages/ingreseProducto/LoginSignin.js index b62645e..6067282 100644 --- a/src/pages/ingreseProducto/LoginSignin.js +++ b/src/pages/ingreseProducto/LoginSignin.js @@ -75,16 +75,9 @@ export default class LoginSignin extends Component { return error }) } - if (this.props.title === 'Registrarse') { - const { fullname, email, password, verifyPassword } = this.inputText - this.props.submitAction(fullname, email, password, verifyPassword) - .then(res => { - jumpTo('/login') - }) - .catch(error => { - alert(error.response.data.error.message) - return error - }) + if (this.props.title === 'Registrar Producto') { + alert("ESO ES TODO AMIGOS 😥") + //window.location.href = 'https://www.youtube.com/watch?v=BtLSaxRnIhc'; } } render() { diff --git a/src/pages/ingreseProducto/Signin.js b/src/pages/ingreseProducto/Signin.js index 8026836..5a38b85 100644 --- a/src/pages/ingreseProducto/Signin.js +++ b/src/pages/ingreseProducto/Signin.js @@ -52,7 +52,6 @@ const INPUT_CONFIG = [ { title: "Categoria", name: "categoria", - }, ] @@ -65,9 +64,9 @@ export default function Signin({signin,signin_loading,signin_error}) { title="Registrar Producto" footer_text="Asegurese de ingresar de manera correcta los datos de su producto" footer_redirect="Iniciar Sesion" - //submitAction={signin} - //loading={signin_loading} - //signin_error={signin_error} + submitAction={signin} + loading={signin_loading} + signin_error={signin_error} />
) diff --git a/src/pages/loginsignin/LoginSignin.js b/src/pages/loginsignin/LoginSignin.js index b26e17f..bf0bd0f 100644 --- a/src/pages/loginsignin/LoginSignin.js +++ b/src/pages/loginsignin/LoginSignin.js @@ -10,6 +10,7 @@ export default class LoginSignin extends Component { constructor(props) { super(props) this.state = {} + this.algo = "algo" this.inputText = {} for (const input of props.INPUT_CONFIG) { this.state[input.name] = { errorMsg: '' } @@ -75,9 +76,10 @@ export default class LoginSignin extends Component { }) } if (this.props.title === 'Registrarse') { + //desestructurando los input const { fullname, email, password, verifyPassword } = this.inputText - this.props.submitAction(fullname, email, password, verifyPassword) - .then(res => { + this.props.submitAction(fullname, email, password, verifyPassword)//////////////////// + .then(res => { jumpTo('/login') }) .catch(error => { From 3b107886f194e7c619ae75ed5d636c73ac8a939e Mon Sep 17 00:00:00 2001 From: Roxana Date: Mon, 25 Jan 2021 16:45:51 -0500 Subject: [PATCH 32/33] roxanabot --- roxanabot.txt.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 roxanabot.txt.txt diff --git a/roxanabot.txt.txt b/roxanabot.txt.txt new file mode 100644 index 0000000..e69de29 From 1cc2d8df62d162801730a11c948ffbdf58e122fc Mon Sep 17 00:00:00 2001 From: Andre Salcedo <171572@unsaac.edu.pe> Date: Wed, 10 Feb 2021 16:15:50 -0500 Subject: [PATCH 33/33] Prueba aaaaaa --- src/pages/loginsignin/stylesheets/base.module.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/loginsignin/stylesheets/base.module.sass b/src/pages/loginsignin/stylesheets/base.module.sass index 38b50e9..c99df6f 100644 --- a/src/pages/loginsignin/stylesheets/base.module.sass +++ b/src/pages/loginsignin/stylesheets/base.module.sass @@ -8,7 +8,7 @@ width: 200px height: 130px background: rgb(238,130,238) - font-size: 50px + font-size: 55px color: white .title_style