Initial admin/user index/show
This commit is contained in:
33
app/views/admin/users/show.html.erb
Normal file
33
app/views/admin/users/show.html.erb
Normal file
@@ -0,0 +1,33 @@
|
||||
<div>
|
||||
<h1 class="font-bold text-4xl">Benutzer Details</h1>
|
||||
<%= render partial: 'user', locals: { user: @user } %>
|
||||
</div>
|
||||
<p>Some Stats:
|
||||
<ul>
|
||||
<li>Druckaufträge insgesammt: <%= @user.jobs_as_costumer.count %></li>
|
||||
<li>davon abgebrochen: <%= @user.jobs_as_costumer.canceled.count %></li>
|
||||
<li>letzten 5 Druckaufträge</li>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="min-w-full overflow-auto shadow-lg">
|
||||
<table class="w-full py-8 table-auto">
|
||||
<thead class="font-semibold tracking-wide bg-gray-200 border-b-2 border-gray-300 text text-hsrm-gray">
|
||||
<tr>
|
||||
<th class="w-1 p-2 py-3 text-center"> ID </th>
|
||||
<th class="w-1 p-2 py-3 text-center"> Vorschau </th>
|
||||
<th class="w-1 p-2 py-3 text-left"> Auftraggeber </th>
|
||||
<th class="p-2 py-3 text-left"> PDF </th>
|
||||
<th class="w-1 p-1 py-3 text-left"> A0 </th>
|
||||
<th class="w-1 p-1 py-3 text-left"> A1 </th>
|
||||
<th class="w-1 p-1 py-3 text-left"> A2 </th>
|
||||
<th class="w-1 p-1 py-3 text-left"> A3 </th>
|
||||
<th class="w-1 p-2 py-3 text-center text-nowrap"> no DIN </th>
|
||||
<th class="w-1 p-2 py-3 text-center"> Kosten </th>
|
||||
<th class="w-1 p-2 py-3 text-center"> Status </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='jobs' class="divide-y divivde-gray-300">
|
||||
<%= render partial: "jobs/job_tr", collection: @user.jobs_as_costumer.limit(5), as: :job, locals: { no_actions: true } %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user