Skip to content

Commit

Permalink
Demo environment (#2384)
Browse files Browse the repository at this point in the history
* feat(*): checkpoint

* revert(workflows-service): reverted error log change

* fix(backoffice-v2): associated companies fixes
  • Loading branch information
Omri-Levy authored May 16, 2024
1 parent 0714d9b commit 2779f04
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export const useUpdateDocumentByIdMutation = ({
const previousWorkflow = queryClient.getQueryData(workflowById.queryKey);

queryClient.setQueryData(workflowById.queryKey, (oldWorkflow: TWorkflowById) => {
if (!oldWorkflow) {
return;
}

return {
...oldWorkflow,
context: {
Expand All @@ -49,6 +53,7 @@ export const useUpdateDocumentByIdMutation = ({
if (doc.id === documentId) {
return document;
}

return doc;
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const getTabsToBlocksMap = (
associated_companies: [
...associatedCompaniesBlock,
...associatedCompaniesInformationBlock,
...createKycBlocks(workflow as TWorkflowById),
...createAssociatedCompanyDocumentBlocks(workflow, blocksCreationParams),
],
directors: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FunctionComponent } from 'react';

export const NoAlerts: FunctionComponent = () => {
return (
<div className="flex items-center justify-center p-4 pb-72">
<div className="flex items-center justify-center p-4 pb-64">
<div className="inline-flex flex-col items-start gap-4 rounded-md border-[1px] border-[#CBD5E1] p-6">
<div className="flex w-[464px] items-center justify-center">
<NoCasesSvg width={96} height={81} />
Expand Down
11 changes: 8 additions & 3 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions services/workflows-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"@types/deep-diff": "^1.0.5",
"@types/express": "4.17.9",
"@types/jest": "^26.0.19",
"@types/jmespath": "^0.15.0",
"@types/js-base64": "^3.3.1",
"@types/json-stable-stringify": "^1.0.36",
"@types/lodash": "^4.14.191",
Expand All @@ -140,6 +141,7 @@
"eslint-plugin-import": "^2.27.5",
"jest": "29.7.0",
"jest-mock-extended": "^2.0.4",
"jmespath": "^0.16.0",
"plop": "^4.0.0",
"prettier": "^2.8.4",
"prisma": "4.16.2",
Expand Down
2 changes: 1 addition & 1 deletion services/workflows-service/prisma/data-migrations
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IAppLogger, LogPayload } from '@/common/abstract-logger/abstract-logger';
import { env } from '@/env';
import { createLogger, format, transports, Logger as TWinstonLogger } from 'winston';
import { createLogger, format, Logger as TWinstonLogger, transports } from 'winston';

export class WinstonLogger implements IAppLogger {
private logger: TWinstonLogger;
Expand Down
4 changes: 4 additions & 0 deletions services/workflows-service/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ export type GenericFunction = (...args: AnyArray) => any;
export type GenericAsyncFunction = (...args: AnyArray) => Promise<any>;

export type PrismaTransaction = Omit<PrismaClient, runtime.ITXClientDenyList>;

export type PrismaTransactionMethod = Parameters<PrismaClient['$transaction']>[0];

export type PrismaTransactionClient = Parameters<PrismaTransactionMethod>[0];
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class HookCallbackHandlerService {
const customer = await this.customerService.getByProjectId(currentProjectId);
const persistedDocuments = await this.workflowService.copyDocumentsPagesFilesAndCreate(
documents as TDocumentsWithoutPageType,
// @ts-expect-error - we don't validate `context` is an object1
// @ts-expect-error - we don't validate `context` is an object
context.entity.id || context.entity.ballerineEntityId,
currentProjectId,
customer.name,
Expand Down

0 comments on commit 2779f04

Please sign in to comment.