Skip to content

Commit

Permalink
[ui] Filter and order individuals by last review
Browse files Browse the repository at this point in the history
Adds the 'lastReviewed' and 'isReviewed' filters to
the individuals table and updates the search syntax
documentation.

Signed-off-by: Eva Millán <[email protected]>
  • Loading branch information
evamillan committed Sep 5, 2024
1 parent 2f2974b commit 5aadbe3
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 19 deletions.
17 changes: 17 additions & 0 deletions releases/unreleased/mark-individuals-as-reviewed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Mark individuals as reviewed
category: added
author: Eva Millán <[email protected]>
issue: null
notes: >
Individuals can now be marked as reviewed to keep track
of which profiles have already been checked and when.
A profile can be marked as reviewed more than once, it
will show the date of the last review. If there have
been any changes to the profile data since the last review,
the review button displays a warning icon.
The list of individuals can be filtered by whether they
have been reviewed and by their review date. The list can
also be ordered by review date.
4 changes: 4 additions & 0 deletions ui/src/components/IndividualsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
title: 'Last updated',
value: 'lastModified',
},
{
title: 'Last reviewed',
value: 'lastReviewed',
},
{
title: 'Created date',
value: 'createdAt',
Expand Down
8 changes: 8 additions & 0 deletions ui/src/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ export default {
filter: "isEnrolled",
type: "boolean",
},
{
filter: "isReviewed",
type: "boolean",
},
{
filter: "lastReviewed",
type: "date",
},
],
},
orderOptions: {
Expand Down
135 changes: 116 additions & 19 deletions ui/src/views/SearchHelp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<v-main>
<v-card class="mx-auto elevation-0 mt-6 section" max-width="800px">
<v-card-title class="header"> Search syntax </v-card-title>
<v-card-text class="pa-8">
<p class="subtitle-2">Search by term</p>
<p>
<v-card-text class="pa-8 pt-0">
<p class="text-subtitle-2">Search by term</p>
<p class="text-body-2">
You can find individuals whose identities contain a particular term in
their name, email address or username by entering the term on the
search box. You can combine this query with any filters, for example
<code>John lastUpdated:>2020-11-01</code>.
</p>
<p class="subtitle-2">Filter by last updated date</p>
<p>
<p class="text-subtitle-2">Filter by last updated date</p>
<p class="text-body-2">
You can filter individuals based on when they were modified, using the
<code>lastUpdated</code> filter.
</p>
Expand Down Expand Up @@ -66,22 +66,22 @@
</template>
</v-simple-table>

<p class="subtitle-2 mt-8">Search for bots</p>
<p>
<p class="text-subtitle-2">Search for bots</p>
<p class="text-body-2">
You can search for individuals based on whether they are marked as
bots, using the <code>isBot:true</code> and <code>isBot:false</code>
filters.
</p>
<p class="subtitle-2 mt-8">Filter by gender</p>
<p>
<p class="text-subtitle-2">Filter by gender</p>
<p class="text-body-2">
You can search for individuals based on their gender, using the
<code>gender</code> filter. Genders that include spaces should be
wrapped in double quotes. For example:
<code>gender:"non binary"</code>.
</p>

<p class="subtitle-2 mt-6">Filter by country</p>
<p>
<p class="text-subtitle-2">Filter by country</p>
<p class="text-body-2">
You can filter individuals based on their country using the
<code>country</code> filter.
</p>
Expand Down Expand Up @@ -114,24 +114,24 @@
</template>
</v-simple-table>

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

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

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

<p class="subtitle-2 mt-8">Filter by enrollment status</p>
<p>
<p class="text-subtitle-2">Filter by enrollment status</p>
<p class="text-body-2">
You can search for individuals based on whether they have any
affiliation, using the <code>isEnrolled:true</code> and
<code>isEnrolled:false</code> filters.
</p>

<p class="text-subtitle-2">Filter by review status</p>
<p class="text-body-2">
You can search for individuals based on whether they have been marked
as reviewed, using the <code>isReviewed:true</code> and
<code>isReviewed:false</code> filters.
</p>

<p class="text-subtitle-2">Filter by review date</p>
<p class="text-body-2">
You can filter individuals based on when they were last marked as
reviewed, using the <code>lastReviewed</code> filter.
</p>
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th class="text-left" width="30%">Filter</th>
<th class="text-left">Explanation</th>
</tr>
</thead>
<tbody>
<tr>
<td width="30%"><code>lastReviewed:>YYYY-MM-DD</code></td>
<td>
Matches individuals that were reviewed after the given date.
</td>
</tr>
<tr>
<td width="30%"><code>lastReviewed:>=YYYY-MM-DD</code></td>
<td>
Matches individuals that were reviewed on or after the given
date.
</td>
</tr>
<tr>
<td width="30%">
<code>lastReviewed:&lt;YYYY-MM-DD</code>
</td>
<td>
Matches individuals that were reviewed before the given date.
</td>
</tr>
<tr>
<td width="30%">
<code>lastReviewed:&lt;=YYYY-MM-DD</code>
</td>
<td>
Matches individuals that were reviewed on or before the given
date.
</td>
</tr>
<tr>
<td width="30%">
<code>lastReviewed:YYYY-MM-DD..YYYY-MM-DD</code>
</td>
<td>
Matches individuals that were reviewed between the given
dates.
</td>
</tr>
</tbody>
</template>
</v-simple-table>
</v-card-text>
</v-card>
</v-main>
Expand All @@ -205,3 +269,36 @@ export default {
name: "SearchHelp",
};
</script>
<style scoped>
.text-subtitle-2 {
padding-bottom: 1.2rem;
padding-top: 1.654rem;
font-size: 1rem;
}
th,
td {
padding: 1.09rem 0;
}
th {
font-size: 0.813rem;
font-weight: 500;
}
td {
border-top: thin solid rgba(0, 0, 0, 0.08);
}
td:first-child {
padding-right: 1.09rem;
}
code {
border-radius: 4px;
font-size: 90%;
line-height: 1.25rem;
padding: 0.1rem 0.25rem;
background-color: #f2f3f5;
}
</style>

0 comments on commit 5aadbe3

Please sign in to comment.