Skip to content

Commit 3bfb56c

Browse files
committed
[ui] Filter and order individuals by last review
Adds the 'lastReviewed' and 'isReviewed' filters to the individuals table and updates the search syntax documentation. Signed-off-by: Eva Millán <evamillan@bitergia.com>
1 parent 53a1655 commit 3bfb56c

File tree

4 files changed

+145
-19
lines changed

4 files changed

+145
-19
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Mark individuals as reviewed
3+
category: added
4+
author: Eva Millán <evamillan@bitergia.com>
5+
issue: null
6+
notes: >
7+
Individuals can now be marked as reviewed to keep track
8+
of which profiles have already been checked and when.
9+
A profile can be marked as reviewed more than once, it
10+
will show the date of the last review. If there have
11+
been any changes to the profile data since the last review,
12+
the review button displays a warning icon.
13+
14+
The list of individuals can be filtered by whether they
15+
have been reviewed and by their review date. The list can
16+
also be ordered by review date.
17+

ui/src/components/IndividualsTable.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
title: 'Last updated',
4141
value: 'lastModified',
4242
},
43+
{
44+
title: 'Last reviewed',
45+
value: 'lastReviewed',
46+
},
4347
{
4448
title: 'Created date',
4549
value: 'createdAt',

ui/src/components/Search.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ export default {
153153
filter: "isEnrolled",
154154
type: "boolean",
155155
},
156+
{
157+
filter: "isReviewed",
158+
type: "boolean",
159+
},
160+
{
161+
filter: "lastReviewed",
162+
type: "date",
163+
},
156164
],
157165
},
158166
orderOptions: {

ui/src/views/SearchHelp.vue

Lines changed: 116 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<v-main>
33
<v-card class="mx-auto elevation-0 mt-6 section" max-width="800px">
44
<v-card-title class="header"> Search syntax </v-card-title>
5-
<v-card-text class="pa-8">
6-
<p class="subtitle-2">Search by term</p>
7-
<p>
5+
<v-card-text class="pa-8 pt-0">
6+
<p class="text-subtitle-2">Search by term</p>
7+
<p class="text-body-2">
88
You can find individuals whose identities contain a particular term in
99
their name, email address or username by entering the term on the
1010
search box. You can combine this query with any filters, for example
1111
<code>John lastUpdated:>2020-11-01</code>.
1212
</p>
13-
<p class="subtitle-2">Filter by last updated date</p>
14-
<p>
13+
<p class="text-subtitle-2">Filter by last updated date</p>
14+
<p class="text-body-2">
1515
You can filter individuals based on when they were modified, using the
1616
<code>lastUpdated</code> filter.
1717
</p>
@@ -66,22 +66,22 @@
6666
</template>
6767
</v-simple-table>
6868

69-
<p class="subtitle-2 mt-8">Search for bots</p>
70-
<p>
69+
<p class="text-subtitle-2">Search for bots</p>
70+
<p class="text-body-2">
7171
You can search for individuals based on whether they are marked as
7272
bots, using the <code>isBot:true</code> and <code>isBot:false</code>
7373
filters.
7474
</p>
75-
<p class="subtitle-2 mt-8">Filter by gender</p>
76-
<p>
75+
<p class="text-subtitle-2">Filter by gender</p>
76+
<p class="text-body-2">
7777
You can search for individuals based on their gender, using the
7878
<code>gender</code> filter. Genders that include spaces should be
7979
wrapped in double quotes. For example:
8080
<code>gender:"non binary"</code>.
8181
</p>
8282

83-
<p class="subtitle-2 mt-6">Filter by country</p>
84-
<p>
83+
<p class="text-subtitle-2">Filter by country</p>
84+
<p class="text-body-2">
8585
You can filter individuals based on their country using the
8686
<code>country</code> filter.
8787
</p>
@@ -114,24 +114,24 @@
114114
</template>
115115
</v-simple-table>
116116

117-
<p class="subtitle-2 mt-8">Filter by data source</p>
118-
<p>
117+
<p class="text-subtitle-2">Filter by data source</p>
118+
<p class="text-body-2">
119119
You can search for individuals based on the data source of their
120120
identities, using the <code>source</code> filter. Source names that
121121
include spaces should be wrapped between double quotes. For example:
122122
<code>source:"Stack Exchange"</code>.
123123
</p>
124124

125-
<p class="subtitle-2 mt-8">Filter by enrollment</p>
126-
<p>
125+
<p class="text-subtitle-2">Filter by enrollment</p>
126+
<p class="text-body-2">
127127
You can search for individuals based on the organizations they are
128128
enrolled in, using the <code>enrollment</code> filter. Organizations
129129
that include spaces should be wrapped between double quotes. For
130130
example: <code>enrollment:"Dumbledore's Army"</code>.
131131
</p>
132132

133-
<p class="subtitle-2">Filter by enrollment date</p>
134-
<p>
133+
<p class="text-subtitle-2">Filter by enrollment date</p>
134+
<p class="text-body-2">
135135
You can filter individuals based on when they were affiliated to an
136136
organization, using the <code>enrollmentDate</code> filter.
137137
</p>
@@ -189,12 +189,76 @@
189189
</template>
190190
</v-simple-table>
191191

192-
<p class="subtitle-2 mt-8">Filter by enrollment status</p>
193-
<p>
192+
<p class="text-subtitle-2">Filter by enrollment status</p>
193+
<p class="text-body-2">
194194
You can search for individuals based on whether they have any
195195
affiliation, using the <code>isEnrolled:true</code> and
196196
<code>isEnrolled:false</code> filters.
197197
</p>
198+
199+
<p class="text-subtitle-2">Filter by review status</p>
200+
<p class="text-body-2">
201+
You can search for individuals based on whether they have been marked
202+
as reviewed, using the <code>isReviewed:true</code> and
203+
<code>isReviewed:false</code> filters.
204+
</p>
205+
206+
<p class="text-subtitle-2">Filter by review date</p>
207+
<p class="text-body-2">
208+
You can filter individuals based on when they were last marked as
209+
reviewed, using the <code>lastReviewed</code> filter.
210+
</p>
211+
<v-simple-table>
212+
<template v-slot:default>
213+
<thead>
214+
<tr>
215+
<th class="text-left" width="30%">Filter</th>
216+
<th class="text-left">Explanation</th>
217+
</tr>
218+
</thead>
219+
<tbody>
220+
<tr>
221+
<td width="30%"><code>lastReviewed:>YYYY-MM-DD</code></td>
222+
<td>
223+
Matches individuals that were reviewed after the given date.
224+
</td>
225+
</tr>
226+
<tr>
227+
<td width="30%"><code>lastReviewed:>=YYYY-MM-DD</code></td>
228+
<td>
229+
Matches individuals that were reviewed on or after the given
230+
date.
231+
</td>
232+
</tr>
233+
<tr>
234+
<td width="30%">
235+
<code>lastReviewed:&lt;YYYY-MM-DD</code>
236+
</td>
237+
<td>
238+
Matches individuals that were reviewed before the given date.
239+
</td>
240+
</tr>
241+
<tr>
242+
<td width="30%">
243+
<code>lastReviewed:&lt;=YYYY-MM-DD</code>
244+
</td>
245+
<td>
246+
Matches individuals that were reviewed on or before the given
247+
date.
248+
</td>
249+
</tr>
250+
<tr>
251+
<td width="30%">
252+
<code>lastReviewed:YYYY-MM-DD..YYYY-MM-DD</code>
253+
</td>
254+
<td>
255+
Matches individuals that were reviewed between the given
256+
dates.
257+
</td>
258+
</tr>
259+
</tbody>
260+
</template>
261+
</v-simple-table>
198262
</v-card-text>
199263
</v-card>
200264
</v-main>
@@ -205,3 +269,36 @@ export default {
205269
name: "SearchHelp",
206270
};
207271
</script>
272+
<style scoped>
273+
.text-subtitle-2 {
274+
padding-bottom: 1.2rem;
275+
padding-top: 1.654rem;
276+
font-size: 1rem;
277+
}
278+
279+
th,
280+
td {
281+
padding: 1.09rem 0;
282+
}
283+
284+
th {
285+
font-size: 0.813rem;
286+
font-weight: 500;
287+
}
288+
289+
td {
290+
border-top: thin solid rgba(0, 0, 0, 0.08);
291+
}
292+
293+
td:first-child {
294+
padding-right: 1.09rem;
295+
}
296+
297+
code {
298+
border-radius: 4px;
299+
font-size: 90%;
300+
line-height: 1.25rem;
301+
padding: 0.1rem 0.25rem;
302+
background-color: #f2f3f5;
303+
}
304+
</style>

0 commit comments

Comments
 (0)