Skip to content

Commit

Permalink
fix(#43,#44): in space users manager, only display invitation button …
Browse files Browse the repository at this point in the history
…on admin tabs + fix button text
  • Loading branch information
NicolasRichel committed Sep 9, 2021
1 parent f799e0f commit edc8438
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ export default {
const tabs = ref([]);
const currentTab = ref(tabsDef[0].id);
const selectTab = tab => {
currentTab.value = tab.id;
};
const selectTab = tab => (currentTab.value = tab.id);
watch(
() => locale.value,
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
clear
/>

<transition name="fade" mode="out-in">
<transition v-if="showInvitations" name="fade" mode="out-in">
<template v-if="showInvitationForm">
<InvitationForm
:space="space"
Expand Down Expand Up @@ -72,6 +72,8 @@ import InvitationCard from "@/components/specific/users/invitation-card/Invitati
import InvitationForm from "@/components/specific/users/invitation-form/InvitationForm";
import UserCard from "@/components/specific/users/user-card/UserCard";
const tabsDef = [{ id: "admins" }, { id: "users" }];
export default {
components: {
InvitationCard,
Expand All @@ -96,20 +98,18 @@ export default {
const { locale, t } = useI18n();
const tabs = ref([]);
const currentTab = ref("admins");
const currentTab = ref(tabsDef[0].id);
const selectTab = tab => (currentTab.value = tab.id);
watch(
locale,
() => locale.value,
() => {
tabs.value = [
{ id: "admins", label: t("SpaceUsersManager.tabs.admins") },
{ id: "users", label: t("SpaceUsersManager.tabs.users") }
];
tabs.value = tabsDef.map(tab => ({
...tab,
label: t(`SpaceUsersManager.tabs.${tab.id}`)
}));
},
{ immediate: true }
);
const selectTab = tab => {
currentTab.value = tab.id;
};
const admins = ref([]);
const users = ref([]);
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"users": "Utilisateurs"
},
"searchInputPlaceholder": "Rechercher un utilisateur",
"addUserButtonText": "Ajouter un utilisateur"
"addUserButtonText": "Ajouter un administrateur"
},

"UserCard": {
Expand Down

0 comments on commit edc8438

Please sign in to comment.