-
Notifications
You must be signed in to change notification settings - Fork 19
/
WorkPackage.vue
130 lines (118 loc) · 2.39 KB
/
WorkPackage.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<template>
<div class="workpackage">
<div class="row">
<div class="row__status"
:style="{'background-color':workpackage.statusCol}">
<div class="row__status__title">
{{ workpackage.statusTitle }}
</div>
</div>
<div class="row__workpackage">
#{{ workpackage.id }} - {{ workpackage.project }}
</div>
</div>
<div class="row">
<div class="row__subject">
<span class="row__subject__type" :style="{'color':workpackage.typeCol}">
{{ workpackage.typeTitle }}
</span>
{{ workpackage.subject }}
</div>
</div>
<div class="row">
<div v-if="workpackage.assignee" class="row__assignee">
<div class="row__assignee__avatar">
<Avatar class="item-avatar"
:size="23"
:url="workpackage.picture"
:user="workpackage.assignee"
:display-name="workpackage.assignee" />
</div>
<div class="row__assignee__assignee">
{{ workpackage.assignee }}
</div>
</div>
</div>
</div>
</template>
<script>
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
export default {
name: 'WorkPackage',
components: {
Avatar,
},
props: {
workpackage: {
type: Object,
required: true,
},
},
}
</script>
<style scoped lang="scss">
.workpackage {
width: 100%;
padding: 15px 6px 0 10px;
.row {
display: flex;
padding: 3px;
flex-wrap: wrap;
&__status {
padding: 5px 10px;
width: fit-content;
height: 20px;
justify-content: center;
display: flex;
align-items: center;
text-align: center;
font-size: 0.75rem;
border-radius: 2px;
margin-right: 4px;
&__title {
font-size: 0.75rem;
line-height: 14px;
text-align: center;
filter: contrast(0) brightness(0);
}
}
&__workpackage {
color: #878787;
font-size: 0.8rem;
height: 20px;
line-height: 20px;
}
&__subject {
font-size: 0.875rem;
text-align: justify;
white-space: normal;
text-justify: inter-word;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
&__type {
font-size: 0.75rem;
font-weight: bold;
text-transform: uppercase;
margin-right: 4px;
}
}
&__assignee {
display: flex;
flex-direction: row;
padding: 5px;
&__assignee {
font-size: 0.81rem;
color: #878787;
text-align: center;
padding-left: 5px;
}
}
}
}
.workpackage div {
cursor: pointer;
}
</style>