2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-12-05 16:39:03 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="user-container">
|
|
|
|
<div class="user-container__avatar">
|
2019-01-10 14:44:15 +00:00
|
|
|
<h1>{{projectMember.user.firstName.slice(0,1)}}</h1>
|
2018-12-05 16:39:03 +00:00
|
|
|
</div>
|
2019-01-14 15:39:21 +00:00
|
|
|
<p class="user-container__user-name">{{userInfo.fullName}}</p>
|
|
|
|
<p class="user-container__user-email">{{userInfo.email}}</p>
|
2018-12-12 16:19:20 +00:00
|
|
|
<p class="user-container__date">{{new Date(projectMember.joinedAt).toLocaleDateString()}}</p>
|
2018-12-05 16:39:03 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
props: {
|
2018-12-18 14:43:23 +00:00
|
|
|
projectMember: Object,
|
2018-12-12 16:19:20 +00:00
|
|
|
},
|
2019-01-14 15:39:21 +00:00
|
|
|
computed: {
|
|
|
|
userInfo: function (): object {
|
|
|
|
let fullName: string = this.$props.projectMember.user.firstName + ' ' + this.$props.projectMember.user.lastName;
|
|
|
|
let email: string = this.$props.projectMember.user.email;
|
|
|
|
|
|
|
|
if (fullName.length > 16) {
|
|
|
|
fullName = this.$props.projectMember.user.firstName.slice(0, 1).toUpperCase() +
|
|
|
|
'. ' + this.$props.projectMember.user.lastName.slice(0, 1).toUpperCase() + '.';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (email.length > 16) {
|
|
|
|
email = this.$props.projectMember.user.email.slice(0, 13) + '...';
|
|
|
|
}
|
|
|
|
|
|
|
|
return { fullName, email };
|
|
|
|
},
|
|
|
|
}
|
2018-12-05 16:39:03 +00:00
|
|
|
})
|
|
|
|
|
2018-12-18 14:43:23 +00:00
|
|
|
export default class TeamMemberItem extends Vue {
|
|
|
|
}
|
2018-12-05 16:39:03 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.user-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
border-radius: 6px;
|
|
|
|
height: 180px;
|
|
|
|
background-color: #fff;
|
|
|
|
margin-bottom: 24px;
|
|
|
|
padding: 30px 0;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: box-shadow .2s ease-out;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
box-shadow: 0px 12px 24px rgba(175, 183, 193, 0.4);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__date {
|
|
|
|
font-family: 'montserrat_regular';
|
|
|
|
font-size: 12px;
|
|
|
|
line-height: 16px;
|
|
|
|
color: #AFB7C1;
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__user-email {
|
|
|
|
font-family: 'montserrat_regular';
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 19px;
|
|
|
|
color: #AFB7C1;
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__user-name {
|
2019-01-14 15:39:21 +00:00
|
|
|
font-family: 'montserrat_bold';
|
2018-12-05 16:39:03 +00:00
|
|
|
font-size: 14px;
|
|
|
|
line-height: 19px;
|
2019-01-14 15:39:21 +00:00
|
|
|
color: #354049;
|
|
|
|
margin-top: 20px;
|
2018-12-05 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__avatar {
|
|
|
|
min-width: 40px;
|
|
|
|
max-width: 40px;
|
|
|
|
min-height: 40px;
|
|
|
|
max-height: 40px;
|
|
|
|
border-radius: 6px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
background-color: #FF8658;
|
|
|
|
h1 {
|
|
|
|
font-family: 'montserrat_medium';
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 23px;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.user-container.selected {
|
|
|
|
box-shadow: 0px 12px 24px rgba(38, 131, 255, 0.4);
|
|
|
|
background-color: #2683FF;
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
|
|
|
&:nth-child(2) {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:nth-child(3) {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:nth-child(4) {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:nth-child(5) {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|