rating-frontend
v1.0.3
Published
[![Maintainability](https://api.codeclimate.com/v1/badges/315fa80d61362b89c888/maintainability)](https://codeclimate.com/repos/5d5d99c276d63525ad00aaa2/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/315fa80d61362b89c888/test_cove
Downloads
3
Readme
Projeto Avaliacao 2.0
Notion
- https://www.notion.so/Avalia-o-Pedir-avalia-o-automaticamente-quando-marcar-como-servi-o-conclu-do-fb9b0ebb6e1f4a789c6d6ea1a2848952
Ambientes
- Produção - https://pros.getninjas.com.br/?id=#### (Bucket S3 arquivos no root da pasta)
- Local - http://localhost:3000/?id=####
Endpoint de consulta de e save dos dadospros: (mesmo banco, só muda o endpoint)
- Produção - https://proto-back-production.labs4.ninja
- Stage - https://proto-back-labs.labs4.ninja
Bucket de Testes
- https://s3.console.aws.amazon.com/s3/buckets/new-avaliacao/?region=us-east-1&tab=overview
- Acesso via web http://new-avaliacao.s3-website-us-east-1.amazonaws.com/?id=8056399
Bucket Produção (root)
- https://s3.console.aws.amazon.com/s3/buckets/pros.getninjas.com.br/?region=us-east-1&tab=overview
- Acesso via web https://pros.getninjas.com.br/?id=8056399
Deploy
- Precisa criar local um arquivo
.env
com as seguintes variáveisREACT_APP_AIRBRAKE_PROJECT_ID=XXXXX REACT_APP_AIRBRAKE_PROJECT_KEY=XXXXXX
- Rodar comando npm run build
- Copiar os arquivos gerados para a raiz do bucket https://s3.console.aws.amazon.com/s3/buckets/pros.getninjas.com.br/?region=us-east-1&tab=overview
- Lembrar de marcar os arquivos como Public
Templates de Email
- Atualmente enviamos os emails pela Exact Target
- https://mc.s7.exacttarget.com/cloud/#app/Email/C12/Default.aspx?entityType=none&entityID=0%23Content
- Template do email de teste é o request-survey-review-2-0_pt-br
- A diferença entre o email original e do teste, é que o botão de SIM envia para a avaliação 2.0 https://pros.getninjas.com.br/?id=####, as opções EM NEGOCIACAO e NAO enviam para avaliacao original https://www.getninjas.com.br/request_surveys/##user_id/##request_id?answer=decline#nao
Feature Flag via Flipper
- Precisa ser usuário do admin http://web.getninjas.com.br/admin/login
- Paínel http://web.getninjas.com.br/flipper/features/survey2dot0
- http://web.getninjas.com.br/flipper/features/survey2dot0 (precisa ser admin no site)
Listagem de PROS
- query/execute
`{
request(id: ##) {
leads {
profile {
databaseId
user {
name
}
cellphone {
numberFormatted
}
}
}
}
}`
Salvar dados da avaliacao
- survey/create
{
"request_id": "8056399",
"topics": [
{
"id": 0,
"answer": 1111770
},
{
"id": 1,
"answer": "sim"
},
{
"id": 2,
"answer": "gostei"
},
{
"id": 3,
"answer": "gostei"
},
{
"id": 4,
"answer": "gostei"
},
{
"id": 5,
"answer": "incrivel"
},
{
"id": 6,
"answer": "Foi muito legal"
},
{
"id": 7,
"answer": "Vou usar sempre!"
},
{
"id": 8,
"answer": "dasasdsada"
}
]
}
Available Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
npm run build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
This project was bootstrapped with Create React App.