profile
viewpoint
Leonardo Alberto Souza leobetosouza @MinisterioPublicoRJ Rio de Janeiro, Rio de Janeiro, Brazil http://leobetosouza.com.br/ Developer focused in JavaScript and Front-end

leobetosouza/bons-front-enders 177

Um guia de como contratar bons desenvolvedores front-end e como front-enders podem achar bons lugares para trabalhar.

kaiquewdev/Eloquent-Javascript-ptBR 18

Tradução do livro Eloquent Javascript <http://eloquentjavascript.net/>

garu/WWW-Correios-SRO 6

Serviço de Rastreamento de Objetos dos Correios (Brazilian Postal Object Tracking System)

leobetosouza/idiomatic-css 3

Principles of writing consistent, idiomatic CSS.

leobetosouza/JSNumberPuzzles 3

Simple implementations of some Number Puzzles in Node.js, using TDD. Just for study.

leobetosouza/idiomatic.js 2

Principles of Writing Consistent, Idiomatic JavaScript

leobetosouza/coding-dojo 1

Javascript coding-dojo

leobetosouza/collapsible 1

A jQuery plugin to create accordions and tabs.

leobetosouza/FrontInRio-node 1

FrontInRio's project in node.js

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 0ce913c9e8b6304371201cf92e65016e8afc5722

making inner labels background with dynamic

view details

push time in 4 days

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 7d3d864f8ed917d3b26756b0875aec50afcbbacb

putting radar labels in portals and drawing a retangle arround each one

view details

Leonardo Alberto Souza

commit sha 394d76865a5a6c32668696e00b4220c7c0caa333

adding some fine fixes to the radar label positions

view details

push time in 14 days

create barnchMinisterioPublicoRJ/promotron-web

branch : patch/remove-warnings

created branch time in 24 days

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha c9699c9570356eff2b4b659ec29caf45a67d12db

changing name of general promotoria

view details

push time in 25 days

create barnchMinisterioPublicoRJ/promotron-web

branch : patch/nomes-promotorias

created branch time in 25 days

create barnchMinisterioPublicoRJ/promotron-web

branch : patch/radar-median-bug

created branch time in 25 days

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha a34b2372bd2c33873fc677b57af0ec54ac94cf45

fixing grid css and making its code more shared

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 9465908ed8caa8df712bdc106b838121ee491b1d

fixing pip code

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha d5bc70e9d756125c900ff61ad801f71b018ff03f

fixing orgao code for pip

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 4dc3c3a52ffab1d5cf6e0f8fa47307b6a42fde24

comment components of pip that arent ready

view details

Leonardo Alberto Souza

commit sha 02d577befb9b156009442158e37f5bc18569d7b5

creating pip radar labels

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha f87ee39e7e1f43bbf4f844d7274cec8f9f803129

creating hocs for different radar components

view details

Leonardo Alberto Souza

commit sha a22ac2b0efb2159ec49e9e4c453c3864ba456cd9

extracting modified radar things to hocs

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha f946dec30a66ab97f32351b4a7ba9f175298dbf5

removing commented code

view details

push time in a month

Pull request review commentMinisterioPublicoRJ/promotron-web

Feature/pip endpoints

 export const ALERTS_LIST = t(`${BASE_URL}/alertas/\${orgao}`); export const PROCESSING_TIME_DATA = t(`${BASE_URL}/tempo-tramitacao/\${orgao}`);  export const PROCESSES_LIST = t(`${BASE_URL}/lista/processos/\${orgao}`);++export const PIP__URL = t(`${BASE_URL}/pip/aproveitamentos/\${orgao}`);

nao consegui pensar num nome bom... deixe a responsabilidade pelo batismo pra quem for implementar de verdade isso ;)

leobetosouza

comment created time in a month

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 33bbfacba5ba11e7fb1bcd595bf48408d975324a

fixing incosistences

view details

push time in a month

push eventMinisterioPublicoRJ/promotron-web

re-andrade1987

commit sha ac450276f8c44afbaf10755a6d9491ea6e14be4c

ajustando fonte dos alertas

view details

re-andrade1987

commit sha c6cc78b518002b578c02a038805a3b07b9c64dae

Ajuste caixa total de alertas

view details

re-andrade1987

commit sha 50bbedd13ea98d5c88123a608d8cdced2db1338c

Finalizado ajustes de qa no componente alertas

view details

Layla

commit sha 5e01846f28db8fc519c8ee2e79b37835bf1721e9

Making the text smaller fixed everything

view details

Layla

commit sha cade4a13026f0e6a8536e0f3372799d49f0171b2

Merge branch 'develop' into ajustes/alerts

view details

re-andrade1987

commit sha db29bfd2f4ca8859db988ee277dee05b97f37c4c

retirado console.log

view details

re-andrade1987

commit sha 12ce7b4f01ee059d1d587f0c2fe8839465388d78

Feito ajuste no posicionameto do box total alertas

view details

re-andrade1987

commit sha c723a77cd7c37176e12a18bc2c4d9bb857ceda44

Feito tratamento de erro com try e catch

view details

re-andrade1987

commit sha 6af770f13fee4f345b64f085524d01c31436a854

Resolvendo conflitos com develop

view details

re-andrade1987

commit sha 87c6d3409542623ced22e358637daa1134b13fb8

Ajuste fonte tabela de acordo com qa

view details

re-andrade1987

commit sha 70a0eb285d201f54263c0cb3f80c080af1ce0835

Inserindo try and catch para retorno de erro

view details

LaylaCsAvila

commit sha d3ac73d799fe5dac4b43d84e60dd54afa85bc4f6

Merge pull request #32 from MinisterioPublicoRJ/ajustes/alerts Ajustes/alerts

view details

re-andrade1987

commit sha 2059012f7ce73e436bed85cbf8f072cc3bf7c23d

Inserido elipse em textos longos

view details

re-andrade1987

commit sha 1bec0ca46d781a04c278dd6319f703651d40e21b

corrigindo tamanho do texto da tabela no mobile

view details

re-andrade1987

commit sha 0cc280cf02167df38eeb4fc4b707efaa91f5fa12

Ajustes na tabela

view details

Leonardo Alberto Souza

commit sha 3311e4baab8af1ec9ccc6b22d6b76b8ab4f9bbf9

error handling

view details

Leonardo Alberto Souza

commit sha f36d828066d2f3cd80b0ad855cfa16a19aa22de7

creating a med line and changing position of radar data

view details

re-andrade1987

commit sha 54214ce5be2a326453c3b77915b687af77fb9e25

Merge pull request #33 from MinisterioPublicoRJ/feature/deskFixes Making the text smaller fixed everything

view details

re-andrade1987

commit sha 3b3379b290df0d04c2d6c0f174ac113caf41f279

Ajustes no componente

view details

Leonardo Alberto Souza

commit sha 26b581073bd250b47887d14e16f0ba43a6b5a3d6

wip radar

view details

push time in a month

startedMortennn/Dozer

started time in 2 months

create barnchMinisterioPublicoRJ/promotron-web

branch : patch/radar-tutela

created branch time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha f90833a394d7c6d5865d4f68d40dd7589efa43f8

pr review fixings

view details

push time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Patch/radar tutela

 const CHART_THEME = {   },   axisLabel: {     fill: darkBlue,-    fontSize: 12,+    fontSize: 10,     fontWeight: 'bold',+    letterSpacing: 2,+    lineHeight: 200,+    // stroke: '#ff0',+    // strokeWidth: 2,   },-  axisLabelBad: {-    fill: red,-    fontSize: 12,-  },-  axisLabelGood: {-    fill: green,-    fontSize: 12,-  },+  // axisLabelBad: {

eu deixei esse pq eles podem voltar em beve, vai saber

leobetosouza

comment created time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha 3cba178a5f0606e844002e8573ccf34b12427149

fix radar subtitle position

view details

Leonardo Alberto Souza

commit sha 4b50ddc14b0745bca1bef7374b5c83cee8fc1761

Merge branch 'patch/radar-tutela' of https://github.com/MinisterioPublicoRJ/promotron-web into patch/radar-tutela

view details

push time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Layla

commit sha 5e01846f28db8fc519c8ee2e79b37835bf1721e9

Making the text smaller fixed everything

view details

re-andrade1987

commit sha 87c6d3409542623ced22e358637daa1134b13fb8

Ajuste fonte tabela de acordo com qa

view details

re-andrade1987

commit sha 70a0eb285d201f54263c0cb3f80c080af1ce0835

Inserindo try and catch para retorno de erro

view details

re-andrade1987

commit sha 2059012f7ce73e436bed85cbf8f072cc3bf7c23d

Inserido elipse em textos longos

view details

re-andrade1987

commit sha 1bec0ca46d781a04c278dd6319f703651d40e21b

corrigindo tamanho do texto da tabela no mobile

view details

re-andrade1987

commit sha 0cc280cf02167df38eeb4fc4b707efaa91f5fa12

Ajustes na tabela

view details

re-andrade1987

commit sha 54214ce5be2a326453c3b77915b687af77fb9e25

Merge pull request #33 from MinisterioPublicoRJ/feature/deskFixes Making the text smaller fixed everything

view details

re-andrade1987

commit sha 3b3379b290df0d04c2d6c0f174ac113caf41f279

Ajustes no componente

view details

re-andrade1987

commit sha bbb0be039709d3f326e78f71003940d9d2736465

Criado arquivo transform para o dados da lista de processos

view details

re-andrade1987

commit sha 921a05eb9b39537fdb17227140720756869c8d5e

Feita conversão do campo data

view details

Layla

commit sha a6c707c07cb0411d3e767516e372e1320bb09300

Bullet points fixed, moved files to a new folder, truncating average and changing the position of first and last bullet points

view details

Layla

commit sha e82097332774c35a2dee39e311668e1fd36445ab

Center text now has proper styling

view details

Layla

commit sha 14933887ab0462e565d3efb6b0579c9d65a23449

Parcial progress on the organ average pointer

view details

re-andrade1987

commit sha 2a2c8ad8058e000382115b91c6520cf566e6e1c9

Criado arquivo transform para o dados e formatação do campo data da tabela do sua mesa

view details

re-andrade1987

commit sha 86998c2aedca0ef86388408fee2db1b6864e70ba

Limpando console.log

view details

re-andrade1987

commit sha 3d64c09c57d101677c2b653edbe55e4457f8db46

Feita validação para quando o lista estiver vazia

view details

re-andrade1987

commit sha 3a0418a9484883aba178dd2773e0214bb6eb58a6

Padronizando trasnform para camelCase

view details

Layla

commit sha cd3a859db32c9d71a7d441ac775c9a735a9bfd05

Possible alternative for pointer

view details

re-andrade1987

commit sha 083c6653657560867a70c1de91defef1a03edc46

Finalizado ajustes no componente

view details

Layla

commit sha 3280d43da9bf0e9ae918a3e0180a0f33d3674e6d

Fixing typo

view details

push time in 2 months

delete branch MinisterioPublicoRJ/promotron-web

delete branch : feature/processingTimeFix

delete time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Layla

commit sha a6c707c07cb0411d3e767516e372e1320bb09300

Bullet points fixed, moved files to a new folder, truncating average and changing the position of first and last bullet points

view details

Layla

commit sha e82097332774c35a2dee39e311668e1fd36445ab

Center text now has proper styling

view details

Layla

commit sha 14933887ab0462e565d3efb6b0579c9d65a23449

Parcial progress on the organ average pointer

view details

Layla

commit sha cd3a859db32c9d71a7d441ac775c9a735a9bfd05

Possible alternative for pointer

view details

Layla

commit sha 8a0fc756add3159657c8b27dad34c9ded1e3988b

Merge branch 'develop' into feature/processingTimeFix

view details

Layla

commit sha 88fcd899893f6a1cd0f22ff826b6c4433209476b

Completing graph pointer

view details

Layla

commit sha 13fb8da5a0cce6e681da789afd973949faffce0f

Finally ready :tada:

view details

Layla

commit sha 20dfe0e5bd1882b122ac1f661c6f87eec25fd875

Small fix to inverted boolean and change in the text

view details

Leonardo Alberto Souza

commit sha 6f1872a83bb996b05748c32ccc76c8c77fab414e

Merge pull request #37 from MinisterioPublicoRJ/feature/processingTimeFix Feature/processing time fix

view details

push time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha d5dd3cf320bd3a1570961f7196d9597d1bdb6980

radar wip

view details

push time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha babfc2d7de8759c0a3256f4072c30eaaf25993b8

removing trash

view details

push time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Leonardo Alberto Souza

commit sha be6a362221cfc61945445a7aea54d3d9504c4552

refactoring radar chart data transformations to avoid dupicated code

view details

push time in 2 months

create barnchMinisterioPublicoRJ/promotron-web

branch : patch/radar-tutela

created branch time in 2 months

create barnchMinisterioPublicoRJ/promotron-web

branch : feature/pip-endpoints

created branch time in 2 months

delete branch MinisterioPublicoRJ/promotron-web

delete branch : feature/cleanse

delete time in 2 months

push eventMinisterioPublicoRJ/promotron-web

Layla

commit sha 40c95fc0ba92638263bd4cb0b12df86625873523

Deleting unused files

view details

Layla

commit sha f94648265b58893aee211fb17554baf5e003fde2

All API components now follow naming conventions

view details

Layla

commit sha e512d26f1a96dd2890fe41d062c9d2d8ba2305b2

Linting and renaming

view details

Layla

commit sha 01817cb5645219992d813d67fff85c3c6f105601

Components folder - Fixing circular dependencies, linting, adding docs and renaming CSS classes

view details

Layla

commit sha eb2b793252a17c29f38131329ed944fa53707723

Pages folder: cleaning, adding proptypes, changing imports, linting

view details

Layla

commit sha 87cd7486f4d633a3b28bf2095fe84ff6e343968c

Sections folder: lots of class renaming, deleting some unused legacy code

view details

Layla

commit sha 68b42cdeff4735637579148b66624cc161379036

Removing unused variables from the themes

view details

Leonardo Alberto Souza

commit sha e3443b00c72d866c23205bd12437adae380a43fc

Merge pull request #31 from MinisterioPublicoRJ/feature/cleanse Feature/cleanse

view details

push time in 2 months

create barnchMinisterioPublicoRJ/promotron-web

branch : feature/radar-reload

created branch time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },+      // 'average' section, from the end of the last section until halfway to max+      { x: 1, y: (halfMaxAvg - halfMinAvg) / max, color: '#6D86EC', label: halfMaxAvg.toFixed(0) },+      // 'bad' section, from the last section all the way to max+      { x: 0, y: (max - halfMaxAvg) / max, color: '#A256BA', label: max.toFixed(0) },+    ];++    const points = [+      { x: 2, y: min / max, type: 'min' },+      { x: 1, y: (average - min) / max, type: 'average' },+      { x: 0, y: (max - average) / max, type: 'max' },+    ];+    setChartData({ pieData, points, domain, organAvg });+  };++  useEffect(() => {+    const loadData = async () => {+      const response = await Api.getProcessingTimeData(getUser());+      setProcessingTime(response);+      cleanChartData(response);+    };+    loadData();+  }, []);++  if (!processingTime.meta || !chartData) {+    return <div>loading</div>;+  }++  const isBetter = processingTime.orgaoData.average >= processingTime.pacoteData.average;++  return (+    <article className="page-tramitacao">+      <div className="pt-texts">+        <SectionTitle value="tempo de tramitação" />+        <p>+          Avaliei que o período de tramitação de processos na sua promotoria+          <strong>+            {isBetter ? ' está mais rápido que a média da casa ' : 'está abaixo da média da casa'}+          </strong>+          entre aquelas de mesma atribuição.+          {'\n'}+          {isBetter && <strong>Muito Bom!</strong>}+        </p>+      </div>+      <div className="pt-graph">+        <ProcessingTimeChart+          data={chartData.pieData}+          scatter={chartData.points}+          domain={chartData.domain}+          labelText={isBetter ? `${chartData.organAvg}\nMuito bom` : chartData.organAvg}+        />+      </div>+      <div className="pt-mainBox">+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinAzul />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#56E8E1' }}>+              {processingTime.orgaoData.min.toFixed(0)}+            </span>+            trânsito mais rápido da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinVermelho />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#FF0086' }}>+              {processingTime.orgaoData.max.toFixed(0)}+            </span>+            trânsito mais lento da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <Markfaster />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#42DCA7' }}>+              {processingTime.pacoteData.min.toFixed(0)}+            </span>+            trânsito mais rápido do pacote+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <MarkMind />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#6D86EC' }}>+              {processingTime.pacoteData.average.toFixed(0)}+            </span>+            trânsito médio do seu pacote+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <MarkSlower />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#FF0086' }}>

esse style devia ir pro css

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },+      // 'average' section, from the end of the last section until halfway to max+      { x: 1, y: (halfMaxAvg - halfMinAvg) / max, color: '#6D86EC', label: halfMaxAvg.toFixed(0) },+      // 'bad' section, from the last section all the way to max+      { x: 0, y: (max - halfMaxAvg) / max, color: '#A256BA', label: max.toFixed(0) },+    ];++    const points = [+      { x: 2, y: min / max, type: 'min' },+      { x: 1, y: (average - min) / max, type: 'average' },+      { x: 0, y: (max - average) / max, type: 'max' },+    ];+    setChartData({ pieData, points, domain, organAvg });+  };++  useEffect(() => {+    const loadData = async () => {+      const response = await Api.getProcessingTimeData(getUser());+      setProcessingTime(response);+      cleanChartData(response);+    };+    loadData();+  }, []);++  if (!processingTime.meta || !chartData) {+    return <div>loading</div>;+  }++  const isBetter = processingTime.orgaoData.average >= processingTime.pacoteData.average;++  return (+    <article className="page-tramitacao">+      <div className="pt-texts">+        <SectionTitle value="tempo de tramitação" />+        <p>+          Avaliei que o período de tramitação de processos na sua promotoria+          <strong>+            {isBetter ? ' está mais rápido que a média da casa ' : 'está abaixo da média da casa'}+          </strong>+          entre aquelas de mesma atribuição.+          {'\n'}+          {isBetter && <strong>Muito Bom!</strong>}+        </p>+      </div>+      <div className="pt-graph">+        <ProcessingTimeChart+          data={chartData.pieData}+          scatter={chartData.points}+          domain={chartData.domain}+          labelText={isBetter ? `${chartData.organAvg}\nMuito bom` : chartData.organAvg}+        />+      </div>+      <div className="pt-mainBox">+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinAzul />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#56E8E1' }}>+              {processingTime.orgaoData.min.toFixed(0)}+            </span>+            trânsito mais rápido da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinVermelho />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#FF0086' }}>+              {processingTime.orgaoData.max.toFixed(0)}+            </span>+            trânsito mais lento da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <Markfaster />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#42DCA7' }}>+              {processingTime.pacoteData.min.toFixed(0)}+            </span>+            trânsito mais rápido do pacote+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <MarkMind />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#6D86EC' }}>

esse style devia ir pro css

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

   --gray: #b5b5b5;   --grayLight: #e8e8e8;   --grayLinks: #cecece;+  --grayTexts: #B3B3B3;

#b3b3b3 nao é muito diferente de #b5b5b5 usado no --gray... confirmou com o designer se ele nao colocou essa cor errada? eu particularmente q só deveria ter um cinza desse tom.

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },+      // 'average' section, from the end of the last section until halfway to max+      { x: 1, y: (halfMaxAvg - halfMinAvg) / max, color: '#6D86EC', label: halfMaxAvg.toFixed(0) },+      // 'bad' section, from the last section all the way to max+      { x: 0, y: (max - halfMaxAvg) / max, color: '#A256BA', label: max.toFixed(0) },+    ];++    const points = [+      { x: 2, y: min / max, type: 'min' },+      { x: 1, y: (average - min) / max, type: 'average' },+      { x: 0, y: (max - average) / max, type: 'max' },+    ];+    setChartData({ pieData, points, domain, organAvg });+  };++  useEffect(() => {+    const loadData = async () => {+      const response = await Api.getProcessingTimeData(getUser());+      setProcessingTime(response);+      cleanChartData(response);+    };+    loadData();+  }, []);++  if (!processingTime.meta || !chartData) {+    return <div>loading</div>;+  }++  const isBetter = processingTime.orgaoData.average >= processingTime.pacoteData.average;++  return (+    <article className="page-tramitacao">+      <div className="pt-texts">+        <SectionTitle value="tempo de tramitação" />+        <p>+          Avaliei que o período de tramitação de processos na sua promotoria+          <strong>+            {isBetter ? ' está mais rápido que a média da casa ' : 'está abaixo da média da casa'}+          </strong>+          entre aquelas de mesma atribuição.+          {'\n'}+          {isBetter && <strong>Muito Bom!</strong>}+        </p>+      </div>+      <div className="pt-graph">+        <ProcessingTimeChart+          data={chartData.pieData}+          scatter={chartData.points}+          domain={chartData.domain}+          labelText={isBetter ? `${chartData.organAvg}\nMuito bom` : chartData.organAvg}+        />+      </div>+      <div className="pt-mainBox">+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinAzul />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#56E8E1' }}>+              {processingTime.orgaoData.min.toFixed(0)}+            </span>+            trânsito mais rápido da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinVermelho />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#FF0086' }}>

esse style devia ir pro css

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },+      // 'average' section, from the end of the last section until halfway to max+      { x: 1, y: (halfMaxAvg - halfMinAvg) / max, color: '#6D86EC', label: halfMaxAvg.toFixed(0) },+      // 'bad' section, from the last section all the way to max+      { x: 0, y: (max - halfMaxAvg) / max, color: '#A256BA', label: max.toFixed(0) },+    ];++    const points = [+      { x: 2, y: min / max, type: 'min' },+      { x: 1, y: (average - min) / max, type: 'average' },+      { x: 0, y: (max - average) / max, type: 'max' },+    ];+    setChartData({ pieData, points, domain, organAvg });+  };++  useEffect(() => {+    const loadData = async () => {+      const response = await Api.getProcessingTimeData(getUser());+      setProcessingTime(response);+      cleanChartData(response);+    };+    loadData();+  }, []);++  if (!processingTime.meta || !chartData) {+    return <div>loading</div>;+  }++  const isBetter = processingTime.orgaoData.average >= processingTime.pacoteData.average;++  return (+    <article className="page-tramitacao">+      <div className="pt-texts">+        <SectionTitle value="tempo de tramitação" />+        <p>+          Avaliei que o período de tramitação de processos na sua promotoria+          <strong>+            {isBetter ? ' está mais rápido que a média da casa ' : 'está abaixo da média da casa'}+          </strong>+          entre aquelas de mesma atribuição.+          {'\n'}+          {isBetter && <strong>Muito Bom!</strong>}+        </p>+      </div>+      <div className="pt-graph">+        <ProcessingTimeChart+          data={chartData.pieData}+          scatter={chartData.points}+          domain={chartData.domain}+          labelText={isBetter ? `${chartData.organAvg}\nMuito bom` : chartData.organAvg}+        />+      </div>+      <div className="pt-mainBox">+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinAzul />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#56E8E1' }}>

esse style devia ir pro css

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },+      // 'average' section, from the end of the last section until halfway to max+      { x: 1, y: (halfMaxAvg - halfMinAvg) / max, color: '#6D86EC', label: halfMaxAvg.toFixed(0) },+      // 'bad' section, from the last section all the way to max+      { x: 0, y: (max - halfMaxAvg) / max, color: '#A256BA', label: max.toFixed(0) },+    ];++    const points = [+      { x: 2, y: min / max, type: 'min' },+      { x: 1, y: (average - min) / max, type: 'average' },+      { x: 0, y: (max - average) / max, type: 'max' },+    ];+    setChartData({ pieData, points, domain, organAvg });+  };++  useEffect(() => {+    const loadData = async () => {+      const response = await Api.getProcessingTimeData(getUser());+      setProcessingTime(response);+      cleanChartData(response);+    };+    loadData();+  }, []);++  if (!processingTime.meta || !chartData) {+    return <div>loading</div>;+  }++  const isBetter = processingTime.orgaoData.average >= processingTime.pacoteData.average;++  return (+    <article className="page-tramitacao">+      <div className="pt-texts">+        <SectionTitle value="tempo de tramitação" />+        <p>+          Avaliei que o período de tramitação de processos na sua promotoria+          <strong>+            {isBetter ? ' está mais rápido que a média da casa ' : 'está abaixo da média da casa'}+          </strong>+          entre aquelas de mesma atribuição.+          {'\n'}+          {isBetter && <strong>Muito Bom!</strong>}+        </p>+      </div>+      <div className="pt-graph">+        <ProcessingTimeChart+          data={chartData.pieData}+          scatter={chartData.points}+          domain={chartData.domain}+          labelText={isBetter ? `${chartData.organAvg}\nMuito bom` : chartData.organAvg}+        />+      </div>+      <div className="pt-mainBox">+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinAzul />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#56E8E1' }}>+              {processingTime.orgaoData.min.toFixed(0)}+            </span>+            trânsito mais rápido da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <PinVermelho />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#FF0086' }}>+              {processingTime.orgaoData.max.toFixed(0)}+            </span>+            trânsito mais lento da sua promotoria+          </div>+        </div>+        <div className="pt-legends">+          <div className="pt-legends-icon">+            <Markfaster />+          </div>+          <div className="pt-legends-text">+            <span className="pt-legends-highlight" style={{ color: '#42DCA7' }}>

esse style devia ir pro css

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

 const Api = (() => {      return radarTransform(data);   }+  async function getProcessingTimeData({ orgao, token }) {+    const { data } = await axios.get(PROCESSING_TIME_DATA({ orgao }), buildRequestConfig(token));++    return tramitacaoTransform(data);+  }    async function getAlertsList({ orgao, token }) {     const { data } = await axios.get(ALERTS_LIST({ orgao }), buildRequestConfig(token)); -    return alertsTransform(data);+    return tramitacaoTransform(data);

ta certo isso? se tá, tem q apagar a importacao do alertsTransform na linha 35.

LaylaCsAvila

comment created time in 2 months

Pull request review commentMinisterioPublicoRJ/promotron-web

Componente tempo de tramitação

+import React, { useState, useEffect } from 'react';++import './styles.css';+import Api from '../../api';+import { getUser } from '../../user';+import { SectionTitle } from '../../components';+import { ProcessingTimeChart } from '../../components/graphs';++import PinAzul from '../../assets/svg/pinAzul';+import PinVermelho from '../../assets/svg/pinVermelho';+import MarkMind from '../../assets/svg/markMind';+import Markfaster from '../../assets/svg/markFaster';+import MarkSlower from '../../assets/svg/markSlower';++const ProcessingTime = () => {+  const [processingTime, setProcessingTime] = useState({});+  const [chartData, setChartData] = useState(null);++  const cleanChartData = raw => {+    const organAvg = raw.orgaoData.average.toFixed(2);+    const { min, max, average } = raw.pacoteData;+    const domain = { min, max };++    // calculating the points exactly between the values+    const halfMinAvg = (average - min) / 2;+    const halfMaxAvg = (max - average) / 2;++    // using the midpoints, make three sections to draw "good", "average" and "bad" time ranges+    const pieData = [+      // 'good' section from min until halfway to average+      { x: 2, y: halfMinAvg / max, color: '#42DCA7', label: halfMinAvg.toFixed(0) },

nao é melhor puxar essas 3 cores usadas nesse pieData do theme?

LaylaCsAvila

comment created time in 2 months

create barnchMinisterioPublicoRJ/promotron-web

branch : feature/radar-improv

created branch time in 3 months

issue commentPokeAPI/pokeapi

Many species with missing `pokedex_numbers`

Not just that, but it seems that many Pokémon are still missing altogether, as far as I remember the last Pokémon is Zeraora (807).

For the Galar pokédex (and Meltan/Melmetan), we need to (sadly) wait Veekun to update its database: #460 :(

I

leobetosouza

comment created time in 3 months

issue openedPokeAPI/pokeapi

Many species with mising `pokedex_numbers`

I'm building an app and I found some inconsistencies on the API data.

My app is trying to get the pokedex_numbers of each pokemon specie and looks like many Alolan species are missing this data.

This is a spreadsheet that my app populates when it encounters this inconsistency: https://docs.google.com/spreadsheets/d/1wfERnZdH3DfLeGtB_4rvoirC37I7WHKNILPcGwhXRmM/edit?usp=sharing

Each row has a link and you can just click it to see the API without the data on the key pokedex_numbers

(the second sheet is populated when it encounters a pair of pokemon-form/pokemon without a front_sprite... there's already an issue for it: #454).

For the sake of your curiosity, the app is: https://pokememo.now.sh/ (it's a work in progress and the repo is leobetosouza/pokememo)

created time in 3 months

issue commentPokeAPI/pokeapi

Missing some Sprites

looks like the api isnt updated since the sprites repo looks okay...

my application found other missing sprites in /pokemonand /pokemon-form... you can see on the second sheet of this link: https://docs.google.com/spreadsheets/d/1wfERnZdH3DfLeGtB_4rvoirC37I7WHKNILPcGwhXRmM/edit?usp=sharing

seelker

comment created time in 3 months

push eventleobetosouza/pokememo

Leonardo Alberto Souza

commit sha 72985298a3bcb2715195a4675a79bf5fe63db6a5

fixing sprites error function

view details

push time in 3 months

push eventleobetosouza/pokememo

Leonardo Alberto Souza

commit sha 469bc7b909cd78c93d266906c6054eefb2b3706c

insomnia = reorganization, cache, error report and analytics

view details

push time in 3 months

push eventleobetosouza/pokememo

Leonardo Alberto Souza

commit sha 53c0e8813fc8d97cdbbba5eeb07c8464f05d5ab4

improving design of card faces

view details

Leonardo Alberto Souza

commit sha 8d2378dee5ed1ecb3bde86feddba7976c82ace5a

addid bounce animation and cursor pointer

view details

Leonardo Alberto Souza

commit sha e6e049a4f7c40d784285187742418f926f572837

improving cards design

view details

Leonardo Alberto Souza

commit sha 04fb678cc1679a5c04319b361ee88ee57036e207

imprementing offline first cache

view details

push time in 3 months

startedtdmalone/pokecss-media

started time in 3 months

startedNaramsim/PokemonSpritesScraper

started time in 3 months

issue openedPokeAPI/pokeapi

There's no flag to say if the pkmn is a ultra beast

Ultra beasts are a special kind of Pokémon debuted in Pokémon Sun and Moon. More info: https://bulbapedia.bulbagarden.net/wiki/Ultra_Beast

For example, Naganadel. Pokémon: https://pokeapi.co/api/v2/pokemon/804/ Specie: https://pokeapi.co/api/v2/pokemon-species/804/ Form: https://pokeapi.co/api/v2/pokemon-form/804/

Neither as a attribute that indicates it is a ultra beast, like is_baby (in the pokémon endpoint) or is_mega (in the form endpoint)... is_ultra_beast isn't a bad one.

Currently the only know way to say if the pokémon is a ultra beast is checking the ability Beast Boost. But, I think it is not the best way to do it. I think the APIs can be more explicit regarding this. And, I think it is not future proof, since someday Game Freak can change the dependency of Beast Boost.

created time in 3 months

issue commentEbookFoundation/free-programming-books

Missing books

Two books from Al Sweigart are also missing: https://inventwithscratch.com/book/ https://turtleappstore.com/book

leobetosouza

comment created time in 3 months

issue openedEbookFoundation/free-programming-books

Missing books

I see that some os the MagPi books aren't listed: https://magpi.raspberrypi.org/books

created time in 3 months

startedEbookFoundation/free-programming-books

started time in 3 months

issue commentaxios/axios

Does Axios have a way to queue X simultaneous requests?

@cerlestes there's a way to do it using interceptors, like this: https://medium.com/@matthew_1129/axios-js-maximum-concurrent-requests-b15045eb69d0

I think this code can be catched by a race condition, but it's an idea.

donpinkus

comment created time in 3 months

push eventleobetosouza/pokememo

Leonardo Alberto Souza

commit sha d90668d8cea5cb2eea90bebb7d949e3af6daa584

wip

view details

Leonardo Alberto Souza

commit sha 980d6493811a4dd3fb680fad4b7172f5c961954d

fixing some issues

view details

push time in 3 months

more