2018-12-05 16:39:03 +00:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div>
|
2018-12-12 16:19:20 +00:00
|
|
|
<div v-if="projectMembers.length > 0" class="team-header">
|
2018-12-05 16:39:03 +00:00
|
|
|
<HeaderArea/>
|
|
|
|
</div>
|
2018-12-12 16:19:20 +00:00
|
|
|
<div v-if="projectMembers.length > 0" class="team-container">
|
2018-12-05 16:39:03 +00:00
|
|
|
<div class="team-container__content">
|
2018-12-26 15:05:33 +00:00
|
|
|
<div v-for="(member, index) in projectMembers" v-on:click="onMemberClick(member)" v-bind:key="index">
|
2018-12-12 16:19:20 +00:00
|
|
|
<TeamMemberItem
|
2018-12-26 15:05:33 +00:00
|
|
|
:projectMember = "member"
|
|
|
|
v-bind:class = "[member.isSelected ? 'selected' : '']"
|
2018-12-12 16:19:20 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2018-12-05 16:39:03 +00:00
|
|
|
</div>
|
|
|
|
<!-- only when selecting team members -->
|
2018-12-12 16:19:20 +00:00
|
|
|
<div v-if="selectedProjectMembers.length > 0" >
|
|
|
|
<Footer/>
|
|
|
|
</div>
|
2018-12-05 16:39:03 +00:00
|
|
|
</div>
|
2018-12-12 16:19:20 +00:00
|
|
|
<EmptyState
|
|
|
|
v-if="projectMembers.length === 0"
|
2018-12-05 16:39:03 +00:00
|
|
|
mainTitle="Invite Team Members"
|
|
|
|
additionalText="You need to click the button “+” in the left corner"
|
|
|
|
:imageSource="emptyImage" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import TeamMemberItem from '@/components/team/TeamMemberItem.vue';
|
|
|
|
import HeaderArea from '@/components/team/headerArea/HeaderArea.vue';
|
|
|
|
import Footer from '@/components/team/footerArea/Footer.vue';
|
|
|
|
import EmptyState from '@/components/common/EmptyStateArea.vue';
|
|
|
|
import { EMPTY_STATE_IMAGES } from '@/utils/constants/emptyStatesImages';
|
2019-01-09 15:40:21 +00:00
|
|
|
import { PM_ACTIONS } from '@/utils/constants/actionNames';
|
2018-12-05 16:39:03 +00:00
|
|
|
|
|
|
|
@Component({
|
2018-12-18 14:43:23 +00:00
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
emptyImage: EMPTY_STATE_IMAGES.TEAM
|
|
|
|
};
|
|
|
|
},
|
2018-12-12 16:19:20 +00:00
|
|
|
methods: {
|
2018-12-18 14:43:23 +00:00
|
|
|
onMemberClick: function (member: any) {
|
2019-01-09 15:40:21 +00:00
|
|
|
this.$store.dispatch(PM_ACTIONS.TOGGLE_SELECTION, member.user.id);
|
2018-12-18 14:43:23 +00:00
|
|
|
},
|
2018-12-12 16:19:20 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
projectMembers: function () {
|
|
|
|
return this.$store.getters.projectMembers;
|
2018-12-18 14:43:23 +00:00
|
|
|
},
|
2018-12-12 16:19:20 +00:00
|
|
|
selectedProjectMembers: function () {
|
|
|
|
return this.$store.getters.selectedProjectMembers;
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
2018-12-12 16:19:20 +00:00
|
|
|
},
|
2018-12-05 16:39:03 +00:00
|
|
|
components: {
|
|
|
|
TeamMemberItem,
|
|
|
|
HeaderArea,
|
|
|
|
Footer,
|
|
|
|
EmptyState,
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2018-12-18 14:43:23 +00:00
|
|
|
export default class TeamArea extends Vue {
|
|
|
|
}
|
2018-12-05 16:39:03 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.team-header {
|
|
|
|
position: fixed;
|
|
|
|
padding: 55px 30px 25px 64px;
|
|
|
|
max-width: 79.7%;
|
|
|
|
width: 100%;
|
|
|
|
background-color: rgba(255,255,255,0.6);
|
|
|
|
z-index: 999;
|
|
|
|
}
|
|
|
|
.team-container {
|
|
|
|
padding: 0px 30px 55px 64px;
|
|
|
|
overflow-y: scroll;
|
|
|
|
max-height: 84vh;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&__content {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 260px 260px 260px 260px 260px;
|
|
|
|
width: 100%;
|
|
|
|
grid-row-gap: 20px;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-top: 175px;
|
|
|
|
margin-bottom: 100px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 1600px) {
|
|
|
|
.team-container {
|
|
|
|
|
|
|
|
&__content {
|
|
|
|
grid-template-columns: 240px 240px 240px 240px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.team-header {
|
|
|
|
max-width: 73.7%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 1366px) {
|
|
|
|
.team-container {
|
|
|
|
|
|
|
|
&__content {
|
|
|
|
grid-template-columns: 260px 260px 260px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.team-header {
|
|
|
|
max-width: 72%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 1120px) {
|
|
|
|
.team-container {
|
|
|
|
|
|
|
|
&__content {
|
|
|
|
grid-template-columns: 270px 270px 270px;
|
|
|
|
grid-row-gap: 0px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.team-header {
|
|
|
|
max-width: 82.7%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|