diff --git a/web/satellite/src/components/modals/AddTeamMemberModal.vue b/web/satellite/src/components/modals/AddTeamMemberModal.vue index caf517f35..b332487a5 100644 --- a/web/satellite/src/components/modals/AddTeamMemberModal.vue +++ b/web/satellite/src/components/modals/AddTeamMemberModal.vue @@ -7,14 +7,22 @@ @@ -60,12 +72,14 @@ import { useAppStore } from '@/store/modules/appStore'; import { useProjectsStore } from '@/store/modules/projectsStore'; import { useAnalyticsStore } from '@/store/modules/analyticsStore'; import { useLoading } from '@/composables/useLoading'; +import { MODALS } from '@/utils/constants/appStatePopUps'; import VButton from '@/components/common/VButton.vue'; import VModal from '@/components/common/VModal.vue'; import VInput from '@/components/common/VInput.vue'; import TeamMembersIcon from '@/../static/images/team/teamMembers.svg'; +import ArrowIcon from '@/../static/images/onboardingTour/arrowRight.svg'; const analyticsStore = useAnalyticsStore(); const appStore = useAppStore(); @@ -84,6 +98,7 @@ const email = ref(''); * or a message describing the validation error. */ const formError = computed(() => { + if (!isPaidTier.value) return false; if (!email.value) return true; if (email.value.toLocaleLowerCase() === usersStore.state.user.email.toLowerCase()) { return `You can't add yourself to the project.`; @@ -95,9 +110,21 @@ const formError = computed(() => { }); /** - * Tries to add the user with the input email to the current project. + * Returns user's paid tier status from store. */ -async function onInviteClick(): Promise { +const isPaidTier = computed(() => { + return usersStore.state.user.paidTier; +}); + +/** + * Handles primary button click. + */ +async function onPrimaryClick(): Promise { + if (!isPaidTier.value) { + appStore.updateActiveModal(MODALS.upgradeAccount); + return; + } + await withLoading(async () => { try { await pmStore.inviteMember(email.value, projectsStore.state.selectedProject.id); diff --git a/web/satellite/vuetify-poc/src/components/BrowserTableComponent.vue b/web/satellite/vuetify-poc/src/components/BrowserTableComponent.vue index c6bf5f77a..b9778c0fc 100644 --- a/web/satellite/vuetify-poc/src/components/BrowserTableComponent.vue +++ b/web/satellite/vuetify-poc/src/components/BrowserTableComponent.vue @@ -37,7 +37,7 @@ @update:itemsPerPage="onLimitChange" >