Fixing issues around workflows (#6991)
Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
9d9fa8e575
commit
1cae2b6f3d
4 files changed
+44
-4
No files matched your search
@@ -204,6 +204,11 @@ export const deleteScheduledEmailReminder = async (referenceId: string) => {
|
||||
status: "cancel",
|
||||
},
|
||||
});
|
||||
|
||||
await client.request({
|
||||
url: `/v3/user/scheduled_sends/${referenceId}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(`Error canceling reminder with error ${error}`);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ function WorkflowPage() {
|
||||
data: workflow,
|
||||
isError,
|
||||
error,
|
||||
dataUpdatedAt,
|
||||
isLoading,
|
||||
} = trpc.viewer.workflows.get.useQuery(
|
||||
{ id: +workflowId },
|
||||
{
|
||||
@@ -111,7 +111,7 @@ function WorkflowPage() {
|
||||
const { data: verifiedNumbers } = trpc.viewer.workflows.getVerifiedNumbers.useQuery();
|
||||
|
||||
useEffect(() => {
|
||||
if (workflow && (workflow.steps.length === 0 || workflow.steps[0].stepNumber === 1)) {
|
||||
if (workflow && !isLoading) {
|
||||
setSelectedEventTypes(
|
||||
workflow.activeOn.map((active) => ({
|
||||
value: String(active.eventType.id),
|
||||
@@ -155,7 +155,7 @@ function WorkflowPage() {
|
||||
form.setValue("activeOn", activeOn || []);
|
||||
setIsAllDataLoaded(true);
|
||||
}
|
||||
}, [dataUpdatedAt]);
|
||||
}, [isLoading]);
|
||||
|
||||
const updateMutation = trpc.viewer.workflows.update.useMutation({
|
||||
onSuccess: async ({ workflow }) => {
|
||||
|
||||
Reference in new issue
Block a user