Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Workspace Invite Member page #5726

Merged
merged 18 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from 8 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
8 changes: 7 additions & 1 deletion src/components/FormAlertWithSubmitButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const propTypes = {
/** Whether to show the alert text */
isAlertVisible: PropTypes.bool.isRequired,

/** Whether the button is disabled */
isDisabled: PropTypes.bool,

/** Submit function */
onSubmit: PropTypes.func.isRequired,

Expand All @@ -32,10 +35,12 @@ const propTypes = {

const defaultProps = {
message: '',
isDisabled: false,
};

const FormAlertWithSubmitButton = ({
isAlertVisible,
isDisabled,
onSubmit,
buttonText,
translate,
Expand Down Expand Up @@ -88,9 +93,10 @@ const FormAlertWithSubmitButton = ({
)}
<Button
success
pressOnEnter
text={buttonText}
onPress={onSubmit}
pressOnEnter
parasharrajat marked this conversation as resolved.
Show resolved Hide resolved
isDisabled={isDisabled}
/>
</View>
);
Expand Down
6 changes: 1 addition & 5 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,12 +701,8 @@ export default {
invitePeople: 'Invite new members',
invitePeoplePrompt: 'Invite new members to your workspace.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This String is also unused now.

personalMessagePrompt: 'Add a personal message (optional)',
enterEmailOrPhone: 'Emails or phone numbers',
EmailOrPhonePlaceholder: 'Enter comma-separated list of emails or phone numbers',
pleaseEnterValidLogin: 'Please ensure the email or phone number is valid (e.g. +15005550006).',
pleaseEnterUniqueLogin: 'That user is already a member of this workspace.',
pleaseSelectUser: 'Please select a user from contacts.',
genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.',
systemUserError: ({email}) => `Sorry, you cannot invite ${email} to a workspace.`,
welcomeNote: ({workspaceName}) => `You have been invited to ${workspaceName}! Download the Expensify mobile app to start tracking your expenses.`,
},
editor: {
Expand Down
6 changes: 1 addition & 5 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,8 @@ export default {
invitePeople: 'Invitar nuevos miembros',
invitePeoplePrompt: 'Invita nuevos miembros a tu espacio de trabajo.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

personalMessagePrompt: 'Agregar un mensaje personal (Opcional)',
enterEmailOrPhone: 'Correos electrónicos o números de teléfono',
EmailOrPhonePlaceholder: 'Introduce una lista de correos electrónicos o números de teléfono separado por comas',
pleaseEnterValidLogin: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (e.g. +15005550006).',
pleaseEnterUniqueLogin: 'Ese usuario ya es miembro de este espacio de trabajo.',
pleaseSelectUser: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (e.g. +15005550006).',
genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..',
systemUserError: ({email}) => `Lo sentimos, no puedes invitar a ${email} a un espacio de trabajo.`,
welcomeNote: ({workspaceName}) => `¡Has sido invitado a ${workspaceName}! Descargue la aplicación móvil Expensify para comenzar a rastrear sus gastos.`,
},
editor: {
Expand Down
Loading