From cbbb633a9aaa804fb063b3053bc2b5d75c3d8ace Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Tue, 7 Jul 2020 14:47:43 -0300 Subject: [PATCH 01/24] =?UTF-8?q?Componentiza=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 132 +++++++++++++++++++-------- src/components/CriacaoDeServicos.js | 0 src/components/Footer.js | 0 src/components/Header.js | 0 src/components/Home.js | 0 src/components/servicos/Filtro.js | 0 src/components/servicos/Ordenacao.js | 0 src/components/servicos/Servicos.js | 0 8 files changed, 96 insertions(+), 36 deletions(-) create mode 100644 src/components/CriacaoDeServicos.js create mode 100644 src/components/Footer.js create mode 100644 src/components/Header.js create mode 100644 src/components/Home.js create mode 100644 src/components/servicos/Filtro.js create mode 100644 src/components/servicos/Ordenacao.js create mode 100644 src/components/servicos/Servicos.js diff --git a/package-lock.json b/package-lock.json index 25ba83f..16a367f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7385,7 +7385,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7403,11 +7404,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7420,15 +7423,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7531,7 +7537,8 @@ }, "inherits": { "version": "2.0.4", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7541,6 +7548,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7553,17 +7561,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.5", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7580,6 +7591,7 @@ "mkdirp": { "version": "0.5.3", "bundled": true, + "optional": true, "requires": { "minimist": "^1.2.5" } @@ -7635,7 +7647,8 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "npm-packlist": { "version": "1.4.8", @@ -7660,7 +7673,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7670,6 +7684,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -7738,7 +7753,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7768,6 +7784,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7785,6 +7802,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7823,11 +7841,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.1.1", - "bundled": true + "bundled": true, + "optional": true } } } @@ -13852,7 +13872,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -13870,11 +13891,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -13887,15 +13910,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -13998,7 +14024,8 @@ }, "inherits": { "version": "2.0.4", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -14008,6 +14035,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -14020,17 +14048,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.5", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -14047,6 +14078,7 @@ "mkdirp": { "version": "0.5.3", "bundled": true, + "optional": true, "requires": { "minimist": "^1.2.5" } @@ -14102,7 +14134,8 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "npm-packlist": { "version": "1.4.8", @@ -14127,7 +14160,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -14137,6 +14171,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -14205,7 +14240,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -14235,6 +14271,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -14252,6 +14289,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -14290,11 +14328,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.1.1", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -14619,7 +14659,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -14637,11 +14678,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -14654,15 +14697,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -14765,7 +14811,8 @@ }, "inherits": { "version": "2.0.4", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -14775,6 +14822,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -14787,17 +14835,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.5", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.9.0", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -14814,6 +14865,7 @@ "mkdirp": { "version": "0.5.3", "bundled": true, + "optional": true, "requires": { "minimist": "^1.2.5" } @@ -14869,7 +14921,8 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "npm-packlist": { "version": "1.4.8", @@ -14894,7 +14947,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -14904,6 +14958,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -14972,7 +15027,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -15002,6 +15058,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -15019,6 +15076,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -15057,11 +15115,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.1.1", - "bundled": true + "bundled": true, + "optional": true } } }, diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Footer.js b/src/components/Footer.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Header.js b/src/components/Header.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Home.js b/src/components/Home.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/servicos/Filtro.js b/src/components/servicos/Filtro.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/servicos/Ordenacao.js b/src/components/servicos/Ordenacao.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js new file mode 100644 index 0000000..e69de29 From 6f74a5d96fa2e076e7276b93061f2503f8c2ad52 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Tue, 7 Jul 2020 17:11:39 -0300 Subject: [PATCH 02/24] =?UTF-8?q?Layout=20b=C3=A1sico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppContainer.js | 18 ++++++- src/components/CriacaoDeServicos.js | 66 +++++++++++++++++++++++++ src/components/Footer.js | 15 ++++++ src/components/Header.js | 15 ++++++ src/components/Home.js | 23 +++++++++ src/components/servicos/Servicos.js | 74 +++++++++++++++++++++++++++++ 6 files changed, 210 insertions(+), 1 deletion(-) diff --git a/src/components/AppContainer.js b/src/components/AppContainer.js index a0b7945..3df2e9d 100644 --- a/src/components/AppContainer.js +++ b/src/components/AppContainer.js @@ -1,11 +1,27 @@ import React, { Component } from 'react' +import Servicos from './servicos/Servicos' +import Home from './Home' +import CriacaoDeServicos from './CriacaoDeServicos' +import Header from './Header' +import Footer from './Footer' export class AppContainer extends Component { + + state = { + + } + render() { + return (
- +
+ + + +
) + } } diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index e69de29..2bb4246 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -0,0 +1,66 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class CriacaoDeServicos extends React.Component { + + state = { + inputTitulo: "", + inputDescricao: "", + inputValorDaRemuneracao: "", + inputPrazo: "" + } + + onChangeInputTitulo = (event) => { + this.setState({inputTitulo: event.target.value}) + } + + onChangeInputDescricao = (event) => { + this.setState({inputDescricao: event.target.value}) + } + + onChangeInputValorDaRemuneracao = (event) => { + this.setState({inputValorDaRemuneracao: event.target.value}) + } + + onChangeInputPrazo = (event) => { + this.setState({inputPrazo: event.target.value}) + } + + render () { + + return ( +
+ + + + + + + + +
+ Transferência Bancaria + Débito + Crédito + Dinheiro + Boleto +
+
+ ) + } +} + +export default CriacaoDeServicos \ No newline at end of file diff --git a/src/components/Footer.js b/src/components/Footer.js index e69de29..63eb902 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -0,0 +1,15 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class Footer extends React.Component { + render () { + return ( +
+

Future Ninjas

+
+ ) + } +} + +export default Footer \ No newline at end of file diff --git a/src/components/Header.js b/src/components/Header.js index e69de29..9ecaa53 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -0,0 +1,15 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class Servicos extends React.Component { + render () { + return ( +
+

Futere Ninjas

+
+ ) + } +} + +export default Servicos \ No newline at end of file diff --git a/src/components/Home.js b/src/components/Home.js index e69de29..fb5a107 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -0,0 +1,23 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class Home extends React.Component { + render () { + return ( +
+
+

O jeito mais esperto de contratar um serviço

+

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

+ +
+
+

Você é profissional?

+ +
+
+ ) + } +} + +export default Home \ No newline at end of file diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index e69de29..3678c9e 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -0,0 +1,74 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class Servicos extends React.Component { + + state = { + inputValorMaximo: "", + inputValorMínimo: "", + inputTitulo: "", + inputDescricao: "", + selectOrdenacao: "" + } + + onChangeValorMaximo = (event) => { + this.setState({inputValorMaximo: event.target.value}) + } + + onChangeValorMinimo = (event) => { + this.setState({inputValorMínimo: event.target.value}) + } + + onChangeTitulo = (event) => { + this.setState({inputTitulo: event.target.value}) + } + + onChangeDescricao = (event) => { + this.setState({inputDescricao: event.target.value}) + } + + render () { + + console.log(this.state.inputTitulo) + console.log(this.state.inputDescricao) + console.log(this.state.inputValorMaximo) + console.log(this.state.inputValorMínimo) + + return ( +
+ + + + + + + + + +
+ ) + } + +} + +export default Servicos \ No newline at end of file From a0d5a42e6972046cd484a57490f2a5638cbebe5c Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Tue, 7 Jul 2020 19:38:32 -0300 Subject: [PATCH 03/24] =?UTF-8?q?Renderiza=C3=A7=C3=A3o=20condicional=20e?= =?UTF-8?q?=20o=20controle=20do=20select?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppContainer.js | 39 +++++++++++++++++++++++++---- src/components/CriacaoDeServicos.js | 1 + src/components/Home.js | 11 ++++++-- src/components/servicos/Servicos.js | 22 ++++++++++------ 4 files changed, 59 insertions(+), 14 deletions(-) diff --git a/src/components/AppContainer.js b/src/components/AppContainer.js index 3df2e9d..5056454 100644 --- a/src/components/AppContainer.js +++ b/src/components/AppContainer.js @@ -1,24 +1,53 @@ import React, { Component } from 'react' -import Servicos from './servicos/Servicos' import Home from './Home' -import CriacaoDeServicos from './CriacaoDeServicos' import Header from './Header' +import CriacaoDeServicos from './CriacaoDeServicos' +import Servicos from './servicos/Servicos' import Footer from './Footer' export class AppContainer extends Component { state = { + paginaSelecionada: "home" + } + onClickVoltar = () => { + this.setState({paginaSelecionada: "home"}) + } + + onClickCriarServico = () => { + this.setState({paginaSelecionada: "criacaodeservicos"}) + } + + onClickServicos = () => { + this.setState({paginaSelecionada: "servicos"}) } render() { + const renderizaNaTela = () => { + + switch (this.state.paginaSelecionada) { + case "home": + return + case "servicos": + return + case "criacaodeservicos": + return + } + } + return (
- - - + {renderizaNaTela()}
) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index 2bb4246..f5ec654 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -58,6 +58,7 @@ class CriacaoDeServicos extends React.Component { Dinheiro Boleto + ) } diff --git a/src/components/Home.js b/src/components/Home.js index fb5a107..b789918 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -3,17 +3,24 @@ import styled from 'styled-components' import axios from 'axios' class Home extends React.Component { + + state = { + + } + render () { + + return (

O jeito mais esperto de contratar um serviço

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

- +

Você é profissional?

- +
) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 3678c9e..b4b865e 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -28,6 +28,10 @@ class Servicos extends React.Component { this.setState({inputDescricao: event.target.value}) } + onChangeSelect = (event) => { + this.setState({selectOrdenacao: event.target.value}) + } + render () { console.log(this.state.inputTitulo) @@ -35,6 +39,8 @@ class Servicos extends React.Component { console.log(this.state.inputValorMaximo) console.log(this.state.inputValorMínimo) + console.log(this.state.selectOrdenacao) + return (
@@ -57,14 +63,16 @@ class Servicos extends React.Component { onChange={this.onChangeDescricao} value={this.state.inputDescricao} /> - + + + + + + + +
) } From 108907a73da69895ce5156c9302783511cce25c0 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 07:57:15 -0300 Subject: [PATCH 04/24] =?UTF-8?q?Adi=C3=A7=C3=A3o=20do=20bot=C3=A3o=20filt?= =?UTF-8?q?rar=20e=20renderiza=C3=A7=C3=A3o=20inicial=20do=20filtro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/Filtro.js | 13 +++++++++++++ src/components/servicos/Servicos.js | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/src/components/servicos/Filtro.js b/src/components/servicos/Filtro.js index e69de29..1bd2f1f 100644 --- a/src/components/servicos/Filtro.js +++ b/src/components/servicos/Filtro.js @@ -0,0 +1,13 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class Filtro extends React.Component { + render () { + return( +
Teste
+ ) + } +} + +export default Filtro \ No newline at end of file diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index b4b865e..a41ace1 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -1,6 +1,7 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' +import Filtro from './Filtro' class Servicos extends React.Component { @@ -72,6 +73,10 @@ class Servicos extends React.Component { + +
+ +
) From 1dfa9b70ef96e92e352dbec4401311b1b0091e75 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 08:00:19 -0300 Subject: [PATCH 05/24] =?UTF-8?q?Adi=C3=A7=C3=A3o=20do=20Bot=C3=A3o=20de?= =?UTF-8?q?=20Cadastrar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index f5ec654..2461f7c 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -58,6 +58,7 @@ class CriacaoDeServicos extends React.Component { Dinheiro Boleto + ) From bb6578e2102e8a8f8bc36d98c1998044efea6766 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 08:44:38 -0300 Subject: [PATCH 06/24] Props para o componente filtro --- src/components/servicos/Filtro.js | 4 +++- src/components/servicos/Servicos.js | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/servicos/Filtro.js b/src/components/servicos/Filtro.js index 1bd2f1f..1cc0619 100644 --- a/src/components/servicos/Filtro.js +++ b/src/components/servicos/Filtro.js @@ -5,7 +5,9 @@ import axios from 'axios' class Filtro extends React.Component { render () { return( -
Teste
+
+ teste +
) } } diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index a41ace1..6ca1db7 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -75,7 +75,13 @@ class Servicos extends React.Component {
- +
From f3730fa9eabf404169f3601cede10378af462c71 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 11:46:07 -0300 Subject: [PATCH 07/24] =?UTF-8?q?Adicionamos=20a=20requisi=C3=A7=C3=A3o=20?= =?UTF-8?q?de=20servi=C3=A7os=20cadastrados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/CardServico.js | 24 ++++++++++++++++++++++++ src/components/servicos/Filtro.js | 21 ++++++++++++++++++++- src/components/servicos/Servicos.js | 7 ------- 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 src/components/servicos/CardServico.js diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js new file mode 100644 index 0000000..3e2b2ad --- /dev/null +++ b/src/components/servicos/CardServico.js @@ -0,0 +1,24 @@ +import React from 'react' +import styled from 'styled-components' +import axios from 'axios' + +class CardServico extends React.Component { + + render () { + + console.log(this.props.lista) + + return( +
+ {this.props.lista.map((servico) => { + return ( +
Título: {servico.title} Descrição: {servico.description} Valor: {servico.value} Data de Vencimento: {servico.dueDate} Pagamento: {servico.paymentMethods}
+ ) + })} +
+ ) + } + +} + +export default CardServico \ No newline at end of file diff --git a/src/components/servicos/Filtro.js b/src/components/servicos/Filtro.js index 1cc0619..1810e74 100644 --- a/src/components/servicos/Filtro.js +++ b/src/components/servicos/Filtro.js @@ -1,15 +1,34 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' +import CardServico from './CardServico' class Filtro extends React.Component { + + state = { + listaDeServicos: [], + } + + componentDidMount = () => { + axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) + .then((response) => { + this.setState({listaDeServicos: response.data.jobs}) + }).catch((error) => { + console.log(error.message) + }) + } + render () { + return(
- teste +
) } + } export default Filtro \ No newline at end of file diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 6ca1db7..c7e4255 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -35,13 +35,6 @@ class Servicos extends React.Component { render () { - console.log(this.state.inputTitulo) - console.log(this.state.inputDescricao) - console.log(this.state.inputValorMaximo) - console.log(this.state.inputValorMínimo) - - console.log(this.state.selectOrdenacao) - return (
From c381e8297591736a8c81c7c475b5666f662f28f6 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 13:29:59 -0300 Subject: [PATCH 08/24] =?UTF-8?q?Nova=20Componentiza=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/CardServico.js | 8 +++--- src/components/servicos/Filtro.js | 34 -------------------------- src/components/servicos/Ordenacao.js | 0 src/components/servicos/Servicos.js | 22 +++++++++++------ 4 files changed, 18 insertions(+), 46 deletions(-) delete mode 100644 src/components/servicos/Filtro.js delete mode 100644 src/components/servicos/Ordenacao.js diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 3e2b2ad..7d368c8 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -10,11 +10,11 @@ class CardServico extends React.Component { return(
- {this.props.lista.map((servico) => { - return ( + {this.props.lista.map((servico) => { + return (
Título: {servico.title} Descrição: {servico.description} Valor: {servico.value} Data de Vencimento: {servico.dueDate} Pagamento: {servico.paymentMethods}
- ) - })} + ) + })}
) } diff --git a/src/components/servicos/Filtro.js b/src/components/servicos/Filtro.js deleted file mode 100644 index 1810e74..0000000 --- a/src/components/servicos/Filtro.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import axios from 'axios' -import CardServico from './CardServico' - -class Filtro extends React.Component { - - state = { - listaDeServicos: [], - } - - componentDidMount = () => { - axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) - .then((response) => { - this.setState({listaDeServicos: response.data.jobs}) - }).catch((error) => { - console.log(error.message) - }) - } - - render () { - - return( -
- -
- ) - } - -} - -export default Filtro \ No newline at end of file diff --git a/src/components/servicos/Ordenacao.js b/src/components/servicos/Ordenacao.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index c7e4255..5620de9 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -1,7 +1,7 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' -import Filtro from './Filtro' +import CardServico from './CardServico' class Servicos extends React.Component { @@ -10,7 +10,17 @@ class Servicos extends React.Component { inputValorMínimo: "", inputTitulo: "", inputDescricao: "", - selectOrdenacao: "" + selectOrdenacao: "", + listaDeServicos: [], + } + + componentDidMount = () => { + axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) + .then((response) => { + this.setState({listaDeServicos: response.data.jobs}) + }).catch((error) => { + console.log(error.message) + }) } onChangeValorMaximo = (event) => { @@ -68,12 +78,8 @@ class Servicos extends React.Component {
-
From 94134b279ed7750d8d028c64ba5481f238eb3ef0 Mon Sep 17 00:00:00 2001 From: Kamila Melo Date: Wed, 8 Jul 2020 15:50:15 -0300 Subject: [PATCH 09/24] =?UTF-8?q?Feita=20a=20parte=20de=20todas=20as=20ord?= =?UTF-8?q?enar=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/Servicos.js | 58 +++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 5620de9..e6282d6 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -10,7 +10,7 @@ class Servicos extends React.Component { inputValorMínimo: "", inputTitulo: "", inputDescricao: "", - selectOrdenacao: "", + selectOrdem: "", listaDeServicos: [], } @@ -39,12 +39,55 @@ class Servicos extends React.Component { this.setState({inputDescricao: event.target.value}) } - onChangeSelect = (event) => { - this.setState({selectOrdenacao: event.target.value}) - } + onChangeSelectOrdem = (event) => { + this.setState({selectOrdem: event.target.value}) + } + render () { + function ordenaTituloAZ(a,b){ + return (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0); + } + function ordenaTituloZA(a,b){ + return (b.title > a.title) ? 1 : ((a.title > b.title) ? -1 : 0); + } + + function ordenaPrecoMenor (a,b){ + return a.value - b.value + } + function ordenaPrecoMaior (a,b){ + return b.value - a.value + } + + function ordenaPrazoMenor (a,b){ + return (a.dueDate > b.dueDate) ? 1 : ((b.dueDate > a.dueDate) ? -1 : 0); + } + function ordenaPrazoMaior (a,b){ + return (b.dueDate > a.dueDate) ? 1 : ((a.dueDate > b.dueDate) ? -1 : 0); + } + + switch(this.state.selectOrdem){ + case 'OrdemAZ': + this.state.listaDeServicos.sort(ordenaTituloAZ) + break; + case 'OrdemZA': + this.state.listaDeServicos.sort(ordenaTituloZA) + break; + case 'MenorPreco': + this.state.listaDeServicos.sort(ordenaPrecoMenor) + break; + case 'MaiorPreco': + this.state.listaDeServicos.sort(ordenaPrecoMaior) + break; + case 'MenorPrazo': + this.state.listaDeServicos.sort(ordenaPrazoMenor) + break; + case 'MaiorPrazo': + this.state.listaDeServicos.sort(ordenaPrazoMaior) + break; + } + return (
@@ -67,14 +110,15 @@ class Servicos extends React.Component { onChange={this.onChangeDescricao} value={this.state.inputDescricao} /> - - + - +
From f61619d55394f5dfd7b4775fea341f5044b5698f Mon Sep 17 00:00:00 2001 From: Diego Miyabara Date: Wed, 8 Jul 2020 16:07:32 -0300 Subject: [PATCH 10/24] =?UTF-8?q?Estiliza=C3=A7=C3=A3o=20inicial=20CardSer?= =?UTF-8?q?vicos=20e=20inicio=20da=20funcionalidade=20da=20cria=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20Servi=C3=A7os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 124 +++++++++++++++++++------ src/components/servicos/CardServico.js | 37 +++++++- 2 files changed, 128 insertions(+), 33 deletions(-) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index 2461f7c..5a88d9a 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -2,6 +2,29 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' +const ContainerCheckBox = styled.div` + display: flex; + justify-content: space-between; + padding: 0 8px; +` +const FormCheckBox = styled.form` + border: 1px solid black; + width: 15vw; + border-radius: 5px; + margin: 10px auto; +` +const ContainerInputs = styled.div` + display: flex; + justify-content: space-between; + width: 25vw; + margin: 8px auto; +` +const ContainerButtons = styled.div` + width: 10vw; + display: flex; + justify-content:space-between; + margin: 0 auto; +` class CriacaoDeServicos extends React.Component { state = { @@ -27,39 +50,82 @@ class CriacaoDeServicos extends React.Component { this.setState({inputPrazo: event.target.value}) } + cadastroServico = () => { + const body = { + "title": this.state.inputTitulo, + "description": this.state.inputDescricao, + "value": this.state.inputValorDaRemuneracao, + "paymentMethods": ["card"], + "dueDate": this.state.inputPrazo + } + axios.post('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs', body).then( + alert("Serviço cadastrado com sucesso!") + ).catch(err => { + console.log(err) + }) + } + render () { return (
- - - - - - - - -
- Transferência Bancaria - Débito - Crédito - Dinheiro - Boleto -
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
) } diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 7d368c8..790f43e 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -1,6 +1,29 @@ import React from 'react' import styled from 'styled-components' -import axios from 'axios' + +const ContainerCard = styled.div` +border: 1px solid black; +border-radius: 20px; +padding: 16px; +` + +const H2Card = styled.h2` +margin: 12px 0; +padding: 0; +` +const H3Card = styled.h3` +margin: 0; +padding: 0; +` + +const ContainerCardServico = styled.div` + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + gap: 16px; + padding:8px; + width: 100%; + +` class CardServico extends React.Component { @@ -9,13 +32,19 @@ class CardServico extends React.Component { console.log(this.props.lista) return( -
+ {this.props.lista.map((servico) => { return ( -
Título: {servico.title} Descrição: {servico.description} Valor: {servico.value} Data de Vencimento: {servico.dueDate} Pagamento: {servico.paymentMethods}
+ + Título: {servico.title} + Descrição: {servico.description} +

Valor: R$ {servico.value}

+

Data de Vencimento: {servico.dueDate}

+

Pagamento: {servico.paymentMethods}

+
) })} -
+ ) } From 6828ed984b5ba9a2566930675ea4e83f0fdda448 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Wed, 8 Jul 2020 17:39:33 -0300 Subject: [PATCH 11/24] Filtros inseridos --- src/components/servicos/CardServico.js | 2 - src/components/servicos/Servicos.js | 63 +++++++++++++++++++++++--- 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 7d368c8..18fab82 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -6,8 +6,6 @@ class CardServico extends React.Component { render () { - console.log(this.props.lista) - return(
{this.props.lista.map((servico) => { diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 5620de9..c05ce99 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -7,17 +7,18 @@ class Servicos extends React.Component { state = { inputValorMaximo: "", - inputValorMínimo: "", + inputValorMinimo: "", inputTitulo: "", inputDescricao: "", selectOrdenacao: "", listaDeServicos: [], + listaFiltrada: [] } componentDidMount = () => { axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) .then((response) => { - this.setState({listaDeServicos: response.data.jobs}) + this.setState({listaDeServicos: response.data.jobs, listaFiltrada: response.data.jobs} ) }).catch((error) => { console.log(error.message) }) @@ -28,7 +29,7 @@ class Servicos extends React.Component { } onChangeValorMinimo = (event) => { - this.setState({inputValorMínimo: event.target.value}) + this.setState({inputValorMinimo: event.target.value}) } onChangeTitulo = (event) => { @@ -43,6 +44,51 @@ class Servicos extends React.Component { this.setState({selectOrdenacao: event.target.value}) } + onClickFiltro = () => { + + if (this.state.inputValorMinimo !== "" || this.state.inputValorMaximo !== "") { + const novaListaFiltrada = this.state.listaDeServicos.filter((servico) => { + if (this.state.inputValorMinimo !== "" && this.state.inputValorMaximo !== "") { + if (servico.value >= this.state.inputValorMinimo && servico.value <= this.state.inputValorMaximo) { + return true + } + } else if (this.state.inputValorMinimo === "") { + if (servico.value <= this.state.inputValorMaximo) { + return true + } + } else if (this.state.inputValorMaximo === "") { + if (servico.value >= this.state.inputValorMinimo) { + return true + } + } + }) + this.setState({listaFiltrada: novaListaFiltrada, inputValorMinimo: "", inputValorMaximo: ""}) + } else { + const novaListaFiltrada2 = this.state.listaDeServicos.filter((servico) => { + return true + }) + this.setState({listaFiltrada: novaListaFiltrada2}) + } + + if (this.state.inputTitulo !== "" && this.state.inputDescricao === "") { + const novaListaFiltrada3 = this.state.listaDeServicos.filter((servico) => { + if (this.state.inputTitulo === servico.title) { + return true + } + }) + this.setState({listaFiltrada: novaListaFiltrada3, inputTitulo: ""}) + } + + if (this.state.inputDescricao !== "" && this.state.inputTitulo === "") { + const novaListaFiltrada4 = this.state.listaDeServicos.filter((servico) => { + if (this.state.inputDescricao === servico.description) { + return true + } + }) + this.setState({listaFiltrada: novaListaFiltrada4, inputDescricao: ""}) + } + } + render () { return ( @@ -50,7 +96,7 @@ class Servicos extends React.Component { Maior Prazo - +
@@ -89,4 +135,7 @@ class Servicos extends React.Component { } -export default Servicos \ No newline at end of file +export default Servicos + +/* && this.state.inputTitulo !== "" */ +/* && servico.title === this.state.inputTitulo */ \ No newline at end of file From e29a2ebe36016af4c82e7eb20c1a88fb572b0459 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Thu, 9 Jul 2020 10:01:39 -0300 Subject: [PATCH 12/24] Resolvendo Conflitos --- src/components/servicos/Servicos.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index af15d9c..9837bac 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -42,7 +42,7 @@ class Servicos extends React.Component { onChangeSelectOrdem = (event) => { this.setState({selectOrdem: event.target.value}) - + } onClickFiltro = () => { @@ -87,11 +87,7 @@ class Servicos extends React.Component { }) this.setState({listaFiltrada: novaListaFiltrada4, inputDescricao: ""}) } - } - - - } - + } render () { @@ -119,21 +115,27 @@ class Servicos extends React.Component { switch(this.state.selectOrdem){ case 'OrdemAZ': this.state.listaDeServicos.sort(ordenaTituloAZ) + this.state.listaFiltrada.sort(ordenaTituloAZ) break; case 'OrdemZA': this.state.listaDeServicos.sort(ordenaTituloZA) + this.state.listaFiltrada.sort(ordenaTituloZA) break; case 'MenorPreco': this.state.listaDeServicos.sort(ordenaPrecoMenor) + this.state.listaFiltrada.sort(ordenaPrecoMenor) break; case 'MaiorPreco': this.state.listaDeServicos.sort(ordenaPrecoMaior) + this.state.listaFiltrada.sort(ordenaPrecoMaior) break; case 'MenorPrazo': this.state.listaDeServicos.sort(ordenaPrazoMenor) + this.state.listaFiltrada.sort(ordenaPrazoMenor) break; case 'MaiorPrazo': this.state.listaDeServicos.sort(ordenaPrazoMaior) + this.state.listaFiltrada.sort(ordenaPrazoMaior) break; } From b2f384d91b7b8ee8dd7f3991d7fb3b988394c814 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Thu, 9 Jul 2020 10:04:15 -0300 Subject: [PATCH 13/24] =?UTF-8?q?Apagando=20Coment=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/Servicos.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 9837bac..d72e85f 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -184,7 +184,4 @@ class Servicos extends React.Component { } -export default Servicos - -/* && this.state.inputTitulo !== "" */ -/* && servico.title === this.state.inputTitulo */ \ No newline at end of file +export default Servicos \ No newline at end of file From 96d0acecb7c8fd11edda92ebf0e843305facc85a Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Thu, 9 Jul 2020 10:09:56 -0300 Subject: [PATCH 14/24] =?UTF-8?q?Bot=C3=A3o=20de=20Canditar-me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/CardServico.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 7401d1f..e6d9388 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -39,6 +39,7 @@ class CardServico extends React.Component {

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

Pagamento: {servico.paymentMethods}

+ ) })} From 7addc0bb335ff07f84f4ec6a7b40e442db3bad72 Mon Sep 17 00:00:00 2001 From: Kamila Melo Date: Thu, 9 Jul 2020 11:51:25 -0300 Subject: [PATCH 15/24] =?UTF-8?q?Parte=20de=20cadastrar=20servi=C3=A7os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 30 ++++++++++++++++++-------- src/components/Home.js | 4 ++-- src/components/servicos/CardServico.js | 4 +++- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index 5a88d9a..c4b232f 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -31,7 +31,8 @@ class CriacaoDeServicos extends React.Component { inputTitulo: "", inputDescricao: "", inputValorDaRemuneracao: "", - inputPrazo: "" + inputPrazo: "", + metodosPag: [] } onChangeInputTitulo = (event) => { @@ -50,12 +51,23 @@ class CriacaoDeServicos extends React.Component { this.setState({inputPrazo: event.target.value}) } + onChangeChecked = (event) => { + let metodosPag = [...this.state.metodosPag, event.target.id] + if(this.state.metodosPag.includes(event.target.id)){ + metodosPag = metodosPag.filter(metodo => metodo !== event.target.id) + } + this.setState({ + metodosPag: metodosPag + }) + + } + cadastroServico = () => { const body = { "title": this.state.inputTitulo, "description": this.state.inputDescricao, "value": this.state.inputValorDaRemuneracao, - "paymentMethods": ["card"], + "paymentMethods": this.state.metodosPag, "dueDate": this.state.inputPrazo } axios.post('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs', body).then( @@ -66,7 +78,7 @@ class CriacaoDeServicos extends React.Component { } render () { - + console.log(this.state.metodosPag) return (
@@ -102,28 +114,28 @@ class CriacaoDeServicos extends React.Component { - + - + - + - + - + - +
diff --git a/src/components/Home.js b/src/components/Home.js index b789918..393c4c0 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -16,11 +16,11 @@ class Home extends React.Component {

O jeito mais esperto de contratar um serviço

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

- +

Você é profissional?

- +
) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index e6d9388..3c2f517 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -38,7 +38,9 @@ class CardServico extends React.Component { Descrição: {servico.description}

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

-

Pagamento: {servico.paymentMethods}

+

Pagamento: {servico.paymentMethods.map((metodo) => { + return (`${metodo}; `) + })}

) From 5dd42827b360d8a67ed2d37a962eb1cf55800233 Mon Sep 17 00:00:00 2001 From: Diego Miyabara Date: Thu, 9 Jul 2020 16:51:41 -0300 Subject: [PATCH 16/24] =?UTF-8?q?Estiliza=C3=A7=C3=A3o=20Header=20e=20foot?= =?UTF-8?q?er,=20inser=C3=A7=C3=A3o=20de=20botoes=20do=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppContainer.js | 13 ++++++-- src/components/Footer.js | 17 +++++++--- src/components/Header.js | 44 +++++++++++++++++++++++--- src/components/servicos/CardServico.js | 4 ++- 4 files changed, 67 insertions(+), 11 deletions(-) diff --git a/src/components/AppContainer.js b/src/components/AppContainer.js index 5056454..69e9777 100644 --- a/src/components/AppContainer.js +++ b/src/components/AppContainer.js @@ -4,6 +4,12 @@ import Header from './Header' import CriacaoDeServicos from './CriacaoDeServicos' import Servicos from './servicos/Servicos' import Footer from './Footer' +import styled from 'styled-components' + +const ContainerRenderiza = styled.div` + position:relative; + margin-bottom: 80px; +` export class AppContainer extends Component { @@ -46,8 +52,11 @@ export class AppContainer extends Component { return (
-
- {renderizaNaTela()} +
+ {renderizaNaTela()}
) diff --git a/src/components/Footer.js b/src/components/Footer.js index 63eb902..b6b5ed3 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -1,13 +1,22 @@ import React from 'react' import styled from 'styled-components' -import axios from 'axios' + +const ContainerFooter = styled.div` +position: fixed; +bottom: 0; +background-color: #2B2D2F; +color: #FFF; +width: 100vw; +text-align: center; +font-size: 0.7em; +` class Footer extends React.Component { render () { return ( -
-

Future Ninjas

-
+ +

Designed and created by Future Ninjas

+
) } } diff --git a/src/components/Header.js b/src/components/Header.js index 9ecaa53..cb31fcc 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,13 +1,49 @@ import React from 'react' import styled from 'styled-components' -import axios from 'axios' + +const H1Header = styled.h1` + margin: 0; + padding: 0; + font-family: Andale Mono, monospace; + cursor: pointer; +` + +const ContainerHeader = styled.div` + display: flex; + justify-content: space-between; + border-bottom: 1px solid grey; + padding: 8px; + align-items: center; + padding: 0 32px; +` + +const ButtonHeader = styled.button` + margin: 16px; + height: 40px; + width: 200px; + background-color: black; + color: #FFF; + border: none; + border-radius: 10px; + cursor: pointer; + outline:none; + :hover{ + background-color: #FFEA52; + color: #474117; + } +` class Servicos extends React.Component { render () { return ( -
-

Futere Ninjas

-
+ + Future Ninjas +
+ PROCURE SERVIÇOS! + SEJA UM PROFISSIONAL! +
+ +
) } } diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index e6d9388..9ff1a54 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -5,6 +5,8 @@ const ContainerCard = styled.div` border: 1px solid black; border-radius: 20px; padding: 16px; +width: 90%; +margin: 0 auto; ` const H2Card = styled.h2` @@ -22,7 +24,7 @@ const ContainerCardServico = styled.div` gap: 16px; padding:8px; width: 100%; - + margin: 16px 0; ` class CardServico extends React.Component { From 5b5064eda81cfafa8b39b208fd7b0aa108caf167 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Thu, 9 Jul 2020 16:57:43 -0300 Subject: [PATCH 17/24] =?UTF-8?q?Funcionalidade=20bot=C3=A3o=20candidatar-?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/CardServico.js | 89 +++++++++++++++++++++----- src/components/servicos/Servicos.js | 9 ++- 2 files changed, 80 insertions(+), 18 deletions(-) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index e6d9388..3a86d05 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -1,5 +1,6 @@ import React from 'react' import styled from 'styled-components' +import axios from 'axios' const ContainerCard = styled.div` border: 1px solid black; @@ -11,6 +12,7 @@ const H2Card = styled.h2` margin: 12px 0; padding: 0; ` + const H3Card = styled.h3` margin: 0; padding: 0; @@ -27,24 +29,79 @@ const ContainerCardServico = styled.div` class CardServico extends React.Component { + state = { + teste: false, + nomeBotao: "" + } + + componentDidMount = () => { + this.props.atualiza() + } + + onClickCandidatar = (Identificador) => { + console.log(this.state.teste) + axios.put(`https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs/${Identificador}/take`,) + .then((response) => { + alert("Você se candidatou na vaga") + this.componentDidMount() + }) + .catch((error) => { + console.log(error.message) + }) + this.setState({teste: !this.state.teste}) + console.log(this.state.teste) + } + + onClickDescandidatar = (Identificador) => { + console.log(this.state.teste) + axios.put(`https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs/${Identificador}/giveup`,) + .then((response) => { + alert("Voce se descandidatou desta vaga") + this.componentDidMount() + }) + .catch((error) => { + console.log(error.message) + }) + this.setState({teste: !this.state.teste}) + console.log(this.state.teste) + } + render () { - return( - - {this.props.lista.map((servico) => { - return ( - - Título: {servico.title} - Descrição: {servico.description} -

Valor: R$ {servico.value}

-

Data de Vencimento: {servico.dueDate}

-

Pagamento: {servico.paymentMethods}

- -
- ) - })} -
- ) + return( + + + {this.props.lista.map((servico) => { + + const renderizaBotao = servico.taken === true ? "Descandidatar-me" : "Candidatar-me" + + if (servico.taken) { + return ( + + Título: {servico.title} + Descrição: {servico.description} +

Valor: R$ {servico.value}

+

Data de Vencimento: {servico.dueDate}

+

Pagamento: {servico.paymentMethods}

+ +
+ ) + } else { + return ( + + Título: {servico.title} + Descrição: {servico.description} +

Valor: R$ {servico.value}

+

Data de Vencimento: {servico.dueDate}

+

Pagamento: {servico.paymentMethods}

+ +
+ ) + } + })} + +
+ ) } } diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index d72e85f..87a1414 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -16,11 +16,15 @@ class Servicos extends React.Component { } componentDidMount = () => { + this.atualizaEstado() + } + + atualizaEstado = () => { axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) .then((response) => { - this.setState({listaDeServicos: response.data.jobs, listaFiltrada: response.data.jobs} ) + this.setState({listaDeServicos: response.data.jobs, listaFiltrada: response.data.jobs} ) }).catch((error) => { - console.log(error.message) + console.log(error.message) }) } @@ -175,6 +179,7 @@ class Servicos extends React.Component {
From 8c6d718dbcc89abb1ba4f7bc6c5c945b81ae3657 Mon Sep 17 00:00:00 2001 From: Diego Miyabara Date: Thu, 9 Jul 2020 17:30:04 -0300 Subject: [PATCH 18/24] =?UTF-8?q?corre=C3=A7=C3=A3o=20de=20conflitos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 3 ++- src/components/servicos/CardServico.js | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index c4b232f..45b34cb 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -71,7 +71,8 @@ class CriacaoDeServicos extends React.Component { "dueDate": this.state.inputPrazo } axios.post('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs', body).then( - alert("Serviço cadastrado com sucesso!") + alert("Serviço cadastrado com sucesso!"), + this.setState({inputTitulo: "", inputDescricao: "", inputValorDaRemuneracao: "", inputPrazo: "", metodosPag: []}) ).catch(err => { console.log(err) }) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index a95048a..658fbb8 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -85,7 +85,9 @@ class CardServico extends React.Component { Descrição: {servico.description}

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

-

Pagamento: {servico.paymentMethods}

+

Pagamento: {servico.paymentMethods.map((metodo) => { + return (`${metodo}; `) + })}

) @@ -96,7 +98,9 @@ class CardServico extends React.Component { Descrição: {servico.description}

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

-

Pagamento: {servico.paymentMethods}

+

Pagamento: {servico.paymentMethods.map((metodo) => { + return (`${metodo}; `) + })}

) From 707ef4393e6c72ba423f53ea1a998bde7ef8cecd Mon Sep 17 00:00:00 2001 From: laisflaviosilva Date: Fri, 10 Jul 2020 11:45:10 -0300 Subject: [PATCH 19/24] lais-branch --- src/components/Footer.js | 1 + src/components/Header.js | 3 +- src/components/Home.js | 65 ++++++++++++++++++++++++++++++++++------ 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/src/components/Footer.js b/src/components/Footer.js index b6b5ed3..3b78382 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -2,6 +2,7 @@ import React from 'react' import styled from 'styled-components' const ContainerFooter = styled.div` +height: 10vh; position: fixed; bottom: 0; background-color: #2B2D2F; diff --git a/src/components/Header.js b/src/components/Header.js index cb31fcc..baa617a 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -9,6 +9,7 @@ const H1Header = styled.h1` ` const ContainerHeader = styled.div` + height: 10vh; display: flex; justify-content: space-between; border-bottom: 1px solid grey; @@ -17,7 +18,7 @@ const ContainerHeader = styled.div` padding: 0 32px; ` -const ButtonHeader = styled.button` +export const ButtonHeader = styled.button` margin: 16px; height: 40px; width: 200px; diff --git a/src/components/Home.js b/src/components/Home.js index 393c4c0..6126ebf 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -2,6 +2,51 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' + +const AreaHome = styled.div` + width: 100vw; + height: 38vh; + display: grid; + grid-template-columns: 1fr 4fr 2fr 3fr; + grid-template-rows: 1fr 1fr ; + grid-gap: 0px 0px; +` +const H2 = styled.h2` + font-size: 40px; + font-family: helvetica''; + /* margin: 45px 0 0 25px;*/ + display: grid; + grid-column: 2/3; + font-weight: lighter; +` + +const H4 = styled.h4` + font-size: 20px; + font-family: ''; + display: grid; + grid-column: 2/4; + grid-row: 2/3; +` + +const ButtonHeader = styled.button` + height: 40px; + width: 200px; + background-color: black; + color: #FFF; + border: none; + border-radius: 10px; + cursor: pointer; + outline:none; + :hover{ + background-color: #FFEA52; + color: #474117; + } + display: grid; + grid-column: 4/4; + grid-row: 2/2; + padding: 4px; +` + class Home extends React.Component { state = { @@ -13,15 +58,17 @@ class Home extends React.Component { return (
-
-

O jeito mais esperto de contratar um serviço

-

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

- -
-
-

Você é profissional?

- -
+ +

O jeito mais esperto de contratar um serviço

+

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

+ QUERO UM PROFISSIONAL AGORA +
+
+ +

Você é profissional?

+

Venha, faça seu anúncio gratuito e amplie seus negócios e sua atuação no mercado

+ CADASTRAR MEUS SERVIÇOS +
) } From 6c6fe9e0144e4e806a9629b65ee6b35f59912e1a Mon Sep 17 00:00:00 2001 From: Diego Miyabara Date: Fri, 10 Jul 2020 11:46:05 -0300 Subject: [PATCH 20/24] =?UTF-8?q?estiliza=C3=A7=C3=A3o=20card=20de=20cria?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20servi=C3=A7os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 117 +++++++++++++++++++--------- src/components/Header.js | 1 + 2 files changed, 81 insertions(+), 37 deletions(-) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index 45b34cb..809bc93 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -1,6 +1,12 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' +import CheckBox from '@material-ui/core/Checkbox' +import TextField from '@material-ui/core/TextField' +import FormGroup from '@material-ui/core/FormGroup' +import FormControlLabel from '@material-ui/core/FormControlLabel' +import FormLabel from '@material-ui/core/FormLabel' +import FormControl from '@material-ui/core/FormControl' const ContainerCheckBox = styled.div` display: flex; @@ -15,8 +21,8 @@ const FormCheckBox = styled.form` ` const ContainerInputs = styled.div` display: flex; - justify-content: space-between; - width: 25vw; + justify-content: center; + width: 50vw; margin: 8px auto; ` const ContainerButtons = styled.div` @@ -25,6 +31,31 @@ const ContainerButtons = styled.div` justify-content:space-between; margin: 0 auto; ` +const StyledTextField = styled(TextField)` + width: 30vw; +` +const ContainerServicos = styled.div` + border: 1px solid black; + width: 50vw; + padding: 16px; + margin: 16px auto; + border-radius: 20px; +` +const ButtonCriacao = styled.button` + margin: 16px; + height: 40px; + width: 200px; + background-color: black; + color: #FFF; + border: none; + border-radius: 10px; + cursor: pointer; + outline:none; + :hover{ + background-color: #FFEA52; + color: #474117; + } +` class CriacaoDeServicos extends React.Component { state = { @@ -81,65 +112,77 @@ class CriacaoDeServicos extends React.Component { render () { console.log(this.state.metodosPag) return ( -
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Formas de Pagamento + + + } + label="Transferência Bancária" + /> + + } + label="Cartão de débito" + /> + + } + label="Cartão de Crédito" + /> + + } + label="Dinheiro" + /> + + } + label="Cartão de Crédito" + /> + + - - + Cadastrar + Voltar -
+ ) } } diff --git a/src/components/Header.js b/src/components/Header.js index cb31fcc..076b0e2 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,5 +1,6 @@ import React from 'react' import styled from 'styled-components' +import Button from '@material-ui/core/Button' const H1Header = styled.h1` margin: 0; From ac4a33e38faa88f00267fa9765e1fecdfdc9fb07 Mon Sep 17 00:00:00 2001 From: laisflaviosilva Date: Fri, 10 Jul 2020 14:37:32 -0300 Subject: [PATCH 21/24] =?UTF-8?q?Feito=20layout=20da=20pagina=20de=20servi?= =?UTF-8?q?=C3=A7os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CriacaoDeServicos.js | 18 ++--- src/components/Home.js | 7 +- src/components/servicos/CardServico.js | 37 +++++++++-- src/components/servicos/Servicos.js | 92 +++++++++++++++++--------- 4 files changed, 100 insertions(+), 54 deletions(-) diff --git a/src/components/CriacaoDeServicos.js b/src/components/CriacaoDeServicos.js index 809bc93..62cdef1 100644 --- a/src/components/CriacaoDeServicos.js +++ b/src/components/CriacaoDeServicos.js @@ -8,17 +8,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel' import FormLabel from '@material-ui/core/FormLabel' import FormControl from '@material-ui/core/FormControl' -const ContainerCheckBox = styled.div` - display: flex; - justify-content: space-between; - padding: 0 8px; -` -const FormCheckBox = styled.form` - border: 1px solid black; - width: 15vw; - border-radius: 5px; - margin: 10px auto; -` + const ContainerInputs = styled.div` display: flex; justify-content: center; @@ -41,7 +31,7 @@ const ContainerServicos = styled.div` margin: 16px auto; border-radius: 20px; ` -const ButtonCriacao = styled.button` +export const ButtonCriacao = styled.button` margin: 16px; height: 40px; width: 200px; @@ -115,6 +105,7 @@ class CriacaoDeServicos extends React.Component {

O jeito mais esperto de contratar um serviço

-

Fale o que precisa, receba até 4 orçamentos, escolha o melhor.

+

Fale o que precisa, receba orçamentos e escolha o melhor.

QUERO UM PROFISSIONAL AGORA

diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 658fbb8..855ac3d 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -1,25 +1,48 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' +//import {ButtonCriacao} from '../CriacaoDeServicos' const ContainerCard = styled.div` -border: 1px solid black; -border-radius: 20px; +border: 1px solid #b2aeae; padding: 16px; width: 90%; +height: 50vh; margin: 0 auto; +display: grid; +grid-row: repeat(7, 1fr); ` const H2Card = styled.h2` -margin: 12px 0; +margin: 0; padding: 0; ` const H3Card = styled.h3` margin: 0; padding: 0; +font-size: 16px; +font-weight: 600; ` +const ButtonCr = styled.button` + margin: 0 auto; + grid-row: 7/8; + height: 40px; + width: 200px; + background-color: ${props => props.cor}; + color: ${props => props.texto}; + border: none; + border-radius: 10px; + cursor: pointer; + outline:none; + :hover{ + background-color: ${props => props.hover}; + color: ${props => props.txt}; + /*color: #474117;*/ + } + +` const ContainerCardServico = styled.div` display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; @@ -81,27 +104,27 @@ class CardServico extends React.Component { if (servico.taken) { return ( - Título: {servico.title} + {servico.title} Descrição: {servico.description}

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

Pagamento: {servico.paymentMethods.map((metodo) => { return (`${metodo}; `) })}

- + this.onClickDescandidatar(servico.id)}> {renderizaBotao}
) } else { return ( - Título: {servico.title} + {servico.title} Descrição: {servico.description}

Valor: R$ {servico.value}

Data de Vencimento: {servico.dueDate}

Pagamento: {servico.paymentMethods.map((metodo) => { return (`${metodo}; `) })}

- + this.onClickCandidatar(servico.id)}> {renderizaBotao}
) } diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 87a1414..3d331d6 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -2,6 +2,32 @@ import React from 'react' import styled from 'styled-components' import axios from 'axios' import CardServico from './CardServico' +import Input from '@material-ui/core/TextField' +import Select from '@material-ui/core/NativeSelect' + +const ButtonCriacao = styled.button` + margin: 12.5px; + height: 40px; + width: 100px; + background-color: black; + color: #FFF; + border: none; + border-radius: 10px; + cursor: pointer; + outline:none; + :hover{ + background-color: #FFEA52; + color: #474117; + } +` + +const Option = styled(Select)` + color: #737373; +` + +const DivFiltro = styled.div` + margin-left: 35px; +` class Servicos extends React.Component { @@ -141,48 +167,50 @@ class Servicos extends React.Component { this.state.listaDeServicos.sort(ordenaPrazoMaior) this.state.listaFiltrada.sort(ordenaPrazoMaior) break; + default: ; } return (
- - - - - - - - - - - + + + + + + + + + + + + + + Filtrar +
- + Voltar
) } From 7e92687f62ca0825a8b8358cd25a65e3748062f9 Mon Sep 17 00:00:00 2001 From: Diego Miyabara Date: Fri, 10 Jul 2020 15:55:29 -0300 Subject: [PATCH 22/24] estilizacao home, grid e botoes --- src/components/Footer.js | 2 +- src/components/Home.js | 36 +++++++++++++++----------- src/components/servicos/CardServico.js | 17 +++++++----- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/src/components/Footer.js b/src/components/Footer.js index 3b78382..b8347c1 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -2,7 +2,7 @@ import React from 'react' import styled from 'styled-components' const ContainerFooter = styled.div` -height: 10vh; +height: 50px; position: fixed; bottom: 0; background-color: #2B2D2F; diff --git a/src/components/Home.js b/src/components/Home.js index ea253a0..915a24f 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -7,7 +7,7 @@ const AreaHome = styled.div` width: 100vw; height: 38vh; display: grid; - grid-template-columns: 1fr 4fr 2fr 3fr; + grid-template-columns: 0.5fr 1fr 1fr 1fr; grid-template-rows: 1fr 1fr ; grid-gap: 0px 0px; ` @@ -18,6 +18,7 @@ const H2 = styled.h2` display: grid; grid-column: 2/3; font-weight: lighter; + align-items: center; ` const H4 = styled.h4` @@ -26,26 +27,31 @@ const H4 = styled.h4` font-family: 'helvetica'; display: grid; grid-column: 2/4; - grid-row: 2/3; + grid-row: 2/4; + ` const ButtonHeader = styled.button` - height: 40px; - width: 200px; - background-color: black; - color: #FFF; + height: 80px; + width: 400px; + font-size: 1.2em; + font-weight: bold; + align-items: center; + background-color: #FF7F50; + color: #2B2D2F; border: none; - border-radius: 10px; + border-radius: 5px; cursor: pointer; outline:none; :hover{ - background-color: #FFEA52; - color: #474117; + background-color: #F83F2C; + color: #FFF; } display: grid; - grid-column: 4/4; - grid-row: 2/2; + grid-column: 4/5; + grid-row: 1/3; padding: 4px; + align-self: center; ` class Home extends React.Component { @@ -60,15 +66,15 @@ class Home extends React.Component { return (
-

O jeito mais esperto de contratar um serviço

+

O jeito mais esperto de contratar um serviço!

Fale o que precisa, receba orçamentos e escolha o melhor.

- QUERO UM PROFISSIONAL AGORA + QUERO UM PROFISSIONAL AGORA!

Você é profissional?

-

Venha, faça seu anúncio gratuito e amplie seus negócios e sua atuação no mercado

- CADASTRAR MEUS SERVIÇOS +

Venha, faça seu anúncio gratuito e amplie seus negócios e sua atuação no mercado.

+ CADASTRAR MEUS SERVIÇOS!
) diff --git a/src/components/servicos/CardServico.js b/src/components/servicos/CardServico.js index 855ac3d..13a835c 100644 --- a/src/components/servicos/CardServico.js +++ b/src/components/servicos/CardServico.js @@ -7,7 +7,7 @@ const ContainerCard = styled.div` border: 1px solid #b2aeae; padding: 16px; width: 90%; -height: 50vh; +height: 100%; margin: 0 auto; display: grid; grid-row: repeat(7, 1fr); @@ -16,11 +16,16 @@ grid-row: repeat(7, 1fr); const H2Card = styled.h2` margin: 0; padding: 0; +padding-bottom: 10px; +border-bottom: 1px solid black; +text-align: center; ` const H3Card = styled.h3` margin: 0; padding: 0; +padding-bottom: 15px; +padding-top: 8px; font-size: 16px; font-weight: 600; ` @@ -32,8 +37,8 @@ const ButtonCr = styled.button` width: 200px; background-color: ${props => props.cor}; color: ${props => props.texto}; - border: none; - border-radius: 10px; + border: ${props => props.border}; + border-radius: ${props => props.borderRadius}; cursor: pointer; outline:none; :hover{ @@ -99,7 +104,7 @@ class CardServico extends React.Component { {this.props.lista.map((servico) => { - const renderizaBotao = servico.taken === true ? "Descandidatar-me" : "Candidatar-me" + const renderizaBotao = servico.taken === true ? "DESCANDIDATAR-ME" : "CANDIDATAR-ME" if (servico.taken) { return ( @@ -111,7 +116,7 @@ class CardServico extends React.Component {

Pagamento: {servico.paymentMethods.map((metodo) => { return (`${metodo}; `) })}

- this.onClickDescandidatar(servico.id)}> {renderizaBotao} + this.onClickDescandidatar(servico.id)}> {renderizaBotao} ) } else { @@ -124,7 +129,7 @@ class CardServico extends React.Component {

Pagamento: {servico.paymentMethods.map((metodo) => { return (`${metodo}; `) })}

- this.onClickCandidatar(servico.id)}> {renderizaBotao} + this.onClickCandidatar(servico.id)}> {renderizaBotao} ) } From 2980a96d3e5a40e105e49481e7a576a5bf4945a0 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Fri, 10 Jul 2020 17:22:33 -0300 Subject: [PATCH 23/24] =?UTF-8?q?Resolvido=20problema=20do=20filtro,=20o?= =?UTF-8?q?=20problema=20era=20que=20estavamos=20recebendo=20string=20para?= =?UTF-8?q?=20comparar,=20ent=C3=A3o=20coloquei=20a=20fun=C3=A7=C3=A3o=20N?= =?UTF-8?q?umber?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/servicos/Servicos.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 3d331d6..6ed3540 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -79,15 +79,15 @@ class Servicos extends React.Component { if (this.state.inputValorMinimo !== "" || this.state.inputValorMaximo !== "") { const novaListaFiltrada = this.state.listaDeServicos.filter((servico) => { if (this.state.inputValorMinimo !== "" && this.state.inputValorMaximo !== "") { - if (servico.value >= this.state.inputValorMinimo && servico.value <= this.state.inputValorMaximo) { + if (Number(servico.value) >= this.state.inputValorMinimo && servico.value <= this.state.inputValorMaximo) { return true } } else if (this.state.inputValorMinimo === "") { - if (servico.value <= this.state.inputValorMaximo) { + if (Number(servico.value) <= this.state.inputValorMaximo) { return true } } else if (this.state.inputValorMaximo === "") { - if (servico.value >= this.state.inputValorMinimo) { + if (Number(servico.value) >= this.state.inputValorMinimo) { return true } } From 604ba69ba7edf020d8460c3afdf60eb3b68ec848 Mon Sep 17 00:00:00 2001 From: Julio Gabriel Date: Fri, 10 Jul 2020 17:44:28 -0300 Subject: [PATCH 24/24] Future Ninjas --- src/components/servicos/Servicos.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/servicos/Servicos.js b/src/components/servicos/Servicos.js index 3d331d6..dc77a0c 100644 --- a/src/components/servicos/Servicos.js +++ b/src/components/servicos/Servicos.js @@ -79,15 +79,15 @@ class Servicos extends React.Component { if (this.state.inputValorMinimo !== "" || this.state.inputValorMaximo !== "") { const novaListaFiltrada = this.state.listaDeServicos.filter((servico) => { if (this.state.inputValorMinimo !== "" && this.state.inputValorMaximo !== "") { - if (servico.value >= this.state.inputValorMinimo && servico.value <= this.state.inputValorMaximo) { + if (Number(servico.value) >= this.state.inputValorMinimo && Number(servico.value) <= this.state.inputValorMaximo) { return true } } else if (this.state.inputValorMinimo === "") { - if (servico.value <= this.state.inputValorMaximo) { + if (Number(servico.value) <= this.state.inputValorMaximo) { return true } } else if (this.state.inputValorMaximo === "") { - if (servico.value >= this.state.inputValorMinimo) { + if (Number(servico.value) >= this.state.inputValorMinimo) { return true } }