From 352037641b21586fbdd5c98940448d0dd9e885be Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 23 Aug 2017 19:55:17 +0630 Subject: [PATCH] update jade integration --- app/controllers/origami/customers_controller.rb | 2 +- app/views/origami/customers/index.html.erb | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index a8048ff1..9dfae470 100644 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -29,7 +29,7 @@ class Origami::CustomersController < BaseOrigamiController @crm_customers.date_of_birth = response["customer_data"]["DOB"] @crm_customers.nrc_no = response["customer_data"]["NRC"] @crm_customers.address = response["customer_data"]["address"] - @crm_customers.card_no = 121212 + @crm_customers.card_no = response["customer_data"]["customer_card_no"] @crm_customers.paypar_account_no = filter @crm_customers.membership_id = response["customer_data"]["id"] @crm_customers.membership_type = response["customer_data"]["member_group_id"] diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index a3fe9264..04b5225f 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -263,13 +263,19 @@ dataType: "json", success: function(data) { if (data.status == false) { - alert(data.message) + $.alert({ + title: 'Alert!', + content: data.message, + type: 'red', + typeAnimated: true, + btnClass: 'btn-danger', + }); } - - + if (data.status == undefined) { customer_id = data[0].customer_id; customer_name = data[0].name; update_sale(customer_id, customer_name,sale_id); + } } }); }