164 lines
6.2 KiB
Plaintext
164 lines
6.2 KiB
Plaintext
<div class="row">
|
|
<div class="col-lg-10 col-md-10 col-sm-10">
|
|
<!-- Column One -->
|
|
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" data-toggle="tab" href="#queue" role="tab">Customer Details </a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link " data-toggle="tab" href="#booking" role="tab">Orders </a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-toggle="tab" href="#customer" role="tab">Sales</a>
|
|
</li>
|
|
</ul>
|
|
<!-- Nav tabs - End -->
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane active" id="queue" role="tabpanel"">
|
|
<div class="row">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
<br>
|
|
<h4>Customer Profile</h4>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
<tr>
|
|
<th>Name</th>
|
|
<td><%= @crm_customer.name %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Email</th>
|
|
<td><%= @crm_customer.email %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Contact no</th>
|
|
<td><%= @crm_customer.contact_no %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Company</th>
|
|
<td><%= @crm_customer.company %></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Date Of Birth</th>
|
|
<td><%= @crm_customer.date_of_birth %> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
<h4>Membership Detail</h4>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
<% if @membership == 0 %>
|
|
<tr>
|
|
<td colspan="2">"There is no membership data"</td>
|
|
</tr>
|
|
<% else %>
|
|
<% @membership.each do |member| %>
|
|
<tr>
|
|
<th><%= member["accountable_type"] %></th>
|
|
<td><%= member["balance"] %></td>
|
|
</tr>
|
|
<% end %>
|
|
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane" id="booking" role="tabpanel">
|
|
<h3>Order Details</h3>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Order ID</th>
|
|
<th>Menu Item</th>
|
|
<th>QTY</th>
|
|
<th>Unit Price </th>
|
|
<th>Option</th>
|
|
<th>Status</th>
|
|
<th>Waiter</th>
|
|
<th>Created at </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @order_items.each do |order_item| %>
|
|
<tr>
|
|
<td><%= order_item.order_id %></td>
|
|
<td><%= order_item.item_name %></td>
|
|
<td><%= order_item.qty %></td>
|
|
<td><%= order_item.price %></td>
|
|
<td><%= order_item.options %></td>
|
|
<td><%= order_item.order_item_status %></td>
|
|
<td><%= order_item.item_order_by %> </td>
|
|
<td><%= order_item.created_at.strftime("%d-%m-%y") %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane" id="customer" role="tabpanel">
|
|
<h3>Sale Details</h3>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Sale ID </th>
|
|
<th>Menu Item</th>
|
|
<th>QTY</th>
|
|
<th>Unit Price </th>
|
|
<th>Tax Price</th>
|
|
<th>Created At</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @sale_items.each do |sale_item| %>
|
|
<tr>
|
|
<td><%= sale_item.sale_id %></td>
|
|
<td><%= sale_item.product_name %></td>
|
|
<td><%= sale_item.qty %></td>
|
|
<td><%= sale_item.unit_price %></td>
|
|
|
|
<td><%= sale_item.taxable_price %></td>
|
|
<td><%= sale_item.created_at %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
|
<br><br>
|
|
<a href="<%= crm_customers_path%>" class="btn btn-primary pull">
|
|
<i class="fa fa-arrow-left fa-xs"></i> Back
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|