chore: init commit

in worker.../repo/GITFOLDER.zip is the .git folder.
This commit is contained in:
2026-08-11 14:44:09 -04:00
parent 0012380fd3
commit 2854619bc9
782 changed files with 65944 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
<div class="flex flex-col h-full w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice">
<%= notice %>
</p>
<% end %>
<header class="flex items-center justify-between px-6 py-4 border-b">
<h1 class="text-2xl font-bold py-2">Classrooms</h1>
<% if policy(Classroom).new? %>
<%= link_to "New classroom", new_classroom_path,
class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" %>
<% end %>
</header>
<main class="flex-1 p-6">
<%= render "shared/table_container" do %>
<thead>
<tr class="table-header-row">
<th class="table-header-cell table-header-cell-left">
<%= sort_link(:name, "Name") %>
</th>
<th class="table-header-cell table-header-cell-left">
Teacher(s)
</th>
<th class="table-header-cell table-header-cell-left">
<%= sort_link(:student_count, "Student Count") %>
</th>
<th class="table-header-cell table-header-cell-right">
<%= sort_link(:total_earnings, "Total Earnings") %>
</th>
<th class="table-header-cell table-header-cell-center">
Edit
</th>
</tr>
</thead>
<tbody>
<% if @classrooms.any? %>
<% @classrooms.each do |classroom| %>
<tr class="table-body-row">
<td class="table-body-cell">
<span class="table-cell-content">
<%= link_to classroom.name, classroom_path(classroom), class: "text-black underline hover:text-[var(--sitf-secondary-chart2)]" %>
</span>
</td>
<td class="table-body-cell py-4">
<div class="flex gap-1 overflow-x-auto py-1" style="max-width: 510px; min-height: 36px;">
<% if classroom.teachers.any? %>
<% classroom.teachers.each do |teacher| %>
<span class="inline-flex items-center px-2.5 py-1.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 border border-blue-200 whitespace-nowrap flex-shrink-0">
<i class="fas fa-user-tie mr-1 text-blue-600"></i>
<%= teacher.display_name %>
</span>
<% end %>
<% else %>
<span class="inline-flex items-center px-2.5 py-1.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500 border border-gray-200 whitespace-nowrap">
<i class="fas fa-user-slash mr-1 text-gray-400"></i>
No teacher assigned
</span>
<% end %>
</div>
</td>
<td class="table-body-cell">
<span class="table-cell-content">
<%= classroom.students.count %>
</span>
</td>
<td class="table-body-cell table-body-cell-right">
<span class="table-cell-content">
$<%= number_with_precision(classroom.students.sum { |s| s.portfolio&.calculate_total_value || 0 }, precision: 2) %>
</span>
</td>
<td class="table-body-cell table-body-cell-center">
<% if policy(classroom).edit? %>
<%= render partial: "components/action_icon_button",
locals: {
options: {
path: edit_classroom_path(classroom),
icon: "fa-pencil",
title: "Edit classroom",
aria_label: "Edit classroom",
text_class: "text-black"
}
} %>
<% else %>
<span class="table-no-permission">-</span>
<% end %>
</td>
</tr>
<% end %>
<% else %>
<tr class="table-body-row">
<td class="table-empty-cell" colspan="5">
<p class="text-lg">No classrooms found</p>
<p class="mt-2">Create your first classroom to get started!</p>
</td>
</tr>
<% end %>
</tbody>
<% end %>
</main>
</div>