From e418c04375475557bab78ce1b93df1acc65a056a Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sat, 7 Dec 2024 00:53:08 +0530 Subject: [PATCH 1/4] fix: Add an Invite button to the workspace profile page. Signed-off-by: krishna2323 --- src/pages/workspace/WorkspaceProfilePage.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx index 4a4862152d53..44c3417ae3f3 100644 --- a/src/pages/workspace/WorkspaceProfilePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePage.tsx @@ -54,6 +54,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac // When we create a new workspace, the policy prop will be empty on the first render. Therefore, we have to use policyDraft until policy has been set in Onyx. const policy = policyDraft?.id ? policyDraft : policyProp; + const isPolicyAdmin = PolicyUtils.isPolicyAdmin(policy); const outputCurrency = policy?.outputCurrency ?? DistanceRequestUtils.getDefaultMileageRate(policy)?.currency ?? PolicyUtils.getPersonalPolicy()?.outputCurrency ?? ''; const currencySymbol = currencyList?.[outputCurrency]?.symbol ?? ''; const formattedCurrency = !isEmptyObject(policy) && !isEmptyObject(currencyList) ? `${outputCurrency} - ${currencySymbol}` : ''; @@ -269,6 +270,16 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac )} {!readOnly && ( + {isPolicyAdmin && ( +