diff --git a/assets/images/simple-illustrations/simple-illustration__house.svg b/assets/images/simple-illustrations/simple-illustration__house.svg
new file mode 100644
index 000000000000..1915ffc57ecf
--- /dev/null
+++ b/assets/images/simple-illustrations/simple-illustration__house.svg
@@ -0,0 +1,23 @@
+
diff --git a/assets/images/workspace-profile.png b/assets/images/workspace-profile.png
new file mode 100644
index 000000000000..335568f3bd23
Binary files /dev/null and b/assets/images/workspace-profile.png differ
diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts
index 5755296f3bb5..197d34b9eb2a 100755
--- a/src/ONYXKEYS.ts
+++ b/src/ONYXKEYS.ts
@@ -391,6 +391,7 @@ type AllOnyxKeys = DeepValueOf;
type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM]: FormTypes.AddDebitCardForm;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM]: FormTypes.WorkspaceSettingsForm;
+ [ONYXKEYS.FORMS.WORKSPACE_DESCRIPTION_FORM]: FormTypes.WorkspaceProfileDescriptionForm;
[ONYXKEYS.FORMS.WORKSPACE_RATE_AND_UNIT_FORM]: FormTypes.WorkspaceRateAndUnitForm;
[ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM]: FormTypes.CloseAccountForm;
[ONYXKEYS.FORMS.PROFILE_SETTINGS_FORM]: FormTypes.Form;
diff --git a/src/ROUTES.ts b/src/ROUTES.ts
index 4eaff69a970a..d9edcad762df 100644
--- a/src/ROUTES.ts
+++ b/src/ROUTES.ts
@@ -450,9 +450,9 @@ const ROUTES = {
route: 'workspace/:policyID/profile/name',
getRoute: (policyID: string) => `workspace/${policyID}/profile/name` as const,
},
- WORKSPACE_DESCRIPTION: {
- route: 'workspace/:policyID/description',
- getRoute: (policyID: string) => `workspace/${policyID}/description` as const,
+ WORKSPACE_PROFILE_DESCRIPTION: {
+ route: 'workspace/:policyID/profile/description',
+ getRoute: (policyID: string) => `workspace/${policyID}/profile/description` as const,
},
WORKSPACE_AVATAR: {
route: 'workspace/:policyID/avatar',
diff --git a/src/SCREENS.ts b/src/SCREENS.ts
index 93692ec1f917..949adcba4d44 100644
--- a/src/SCREENS.ts
+++ b/src/SCREENS.ts
@@ -208,8 +208,8 @@ const SCREENS = {
INVITE: 'Workspace_Invite',
INVITE_MESSAGE: 'Workspace_Invite_Message',
CURRENCY: 'Workspace_Profile_Currency',
+ DESCRIPTION: 'Workspace_Profile_Description',
NAME: 'Workspace_Profile_Name',
- DESCRIPTION: 'Workspace_Description',
},
EDIT_REQUEST: {
diff --git a/src/components/Icon/Illustrations.ts b/src/components/Icon/Illustrations.ts
index c9427a57c2b3..911f09104349 100644
--- a/src/components/Icon/Illustrations.ts
+++ b/src/components/Icon/Illustrations.ts
@@ -42,6 +42,7 @@ import HandCard from '@assets/images/simple-illustrations/simple-illustration__h
import HandEarth from '@assets/images/simple-illustrations/simple-illustration__handearth.svg';
import HotDogStand from '@assets/images/simple-illustrations/simple-illustration__hotdogstand.svg';
import Hourglass from '@assets/images/simple-illustrations/simple-illustration__hourglass.svg';
+import House from '@assets/images/simple-illustrations/simple-illustration__house.svg';
import InvoiceBlue from '@assets/images/simple-illustrations/simple-illustration__invoice.svg';
import LockClosed from '@assets/images/simple-illustrations/simple-illustration__lockclosed.svg';
import LockOpen from '@assets/images/simple-illustrations/simple-illustration__lockopen.svg';
@@ -130,4 +131,5 @@ export {
LockClosed,
Gears,
QRCode,
+ House,
};
diff --git a/src/components/ReportWelcomeText.tsx b/src/components/ReportWelcomeText.tsx
index 2bfc43853899..ffd1b81892a6 100644
--- a/src/components/ReportWelcomeText.tsx
+++ b/src/components/ReportWelcomeText.tsx
@@ -69,7 +69,7 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
if (!canEditPolicyDescription) {
return;
}
- Navigation.navigate(ROUTES.WORKSPACE_DESCRIPTION.getRoute(policy.id));
+ Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(policy.id));
}}
style={[styles.renderHTML, canEditPolicyDescription ? styles.cursorPointer : styles.cursorText]}
accessibilityLabel={translate('reportDescriptionPage.roomDescription')}
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 0baaee4c07a8..ce1d7e842a1d 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -1820,7 +1820,7 @@ export default {
`You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.`,
},
editor: {
- descriptionInputLabel: 'Workspace description',
+ descriptionInputLabel: 'Description',
nameInputLabel: 'Name',
nameInputHelpText: 'This is the name you will see on your workspace.',
nameIsRequiredError: 'You need to define a name for your workspace.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index ae566f3033f0..d16df41dcd36 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1845,8 +1845,8 @@ export default {
`¡Has sido invitado a ${workspaceName}! Descargue la aplicación móvil Expensify en use.expensify.com/download para comenzar a rastrear sus gastos.`,
},
editor: {
- descriptionInputLabel: 'Descripción del espacio de trabajo',
nameInputLabel: 'Nombre',
+ descriptionInputLabel: 'Descripción',
nameInputHelpText: 'Este es el nombre que verás en tu espacio de trabajo.',
nameIsRequiredError: 'Debes definir un nombre para tu espacio de trabajo.',
currencyInputLabel: 'Moneda por defecto',
diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts
index 250ee76d58e1..97e0fdd064c5 100644
--- a/src/libs/API/types.ts
+++ b/src/libs/API/types.ts
@@ -104,6 +104,7 @@ const WRITE_COMMANDS = {
DELETE_WORKSPACE_AVATAR: 'DeleteWorkspaceAvatar',
UPDATE_WORKSPACE_GENERAL_SETTINGS: 'UpdateWorkspaceGeneralSettings',
UPDATE_WORKSPACE_CUSTOM_UNIT_AND_RATE: 'UpdateWorkspaceCustomUnitAndRate',
+ UPDATE_WORKSPACE_DESCRIPTION: 'UpdateWorkspaceDescription',
CREATE_WORKSPACE: 'CreateWorkspace',
CREATE_WORKSPACE_FROM_IOU_PAYMENT: 'CreateWorkspaceFromIOUPayment',
CREATE_TASK: 'CreateTask',
@@ -143,7 +144,6 @@ const WRITE_COMMANDS = {
PAY_MONEY_REQUEST: 'PayMoneyRequest',
CANCEL_PAYMENT: 'CancelPayment',
ACCEPT_ACH_CONTRACT_FOR_BANK_ACCOUNT: 'AcceptACHContractForBankAccount',
- UPDATE_WORKSPACE_DESCRIPTION: 'UpdateWorkspaceDescription',
} as const;
type WriteCommand = ValueOf;
@@ -244,6 +244,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_WORKSPACE_AVATAR]: Parameters.UpdateWorkspaceAvatarParams;
[WRITE_COMMANDS.DELETE_WORKSPACE_AVATAR]: Parameters.DeleteWorkspaceAvatarParams;
[WRITE_COMMANDS.UPDATE_WORKSPACE_GENERAL_SETTINGS]: Parameters.UpdateWorkspaceGeneralSettingsParams;
+ [WRITE_COMMANDS.UPDATE_WORKSPACE_DESCRIPTION]: Parameters.UpdateWorkspaceDescriptionParams;
[WRITE_COMMANDS.UPDATE_WORKSPACE_CUSTOM_UNIT_AND_RATE]: Parameters.UpdateWorkspaceCustomUnitAndRateParams;
[WRITE_COMMANDS.CREATE_WORKSPACE]: Parameters.CreateWorkspaceParams;
[WRITE_COMMANDS.CREATE_WORKSPACE_FROM_IOU_PAYMENT]: Parameters.CreateWorkspaceFromIOUPaymentParams;
diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx
index ee849cd54c10..a585cddcdbf5 100644
--- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx
+++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx
@@ -245,7 +245,7 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../pages/workspace/WorkspaceInvitePage').default as React.ComponentType,
[SCREENS.WORKSPACE.INVITE_MESSAGE]: () => require('../../../pages/workspace/WorkspaceInviteMessagePage').default as React.ComponentType,
[SCREENS.WORKSPACE.NAME]: () => require('../../../pages/workspace/WorkspaceNamePage').default as React.ComponentType,
- [SCREENS.WORKSPACE.DESCRIPTION]: () => require('../../../pages/workspace/WorkspaceDescriptionPage').default as React.ComponentType,
+ [SCREENS.WORKSPACE.DESCRIPTION]: () => require('../../../pages/workspace/WorkspaceProfileDescriptionPage').default as React.ComponentType,
[SCREENS.WORKSPACE.CURRENCY]: () => require('../../../pages/workspace/WorkspaceProfileCurrencyPage').default as React.ComponentType,
[SCREENS.REIMBURSEMENT_ACCOUNT]: () => require('../../../pages/ReimbursementAccount/ReimbursementAccountPage').default as React.ComponentType,
[SCREENS.GET_ASSISTANCE]: () => require('../../../pages/GetAssistancePage').default as React.ComponentType,
diff --git a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
index 1936de564c37..a2fcff927a93 100755
--- a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
+++ b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
@@ -2,7 +2,7 @@ import type {CentralPaneName} from '@libs/Navigation/types';
import SCREENS from '@src/SCREENS';
const CENTRAL_PANE_TO_RHP_MAPPING: Partial> = {
- [SCREENS.WORKSPACE.PROFILE]: [SCREENS.WORKSPACE.NAME, SCREENS.WORKSPACE.CURRENCY],
+ [SCREENS.WORKSPACE.PROFILE]: [SCREENS.WORKSPACE.NAME, SCREENS.WORKSPACE.CURRENCY, SCREENS.WORKSPACE.DESCRIPTION],
[SCREENS.WORKSPACE.REIMBURSE]: [SCREENS.WORKSPACE.RATE_AND_UNIT, SCREENS.WORKSPACE.RATE_AND_UNIT_RATE, SCREENS.WORKSPACE.RATE_AND_UNIT_UNIT],
[SCREENS.WORKSPACE.MEMBERS]: [SCREENS.WORKSPACE.INVITE, SCREENS.WORKSPACE.INVITE_MESSAGE],
};
diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts
index d4c9ebffe81c..a1579832ca54 100644
--- a/src/libs/Navigation/linkingConfig/config.ts
+++ b/src/libs/Navigation/linkingConfig/config.ts
@@ -235,6 +235,9 @@ const config: LinkingOptions['config'] = {
[SCREENS.WORKSPACE.CURRENCY]: {
path: ROUTES.WORKSPACE_PROFILE_CURRENCY.route,
},
+ [SCREENS.WORKSPACE.DESCRIPTION]: {
+ path: ROUTES.WORKSPACE_PROFILE_DESCRIPTION.route,
+ },
[SCREENS.WORKSPACE.RATE_AND_UNIT]: {
path: ROUTES.WORKSPACE_RATE_AND_UNIT.route,
},
@@ -261,7 +264,6 @@ const config: LinkingOptions['config'] = {
path: ROUTES.KEYBOARD_SHORTCUTS,
},
[SCREENS.WORKSPACE.NAME]: ROUTES.WORKSPACE_PROFILE_NAME.route,
- [SCREENS.WORKSPACE.DESCRIPTION]: ROUTES.WORKSPACE_DESCRIPTION.route,
},
},
[SCREENS.RIGHT_MODAL.PRIVATE_NOTES]: {
diff --git a/src/libs/actions/Policy.ts b/src/libs/actions/Policy.ts
index 5a65e2e69acb..0b64928708ad 100644
--- a/src/libs/actions/Policy.ts
+++ b/src/libs/actions/Policy.ts
@@ -923,7 +923,7 @@ function updateGeneralSettings(policyID: string, name: string, currency: string)
});
}
-function updateDescription(policyID: string, description: string, currentDescription: string) {
+function updateWorkspaceDescription(policyID: string, description: string, currentDescription: string) {
if (description === currentDescription) {
return;
}
@@ -2126,5 +2126,5 @@ export {
buildOptimisticPolicyRecentlyUsedTags,
createDraftInitialWorkspace,
setWorkspaceInviteMessageDraft,
- updateDescription,
+ updateWorkspaceDescription,
};
diff --git a/src/pages/workspace/WorkspacePageWithSections.tsx b/src/pages/workspace/WorkspacePageWithSections.tsx
index 17163346473f..9e01a82b3188 100644
--- a/src/pages/workspace/WorkspacePageWithSections.tsx
+++ b/src/pages/workspace/WorkspacePageWithSections.tsx
@@ -21,6 +21,7 @@ import type {Route} from '@src/ROUTES';
import ROUTES from '@src/ROUTES';
import type {Policy, ReimbursementAccount, User} from '@src/types/onyx';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
+import type IconAsset from '@src/types/utils/IconAsset';
import type {WithPolicyAndFullscreenLoadingProps} from './withPolicyAndFullscreenLoading';
import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading';
@@ -69,6 +70,13 @@ type WorkspacePageWithSectionsProps = WithPolicyAndFullscreenLoadingProps &
/** Policy values needed in the component */
policy: OnyxEntry;
+
+ /**
+ * Icon displayed on the left of the title.
+ * If it is passed, the new styling is applied to the component:
+ * taller header on desktop and different font of the title.
+ * */
+ icon?: IconAsset;
};
function fetchData(skipVBBACal?: boolean) {
@@ -96,6 +104,7 @@ function WorkspacePageWithSections({
shouldShowLoading = true,
shouldShowOfflineIndicatorInWideScreen = false,
shouldShowNonAdmin = false,
+ icon,
}: WorkspacePageWithSectionsProps) {
const styles = useThemeStyles();
useNetwork({onReconnect: () => fetchData(shouldSkipVBBACall)});
@@ -155,6 +164,7 @@ function WorkspacePageWithSections({
guidesCallTaskID={guidesCallTaskID}
shouldShowBackButton={isSmallScreenWidth || shouldShowBackButton}
onBackButtonPress={() => Navigation.goBack(backButtonRoute ?? ROUTES.WORKSPACE_INITIAL.getRoute(policyID))}
+ icon={icon}
/>
{(isLoading || firstRender.current) && shouldShowLoading ? (
diff --git a/src/pages/workspace/WorkspaceDescriptionPage.tsx b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx
similarity index 74%
rename from src/pages/workspace/WorkspaceDescriptionPage.tsx
rename to src/pages/workspace/WorkspaceProfileDescriptionPage.tsx
index 327454fe9c3c..46a83dd2b166 100644
--- a/src/pages/workspace/WorkspaceDescriptionPage.tsx
+++ b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx
@@ -10,6 +10,7 @@ import TextInput from '@components/TextInput';
import type {BaseTextInputRef} from '@components/TextInput/BaseTextInput/types';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
+import * as ErrorUtils from '@libs/ErrorUtils';
import Navigation from '@libs/Navigation/Navigation';
import updateMultilineInputRange from '@libs/updateMultilineInputRange';
import * as Policy from '@userActions/Policy';
@@ -18,21 +19,36 @@ import ONYXKEYS from '@src/ONYXKEYS';
import withPolicy from './withPolicy';
import type {WithPolicyProps} from './withPolicy';
-type WorkspaceDescriptionProps = WithPolicyProps;
+type Props = WithPolicyProps;
-function WorkspaceDescriptionPage({policy}: WorkspaceDescriptionProps) {
+const parser = new ExpensiMark();
+
+function WorkspaceProfileDescriptionPage({policy}: Props) {
const styles = useThemeStyles();
const {translate} = useLocalize();
- const parser = new ExpensiMark();
const [description, setDescription] = useState(() => parser.htmlToMarkdown(policy?.description ?? ''));
+ /**
+ * @param {Object} values - form input values passed by the Form component
+ * @returns {Boolean}
+ */
+ const validate = useCallback((values: FormOnyxValues) => {
+ const errors = {};
+
+ if (values.description.length > CONST.DESCRIPTION_LIMIT) {
+ ErrorUtils.addErrorMessage(errors, 'description', ['common.error.characterLimitExceedCounter', {length: values.description.length, limit: CONST.DESCRIPTION_LIMIT}]);
+ }
+
+ return errors;
+ }, []);
+
const submit = useCallback(
(values: FormOnyxValues) => {
if (!policy || policy.isPolicyUpdating) {
return;
}
- Policy.updateDescription(policy.id, values.description.trim(), policy.description ?? '');
+ Policy.updateWorkspaceDescription(policy.id, values.description.trim(), policy.description ?? '');
Keyboard.dismiss();
Navigation.goBack();
},
@@ -43,7 +59,7 @@ function WorkspaceDescriptionPage({policy}: WorkspaceDescriptionProps) {
@@ -82,6 +99,6 @@ function WorkspaceDescriptionPage({policy}: WorkspaceDescriptionProps) {
);
}
-WorkspaceDescriptionPage.displayName = 'WorkspaceDescriptionPage';
+WorkspaceProfileDescriptionPage.displayName = 'WorkspaceProfileDescriptionPage';
-export default withPolicy(WorkspaceDescriptionPage);
+export default withPolicy(WorkspaceProfileDescriptionPage);
diff --git a/src/pages/workspace/WorkspaceProfilePage.js b/src/pages/workspace/WorkspaceProfilePage.js
index 37be3015318b..8a611898cbab 100644
--- a/src/pages/workspace/WorkspaceProfilePage.js
+++ b/src/pages/workspace/WorkspaceProfilePage.js
@@ -1,17 +1,21 @@
import lodashGet from 'lodash/get';
import PropTypes from 'prop-types';
import React, {useCallback} from 'react';
-import {View} from 'react-native';
+import {Image, ScrollView, StyleSheet, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
+import WorkspaceProfile from '@assets/images/workspace-profile.png';
import Avatar from '@components/Avatar';
import AvatarWithImagePicker from '@components/AvatarWithImagePicker';
import * as Expensicons from '@components/Icon/Expensicons';
+import * as Illustrations from '@components/Icon/Illustrations';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
+import Section from '@components/Section';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
+import useWindowDimensions from '@hooks/useWindowDimensions';
import compose from '@libs/compose';
import Navigation from '@libs/Navigation/Navigation';
import * as PolicyUtils from '@libs/PolicyUtils';
@@ -53,14 +57,18 @@ const defaultProps = {
function WorkspaceProfilePage({policy, currencyList, route}) {
const styles = useThemeStyles();
const {translate} = useLocalize();
+ const {isSmallScreenWidth} = useWindowDimensions();
const formattedCurrency = !_.isEmpty(policy) && !_.isEmpty(currencyList) && !!policy.outputCurrency ? `${policy.outputCurrency} - ${currencyList[policy.outputCurrency].symbol}` : '';
const onPressCurrency = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_CURRENCY.getRoute(policy.id)), [policy.id]);
const onPressName = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_NAME.getRoute(policy.id)), [policy.id]);
+ const onPressDescription = useCallback(() => Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(policy.id)), [policy.id]);
const policyName = lodashGet(policy, 'name', '');
+ const policyDescription = lodashGet(policy, 'description', '');
const readOnly = !PolicyUtils.isPolicyAdmin(policy);
+ const imageStyle = isSmallScreenWidth ? [styles.mhv12, styles.mhn5] : [styles.mhv8, styles.mhn8];
return (
{(hasVBA) => (
- <>
- Navigation.navigate(ROUTES.WORKSPACE_AVATAR.getRoute(policy.id))}
- source={lodashGet(policy, 'avatar')}
- size={CONST.AVATAR_SIZE.XLARGE}
- avatarStyle={styles.avatarXLarge}
- enablePreview
- DefaultAvatar={() => (
-
+
+
+
+ Navigation.navigate(ROUTES.WORKSPACE_AVATAR.getRoute(policy.id))}
+ source={lodashGet(policy, 'avatar')}
size={CONST.AVATAR_SIZE.XLARGE}
- name={policyName}
+ avatarStyle={styles.avatarXLarge}
+ enablePreview
+ DefaultAvatar={() => (
+
+ )}
type={CONST.ICON_TYPE_WORKSPACE}
- />
- )}
- type={CONST.ICON_TYPE_WORKSPACE}
- fallbackIcon={Expensicons.FallbackWorkspaceAvatar}
- style={[styles.mb3, styles.mt5, styles.mh5]}
- isUsingDefaultAvatar={!lodashGet(policy, 'avatar', null)}
- onImageSelected={(file) => Policy.updateWorkspaceAvatar(lodashGet(policy, 'id', ''), file)}
- onImageRemoved={() => Policy.deleteWorkspaceAvatar(lodashGet(policy, 'id', ''))}
- editorMaskImage={Expensicons.ImageCropSquareMask}
- pendingAction={lodashGet(policy, 'pendingFields.avatar', null)}
- errors={lodashGet(policy, 'errorFields.avatar', null)}
- onErrorClose={() => Policy.clearAvatarErrors(policy.id)}
- previewSource={UserUtils.getFullSizeAvatar(policy.avatar, '')}
- headerTitle={translate('workspace.common.workspaceAvatar')}
- originalFileName={policy.originalFileName}
- disabled={readOnly}
- disabledStyle={styles.cursorDefault}
- />
-
-
-
- {(!_.isEmpty(policy.description) || !readOnly) && (
-
- Policy.updateWorkspaceAvatar(lodashGet(policy, 'id', ''), file)}
+ onImageRemoved={() => Policy.deleteWorkspaceAvatar(lodashGet(policy, 'id', ''))}
+ editorMaskImage={Expensicons.ImageCropSquareMask}
+ pendingAction={lodashGet(policy, 'pendingFields.avatar', null)}
+ errors={lodashGet(policy, 'errorFields.avatar', null)}
+ onErrorClose={() => Policy.clearAvatarErrors(policy.id)}
+ previewSource={UserUtils.getFullSizeAvatar(policy.avatar, '')}
+ headerTitle={translate('workspace.common.workspaceAvatar')}
+ originalFileName={policy.originalFileName}
disabled={readOnly}
- onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DESCRIPTION.getRoute(policy.id))}
- shouldGreyOutWhenDisabled={false}
- shouldUseDefaultCursorWhenDisabled
- shouldRenderAsHTML
- />
-
- )}
-
-
-
-
- {hasVBA ? translate('workspace.editor.currencyInputDisabledText') : translate('workspace.editor.currencyInputHelpText')}
-
-
-
- >
+
+
+
+ {(!_.isEmpty(policy.description) || !readOnly) && (
+
+
+
+ )}
+
+
+
+
+ {hasVBA ? translate('workspace.editor.currencyInputDisabledText') : translate('workspace.editor.currencyInputHelpText')}
+
+
+
+
+
+
)}
);
diff --git a/src/styles/index.ts b/src/styles/index.ts
index 19f5b791a9af..9fee6a9723da 100644
--- a/src/styles/index.ts
+++ b/src/styles/index.ts
@@ -4445,6 +4445,12 @@ const styles = (theme: ThemeColors) =>
updateRequiredViewTextContainer: {
width: variables.updateTextViewContainerWidth,
},
+
+ workspaceTitleStyle: {
+ fontFamily: FontUtils.fontFamily.platform.EXP_NEUE_BOLD,
+ fontWeight: '500',
+ fontSize: variables.workspaceProfileName,
+ },
} satisfies Styles);
type ThemeStyles = ReturnType;
diff --git a/src/styles/utils/sizing.ts b/src/styles/utils/sizing.ts
index b48fa0099f8a..b461fc0f5d09 100644
--- a/src/styles/utils/sizing.ts
+++ b/src/styles/utils/sizing.ts
@@ -10,6 +10,10 @@ export default {
height: '100%',
},
+ h68: {
+ height: 272,
+ },
+
w15: {
width: '15%',
},
diff --git a/src/styles/utils/spacing.ts b/src/styles/utils/spacing.ts
index 0a0ca3831eca..354c3ae3cea5 100644
--- a/src/styles/utils/spacing.ts
+++ b/src/styles/utils/spacing.ts
@@ -83,6 +83,18 @@ export default {
marginVertical: 20,
},
+ mhv5: {
+ marginVertical: -20,
+ },
+
+ mhv8: {
+ marginVertical: -32,
+ },
+
+ mhv12: {
+ marginVertical: -48,
+ },
+
mr0: {
marginRight: 0,
},
@@ -235,6 +247,10 @@ export default {
marginTop: -24,
},
+ mtn17: {
+ marginTop: -68,
+ },
+
mb0: {
marginBottom: 0,
},
diff --git a/src/styles/variables.ts b/src/styles/variables.ts
index a21d28e912d7..24f69af120a3 100644
--- a/src/styles/variables.ts
+++ b/src/styles/variables.ts
@@ -215,4 +215,5 @@ export default {
updateAnimationH: 240,
updateTextViewContainerWidth: 310,
updateViewHeaderHeight: 70,
+ workspaceProfileName: 20,
} as const;
diff --git a/src/types/form/WorkspaceProfileDescriptionForm.ts b/src/types/form/WorkspaceProfileDescriptionForm.ts
new file mode 100644
index 000000000000..2fc84334c03e
--- /dev/null
+++ b/src/types/form/WorkspaceProfileDescriptionForm.ts
@@ -0,0 +1,12 @@
+import type Form from './Form';
+
+const INPUT_IDS = {
+ DESCRIPTION: 'description',
+} as const;
+
+type WorkspaceProfileDescriptionForm = Form<{
+ [INPUT_IDS.DESCRIPTION]: string;
+}>;
+
+export type {WorkspaceProfileDescriptionForm};
+export default INPUT_IDS;
diff --git a/src/types/form/index.ts b/src/types/form/index.ts
index 91fb14982293..d9263991023c 100644
--- a/src/types/form/index.ts
+++ b/src/types/form/index.ts
@@ -33,4 +33,5 @@ export type {WorkspaceInviteMessageForm} from './WorkspaceInviteMessageForm';
export type {WorkspaceRateAndUnitForm} from './WorkspaceRateAndUnitForm';
export type {WorkspaceSettingsForm} from './WorkspaceSettingsForm';
export type {WorkspaceDescriptionForm} from './WorkspaceDescriptionForm';
+export type {WorkspaceProfileDescriptionForm} from './WorkspaceProfileDescriptionForm';
export type {default as Form} from './Form';