Skip to content

Commit

Permalink
Merge pull request #17 from ucdavis/fix/raps-add-person-link
Browse files Browse the repository at this point in the history
Adding a link from all permission members page to search for a user
  • Loading branch information
bsedwards authored Feb 23, 2024
2 parents b079bf9 + eb93ce7 commit 86eda68
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/Areas/RAPS/Controllers/MembersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public async Task<ActionResult<IEnumerable<MemberSearchResult>>> Get(string sear
.Where(u => (u.DisplayFirstName + " " + u.DisplayLastName).Contains(search)
|| (u.MailId != null && u.MailId.Contains(search))
|| (u.LoginId != null && u.LoginId.Contains(search))
|| (u.MothraId == search)
)
.Where(u => active == "all" || (active == "recent" && u.MostRecentTerm != null && u.MostRecentTerm >= DateTime.Now.Year * 100) || u.Current)
.OrderBy(u => u.DisplayLastName)
Expand Down
9 changes: 7 additions & 2 deletions web/Areas/RAPS/Views/Members/List.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,16 @@
if(includeInactive) {
this.includeInactive = includeInactive
}
var urlSearch = this.urlParams.get("search")
var userSearch = getItemFromStorage("RAPS_userSearch_userSearch")
if(userSearch) {
if(urlSearch) {
this.userSearch = urlSearch
}
else if (userSearch) {
this.userSearch = userSearch
this.findUsers()
}
this.findUsers()
},
watch: {
userSearch: {
Expand Down
5 changes: 5 additions & 0 deletions web/Areas/RAPS/Views/Permissions/AllMembers.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
</template>
</q-input>
</template>
<template v-slot:body-cell-member="props">
<q-td :props="props">
<a :href="'UserSearch?search=' + props.row.memberId">{{props.row.memberName}}</a>
</q-td>
</template>
</q-table>

@section Scripts {
Expand Down

0 comments on commit 86eda68

Please sign in to comment.