Skip to content

Commit

Permalink
Display position and title.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Nov 12, 2024
1 parent 818a47a commit 9189f12
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/user_job_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ class UserJobRole < ApplicationRecord
belongs_to :user
belongs_to :job_role
belongs_to :manager_user, optional: true, class_name: :User
has_many :managed_user_job_roles, foreign_key: :manager_user_id, class_name: :UserJobRole
end
15 changes: 15 additions & 0 deletions app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<% content_for :head do %>
<%= append_javascript_pack_tag 'stimulus' %>
<% end %>

<section class="container mt-4">
<div class="row">
<div class="col-12">
<% if current_user.user_job_roles.any? %>
<% current_user.user_job_roles.each do |role| %>
<h4><%= role.title %> <small class="text-muted float-end"><%= role.company %></small></h4>

<% end %>
<% else %>
<p class="text-muted">No job roles found.</p>
<% end %>
</div>
</div>
</section>

0 comments on commit 9189f12

Please sign in to comment.