diff --git a/src/components/specific/users/invitation-form/ProjectInvitationForm.vue b/src/components/specific/users/invitation-form/ProjectInvitationForm.vue index 7b743399c..ec795ff85 100644 --- a/src/components/specific/users/invitation-form/ProjectInvitationForm.vue +++ b/src/components/specific/users/invitation-form/ProjectInvitationForm.vue @@ -29,8 +29,9 @@ const errorMessage = ref(""); const submit = async ({ emails, role }) => { const existingEmails = props.users.map(user => user.email); - if (emails.some(eml => existingEmails.includes(eml))) { - errorMessage.value = t("InvitationForm.userAlreadyExistInputErrorMessage"); + const alreadyExistingEmail = emails.find(eml => existingEmails.includes(eml)); + if (alreadyExistingEmail) { + errorMessage.value = t("InvitationForm.projectUserAlreadyExistError", { email: alreadyExistingEmail }); return; } diff --git a/src/components/specific/users/invitation-form/SpaceInvitationForm.vue b/src/components/specific/users/invitation-form/SpaceInvitationForm.vue index f28f8f958..716213a34 100644 --- a/src/components/specific/users/invitation-form/SpaceInvitationForm.vue +++ b/src/components/specific/users/invitation-form/SpaceInvitationForm.vue @@ -1,6 +1,8 @@ diff --git a/src/components/specific/users/user-role-badge/UserRoleBadge.vue b/src/components/specific/users/user-role-badge/UserRoleBadge.vue index a94a7af59..1fcd488bb 100644 --- a/src/components/specific/users/user-role-badge/UserRoleBadge.vue +++ b/src/components/specific/users/user-role-badge/UserRoleBadge.vue @@ -45,6 +45,7 @@ export default { if (props.projectRole === PROJECT_ROLE.GUEST) { return "guest"; } + return "projectUser"; }); diff --git a/src/i18n/lang/de.json b/src/i18n/lang/de.json index 56003cad9..d12b95fb7 100644 --- a/src/i18n/lang/de.json +++ b/src/i18n/lang/de.json @@ -218,7 +218,7 @@ "submitButtonText": "Einladen", "successNotifText": "Einladung versendet", "successUserToAdmin": "Der Nutzer wurde zum Administrator befördert.", - "userAlreadyExistInputErrorMessage": "Der Nutzer ist bereits in Ihren Projekt." + "projectUserAlreadyExistError": "Der Nutzer ist bereits in Ihren Projekt." }, "ModelActionsCell": { "addTagsButtonText": "Tags hinzufügen", diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index c55842a97..34c903bab 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -82,12 +82,10 @@ "folder_permissions_updated": "Folder permissions updated", "folder_renamed": "Folder renamed", "folder_moved": "Folder moved", - "cloud_invitation_sent": "Invitation sent", "cloud_invitation_canceled": "Invitation canceled", "cloud_invitation_accepted": "Invitation accepted", "cloud_invitation_denied": "Invitation denied", - "project_invitation_sent": "Project invitation sent", "project_invitation_canceled": "Project invitation canceled", "project_invitation_accepted": "Project invitation accepted", @@ -288,7 +286,9 @@ "submitButtonText": "Send invitation", "successNotifText": "Invitation sent", "successUserToAdmin": "The user has now admin role", - "userAlreadyExistInputErrorMessage": "User is already in the project" + "projectUserAlreadyExistError": "User {email} is already in the project", + "spaceUserAlreadyExistError": "User {email} is already in the space", + "spaceAdminAlreadyExistError": "User {email} is already an admin of the space" }, "ModelActionsCell": { "addTagsButtonText": "Add tags", @@ -1046,4 +1046,4 @@ "title": "Delete {visasCount} visas", "message": "You are about to delete the visas on the following files:" } -} +} \ No newline at end of file diff --git a/src/i18n/lang/es.json b/src/i18n/lang/es.json index 36412d363..a17dc7201 100644 --- a/src/i18n/lang/es.json +++ b/src/i18n/lang/es.json @@ -218,7 +218,7 @@ "submitButtonText": "Invitar", "successNotifText": "Invitación enviada", "successUserToAdmin": "El usuario ha sido ascendido a administrador", - "userAlreadyExistInputErrorMessage": "El usuario ya está en su proyecto" + "projectUserAlreadyExistError": "El usuario ya está en su proyecto" }, "ModelActionsCell": { "addTagsButtonText": "Añadir etiquetas", diff --git a/src/i18n/lang/fr.json b/src/i18n/lang/fr.json index f7205986d..b4ee5221d 100644 --- a/src/i18n/lang/fr.json +++ b/src/i18n/lang/fr.json @@ -153,12 +153,10 @@ "folder_permissions_updated": "Modification des droits d’accès", "folder_renamed": "Renommage du dossier", "folder_moved": "Déplacement du dossier", - "cloud_invitation_sent": "Invitation envoyée", "cloud_invitation_canceled": "Invitation annulée", "cloud_invitation_accepted": "Invitation acceptée", "cloud_invitation_denied": "Invitation refusée", - "project_invitation_sent": "Invitation projet envoyée", "project_invitation_canceled": "Invitation projet annulée", "project_invitation_accepted": "Invitation projet acceptée", @@ -388,7 +386,9 @@ "InvitationForm": { "emailInputPlaceholder": "Email de l'utilisateur", "emailInputErrorMessage": "Email invalide", - "userAlreadyExistInputErrorMessage": "L'utilisateur est déjà dans votre projet", + "projectUserAlreadyExistError": "L'utilisateur {email} est déjà dans votre projet", + "spaceUserAlreadyExistError": "L'utilisateur {email} est déjà dans votre espace", + "spaceAdminAlreadyExistError": "L'utilisateur {email} est déjà admin dans votre espace", "roleInputLabel": "Rôle", "roles": { "admin": "Administrateur", @@ -1071,4 +1071,4 @@ "title": "Suppression de {visasCount} visas", "message": "Vous êtes sur le point de supprimer les visas sur les fichiers suivants :" } -} +} \ No newline at end of file