update crm customer and bind customer and queue
This commit is contained in:
@@ -73,6 +73,8 @@
|
||||
|
||||
<span class="patch_method"></span>
|
||||
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
|
||||
<input type="hidden" id="table_id" name="table_id" value="<%= @dining_facility.id %>" />
|
||||
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
@@ -171,6 +173,7 @@
|
||||
<div class="form-group">
|
||||
<label>Select Member Group</label>
|
||||
<select class="selectpicker form-control col-md-12" name="member_group_id">
|
||||
<option value="">Select Membership Group</option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
@@ -186,9 +189,9 @@
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<br>
|
||||
<a href="<%= origami_root_path%>" class="btn btn-primary">
|
||||
<button id="back" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -292,8 +295,14 @@
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
|
||||
window.location.href = '/origami'
|
||||
var id = $("#table_id").val()
|
||||
var type = $("#type").val()
|
||||
if (type=="Table") {
|
||||
window.location.href = '/origami/table/'+id
|
||||
}else{
|
||||
window.location.href = '/origami/room/'+id
|
||||
}
|
||||
|
||||
}else{
|
||||
alert('Record not found!');
|
||||
location.reload();
|
||||
@@ -307,4 +316,27 @@
|
||||
});
|
||||
}
|
||||
|
||||
$('#back').on('click',function(){
|
||||
var id = $("#table_id").val()
|
||||
var type = $("#type").val()
|
||||
if (type=="Table") {
|
||||
window.location.href = '/origami/table/'+id
|
||||
}else{
|
||||
window.location.href = '/origami/room/'+id
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
class CreateDiningQueues < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :dining_queues do |t|
|
||||
t.string :name
|
||||
t.string :contact_no
|
||||
t.string :queue_no
|
||||
t.string :status
|
||||
t.references :dining_facility, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user