From 2f5657097d18e2465787b4aa40be0f4fee43a11d Mon Sep 17 00:00:00 2001 From: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:44:36 +0100 Subject: [PATCH 1/2] Fix: Save button loops between Rate and Track distance after refreshing Rate page --- .../workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx index 65be798f9520..9405f0d67140 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx @@ -46,7 +46,7 @@ function WorkspaceRatePage(props: WorkspaceRatePageProps) { const submit = (values: FormOnyxValues) => { const rate = values.rate; Policy.setRateForReimburseView((parseFloat(rate) * CONST.POLICY.CUSTOM_UNIT_RATE_BASE_OFFSET).toFixed(1)); - Navigation.navigate(ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')); + Navigation.goBack(ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')); }; const validate = (values: FormOnyxValues): FormInputErrors => { From 1d39757d39986020c43c182399ef27d0d537e380 Mon Sep 17 00:00:00 2001 From: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:56:50 +0100 Subject: [PATCH 2/2] Fix: Save button loops between Unit and Track distance after refreshing Unit page --- .../workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx index 3bd5a9e01bab..af5bad39e027 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx @@ -53,7 +53,7 @@ function WorkspaceUnitPage(props: WorkspaceUnitPageProps) { const updateUnit = (unit: Unit) => { Policy.setUnitForReimburseView(unit); - Navigation.navigate(ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')); + Navigation.goBack(ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')); }; const defaultValue = useMemo(() => {