Skip to content

Commit

Permalink
Merge pull request #47292 from daledah/fix/47178
Browse files Browse the repository at this point in the history
fix: Submission frequency modal gets dismissed
  • Loading branch information
MonilBhavsar authored Aug 16, 2024
2 parents 5e5bff3 + 973d15f commit 7c4bcc4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import withPolicy from '@pages/workspace/withPolicy';
import type {WithPolicyOnyxProps} from '@pages/workspace/withPolicy';
import * as Policy from '@userActions/Policy/Policy';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

Expand Down Expand Up @@ -67,7 +68,7 @@ function WorkspaceAutoReportingMonthlyOffsetPage({policy, route}: WorkspaceAutoR

const onSelectDayOfMonth = (item: WorkspaceAutoReportingMonthlyOffsetPageItem) => {
Policy.setWorkspaceAutoReportingMonthlyOffset(policy?.id ?? '-1', item.isNumber ? parseInt(item.keyForList, 10) : (item.keyForList as AutoReportingOffsetKeys));
Navigation.goBack();
Navigation.goBack(ROUTES.WORKSPACE_WORKFLOWS_AUTOREPORTING_FREQUENCY.getRoute(policy?.id ?? ''));
};

return (
Expand All @@ -87,7 +88,7 @@ function WorkspaceAutoReportingMonthlyOffsetPage({policy, route}: WorkspaceAutoR
>
<HeaderWithBackButton
title={translate('workflowsPage.submissionFrequency')}
onBackButtonPress={Navigation.goBack}
onBackButtonPress={() => Navigation.goBack(ROUTES.WORKSPACE_WORKFLOWS_AUTOREPORTING_FREQUENCY.getRoute(policy?.id ?? ''))}
/>

<SelectionList
Expand Down

0 comments on commit 7c4bcc4

Please sign in to comment.