Skip to content

Commit

Permalink
show only one status tag, if all the other tags would be the same status
Browse files Browse the repository at this point in the history
  • Loading branch information
Beniox committed Aug 7, 2024
1 parent 912d1e5 commit c14b288
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions webapp/src/views/ServiceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@
<td>
{{ person.serviceDates.map((ele) => ele.date).join(", ") }}
<span
v-if="
person.groups[0].groupMemberStatus !== 'Active' &&
person.groups.every(
(g) =>
g.groupMemberStatus === person.groups[0].groupMemberStatus
)
"
class="badge rounded-pill"
:class="{
'text-bg-danger':
person.groups[0].groupMemberStatus === 'To_Delete',
'text-bg-secondary':
person.groups[0].groupMemberStatus === 'Requested',
}"
>{{ person.groups[0].groupMemberStatus }}</span
>
<span
v-else
v-for="group in person.groups.filter(
(g) => g.groupMemberStatus !== 'Active'
)"
Expand Down

0 comments on commit c14b288

Please sign in to comment.