diff --git a/apps/backoffice-v2/src/pages/Entity/components/Case/Case.Actions.tsx b/apps/backoffice-v2/src/pages/Entity/components/Case/Case.Actions.tsx index 11f67de2ca..c52f718674 100644 --- a/apps/backoffice-v2/src/pages/Entity/components/Case/Case.Actions.tsx +++ b/apps/backoffice-v2/src/pages/Entity/components/Case/Case.Actions.tsx @@ -35,6 +35,7 @@ export const Actions: FunctionComponent = ({ assignees, onMutateAssignWorkflow, workflowDefinition, + isWorkflowCompleted, } = useCaseActionsLogic({ workflowId: id, fullName }); return ( @@ -47,6 +48,7 @@ export const Actions: FunctionComponent = ({ onMutateAssignWorkflow(id, id === authenticatedUser?.id); }} authenticatedUserId={authenticatedUser?.id} + isDisabled={isWorkflowCompleted} />
diff --git a/apps/backoffice-v2/src/pages/Entity/components/Case/hooks/useCaseActionsLogic/useCaseActionsLogic.tsx b/apps/backoffice-v2/src/pages/Entity/components/Case/hooks/useCaseActionsLogic/useCaseActionsLogic.tsx index d20c0b4ed6..d46bd4a31c 100644 --- a/apps/backoffice-v2/src/pages/Entity/components/Case/hooks/useCaseActionsLogic/useCaseActionsLogic.tsx +++ b/apps/backoffice-v2/src/pages/Entity/components/Case/hooks/useCaseActionsLogic/useCaseActionsLogic.tsx @@ -57,6 +57,8 @@ export const useCaseActionsLogic = ({ workflowId, fullName }: IUseActions) => { } : undefined; + const isWorkflowCompleted = workflow?.status === 'completed'; + return { isActionButtonDisabled, onMutateAssignWorkflow, @@ -74,5 +76,6 @@ export const useCaseActionsLogic = ({ workflowId, fullName }: IUseActions) => { tag, workflow, workflowDefinition: workflow?.workflowDefinition, + isWorkflowCompleted, }; }; diff --git a/services/workflows-service/prisma/data-migrations b/services/workflows-service/prisma/data-migrations index 419f5c7495..ba704ed1de 160000 --- a/services/workflows-service/prisma/data-migrations +++ b/services/workflows-service/prisma/data-migrations @@ -1 +1 @@ -Subproject commit 419f5c749531b5bb7ca663a3cc02581a3a9c756a +Subproject commit ba704ed1dec6f80d0a5fdae9583ccdb0c8487297 diff --git a/services/workflows-service/scripts/alerts/generate-transactions.ts b/services/workflows-service/scripts/alerts/generate-transactions.ts index d90f9a0169..e10c251fc5 100644 --- a/services/workflows-service/scripts/alerts/generate-transactions.ts +++ b/services/workflows-service/scripts/alerts/generate-transactions.ts @@ -1,9 +1,6 @@ import { - Business, - EndUser, PaymentAcquirer, PaymentBrandName, - PaymentChannel, PaymentGateway, PaymentIssuer, PaymentMethod, @@ -18,6 +15,14 @@ import { import { faker } from '@faker-js/faker'; import { generateBusiness, generateEndUser } from '../generate-end-user'; +const PaymentChannel = { + online: 'online', + mobile_app: 'mobile_app', + in_store: 'in_store', + telephone: 'telephone', + mail_order: 'mail_order', +}; + export const generateTransactions = async ( prismaClient: PrismaClient, {