Skip to content

PR de correção! Não precisa mergeear! #18

Open
pedro-severo wants to merge 44 commits intocorrecao-projetofrom
master
Open

PR de correção! Não precisa mergeear! #18
pedro-severo wants to merge 44 commits intocorrecao-projetofrom
master

Conversation

@pedro-severo
Copy link
Copy Markdown

PR de correção! Não precisa mergeear!

enthusiastic-beetle.surge.sh

EuJulioGabriel and others added 30 commits July 7, 2020 14:47
Adicionamos a requisição de serviços cadastrados
Feita a parte de todas as ordenações
Estilização inicial CardServicos e inicio funcionalidade da criação de Serviços
Parte de cadastrar serviços concluído
Estilização Header e footer, inserção de botoes do header
Funcionalidade botão candidatar-me
Comment on lines +55 to +58
<Header
onClickCriarServico={this.onClickCriarServico}
onClickServicos={this.onClickServicos}
onClickHome={this.onClickVoltar}/>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção pra identação. Coloquem margem nas props e quebrem linha para fechar a tag:

           <Header 
              onClickCriarServico={this.onClickCriarServico} 
              onClickServicos={this.onClickServicos}
              onClickHome={this.onClickVoltar}
          />

Comment on lines +34 to +51
const renderizaNaTela = () => {

switch (this.state.paginaSelecionada) {
case "home":
return <Home
abrirServico={this.onClickServicos}
abrirCriacaoDeServicos={this.onClickCriarServico}
/>
case "servicos":
return <Servicos
voltar={this.onClickVoltar}
/>
case "criacaodeservicos":
return <CriacaoDeServicos
voltar={this.onClickVoltar}
/>
}
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bom uso da renderização condicional! 👏👏

Comment on lines +12 to +32
const ContainerInputs = styled.div`
display: flex;
justify-content: center;
width: 50vw;
margin: 8px auto;
`
const ContainerButtons = styled.div`
width: 10vw;
display: flex;
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;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na próxima, tentem isolar as constantes do styled-components em um arquivo separado e apenas as importem no componente. Isso deixa o código bem mais limpo. Se vcs tiverem dúvida sobre isso, mandem lá no canal de dúvidas que podemos ajudar vcs...

<FormGroup>
<FormControlLabel
control={
<CheckBox color="primary" type="checkbox" id="Transferência Bancária" value="Transferência Bancária" onChange={this.onChangeChecked}/>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção com a identação. Muitas props pedem quebra de linhas...

}
}

export default CriacaoDeServicos No newline at end of file
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apesar dos meus comentários sobre identação, o código está muito bem escrito e identado! Parabéns!

Comment on lines +5 to +10
const H1Header = styled.h1`
margin: 0;
padding: 0;
font-family: Andale Mono, monospace;
cursor: pointer;
`
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção para nomeação das constantes do styled-components. H1 não é um bom nome.

Comment on lines +59 to +61
state = {

}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se vcs não usaram o estado nesse componente, não precisam chamá-lo.

Comment on lines +14 to +32
const H2 = styled.h2`
font-size: 40px;
font-family: helvetica'';
/* margin: 45px 0 0 25px;*/
display: grid;
grid-column: 2/3;
font-weight: lighter;
align-items: center;
`

const H4 = styled.h4`
font-weight: lighter;
font-size: 16px;
font-family: 'helvetica';
display: grid;
grid-column: 2/4;
grid-row: 2/4;

`
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção para nomeação de títulos...

Comment on lines +6 to +14
const ContainerCard = styled.div`
border: 1px solid #b2aeae;
padding: 16px;
width: 90%;
height: 100%;
margin: 0 auto;
display: grid;
grid-row: repeat(7, 1fr);
`
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção para identação. De margens nas configs do CSS

import React from 'react'
import styled from 'styled-components'
import axios from 'axios'
//import {ButtonCriacao} from '../CriacaoDeServicos'
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não deixem códigos comentados!

Comment on lines +49 to +54
axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',)
.then((response) => {
this.setState({listaDeServicos: response.data.jobs, listaFiltrada: response.data.jobs} )
}).catch((error) => {
console.log(error.message)
})
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção para identação. Deem margem nas funções!

Comment on lines +124 to +143
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);
}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atenção para nomeação de variáveis! Parâmetros a e b não querem dizer nada para quem lê o código

@pedro-severo
Copy link
Copy Markdown
Author

Oi, querida(o)s!

Fiz alguns comentários pelo código, deem uma olhada, por favor!

Mas no geral, a entrega de vocês está excelente!! Parabéns pelo trabalho e esforço! Vcs conseguiram aplicar tudo o que aprenderam no módulo 2 e fecharam o módulo com chave de ouro!

Além disso, apesar de alguns pontos de melhoria que levantei ao longo do código, a identação de vocês está muito boa, parabéns!

Continuem assim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants