obdev/app/views/workers/show.html.erb

46 lines
1.4 KiB
Plaintext

<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-6">
<h1 class="mb-4 text-center">Worker Details</h1>
<div class="card">
<div class="card-body">
<p class="card-text">
<strong>Name:</strong>
<%= @worker.first_name %> <%= @worker.last_name %>
</p>
<p class="card-text">
<strong>Address:</strong>
<%= [@worker.address_line_1, @worker.address_line_2, @worker.city, @worker.state, @worker.zip].reject(&:blank?).join(', ') %>
</p>
<p class="card-text">
<strong>Phone:</strong>
<%= @worker.phone %>
</p>
<p class="card-text">
<strong>Email:</strong>
<%= @worker.email %>
</p>
<p class="card-text">
<strong>DOB:</strong>
<%= @worker.dob %>
</p>
<p class="card-text">
<strong>SSN:</strong>
<%= @worker.ssn %>
</p>
<p class="card-text">
<strong>Gender:</strong>
<%= @worker.gender %>
</p>
</div>
</div>
<div class="mt-3 d-flex justify-content-between">
<%= link_to 'Edit', edit_worker_path(@worker), class: "btn btn-dark" %>
<%= link_to 'Back to List', workers_path, class: "btn btn-secondary" %>
</div>
</div>
</div>
</div>