diff --git a/Pearlception/app/views/dashboard/index.html.erb b/Pearlception/app/views/dashboard/index.html.erb index fdaf05d..6d231d2 100644 --- a/Pearlception/app/views/dashboard/index.html.erb +++ b/Pearlception/app/views/dashboard/index.html.erb @@ -84,11 +84,18 @@ --> -

Recent Results

+ <% if current_user.admin? %> +

Recent Results From All Companies

+ <% else %> +

Recent Results

+ <% end %>
+ <% if current_user.admin? %> + + <% end %> @@ -99,6 +106,59 @@ + <% if current_user.admin? %> + <% @results.each_slice(1) do |row| %> + + <% row.each do |result| + run = Run.find(result.id) + #company = Company.find(run.company_id) + %> + + + + + + + + + + + + + + + + + + + + + + + + + <% end %> + + <% end %> + <% else %> <% @results.each_slice(1) do |row| %> <% row.each do |result| @@ -141,6 +201,7 @@ <% end %> <% end %> + <% end %>
CompanyRun Date Location Harvest Time
+ <%= #company.company_name + "Fake Industries" %> + + <%= run.runDate %> + + <%= run.location ? run.location : "" %> + + <%= "" %> + + + <%= run.supplier ? run.supplier : "" %> + + <%= run.distributor ? run.distributor : "" %> + + <%= result.total %> + + <%= run.other ? run.other : "" %> +