This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 7188b91b Show explicit member status
7188b91b is described below
commit 7188b91b2eed59382c97be944942dc6dff4c3f21
Author: Sebb <[email protected]>
AuthorDate: Thu May 18 16:53:01 2023 +0100
Show explicit member status
---
www/roster/main.rb | 3 ++-
www/roster/views/committerSearch.js.rb | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/www/roster/main.rb b/www/roster/main.rb
index da1d95bf..ad195644 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -138,10 +138,11 @@ get '/committer/index.json' do
map {|person, list| [person, list.map(&:first)]}]
ASF::Person.preload(['id','name','mail','githubUsername'])
+ member_statuses = ASF::Member.member_statuses
# build a list of people, their public-names, and email addresses
index = ASF::Person.list.sort_by(&:id).map {|person|
result = {id: person.id, name: person.public_name, mail: mail[person],
githubUsername: person.attrs['githubUsername'] || []}
- result[:member] = true if person.asf_member?
+ result[:asf_member_status] = member_statuses[person.id]
result
}.to_json
diff --git a/www/roster/views/committerSearch.js.rb
b/www/roster/views/committerSearch.js.rb
index b8fad901..e09c50a6 100644
--- a/www/roster/views/committerSearch.js.rb
+++ b/www/roster/views/committerSearch.js.rb
@@ -119,8 +119,10 @@ class CommitterSearch < Vue
_td 'notinavail'
end
- if person.member
+ if person.asf_member_status == :current
_td {_b person.name}
+ elsif person.asf_member_status
+ _td { _i "#{person.name} (#{person.asf_member_status})" }
else
_td person.name
end