diff --git a/assets/images/buildings.svg b/assets/images/buildings.svg
new file mode 100644
index 000000000000..42171d499f26
--- /dev/null
+++ b/assets/images/buildings.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/assets/images/simple-illustrations/simple-illustration__building.svg b/assets/images/simple-illustrations/simple-illustration__building.svg
new file mode 100644
index 000000000000..94a7320d8471
--- /dev/null
+++ b/assets/images/simple-illustrations/simple-illustration__building.svg
@@ -0,0 +1,47 @@
+
+
\ No newline at end of file
diff --git a/assets/images/simple-illustrations/simple-illustration__buildings.svg b/assets/images/simple-illustrations/simple-illustration__buildings.svg
new file mode 100644
index 000000000000..cb22c3a29ce4
--- /dev/null
+++ b/assets/images/simple-illustrations/simple-illustration__buildings.svg
@@ -0,0 +1,55 @@
+
+
\ No newline at end of file
diff --git a/src/components/Icon/Expensicons.ts b/src/components/Icon/Expensicons.ts
index 4093b44743fe..02a6843dc11f 100644
--- a/src/components/Icon/Expensicons.ts
+++ b/src/components/Icon/Expensicons.ts
@@ -32,6 +32,7 @@ import Box from '@assets/images/box.svg';
import Briefcase from '@assets/images/briefcase.svg';
import Bug from '@assets/images/bug.svg';
import Building from '@assets/images/building.svg';
+import Buildings from '@assets/images/buildings.svg';
import CalendarSolid from '@assets/images/calendar-solid.svg';
import Calendar from '@assets/images/calendar.svg';
import Camera from '@assets/images/camera.svg';
@@ -235,6 +236,7 @@ export {
Briefcase,
Bug,
Building,
+ Buildings,
Calendar,
Camera,
Car,
diff --git a/src/components/Icon/Illustrations.ts b/src/components/Icon/Illustrations.ts
index 4379142619ff..0debd4585e7b 100644
--- a/src/components/Icon/Illustrations.ts
+++ b/src/components/Icon/Illustrations.ts
@@ -74,6 +74,8 @@ import BankArrow from '@assets/images/simple-illustrations/simple-illustration__
import BigRocket from '@assets/images/simple-illustrations/simple-illustration__bigrocket.svg';
import PinkBill from '@assets/images/simple-illustrations/simple-illustration__bill.svg';
import Binoculars from '@assets/images/simple-illustrations/simple-illustration__binoculars.svg';
+import Building from '@assets/images/simple-illustrations/simple-illustration__building.svg';
+import Buildings from '@assets/images/simple-illustrations/simple-illustration__buildings.svg';
import CarIce from '@assets/images/simple-illustrations/simple-illustration__car-ice.svg';
import Car from '@assets/images/simple-illustrations/simple-illustration__car.svg';
import ChatBubbles from '@assets/images/simple-illustrations/simple-illustration__chatbubbles.svg';
@@ -228,6 +230,8 @@ export {
PendingBank,
ThreeLeggedLaptopWoman,
House,
+ Building,
+ Buildings,
Alert,
TeachersUnite,
Abacus,
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 77e3b882b892..48d7d0cb6a61 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -2536,7 +2536,7 @@ const translations = {
rules: 'Rules',
displayedAs: 'Displayed as',
plan: 'Plan',
- profile: 'Profile',
+ profile: 'Workspace profile',
perDiem: 'Per diem',
bankAccount: 'Bank account',
connectBankAccount: 'Connect bank account',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 09a0394ea6a0..4f61f98bfc21 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -2558,7 +2558,7 @@ const translations = {
accounting: 'Contabilidad',
rules: 'Reglas',
plan: 'Plan',
- profile: 'Perfil',
+ profile: 'Perfil del espacio de trabajo',
perDiem: 'Per diem',
bankAccount: 'Cuenta bancaria',
displayedAs: 'Mostrado como',
diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts
index 4982e8660dec..55928afd6941 100644
--- a/src/libs/PolicyUtils.ts
+++ b/src/libs/PolicyUtils.ts
@@ -1093,7 +1093,7 @@ function getCurrentTaxID(policy: OnyxEntry, taxID: string): string | und
return Object.keys(policy?.taxRates?.taxes ?? {}).find((taxIDKey) => policy?.taxRates?.taxes?.[taxIDKey].previousTaxCode === taxID || taxIDKey === taxID);
}
-function getWorkspaceAccountID(policyID: string) {
+function getWorkspaceAccountID(policyID?: string) {
const policy = getPolicy(policyID);
if (!policy) {
diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts
index f855ea477856..eaf04135ad36 100644
--- a/src/libs/actions/Policy/Policy.ts
+++ b/src/libs/actions/Policy/Policy.ts
@@ -725,7 +725,10 @@ function clearWorkspaceReimbursementErrors(policyID: string) {
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {errorFields: {reimbursementChoice: null}});
}
-function leaveWorkspace(policyID: string) {
+function leaveWorkspace(policyID?: string) {
+ if (!policyID) {
+ return;
+ }
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`];
const workspaceChats = ReportUtils.getAllWorkspaceReports(policyID);
diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx
index a40b14eae4c9..bc1d5b37c94e 100755
--- a/src/pages/settings/InitialSettingsPage.tsx
+++ b/src/pages/settings/InitialSettingsPage.tsx
@@ -181,7 +181,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
const items: MenuData[] = [
{
translationKey: 'common.workspaces',
- icon: Expensicons.Building,
+ icon: Expensicons.Buildings,
routeName: ROUTES.SETTINGS_WORKSPACES,
brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, allConnectionSyncProgresses) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,
},
diff --git a/src/pages/workspace/AccessOrNotFoundWrapper.tsx b/src/pages/workspace/AccessOrNotFoundWrapper.tsx
index 9bda7f3972f9..b9da0147b525 100644
--- a/src/pages/workspace/AccessOrNotFoundWrapper.tsx
+++ b/src/pages/workspace/AccessOrNotFoundWrapper.tsx
@@ -123,7 +123,7 @@ function AccessOrNotFoundWrapper({
...props
}: AccessOrNotFoundWrapperProps) {
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`);
- const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`);
+ const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID ?? CONST.DEFAULT_NUMBER_ID}`);
const [isLoadingReportData] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA, {initialValue: true});
const {login = ''} = useCurrentUserPersonalDetails();
const isPolicyIDInRoute = !!policyID?.length;
diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx
index 95449e4c10ea..f706a299c30f 100644
--- a/src/pages/workspace/WorkspaceInitialPage.tsx
+++ b/src/pages/workspace/WorkspaceInitialPage.tsx
@@ -325,7 +325,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
const menuItems: WorkspaceMenuItem[] = [
{
translationKey: 'workspace.common.profile',
- icon: Expensicons.Home,
+ icon: Expensicons.Building,
action: singleExecution(waitForNavigate(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE.getRoute(policyID)))),
brickRoadIndicator: hasGeneralSettingsError ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,
routeName: SCREENS.WORKSPACE.PROFILE,
diff --git a/src/pages/workspace/WorkspaceNamePage.tsx b/src/pages/workspace/WorkspaceNamePage.tsx
index d9632a1a2ae8..42c97d5d85e6 100644
--- a/src/pages/workspace/WorkspaceNamePage.tsx
+++ b/src/pages/workspace/WorkspaceNamePage.tsx
@@ -58,7 +58,7 @@ function WorkspaceNamePage({policy}: Props) {
return (
Navigation.goBack()}
/>
@@ -85,8 +85,8 @@ function WorkspaceNamePage({policy}: Props) {
InputComponent={TextInput}
role={CONST.ROLE.PRESENTATION}
inputID={INPUT_IDS.NAME}
- label={translate('workspace.editor.nameInputLabel')}
- accessibilityLabel={translate('workspace.editor.nameInputLabel')}
+ label={translate('workspace.common.workspaceName')}
+ accessibilityLabel={translate('workspace.common.workspaceName')}
defaultValue={policy?.name}
spellCheck={false}
autoFocus
diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx
index 845937ceaf75..064f17e0539b 100644
--- a/src/pages/workspace/WorkspaceProfilePage.tsx
+++ b/src/pages/workspace/WorkspaceProfilePage.tsx
@@ -184,7 +184,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac
shouldUseScrollView
shouldShowOfflineIndicatorInWideScreen
shouldShowNonAdmin
- icon={Illustrations.House}
+ icon={Illustrations.Building}
shouldShowNotFoundPage={policy === undefined}
>
{(hasVBA?: boolean) => (
@@ -253,7 +253,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac
Policy.leaveWorkspace(item.policyID ?? '-1')),
+ onSelected: Session.checkIfActionIsAllowed(() => Policy.leaveWorkspace(item.policyID)),
});
}
@@ -416,7 +416,7 @@ function WorkspacesListPage() {
shouldShowBackButton={shouldUseNarrowLayout}
shouldDisplaySearchRouter
onBackButtonPress={() => Navigation.goBack()}
- icon={Illustrations.BigRocket}
+ icon={Illustrations.Buildings}
shouldUseHeadlineHeader
/>
@@ -451,7 +451,7 @@ function WorkspacesListPage() {
shouldShowBackButton={shouldUseNarrowLayout}
shouldDisplaySearchRouter
onBackButtonPress={() => Navigation.goBack()}
- icon={Illustrations.BigRocket}
+ icon={Illustrations.Buildings}
shouldUseHeadlineHeader
>
{!shouldUseNarrowLayout && getHeaderButton()}