Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Advanced approval - RHP turns to not here page while dismissing dismissing after deleting the workflow. #48618

Merged
merged 6 commits into from
Sep 16, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {StackScreenProps} from '@react-navigation/stack';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
// eslint-disable-next-line no-restricted-imports
import type {ScrollView} from 'react-native';
import {InteractionManager} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import ConfirmModal from '@components/ConfirmModal';
Expand Down Expand Up @@ -57,9 +58,11 @@ function WorkspaceWorkflowsApprovalsEditPage({policy, isLoadingReportData = true
}

// Remove the approval workflow using the initial data as it could be already edited
Krishna2323 marked this conversation as resolved.
Show resolved Hide resolved
Workflow.removeApprovalWorkflow(route.params.policyID, initialApprovalWorkflow);
setIsDeleteModalVisible(false);
Navigation.dismissModal();
InteractionManager.runAfterInteractions(() => {
Workflow.removeApprovalWorkflow(route.params.policyID, initialApprovalWorkflow);
Krishna2323 marked this conversation as resolved.
Show resolved Hide resolved
});
}, [initialApprovalWorkflow, route.params.policyID]);

const {currentApprovalWorkflow, defaultWorkflowMembers, usedApproverEmails} = useMemo(() => {
Expand Down
Loading