Remove filters following deleted trigger/steps (#13697)
https://github.com/user-attachments/assets/e6ec591a-2064-4dfe-9048-2f234bef5c79
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient';
|
||||
import { DELETE_WORKFLOW_VERSION_STEP } from '@/workflow/graphql/mutations/deleteWorkflowVersionStep';
|
||||
import { useUpdateWorkflowVersionCache } from '@/workflow/workflow-steps/hooks/useUpdateWorkflowVersionCache';
|
||||
import { useMutation } from '@apollo/client';
|
||||
import {
|
||||
DeleteWorkflowVersionStepInput,
|
||||
DeleteWorkflowVersionStepMutation,
|
||||
DeleteWorkflowVersionStepMutationVariables,
|
||||
} from '~/generated-metadata/graphql';
|
||||
import { useUpdateWorkflowVersionCache } from '@/workflow/workflow-steps/hooks/useUpdateWorkflowVersionCache';
|
||||
|
||||
export const useDeleteWorkflowVersionStep = () => {
|
||||
const apolloCoreClient = useApolloCoreClient();
|
||||
@@ -31,6 +31,8 @@ export const useDeleteWorkflowVersionStep = () => {
|
||||
workflowVersionStepChanges,
|
||||
workflowVersionId: input.workflowVersionId,
|
||||
});
|
||||
|
||||
return workflowVersionStepChanges;
|
||||
};
|
||||
|
||||
return { deleteWorkflowVersionStep };
|
||||
|
||||
@@ -3,8 +3,8 @@ import { WorkflowVersion } from '@/workflow/types/Workflow';
|
||||
import { getStepOutputSchemaFamilyStateKey } from '@/workflow/utils/getStepOutputSchemaFamilyStateKey';
|
||||
import { getActionIcon } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIcon';
|
||||
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
|
||||
import { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';
|
||||
import { getTriggerDefaultLabel } from '@/workflow/workflow-trigger/utils/getTriggerDefaultLabel';
|
||||
import { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';
|
||||
import {
|
||||
OutputSchema,
|
||||
StepOutputSchema,
|
||||
@@ -60,27 +60,29 @@ export const useStepsOutputSchema = () => {
|
||||
[],
|
||||
);
|
||||
|
||||
const deleteStepOutputSchema = useRecoilCallback(
|
||||
const deleteStepsOutputSchema = useRecoilCallback(
|
||||
({ set }) =>
|
||||
({
|
||||
stepId,
|
||||
stepIds,
|
||||
workflowVersionId,
|
||||
}: {
|
||||
stepId: string;
|
||||
stepIds: string[];
|
||||
workflowVersionId: string;
|
||||
}) => {
|
||||
set(
|
||||
stepsOutputSchemaFamilyState(
|
||||
getStepOutputSchemaFamilyStateKey(workflowVersionId, stepId),
|
||||
),
|
||||
null,
|
||||
);
|
||||
stepIds.forEach((stepId) => {
|
||||
set(
|
||||
stepsOutputSchemaFamilyState(
|
||||
getStepOutputSchemaFamilyStateKey(workflowVersionId, stepId),
|
||||
),
|
||||
null,
|
||||
);
|
||||
});
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
return {
|
||||
populateStepsOutputSchema,
|
||||
deleteStepOutputSchema,
|
||||
deleteStepsOutputSchema,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user