Skip to content

Commit

Permalink
chore/merge-dev-into-sb (#1632)
Browse files Browse the repository at this point in the history
* fix(change gh docs): removing bank statment for GH fin focs (#1621)

* fix(change gh docs): removing bank statment for GH fin focs

* chore(mono): version bump

* feat: fixing ClipsPay workflow bugs (#1630)

* chore: packages/ui version bump (#1631)

---------

Co-authored-by: Alon Peretz <[email protected]>
  • Loading branch information
tomer-shvadron and alonp99 authored Nov 15, 2023
1 parent 36ee6d9 commit 8975fa5
Show file tree
Hide file tree
Showing 40 changed files with 316 additions and 161 deletions.
18 changes: 18 additions & 0 deletions apps/backoffice-v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @ballerine/backoffice-v2

## 0.5.23

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.3.14

## 0.5.22

### Patch Changes

- Change document schemas
- Updated dependencies
- @ballerine/common@0.7.22
- @ballerine/ui@0.3.13
- @ballerine/workflow-browser-sdk@0.5.20
- @ballerine/workflow-node-sdk@0.5.20

## 0.5.21

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions apps/backoffice-v2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ballerine/backoffice-v2",
"version": "0.5.21",
"version": "0.5.23",
"description": "Ballerine - Backoffice",
"homepage": "https://github.com/ballerine-io/ballerine",
"repository": {
Expand Down Expand Up @@ -50,10 +50,10 @@
"preview": "vite preview"
},
"dependencies": {
"@ballerine/common": "0.7.21",
"@ballerine/ui": "0.3.12",
"@ballerine/workflow-browser-sdk": "0.5.19",
"@ballerine/workflow-node-sdk": "0.5.19",
"@ballerine/common": "0.7.22",
"@ballerine/ui": "0.3.14",
"@ballerine/workflow-browser-sdk": "0.5.20",
"@ballerine/workflow-node-sdk": "0.5.20",
"@fontsource/inter": "^4.5.15",
"@formkit/auto-animate": "1.0.0-beta.5",
"@hookform/resolvers": "^3.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod';

/**
* @description Checks if a passed value is a datetime string.
* @description Checks if a passed value is a date string.
* @param value
* @param isStrict - If false, will return true for strings that match the format YYYY-MM-DD.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { isValidDatetime } from './is-valid-datetime';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @description Checks if a passed value is a string that match the format YYYY-MM-DD HH:MM:SS.
* @param value
*/
export const isValidDatetime = (value: unknown): value is string => {
if (typeof value !== 'string') return false;

return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(value);
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { toTitleCase } from 'string-ts';
* @param props
* @param props.id - The id of the entity, passed into the reject/approve mutation.
* @param props.fullName - The full name of the entity.
* @param props.avatarUrl - The entity's image url to pass into {@link Avatar}.
* @param props.showResolutionButtons - Whether to show the reject/approve buttons.
*
* @see {@link Case}
* @see {@link Avatar}
Expand All @@ -35,7 +35,6 @@ import { toTitleCase } from 'string-ts';
export const Actions: FunctionComponent<IActionsProps> = ({
id,
fullName,
avatarUrl,
showResolutionButtons,
}) => {
const {
Expand Down Expand Up @@ -87,10 +86,13 @@ export const Actions: FunctionComponent<IActionsProps> = ({
variant={tagToBadgeData[tag].variant}
className={ctw(`text-sm font-bold`, {
'bg-info/20 text-info': tag === StateTag.MANUAL_REVIEW,
'bg-violet-500/20 text-violet-500': tag === StateTag.COLLECTION_FLOW,
'bg-violet-500/20 text-violet-500': [
StateTag.COLLECTION_FLOW,
StateTag.DATA_ENRICHMENT,
].includes(tag),
})}
>
{toTitleCase(tagToBadgeData[tag].text)}
{tagToBadgeData[tag].text}
</Badge>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/backoffice-v2/src/pages/Entity/components/Case/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const tagToBadgeData = {
[StateTag.REJECTED]: { variant: 'destructive', text: 'Rejected' },
[StateTag.RESOLVED]: { variant: 'success', text: 'Resolved' },
[StateTag.MANUAL_REVIEW]: { variant: 'info', text: 'Manual Review' },
[StateTag.COLLECTION_FLOW]: { variant: 'slate', text: 'Collection in Progress' },
[StateTag.COLLECTION_FLOW]: { variant: 'violet', text: 'Collection in Progress' },
[StateTag.PENDING_PROCESS]: { variant: 'warning', text: 'Pending ID Verification' },
[StateTag.FAILURE]: { variant: 'destructive', text: 'Failed' },
[StateTag.DATA_ENRICHMENT]: { variant: 'primary', text: 'Gathering Data' },
[StateTag.DATA_ENRICHMENT]: { variant: 'violet', text: 'Awaiting 3rd Party Data' },
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const useCaseActionsLogic = ({ workflowId, fullName }: IUseActions) => {

const tag = useMemo(() => {
return workflow?.tags?.find(t => tagToBadgeData[t]);
}, [workflow]);
}, [workflow]) as keyof typeof tagToBadgeData;

const isActionButtonDisabled = !caseState.actionButtonsEnabled;
const documentsToReviseCount = workflow?.context?.documents?.filter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { isValidDate } from '../../../../common/utils/is-valid-date';
import { isValidIsoDate } from '../../../../common/utils/is-valid-iso-date/is-valid-iso-date';
import { JsonDialog } from '@ballerine/ui';
import { toTitleCase } from 'string-ts';
import { isValidDatetime } from '../../../../common/utils/is-valid-datetime';

const useInitialCategorySetValue = ({ form, data }) => {
useEffect(() => {
Expand Down Expand Up @@ -129,7 +130,7 @@ export const EditableDetails: FunctionComponent<IEditableDetails> = ({
type: string | undefined;
value: unknown;
}) => {
if (format === 'date-time') {
if (format === 'date-time' || isValidDatetime(value)) {
return 'datetime-local';
}

Expand Down
17 changes: 17 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# kyb-app

## 0.1.17

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.3.14

## 0.1.16

### Patch Changes

- Change document schemas
- Updated dependencies
- @ballerine/blocks@0.1.20
- @ballerine/ui@0.3.13
- @ballerine/workflow-browser-sdk@0.5.20

## 0.1.15

### Patch Changes
Expand Down
8 changes: 4 additions & 4 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.1.15",
"version": "0.1.17",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,9 +11,9 @@
"test": "vitest run"
},
"dependencies": {
"@ballerine/blocks": "0.1.19",
"@ballerine/ui": "0.3.12",
"@ballerine/workflow-browser-sdk": "0.5.19",
"@ballerine/blocks": "0.1.20",
"@ballerine/ui": "0.3.14",
"@ballerine/workflow-browser-sdk": "0.5.20",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-icons": "^1.3.0",
"@rjsf/core": "^5.9.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/workflows-dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/workflows-dashboard

## 0.1.9

### Patch Changes

- Change document schemas

## 0.1.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/workflows-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/workflows-dashboard",
"private": false,
"version": "0.1.8",
"version": "0.1.9",
"type": "module",
"scripts": {
"spellcheck": "cspell \"*\"",
Expand Down
9 changes: 9 additions & 0 deletions examples/headless-example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @ballerine/headless-example

## 0.1.20

### Patch Changes

- Change document schemas
- Updated dependencies
- @ballerine/common@0.7.22
- @ballerine/workflow-browser-sdk@0.5.20

## 0.1.19

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions examples/headless-example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/headless-example",
"private": true,
"version": "0.1.19",
"version": "0.1.20",
"type": "module",
"scripts": {
"spellcheck": "cspell \"*\"",
Expand Down Expand Up @@ -34,8 +34,8 @@
"vite": "^4.1.0"
},
"dependencies": {
"@ballerine/common": "0.7.21",
"@ballerine/workflow-browser-sdk": "0.5.19",
"@ballerine/common": "0.7.22",
"@ballerine/workflow-browser-sdk": "0.5.20",
"@felte/reporter-svelte": "^1.1.5",
"@felte/validator-zod": "^1.0.13",
"@fontsource/inter": "^4.5.15",
Expand Down
8 changes: 8 additions & 0 deletions packages/blocks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @ballerine/blocks

## 0.1.20

### Patch Changes

- Change document schemas
- Updated dependencies
- @ballerine/common@0.7.22

## 0.1.19

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"name": "@ballerine/blocks",
"author": "Ballerine <[email protected]>",
"version": "0.1.19",
"version": "0.1.20",
"description": "blocks",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/common

## 0.7.22

### Patch Changes

- Change document schemas

## 0.7.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"name": "@ballerine/common",
"author": "Ballerine <[email protected]>",
"version": "0.7.21",
"version": "0.7.22",
"description": "common",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,44 +55,44 @@ export const getGhanaDocuments = (): TDocument[] => {
// }),
// },

{
category: 'financial_information',
type: 'bank_statement',
issuer: { country: 'GH' },
issuingVersion: 1,
version: 1,
propertiesSchema: Type.Object({
issuer: TypeStringEnum([
'Absa Bank Ghana Limited',
'Access Bank Ghana Plc',
'Agricultural Development Bank of Ghana',
'Bank of Africa Ghana Limited',
'CalBank Limited',
'Consolidated Bank Ghana Limited',
'Ecobank Ghana Limited',
'FBN Bank Ghana Limited',
'Fidelity Bank Ghana Limited',
'First Atlantic Bank Limited',
'First National Bank Ghana',
'GCB Bank Limited',
'Guaranty Trust Bank Ghana Limited',
'National Investment Bank Limited',
'OmniBSIC Bank Ghana Limited',
'Prudential Bank Limited',
'Republic Bank Ghana',
'Societe Generale Ghana Limited',
'Stanbic Bank Ghana Limited',
'Standard Chartered Bank Ghana Limited',
'United Bank for Africa Ghana Limited',
'Zenith Bank Ghana Limited',
]),
printDate: Type.String({ format: 'date-time' }),
accountHolderName: TypeStringAtLeastOneWord,
from: Type.String({ format: 'date' }),
to: Type.String({ format: 'date' }),
accountNumber: Type.Optional(Type.String()),
}),
},
// {
// category: 'financial_information',
// type: 'bank_statement',
// issuer: { country: 'GH' },
// issuingVersion: 1,
// version: 1,
// propertiesSchema: Type.Object({
// issuer: TypeStringEnum([
// 'Absa Bank Ghana Limited',
// 'Access Bank Ghana Plc',
// 'Agricultural Development Bank of Ghana',
// 'Bank of Africa Ghana Limited',
// 'CalBank Limited',
// 'Consolidated Bank Ghana Limited',
// 'Ecobank Ghana Limited',
// 'FBN Bank Ghana Limited',
// 'Fidelity Bank Ghana Limited',
// 'First Atlantic Bank Limited',
// 'First National Bank Ghana',
// 'GCB Bank Limited',
// 'Guaranty Trust Bank Ghana Limited',
// 'National Investment Bank Limited',
// 'OmniBSIC Bank Ghana Limited',
// 'Prudential Bank Limited',
// 'Republic Bank Ghana',
// 'Societe Generale Ghana Limited',
// 'Stanbic Bank Ghana Limited',
// 'Standard Chartered Bank Ghana Limited',
// 'United Bank for Africa Ghana Limited',
// 'Zenith Bank Ghana Limited',
// ]),
// printDate: Type.String({ format: 'date-time' }),
// accountHolderName: TypeStringAtLeastOneWord,
// from: Type.String({ format: 'date' }),
// to: Type.String({ format: 'date' }),
// accountNumber: Type.Optional(Type.String()),
// }),
// },
// Proof of Address
{
category: 'proof_of_address',
Expand Down
6 changes: 6 additions & 0 deletions packages/rules-engine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/rules-engine-lib

## 0.4.21

### Patch Changes

- Change document schemas

## 0.4.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/rules-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/rules-engine-lib",
"author": "Ballerine <[email protected]>",
"version": "0.4.20",
"version": "0.4.21",
"description": "rules-engine-lib",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
Expand Down
Loading

0 comments on commit 8975fa5

Please sign in to comment.