From b8441bec8b9291483de32e9e19d00e743059787a Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Tue, 24 Dec 2024 16:12:50 +0700 Subject: [PATCH 1/2] update correct field --- src/libs/actions/Policy/Policy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 37f7d09f3a9a..f9652a3638d3 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -3479,7 +3479,7 @@ function downgradeToTeam(policyID: string) { onyxMethod: Onyx.METHOD.MERGE, key: `policy_${policyID}`, value: { - isPendingUpgrade: false, + isPendingDowngrade: false, type: policy?.type, }, }, From 0d792b555d614008c3d77032ac96709a35d219e6 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Tue, 24 Dec 2024 16:47:09 +0700 Subject: [PATCH 2/2] update selected option --- src/pages/workspace/WorkspaceProfilePlanTypePage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx b/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx index 35c184d72707..253f64d1574f 100644 --- a/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx @@ -49,6 +49,10 @@ function WorkspaceProfilePlanTypePage({policy}: WithPolicyProps) { OpenWorkspacePlanPage(policyID); }, [policyID]); + useEffect(() => { + setCurrentPlan(policy?.type); + }, [policy?.type]); + const workspacePlanTypes = Object.values(CONST.POLICY.TYPE) .filter((type) => type !== CONST.POLICY.TYPE.PERSONAL) .map((policyType) => ({