From 25c21f03c33c65f9b52ea92d986fb19951e5025e Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Thu, 22 Jun 2023 00:42:39 -0500 Subject: [PATCH] web/satellite: add project role for expired invitations Pending project members whose invitations have expired now appear with the "Invite Expired" role in the Team page. References #5752 Change-Id: Ic91289618ee02e65de29e986fa3205eccf39b267 --- .../src/components/common/TableItem.vue | 6 ++++- .../project/ProjectOwnershipTag.vue | 26 ++++++++++++++----- .../components/team/ProjectMemberListItem.vue | 8 ++++-- web/satellite/src/types/projectMembers.ts | 1 + web/satellite/static/images/team/clock.svg | 3 +++ 5 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 web/satellite/static/images/team/clock.svg diff --git a/web/satellite/src/components/common/TableItem.vue b/web/satellite/src/components/common/TableItem.vue index d3932f584..eb59e3dc0 100644 --- a/web/satellite/src/components/common/TableItem.vue +++ b/web/satellite/src/components/common/TableItem.vue @@ -27,7 +27,7 @@

- + {{ val }}

@@ -92,6 +92,10 @@ const customIconClasses = computed(() => { return classes; }); +function isProjectRoleIconShown(role: ProjectRole) { + return props.itemType === 'project' || role === ProjectRole.Invited || role === ProjectRole.InviteExpired; +} + function selectClicked(event: Event): void { emit('selectClicked', event); } diff --git a/web/satellite/src/components/project/ProjectOwnershipTag.vue b/web/satellite/src/components/project/ProjectOwnershipTag.vue index e67d0f6d9..5c9a95964 100644 --- a/web/satellite/src/components/project/ProjectOwnershipTag.vue +++ b/web/satellite/src/components/project/ProjectOwnershipTag.vue @@ -2,9 +2,8 @@ // See LICENSE for copying information. @@ -16,6 +15,7 @@ import { ProjectRole } from '@/types/projectMembers'; import BoxIcon from '@/../static/images/navigation/project.svg'; import InviteIcon from '@/../static/images/navigation/quickStart.svg'; +import ClockIcon from '@/../static/images/team/clock.svg'; const props = withDefaults(defineProps<{ role: ProjectRole, @@ -26,7 +26,14 @@ const props = withDefaults(defineProps<{ }); const icon = computed((): string => { - return props.role === ProjectRole.Invited ? InviteIcon : BoxIcon; + switch (props.role) { + case ProjectRole.Invited: + return InviteIcon; + case ProjectRole.InviteExpired: + return ClockIcon; + default: + return BoxIcon; + } }); @@ -65,13 +72,18 @@ const icon = computed((): string => { } } - &.invited { + &.invited, + &.invite-expired { color: var(--c-grey-6); border-color: var(--c-grey-4); + } - :deep(path) { - fill: var(--c-yellow-3); - } + &.invited :deep(path) { + fill: var(--c-yellow-3); + } + + &.invite-expired :deep(path) { + fill: var(--c-grey-4); } } diff --git a/web/satellite/src/components/team/ProjectMemberListItem.vue b/web/satellite/src/components/team/ProjectMemberListItem.vue index 2e371f51e..ca39d944b 100644 --- a/web/satellite/src/components/team/ProjectMemberListItem.vue +++ b/web/satellite/src/components/team/ProjectMemberListItem.vue @@ -16,7 +16,7 @@