Latest updates

This commit is contained in:
2022-04-07 12:45:09 +01:00
parent 557b43c911
commit 21b42c69a5
25 changed files with 412 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
<h1>CAF Compliance Tracking</h1>
<h2>By Hidden Agenda Ltd</h2>
<% if !user_signed_in? %>
Not Signed in.
@@ -7,11 +6,28 @@ Not Signed in.
<% else %>
<%#= current_user.roletxt %>
<% if current_user.admin? %>
<h2>Companies</h2>
<%= link_to "Add Company", new_company_path %>
<h3>Companies <small><%= link_to "Add Company", new_company_path %></small></h3>
<ul>
<% @companies.each do |company| %>
<li><%= company.name %> <%= link_to "Edit", edit_company_path(company) %>
<ul>
<% company.users.each do |user|%>
<li><%= user.email %></li>
<% end %>
<li>Add user</li>
</ul>
<ul>
<% company.cafs.each do |caf| %>
<li><%= caf.name %>
<% end %>
<li><%= link_to "Add CAF", new_company_caf_path(company) %></li>
</ul>
<% end %>
</ul>
<p>
<%= link_to "Add User" %>
</p>
<% end %>
<% if current_user.user? %>