Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 6 additions & 8 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5602,14 +5602,12 @@ const CONST = {
type: 'reviewWorkspaceSettings',
autoCompleted: false,
mediaAttributes: {},
title: 'Review your workspace settings',
description:
"Here's how to review and update your workspace settings:" +
'\n' +
'1. Click *Settings*.' +
'2. Go to *Workspaces* > [Your workspace].' +
'\n' +
"Make any changes there and we'll track them in the #admins room.",
title: ({workspaceSettingsLink}) => `Review your [workspace settings](${workspaceSettingsLink})`,
description: ({workspaceSettingsLink}) =>
"Here's how to review and update your workspace settings:\n" +
'1. Click the settings tab.\n' +
'2. Click *Workspaces* > [Your workspace].\n' +
`[Go to your workspace](${workspaceSettingsLink}). We'll track them in the #admins room.`,
},
{
type: 'submitExpense',
Expand Down
1 change: 1 addition & 0 deletions src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ export {
areAllGroupPoliciesExpenseChatDisabled,
getActiveEmployeeWorkspaces,
isUserInvitedToWorkspace,
getPolicyRole,
};

export type {MemberEmailsToAccountIDs};
8 changes: 6 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ import {addSMSDomainIfPhoneNumber} from './PhoneNumber';
import {
arePaymentsEnabled,
canSendInvoiceFromWorkspace,
getActivePolicies,
getForwardsToAccount,
getManagerAccountEmail,
getPolicyEmployeeListByIdWithoutCurrentUser,
getPolicyNameByID,
getPolicyRole,
getRuleApprovers,
getSubmitToAccountID,
isExpensifyTeam,
Expand Down Expand Up @@ -9619,11 +9621,13 @@ function prepareOnboardingOnyxData(
});
}
const actorAccountID = shouldPostTasksInAdminsRoom ? assignedGuideAccountID : CONST.ACCOUNT_ID.CONCIERGE;

const firstAdminPolicy = getActivePolicies(allPolicies, currentUserEmail).find(
(policy) => policy.type !== CONST.POLICY.TYPE.PERSONAL && getPolicyRole(policy, currentUserEmail) === CONST.POLICY.ROLE.ADMIN,
);
const onboardingTaskParams: OnboardingTaskLinks = {
integrationName,
onboardingCompanySize: companySize ?? onboardingCompanySize,
workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID)}`,
workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? firstAdminPolicy?.id)}`,
workspaceCategoriesLink: `${environmentURL}/${ROUTES.WORKSPACE_CATEGORIES.getRoute(onboardingPolicyID)}`,
workspaceMembersLink: `${environmentURL}/${ROUTES.WORKSPACE_MEMBERS.getRoute(onboardingPolicyID)}`,
workspaceMoreFeaturesLink: `${environmentURL}/${ROUTES.WORKSPACE_MORE_FEATURES.getRoute(onboardingPolicyID)}`,
Expand Down