Merge branch 'r-1902001-01-dev' of gitlab.com:code2lab/SXRestaurant into r-1902001-01-dev

This commit is contained in:
Myat Zin Wai Maw
2019-09-11 18:18:13 +06:30
9 changed files with 91 additions and 64 deletions

View File

@@ -29,4 +29,4 @@ if @status == true
else
json.status false
json.error_message @error_message
end
end

View File

@@ -64,7 +64,7 @@
<%end %>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
<%= paginate @crm_customers %>
@@ -78,8 +78,8 @@
<button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
<button id="qr_code" class="btn btn-danger btn-md">
<span class="fa fa-credit-card"></span> QR CODE
</button>
</button>
</td>
</tr>-->
<tr>
@@ -124,6 +124,7 @@
<% end %>
</td>
<td><%= crm_customer.card_no rescue '-' %></td>
<td><%= crm_customer.paypar_account_no rescue '-' %></td>
<td>
<% if crm_customer.membership_id.nil? && !crm_customer.membership_type.nil? && !crm_customer.membership_type.blank? && !crm_customer.paypar_account_no.blank? && !crm_customer.paypar_account_no.nil? %>
<%= link_to t("views.btn.sync"), crm_customer_sync_path(crm_customer), :class => "btn btn-md bg-green waves-effect" %>
@@ -140,7 +141,7 @@
<% end %>
</tbody>
</table>
</div>
</div>
<% if @create_flag %>
@@ -182,10 +183,10 @@
// QR Code Reader
$("#qr_code").on('click', function(e){
var code = "";
var code = "";
setTimeout(function(){
code=getQRCode();
setQRCode(code);
setQRCode(code);
},100);
});
@@ -203,12 +204,12 @@
/*new customer UI func:*/
//Initialize tooltips
$('.nav-tabs > li a[title]').tooltip();
//Wizard
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
var $target = $(e.target);
if ($target.parent().hasClass('disabled')) {
return false;
}
@@ -260,10 +261,10 @@
url: url,
data: {},
dataType: "json",
success: function(data) {
// Selected for Taxes
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
success: function(data) {
// Selected for Taxes
var taxes = JSON.stringify(data.tax_profiles);
var parse_taxes = JSON.parse(taxes);
$.each(parse_taxes, function(i, value){
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
});
@@ -276,7 +277,7 @@
$('#customer_salutation').val(data.salutation);
$('#customer_nrc_no').val(data.nrc_no);
$('#customer_card_no').val(data.card_no);
$('#customer_type').val(data.customer_type);
$('#customer_type').val(data.customer_type);
$('#paypar_account_no').val(data.paypar_account_no);
$('#customer_address').val(data.address);
$('#customer_date_of_birth').val(data.date_of_birth);

View File

@@ -10,16 +10,16 @@
<!-- <th><%= t("views.right_panel.detail.created_by") %></th>
<th><%= t("views.right_panel.detail.created_time") %></th> -->
</tr>
<% cate_arr = Array.new %>
<% cate_arr = Array.new %>
<%
count = 0
@inventory_definitions.each do |item|
count = 0
@inventory_definitions.each do |item|
count += 1
%>
%>
<tr>
<% if !cate_arr.include?(item.menu_category_id) %>
<% if !cate_arr.include?(item.menu_category_id) %>
<td><%= item.menu_category_name %></td>
<% cate_arr.push(item.menu_category_id) %>
<% else %>
@@ -72,4 +72,4 @@
window.location.href = '/inventory/'+ID+'/show';
});
</script>
</script>