74 lines
2.8 KiB
Plaintext
74 lines
2.8 KiB
Plaintext
<div>
|
|
<h1 class="p-1 text-4xl font-bold border-b-2 border-hsrm-red">Profile</h1>
|
|
<ul>
|
|
<li>Name: <%= current_user.name %>
|
|
<% if is_admin_or_operator? %>
|
|
<p class="inline badge"><%= current_user.role %></p>
|
|
<% end %>
|
|
</li>
|
|
<li>E-Mail: <%= current_user.email %></li>
|
|
<% if current_user.verified? %>
|
|
<p>
|
|
E-Mail is verified
|
|
</p>
|
|
<% else %>
|
|
<p>
|
|
<div>
|
|
Please validate your E-mail-adress (<%= button_to 'Re-send verification email', identity_email_verification_path, form_class: "inline" %>)
|
|
</div>
|
|
</p>
|
|
<% end %>
|
|
</ul>
|
|
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Aufgegebene Druckaufträge</h2>
|
|
<p>
|
|
Aufgegebene Druckaufträge
|
|
<%= current_user.customer_jobs.size %>
|
|
</p>
|
|
<p>
|
|
Abgebrochene Druckaufgräge
|
|
<%= current_user.customer_jobs.canceled.size %>
|
|
</p>
|
|
<% if is_admin_or_operator? %>
|
|
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Bearbeitete Druckaufträge</h2>
|
|
<p>
|
|
Gedruckte Druckaufträge
|
|
<%= current_user.operator_jobs.paid.size %>
|
|
</p>
|
|
<% end %>
|
|
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Actions</h2>
|
|
<div>
|
|
<%= link_to "Change password", edit_password_path %>
|
|
</div>
|
|
<div>
|
|
<%= link_to "Change email address", edit_identity_email_path %>
|
|
</div>
|
|
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Access history</h2>
|
|
<div>
|
|
<%= link_to "Devices & Sessions", sessions_path %>
|
|
</div>
|
|
<br>
|
|
<%= button_to "Log out", Current.session, method: :delete, class: "btn btn-primary" %>
|
|
</div>
|
|
<h1 class="py-4 text-4xl font-bold text-hsrm-gray">Die letzten 10 Druckaufträge</h1>
|
|
<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: current_user.customer_jobs.order(created_at: :desc).limit(10), as: :job, locals: { no_actions: true } %>
|
|
</tbody>
|
|
</table>
|
|
</div> |