crm update
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user