Skip to content

Commit

Permalink
fix(frontend): Fix bug on country picker
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed May 14, 2024
1 parent 389d6a5 commit 8ef5a0a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 31 deletions.
64 changes: 34 additions & 30 deletions frontend/DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
npm/npmjs/-/axios/1.6.4, MIT, approved, #11338
npm/npmjs/-/clsx/2.0.0, MIT, approved, clearlydefined
npm/npmjs/-/cssstyle/3.0.0, MIT, approved, clearlydefined
npm/npmjs/-/data-urls/4.0.0, MIT, approved, clearlydefined
npm/npmjs/-/domexception/4.0.0, MIT, approved, clearlydefined
npm/npmjs/-/follow-redirects/1.15.5, MIT, approved, #10782
npm/npmjs/-/html-encoding-sniffer/3.0.0, MIT, approved, clearlydefined
npm/npmjs/-/html-parse-stringify/3.0.1, MIT, approved, clearlydefined
npm/npmjs/-/http-proxy-agent/5.0.0, MIT, approved, clearlydefined
npm/npmjs/-/i18next/22.5.1, MIT, approved, #9143
npm/npmjs/-/jsdom/22.0.0, MIT AND LGPL-2.0-or-later, approved, #8188
npm/npmjs/-/react-i18next/13.5.0, MIT AND Apache-2.0, approved, #11697
npm/npmjs/-/rrweb-cssom/0.6.0, MIT, approved, clearlydefined
npm/npmjs/-/saxes/6.0.0, ISC, approved, clearlydefined
npm/npmjs/-/tr46/4.1.1, MIT, approved, clearlydefined
npm/npmjs/-/void-elements/3.1.0, MIT, approved, clearlydefined
npm/npmjs/-/w3c-xmlserializer/4.0.0, MIT, approved, clearlydefined
npm/npmjs/-/webidl-conversions/7.0.0, BSD-2-Clause, approved, clearlydefined
npm/npmjs/-/whatwg-encoding/2.0.0, MIT, approved, clearlydefined
npm/npmjs/-/whatwg-mimetype/3.0.0, MIT, approved, clearlydefined
npm/npmjs/-/whatwg-url/12.0.1, MIT, approved, clearlydefined
npm/npmjs/-/xml-name-validator/4.0.0, Apache-2.0, approved, clearlydefined
npm/npmjs/@adobe/css-tools/4.3.2, MIT, approved, #9985
npm/npmjs/@catena-x/portal-shared-components/2.1.30, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@mui/private-theming/5.14.20, MIT, approved, #10973
npm/npmjs/@mui/styled-engine/5.14.20, MIT, approved, #10971
npm/npmjs/@mui/system/5.14.20, MIT AND CC-BY-3.0, approved, #9905
npm/npmjs/@mui/types/7.2.12, MIT, approved, clearlydefined
npm/npmjs/@mui/x-data-grid/6.18.4, MIT AND ISC, approved, #11696
npm/npmjs/@tootallnate/once/2.0.0, MIT, approved, clearlydefined
npm/npmjs/-/ansi-styles/3.2.1, MIT, approved, clearlydefined
npm/npmjs/-/attr-accept/2.2.2, MIT, approved, clearlydefined
npm/npmjs/-/browserslist/4.23.0, MIT, approved, clearlydefined
npm/npmjs/-/caniuse-lite/1.0.30001607, CC-BY-4.0, approved, #1196
npm/npmjs/-/chalk/2.4.2, MIT, approved, clearlydefined
npm/npmjs/-/color-convert/1.9.3, MIT, approved, clearlydefined
npm/npmjs/-/color-name/1.1.3, MIT, approved, clearlydefined
npm/npmjs/-/country-data/0.0.31, MIT, approved, #14666
npm/npmjs/-/currency-symbol-map/2.2.0, BSD-2-Clause, approved, clearlydefined
npm/npmjs/-/electron-to-chromium/1.4.729, ISC, approved, #1950
npm/npmjs/-/escape-string-regexp/1.0.5, MIT, approved, clearlydefined
npm/npmjs/-/file-selector/0.6.0, MIT, approved, #3230
npm/npmjs/-/has-flag/3.0.0, MIT, approved, clearlydefined
npm/npmjs/-/node-releases/2.0.14, MIT, approved, #1954
npm/npmjs/-/postcss/8.4.38, MIT, approved, #3545
npm/npmjs/-/react-dropzone/14.2.3, MIT, approved, clearlydefined
npm/npmjs/-/source-map-js/1.2.0, BSD-3-Clause, approved, #13911
npm/npmjs/-/supports-color/5.5.0, MIT, approved, clearlydefined
npm/npmjs/@babel/code-frame/7.24.2, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13943
npm/npmjs/@babel/compat-data/7.24.4, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13915
npm/npmjs/@babel/core/7.24.4, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13942
npm/npmjs/@babel/generator/7.24.4, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13919
npm/npmjs/@babel/helper-compilation-targets/7.23.6, MIT, approved, clearlydefined
npm/npmjs/@babel/helper-validator-option/7.23.5, MIT, approved, clearlydefined
npm/npmjs/@babel/helpers/7.24.4, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13922
npm/npmjs/@babel/highlight/7.24.2, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13941
npm/npmjs/@babel/parser/7.24.4, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13492
npm/npmjs/@babel/template/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@babel/traverse/7.24.1, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13926
npm/npmjs/@babel/types/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/2.1.40, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@jridgewell/gen-mapping/0.3.5, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/set-array/1.2.1, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/trace-mapping/0.3.25, MIT, approved, #9904
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@testing-library/user-event": "^14.5.1",
"axios": "1.6.4",
"buffer": "^6.0.3",
"country-data": "^0.0.31",
"cx-portal-shared-components": "0.4.5",
"d3-fetch": "^3.0.1",
"env-cmd": "^10.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import UserService from "../../services/UserService";
import { CompanyUserContext } from "../../../contexts/companyuser";
import { GatesContext } from "../../../contexts/gates";
import DetailDialog from "../DetailDialog/DetailDialog";
import { countries } from "country-data";

const DashboardTable2 = (ratings, years) => {
//Data Fetch
Expand Down Expand Up @@ -100,7 +101,10 @@ const DashboardTable2 = (ratings, years) => {
if (countryS !== "none") {
const array = [];
globalData.forEach((gd) => {
if (gd.country === countryS.country) {
const countryFullName = countries[gd.country]
? countries[gd.country].name
: "";
if (countryFullName === countryS.country) {
array.push(gd);
}
});
Expand Down

0 comments on commit 8ef5a0a

Please sign in to comment.