diff --git a/apps/backoffice-v2/src/domains/customer/fetchers.ts b/apps/backoffice-v2/src/domains/customer/fetchers.ts
index 94587404af..dbe623de31 100644
--- a/apps/backoffice-v2/src/domains/customer/fetchers.ts
+++ b/apps/backoffice-v2/src/domains/customer/fetchers.ts
@@ -21,6 +21,9 @@ const CustomerSchema = z.object({
language: z.union([z.string(), z.null()]).optional(),
features: z
.object({
+ chatbot: z
+ .object({ enabled: z.boolean().default(false), clientId: z.string().optional() })
+ .optional(),
createBusinessReport: z
.object({ enabled: z.boolean().default(false), options: createBusinessReportOptions })
.optional(),
@@ -35,7 +38,6 @@ const CustomerSchema = z.object({
isMerchantMonitoringEnabled: z.boolean().default(false),
isExample: z.boolean().default(false),
isDemo: z.boolean().default(false),
- isChatbotEnabled: z.boolean().default(false),
})
.nullable()
.default({
diff --git a/apps/backoffice-v2/src/domains/notes/Notes.tsx b/apps/backoffice-v2/src/domains/notes/Notes.tsx
index 951d57c617..68822d8384 100644
--- a/apps/backoffice-v2/src/domains/notes/Notes.tsx
+++ b/apps/backoffice-v2/src/domains/notes/Notes.tsx
@@ -88,7 +88,7 @@ export const Notes = ({
size={`sm`}
aria-disabled={isLoading}
className={
- 'mt-3 h-5 self-end p-4 text-sm font-medium aria-disabled:pointer-events-none aria-disabled:opacity-50'
+ 'mt-3 h-5 self-end p-4 text-sm font-medium enabled:bg-primary enabled:hover:bg-primary/90 aria-disabled:pointer-events-none aria-disabled:opacity-50'
}
>
diff --git a/apps/backoffice-v2/src/domains/transactions/fetchers.ts b/apps/backoffice-v2/src/domains/transactions/fetchers.ts
index 4a2c7e13be..ae7c46a971 100644
--- a/apps/backoffice-v2/src/domains/transactions/fetchers.ts
+++ b/apps/backoffice-v2/src/domains/transactions/fetchers.ts
@@ -178,7 +178,7 @@ export const TransactionsListSchema = z.array(
export type TTransactionsList = z.output
;
export const fetchTransactions = async (params: {
- counterpartyId: string;
+ counterpartyId?: string;
page: {
number: number;
size: number;
diff --git a/apps/backoffice-v2/src/domains/transactions/hooks/queries/useTransactionsQuery/useTransactionsQuery.tsx b/apps/backoffice-v2/src/domains/transactions/hooks/queries/useTransactionsQuery/useTransactionsQuery.tsx
index 1f43e0d085..04e7b57478 100644
--- a/apps/backoffice-v2/src/domains/transactions/hooks/queries/useTransactionsQuery/useTransactionsQuery.tsx
+++ b/apps/backoffice-v2/src/domains/transactions/hooks/queries/useTransactionsQuery/useTransactionsQuery.tsx
@@ -9,7 +9,7 @@ export const useTransactionsQuery = ({
pageSize,
}: {
alertId: string;
- counterpartyId: string;
+ counterpartyId?: string;
page: number;
pageSize: number;
}) => {
@@ -22,7 +22,7 @@ export const useTransactionsQuery = ({
page,
pageSize,
}),
- enabled: isAuthenticated && !!counterpartyId,
+ enabled: isAuthenticated,
staleTime: 100_000,
});
};
diff --git a/apps/backoffice-v2/src/domains/transactions/query-keys.ts b/apps/backoffice-v2/src/domains/transactions/query-keys.ts
index 158d98ec23..f806c25f79 100644
--- a/apps/backoffice-v2/src/domains/transactions/query-keys.ts
+++ b/apps/backoffice-v2/src/domains/transactions/query-keys.ts
@@ -8,7 +8,7 @@ export const transactionsQueryKeys = createQueryKeys('transactions', {
...params
}: {
alertId: string;
- counterpartyId: string;
+ counterpartyId?: string;
page: number;
pageSize: number;
}) => {
diff --git a/apps/backoffice-v2/src/domains/workflow-definitions/fetchers.ts b/apps/backoffice-v2/src/domains/workflow-definitions/fetchers.ts
index e353beead5..16cb3de6f1 100644
--- a/apps/backoffice-v2/src/domains/workflow-definitions/fetchers.ts
+++ b/apps/backoffice-v2/src/domains/workflow-definitions/fetchers.ts
@@ -47,6 +47,15 @@ export const WorkflowDefinitionConfigSchema = z
.optional(),
})
.optional(),
+ editableContext: z
+ .object({
+ kyc: z
+ .object({
+ entity: z.boolean().optional(),
+ })
+ .optional(),
+ })
+ .optional(),
})
.passthrough()
.nullable();
diff --git a/apps/backoffice-v2/src/domains/workflows/fetchers.ts b/apps/backoffice-v2/src/domains/workflows/fetchers.ts
index ac1f9ab036..af75288bb8 100644
--- a/apps/backoffice-v2/src/domains/workflows/fetchers.ts
+++ b/apps/backoffice-v2/src/domains/workflows/fetchers.ts
@@ -13,6 +13,23 @@ import { z } from 'zod';
import { IWorkflowId } from './interfaces';
import { zPropertyKey } from '@/lib/zod/utils/z-property-key/z-property-key';
+export const updateContextAndSyncEntity = async ({
+ workflowId,
+ data,
+}: {
+ workflowId: string;
+ data: Partial;
+}) => {
+ const [workflow, error] = await apiClient({
+ endpoint: `../external/workflows/${workflowId}/sync-entity`,
+ method: Method.PATCH,
+ body: data,
+ schema: z.undefined(),
+ });
+
+ return handleZodError(error, workflow);
+};
+
export const fetchWorkflows = async (params: {
filterId: string;
orderBy: string;
diff --git a/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateContextAndSyncEntity/useUpdateContextAndSyncEntity.tsx b/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateContextAndSyncEntity/useUpdateContextAndSyncEntity.tsx
new file mode 100644
index 0000000000..a0de2d8918
--- /dev/null
+++ b/apps/backoffice-v2/src/domains/workflows/hooks/mutations/useUpdateContextAndSyncEntity/useUpdateContextAndSyncEntity.tsx
@@ -0,0 +1,34 @@
+import { TWorkflowById, updateContextAndSyncEntity } from '@/domains/workflows/fetchers';
+
+import { useMutation, useQueryClient } from '@tanstack/react-query';
+import { toast } from 'sonner';
+import { t } from 'i18next';
+import { workflowsQueryKeys } from '../../../query-keys';
+
+export const useUpdateContextAndSyncEntityMutation = ({
+ workflowId,
+ onSuccess,
+}: {
+ workflowId: string;
+ onSuccess: (data: null, variables: Partial, context: unknown) => void;
+}) => {
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: async (data: Partial) =>
+ await updateContextAndSyncEntity({
+ workflowId,
+ data,
+ }),
+ onSuccess: (...args) => {
+ void queryClient.invalidateQueries(workflowsQueryKeys._def);
+
+ toast.success(t('toast:update_details.success'));
+
+ onSuccess(...args);
+ },
+ onError: () => {
+ toast.error(t('toast:update_details.error'));
+ },
+ });
+};
diff --git a/apps/backoffice-v2/src/index.css b/apps/backoffice-v2/src/index.css
index 4965a08679..1e85734aa2 100644
--- a/apps/backoffice-v2/src/index.css
+++ b/apps/backoffice-v2/src/index.css
@@ -318,10 +318,7 @@
}
}
-a.bpComposerPoweredBy {
+a.bpComposerPoweredBy,
+div.bpHeaderExpandedContentDescriptionItemsPoweredBy {
display: none !important;
}
-
-button.bpModalDialogNewConversationButton {
- background-color: var(--bpPrimary-500) !important;
-}
diff --git a/apps/backoffice-v2/src/lib/blocks/components/BlockCell/BlockCell.tsx b/apps/backoffice-v2/src/lib/blocks/components/BlockCell/BlockCell.tsx
index ab5298c6b7..ae31ba0fc7 100644
--- a/apps/backoffice-v2/src/lib/blocks/components/BlockCell/BlockCell.tsx
+++ b/apps/backoffice-v2/src/lib/blocks/components/BlockCell/BlockCell.tsx
@@ -1,14 +1,15 @@
-import { ctw } from '@/common/utils/ctw/ctw';
-import { CardContent } from '@/common/components/atoms/Card/Card.Content';
import { Card } from '@/common/components/atoms/Card/Card';
-import { FunctionComponent } from 'react';
-import { Block } from '@ballerine/blocks';
+import { CardContent } from '@/common/components/atoms/Card/Card.Content';
+import { ctw } from '@/common/utils/ctw/ctw';
import { cells } from '@/lib/blocks/create-blocks-typed/create-blocks-typed';
+import { Block } from '@ballerine/blocks';
+import { FunctionComponent } from 'react';
interface IBlockCellProps {
value: Block;
props?: {
className?: string;
+ contentClassName?: string;
};
}
@@ -20,9 +21,13 @@ export const BlockCell: FunctionComponent = ({ value, props })
return (
cell?.type === 'multiDocuments'),
- })}
+ className={ctw(
+ 'grid gap-2',
+ {
+ 'grid-cols-2': value?.some(cell => cell?.type === 'multiDocuments'),
+ },
+ props?.contentClassName,
+ )}
>
{value?.map((cell, index) => {
const Cell = cells[cell?.type];
diff --git a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx
index c62acd5d0a..cd4da51747 100644
--- a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx
+++ b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx
@@ -189,7 +189,10 @@ export const CallToActionLegacy: FunctionComponent = (
size="wide"
variant="warning"
disabled={disabled}
- className={ctw({ 'flex gap-2': isReuploadResetable })}
+ className={ctw(
+ { 'flex gap-2': isReuploadResetable },
+ 'enabled:bg-warning enabled:hover:bg-warning/90',
+ )}
>
{value.text}
{isReuploadResetable && (
@@ -253,9 +256,11 @@ export const CallToActionLegacy: FunctionComponent = (
}
close={