crm update

This commit is contained in:
Aung Myo
2017-06-11 18:00:34 +06:30
parent 9c228dce5c
commit d65882ac5b
10 changed files with 146 additions and 75 deletions

View File

@@ -69,8 +69,10 @@
<div class="col-lg-4">
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
<span class="patch_method"></span>
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
<%= f.error_notification %>
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
<div class="form-group">
@@ -95,24 +97,14 @@
<%= f.text_field :date_of_birth,:class=>"form-control date_of_birth datepicker"%>
</div>
<div class="form-group">
<select class="selectpicker form-control col-md-12" name="membership_id">
<option>Select Member Group</option>
<% @member_group.each do |member| %>
<option value="<%= member["id"] %>">
<%= member["name"] %></option>
<%end %>
</select>
</div>
<div class="form-group">
<!-- <div class="form-group">
<%= f.input :membership_type, :class => "form-control col-md-6 membership_type" %>
</div>
<div class="form-group">
<%= f.input :membership_authentication_code, :class => "form-control col-md-6 membership_authentication_code" %>
</div>
-->
<div class="form-group">
<%= f.button :submit, "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
<%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update_customer' %>
@@ -140,11 +132,11 @@
$(document).on('click',".checkbox_check",function(){
if(this.checked){
var sale_id = $("#sale_id").val() || 0;
var sale_id = $("#sale_id").val() || 0;
var customer_id = $(this).val();
if(sale_id != 0){
var url = "../"+customer_id;
// var url = "/"+customer_id;
update_sale(customer_id,sale_id);
}else{
@@ -201,7 +193,7 @@
action: function(){
$.ajax({
type: "POST",
url: "../../update_sale/" ,
url: "update_sale/" ,
data: {customer_id:customer_id,sale_id:sale_id},
dataType: "json",
success: function(data) {

View File

@@ -76,8 +76,9 @@ $(function(){
//End Print Click
$('.assign').click(function(e){
var booking_id = $(this).val()
var type = $(this).attr("data-type")
var booking_id = $(this).val();
var type = $(this).attr("data-type");
alert(booking_id);
update_booking(booking_id,type)
});
@@ -190,7 +191,7 @@ function update_booking(booking_id,type) {
//Start Ajax
$.ajax({
type: "POST",
url: "update_booking/" ,
url: "crm/update_booking/" ,
data: {booking_id:booking_id,type:type},
dataType: "json",
success: function(data) {

View File

@@ -3,7 +3,7 @@
<!-- Column One -->
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<!-- <ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#queue" role="tab">Queue <span class="badge badge-pill badge-default"><%= @queue.count %></span></a>
</li>
@@ -13,7 +13,7 @@
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#customer" role="tab">Customers</a>
</li>
</ul>
</ul> -->
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px; overflow-y:scroll">