Skip to content

Commit

Permalink
Fix boolean fields (#2632)
Browse files Browse the repository at this point in the history
* fix(ui): fixed filtering of boolean fields

* revert(*): reverted adapter change

* revert(*): reverted adapter change

* fix(*): boolean fields

* feat(*): update backoffice

* revert(backoffice-v2): reverted mock
  • Loading branch information
Omri-Levy authored Aug 8, 2024
1 parent 60501ba commit 355e1d3
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/backoffice-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@ballerine/blocks": "0.2.12",
"@ballerine/common": "0.9.22",
"@ballerine/react-pdf-toolkit": "^1.2.15",
"@ballerine/ui": "^0.5.15",
"@ballerine/ui": "^0.5.18",
"@ballerine/workflow-browser-sdk": "0.6.33",
"@ballerine/workflow-node-sdk": "0.6.33",
"@fontsource/inter": "^4.5.15",
Expand Down
7 changes: 7 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# kyb-app

## 0.3.37

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.5.18

## 0.3.36

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/kyb-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/kyb-app",
"private": true,
"version": "0.3.36",
"version": "0.3.37",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@ballerine/blocks": "0.2.12",
"@ballerine/common": "^0.9.22",
"@ballerine/ui": "0.5.17",
"@ballerine/ui": "0.5.18",
"@ballerine/workflow-browser-sdk": "0.6.33",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-icons": "^1.3.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-pdf-toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @ballerine/react-pdf-toolkit

## 1.2.18

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.5.18

## 1.2.17

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-pdf-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/react-pdf-toolkit",
"private": false,
"version": "1.2.17",
"version": "1.2.18",
"types": "./dist/build.d.ts",
"main": "./dist/react-pdf-toolkit.js",
"module": "./dist/react-pdf-toolkit.mjs",
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@ballerine/config": "^1.1.11",
"@ballerine/ui": "0.5.17",
"@ballerine/ui": "0.5.18",
"@react-pdf/renderer": "^3.1.14",
"@sinclair/typebox": "^0.31.7",
"ajv": "^8.12.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/ui

## 0.5.18

### Patch Changes

- fix boolean fields

## 0.5.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/ui",
"private": false,
"version": "0.5.17",
"version": "0.5.18",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const adsProviderAdapter = {
biography: data?.biography,
followers: data?.numberOfFollowers,
isBusinessAccount: booleanToYesOrNo(data?.isBusinessAccount),
isVerified: data?.isVerified,
isVerified: booleanToYesOrNo(data?.isVerified),
}),
} as const satisfies Record<
Lowercase<TAdsProvider>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AdsProviders, severityToDisplaySeverity } from '@/components/templates/report/constants';
import { adsProviderAdapter } from '@/components';
import { TAdsProvider } from '@/components/templates/report/types';
import { isNullish, SeverityType } from '@ballerine/common';
import { SeverityType } from '@ballerine/common';

const getLabel = ({ label, provider }: { label: string; provider: string }) => {
if (label === 'page') {
Expand Down Expand Up @@ -67,7 +67,7 @@ export const reportAdapter = {
})),
};
})
?.filter((value): value is NonNullable<typeof value> => !isNullish(value)),
?.filter((value): value is NonNullable<typeof value> => Boolean(value)),
websiteLineOfBusinessAnalysis: toRiskLabels(
report?.summary?.riskIndicatorsByDomain?.lineOfBusinessViolations,
),
Expand Down Expand Up @@ -195,7 +195,7 @@ export const reportAdapter = {
})),
};
})
?.filter((value): value is NonNullable<typeof value> => !isNullish(value)),
?.filter((value): value is NonNullable<typeof value> => Boolean(value)),
websiteLineOfBusinessAnalysis: toRiskLabels(
report?.summary?.riskIndicatorsByDomain?.lineOfBusinessViolations,
),
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

0 comments on commit 355e1d3

Please sign in to comment.