Skip to content

Commit

Permalink
Merge pull request #2475 from NationalSecurityAgency/t#2458/add-user-…
Browse files Browse the repository at this point in the history
…link

#2458 Add link to user page on expiration table
  • Loading branch information
sudo-may authored Nov 27, 2023
2 parents eae8872 + e315128 commit 397c571
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dashboard/src/components/expiration/ExpirationHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ limitations under the License.
<template #head(expiredOn)="data">
<span class="text-primary"><i class="fas fa-clock text-warning" aria-hidden="true"></i> {{ data.label }}</span>
</template>
<template v-slot:cell(userIdForDisplay)="data">
{{ data.value }}

<b-button-group class="float-right">
<b-button :to="calculateClientDisplayRoute(data)"
variant="outline-info" size="sm" class="text-secondary"
v-b-tooltip.hover="'View User Details'"
:aria-label="`View details for user ${data.label}`"
data-cy="usersTable_viewDetailsBtn"><i class="fa fa-user-alt" aria-hidden="true"/><span class="sr-only">view user details</span>
</b-button>
</b-button-group>
</template>
<template v-slot:cell(skillName)="data">
<a :href="getUrl(data.item)">{{ data.value }}</a>
</template>
Expand Down Expand Up @@ -180,6 +192,17 @@ limitations under the License.
getUrl(item) {
return `/administrator/projects/${encodeURIComponent(this.projectId)}/subjects/${encodeURIComponent(item.subjectId)}/skills/${encodeURIComponent(item.skillId)}/`;
},
calculateClientDisplayRoute(props) {
const routeObj = {
name: 'ClientDisplayPreview',
params: {
projectId: this.$route.params.projectId,
userId: props.item.userId,
},
};
return routeObj;
},
},
};
</script>

0 comments on commit 397c571

Please sign in to comment.