Skip to content

Commit

Permalink
UI of good and bad events.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Nov 15, 2024
1 parent a610f89 commit 03c9c29
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions app/views/home/_user_job_roles.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<% user_job_roles.each do |role| %>
<h4><%= role.user.chinese_name -%> <small class="text-muted"><%= role.title %></small> <small class="text-muted float-end"><%= role.company %></small></h4>
<h4>
<span class="float-start"><%= role.user.chinese_name -%></span>
&nbsp;
<small class="text-muted"><%= role.title %></small>
<small class="text-muted float-end"><%= role.company %></small>
</h4>
<div class="row">
<% role.managed_user_job_roles.each do |managed_role| %>
<% user = managed_role.user %>
<div class="col-3">
<div class="card my-3">
<div class="card-body">
<div class="card bg-transparent my-3">
<div class="card-header">
<span class="badge rounded-pill text-bg-success float-start"><%= user.good_events_count -%></span>
<span class="badge rounded-pill text-bg-danger float-end"><%= user.bad_events_count -%></span>
</div>
<div class="card-body bg-white">
<div class="text-center">
<div><%= managed_role.user.chinese_name %></div>
<div><%= user.chinese_name %></div>
<small class="text-muted"><%= managed_role.title %></small>
</div>
</div>
Expand Down

0 comments on commit 03c9c29

Please sign in to comment.