finished customer and join membership in crm
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
<% @i = 0 %>
|
||||
<% @booking.each do |booking| %>
|
||||
<% if booking.booking_status == "assign" %>
|
||||
<% if booking.booking_status == "new" %>
|
||||
<div class="card">
|
||||
<div class="card-block booking_click" data-ref="<%= api_booking_path booking.id%>" id="card-block booking_block" style="width:100%;">
|
||||
<div class="card-block booking_click" data-ref="<%= api_booking_path booking.id%>" id="card-block booking_block" style="width:100%;" data="<%= booking.id %>">
|
||||
<h4 class="card-title">
|
||||
<%= @i += 1 %> . <%= booking.dining_facility.name %>
|
||||
- <%= booking.id %>
|
||||
@@ -36,14 +36,20 @@
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
|
||||
|
||||
$(".booking_click").on("click", function(){
|
||||
$(".summary-items tbody tr").remove();
|
||||
$("#cancel").removeAttr("disabled");
|
||||
$("#assign").removeAttr("disabled");
|
||||
var url = $(this).attr('data-ref');alert(url);
|
||||
$("#crm_print").removeAttr("disabled");
|
||||
$("#crm_print").attr('data',$(this).attr('data'));
|
||||
var url = $(this).attr('data-ref');
|
||||
show_details(url);
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.assign').click(function(e){
|
||||
var booking_id = $(this).val()
|
||||
var type = $(this).attr("data-type")
|
||||
@@ -58,6 +64,8 @@ $(function(){
|
||||
update_booking(booking_id,type)
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function show_details(url_item){
|
||||
@@ -97,7 +105,7 @@ function show_details(url_item){
|
||||
function update_booking(booking_id,type) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "crm/update_booking/" ,
|
||||
url: "update_booking/" ,
|
||||
data: {booking_id:booking_id,type:type},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
|
||||
Reference in New Issue
Block a user