update crm layout

This commit is contained in:
Aung Myo
2017-06-09 11:55:50 +06:30
parent 35277ac000
commit e2e8045d0f
13 changed files with 98 additions and 85 deletions

View File

@@ -38,7 +38,6 @@
$(function(){
$(".booking_click").on("click", function(){
$(this).css('background-color', '#CCC');
$(".summary-items tbody tr").remove();
$("#cancel").removeAttr("disabled");
$("#assign").removeAttr("disabled");
@@ -94,7 +93,6 @@ $(function(){
$(".customer_detail").on("click", function(){
$(this).css('background-color', '#CCC');
$(".summary-items tbody tr").remove();
$("#crm_print").removeAttr("disabled");
var id = $(this).attr('data-ref');
@@ -118,13 +116,14 @@ function show_details(url_item){
success: function(data) {
item_data = data.order_items;
//console.log(item_data.length);
$("#table").text(data.table_name)
$("#order_at").text(data.checkin_at)
$("#order_by").text(data.checkin_by)
$("#assign").val(data.id)
$("#cancel").val(data.id)
$('.no_record').addClass('hide');
for(var field in item_data) {
if (item_data[field].item_name){
var price = parseFloat(item_data[field].price).toFixed(2);
@@ -157,13 +156,14 @@ function customer_details(id){
$("#for-booking").remove();
var div_data = "<strong>CUSTOMER DETAILS</strong>";
$("#order-title").replaceWith(div_data);
$('.no_record').addClass('hide');
$('.customer-detail').removeClass('hide') ;
$("#cus_name").text(data.name)
$("#cus_email").text(data.email)
$("#cus_contact_no").text(data.contact_no)
if(item_data.length>0){
for(var field in item_data) {
if (item_data[field].item_name){
@@ -178,7 +178,8 @@ function customer_details(id){
$(".summary-items tbody").append(row);
}
}else{
$('.no_record').removeClass('hide');
$("#crm_print").attr("disabled","disabled");
}
}
});