update gem file

This commit is contained in:
Yan
2017-06-07 18:09:56 +06:30
10 changed files with 154 additions and 52 deletions

View File

@@ -13,7 +13,6 @@ if (@booking)
@total_amount = 0.00
@total_tax = 0.00
@booking_orders = BookingOrder.where("booking_id = #{@booking.booking_id}").all;
if @booking.booking_orders
order_items = []
@booking.booking_orders.each do |bo|

View File

@@ -8,7 +8,7 @@
<%= f.input :contact_no %>
<%= f.input :email %>
<%= f.input :date_of_birth %>
<%= f.input :membership_id, :collection => @membership %>
<%= f.input :membership_type %>
<%= f.input :membership_authentication_code %>
</div>

View File

@@ -1,41 +1,110 @@
<p id="notice"><%= notice %></p>
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="<%= dashboard_path %>">Home</a></li>
<li class="active">
<a href="<%= crm_customers_path %>">Customer</a>
</li>
<a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
</a>
</ol>
</div>
</div>
<br/>
<h1>Crm Customers</h1>
<div class="row">
<div class="col-lg-7">
<div class="main-box-body clearfix">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Company</th>
<th>Contact no</th>
<th>Email</th>
</tr>
</thead>
<table>
<thead>
<tr>
<th>Name</th>
<th>Company</th>
<th>Contact no</th>
<th>Email</th>
<th>Date of birth</th>
<th>Membership</th>
<th>Membership type</th>
<th>Membership authentication code</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<tbody>
<% @crm_customers.each do |crm_customer| %>
<tr>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.company %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= crm_customer.date_of_birth %></td>
<td><%= crm_customer.membership_id %></td>
<td><%= crm_customer.membership_type %></td>
<td><%= crm_customer.membership_authentication_code %></td>
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
<td><%= link_to 'Edit', edit_crm_customer_path(crm_customer) %></td>
<td><%= link_to 'Destroy', crm_customer_path(crm_customer), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<br>
<div class="col-lg-5">
<%= simple_form_for crm_customers_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="form-group">
<%= f.input :name, :class => "form-control col-md-6" %>
</div>
<div class="form-group">
<%= f.input :company, :class => "form-control col-md-6" %>
</div>
<div class="form-group">
<%= f.input :contact_no, :class => "form-control col-md-6" %>
</div>
<div class="form-group">
<%= f.input :email, :class => "form-control col-md-6" %>
</div>
<%= link_to 'New Crm Customer', new_crm_customer_path %>
<div class="form-group">
<label for="date_of_birth" class="col-md-6 control-label">Date Of Birth</label>
<%= f.text_field :date_of_birth,:class=>"form-control datepicker",:readonly =>true, :value => @date_of_birth%>
</div>
<div class="form-group">
<%= f.select :membership_id, options_for_select(@membership.collect { |member|
[member["id"].name.titleize, member["id"].id] }, 1), {}, { id: 'countries_select' } %>
<select class="selectpicker form-control col-md-6" name="membership_id">
<option>Select Member Group</option>
<% @membership.each do |member| %>
<option value="<%= member["id"] %>">
<%= member["name"] %></option>
<%end %>
</select>
</div>
<div class="form-group">
<%= f.input :membership_type, :class => "form-control col-md-6" %>
</div>
<div class="form-group">
<%= f.input :membership_authentication_code, :class => "form-control col-md-6" %>
</div>
<div class="form-group">
<%= f.button :submit, "Submit", :class => 'btn btn-primary' , :id => 'submit_account' %>
</div>
<%end%>
</div>
</div>
<script type="text/javascript">
$(function () {
if (jQuery().datepicker) {
$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
});
$('.datepicker').attr('ReadOnly','true');
$('.datepicker').css('cursor','pointer');
}
});
</script>