queue and crm view updated

This commit is contained in:
Aung Myo
2017-06-09 09:29:25 +06:30
parent ea4f50e779
commit 35277ac000
41 changed files with 685 additions and 318 deletions

View File

@@ -0,0 +1,2 @@
json.extract! crm_dining_queue, :id, :name, :contact, :queue_no, :created_at, :updated_at
json.url crm_dining_queue_url(crm_dining_queue, format: :json)

View File

@@ -0,0 +1,16 @@
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :name %>
<%= f.input :contact_no %>
<%= f.input :queue_no %>
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>

View File

@@ -0,0 +1,11 @@
<div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li><a href="<%= crm_dining_queues_path %>">Queue</a></li>
<li>Edit</li>
</ul>
</div>
<%= render 'form', dining_queue: @dining_queue %>
</div>

View File

@@ -0,0 +1,38 @@
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= %>">Home</a></li>
<li>Queue</li>
<span style="float: right">
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
</span>
</ul>
</div>
<br>
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th style="width:25%">Name</th>
<th style="width:25%">Contact No</th>
<th style="width:25%">Queue No</th>
<th style="width:25%">Action</th>
</tr>
</thead>
<tbody>
<% @dining_queues.each do |dining_queue| %>
<tr>
<td><%= dining_queue.name %></td>
<td><%= dining_queue.contact_no %></td>
<td><%= dining_queue.queue_no %></td>
<td>
<%= link_to 'Edit', edit_crm_dining_queue_path(dining_queue) %> | <%= link_to 'Destroy', crm_dining_queue_path(dining_queue), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
</div>

View File

@@ -0,0 +1 @@
json.array! @crm_dining_queues, partial: 'crm_dining_queues/crm_dining_queue', as: :crm_dining_queue

View File

@@ -0,0 +1,11 @@
<div class="span12">
<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li><a href="<%= crm_dining_queues_path %>">Queue</a></li>
<li>New</li>
</ul>
</div>
<%= render 'form', dining_queue: @dining_queue %>
</div>

View File

@@ -0,0 +1,19 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @crm_dining_queue.name %>
</p>
<p>
<strong>Contact:</strong>
<%= @crm_dining_queue.contact %>
</p>
<p>
<strong>Queue no:</strong>
<%= @crm_dining_queue.queue_no %>
</p>
<%= link_to 'Edit', edit_crm_dining_queue_path(@crm_dining_queue) %> |
<%= link_to 'Back', crm_dining_queues_path %>

View File

@@ -0,0 +1 @@
json.partial! "crm_dining_queues/crm_dining_queue", crm_dining_queue: @crm_dining_queue