for origami view file
This commit is contained in:
@@ -109,6 +109,7 @@ GEM
|
|||||||
nokogiri (1.7.2)
|
nokogiri (1.7.2)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
pdf-core (0.7.0)
|
pdf-core (0.7.0)
|
||||||
|
pg (0.20.0)
|
||||||
prawn (2.2.2)
|
prawn (2.2.2)
|
||||||
pdf-core (~> 0.7.0)
|
pdf-core (~> 0.7.0)
|
||||||
ttfunk (~> 1.5)
|
ttfunk (~> 1.5)
|
||||||
@@ -244,6 +245,7 @@ DEPENDENCIES
|
|||||||
kaminari (~> 0.16.3)
|
kaminari (~> 0.16.3)
|
||||||
listen (~> 3.0.5)
|
listen (~> 3.0.5)
|
||||||
mysql2 (>= 0.3.18, < 0.5)
|
mysql2 (>= 0.3.18, < 0.5)
|
||||||
|
pg
|
||||||
prawn
|
prawn
|
||||||
prawn-table
|
prawn-table
|
||||||
puma (~> 3.0)
|
puma (~> 3.0)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class Crm::HomeController < BaseCrmController
|
|||||||
def print_order
|
def print_order
|
||||||
|
|
||||||
@booking = Booking.find(params[:id])
|
@booking = Booking.find(params[:id])
|
||||||
|
|
||||||
unique_code="CrmOrderPdf"
|
unique_code="CrmOrderPdf"
|
||||||
|
|
||||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
|||||||
@@ -42,14 +42,27 @@ $(function(){
|
|||||||
$(".summary-items tbody tr").remove();
|
$(".summary-items tbody tr").remove();
|
||||||
$("#cancel").removeAttr("disabled");
|
$("#cancel").removeAttr("disabled");
|
||||||
$("#assign").removeAttr("disabled");
|
$("#assign").removeAttr("disabled");
|
||||||
$("#crm_print").removeAttr("disabled");
|
|
||||||
//$("#crm_print").val($(this).attr('data'));
|
|
||||||
|
$("#crm_print").removeAttr("disabled");
|
||||||
|
|
||||||
var url = $(this).attr('data-ref');
|
var url = $(this).attr('data-ref');
|
||||||
show_details(url);
|
show_details(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.crm_print').click(function() {
|
||||||
|
var id = $(this).val();
|
||||||
|
alert(id)
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: "crm/print/"+id,
|
||||||
|
data: {},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('.assign').click(function(e){
|
$('.assign').click(function(e){
|
||||||
var booking_id = $(this).val()
|
var booking_id = $(this).val()
|
||||||
|
|||||||
@@ -105,24 +105,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
$('.crm_print').click(function() {
|
|
||||||
var id = "BKI-000000000004"
|
|
||||||
$.ajax({
|
|
||||||
type: "GET",
|
|
||||||
url: "crm/print/"+id,
|
|
||||||
data: {},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
/*if(data.status == true && data.type == "cancel")
|
|
||||||
{
|
|
||||||
alert('Booking has canceled!');
|
|
||||||
}else{
|
|
||||||
alert('Booking has completed!');
|
|
||||||
}
|
|
||||||
location.reload();*/
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user