upgrade version
This commit is contained in:
0
app/views/api/bill/create.json.jbuilder
Normal file → Executable file
0
app/views/api/bill/create.json.jbuilder
Normal file → Executable file
0
app/views/api/bookings/create.json.jbuilder
Normal file → Executable file
0
app/views/api/bookings/create.json.jbuilder
Normal file → Executable file
0
app/views/api/bookings/show.json.jbuilder
Normal file → Executable file
0
app/views/api/bookings/show.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/get_customer_order.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/get_customer_order.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/index.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/index.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/show.json.jbuilder
Normal file → Executable file
0
app/views/api/customers/show.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/create.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/create.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/show.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/show.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/update.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/update.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/view_orders.json.jbuilder
Normal file → Executable file
0
app/views/api/orders/view_orders.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/item_sets/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/item_sets/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/_menu.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/_menu.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/_menu_item.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/_menu_item.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_categories/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_categories/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_attributes/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_attributes/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_attributes/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_attributes/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_instances/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_instances/show.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_options/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/menu_item_options/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/zones/index.json.jbuilder
Normal file → Executable file
0
app/views/api/restaurant/zones/index.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/_card_read_form.html.erb
Normal file → Executable file
0
app/views/crm/customers/_card_read_form.html.erb
Normal file → Executable file
0
app/views/crm/customers/_crm_customer.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/_crm_customer.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/_form.html.erb
Normal file → Executable file
0
app/views/crm/customers/_form.html.erb
Normal file → Executable file
94
app/views/crm/customers/_new_form.html.erb
Normal file → Executable file
94
app/views/crm/customers/_new_form.html.erb
Normal file → Executable file
@@ -1,37 +1,37 @@
|
||||
<div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll">
|
||||
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<%= f.hidden_field :id, :class => "form-control " %>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Salutation :</label><br>
|
||||
<label>Mr</label>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%>
|
||||
<label>Miss</label>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%>
|
||||
<label>Mrs</label>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%>
|
||||
<label>Mdm</label>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%>
|
||||
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.mr") %></label>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%>
|
||||
<label><%= t("views.right_panel.detail.miss") %></label>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs", :style=>"width: 30px"%>
|
||||
<label><%= t("views.right_panel.detail.mrs") %></label>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss", :style=>"width: 30px"%>
|
||||
<label><%= t("views.right_panel.detail.mdm") %></label>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
<% flash.each do |test, msg| %>
|
||||
<%
|
||||
str="[\"#{msg['name']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Gender :</label><br>
|
||||
<label>Male</label>
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %></label>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%>
|
||||
<label>Female</label>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%>
|
||||
<label><%= t("views.right_panel.detail.female") %></label>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -45,28 +45,28 @@
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -75,18 +75,21 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Sr.No</label>
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Date Of Birth</label>
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Customer Type</label>
|
||||
<select class="selectpicker form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||
<select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
@@ -98,58 +101,53 @@
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Paypar Account No:</label>
|
||||
<div class="input-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="-group">
|
||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
|
||||
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Member Group</label>
|
||||
<select class="selectpicker form-control col-md-12" name="member_group_id" style="height: 40px" >
|
||||
<option value="">Select Membership Group</option>
|
||||
<label><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " >
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.button :submit, "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
|
||||
<%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update_customer' %>
|
||||
<%= f.button :button, "Reset",:class => 'btn btn-danger ', :id => 'reset' %>
|
||||
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
|
||||
<%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> -->
|
||||
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
|
||||
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
||||
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
<div id="sxModal-Content"><h3><%= t :card_tap %></h3></div>
|
||||
</div>
|
||||
<!-- The modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" style="margin-left:-380px">
|
||||
<div class="modal-content">
|
||||
|
||||
<!-- <div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabelLarge">Large Shoes</h4>
|
||||
</div> -->
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="container">
|
||||
<video autoplay="true" id="videoElement">
|
||||
|
||||
2
app/views/crm/customers/edit.html.erb
Normal file → Executable file
2
app/views/crm/customers/edit.html.erb
Normal file → Executable file
@@ -2,5 +2,5 @@
|
||||
|
||||
<%= render 'form', crm_customer: @crm_customer %>
|
||||
|
||||
<%= link_to 'Show', @crm_customers_path %> |
|
||||
<%= link_to t("views.btn.show"), @crm_customers_path %> |
|
||||
<%= link_to 'Back', crm_customers_path %>
|
||||
|
||||
0
app/views/crm/customers/edit.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/edit.json.jbuilder
Normal file → Executable file
255
app/views/crm/customers/index.html.erb
Normal file → Executable file
255
app/views/crm/customers/index.html.erb
Normal file → Executable file
@@ -1,108 +1,118 @@
|
||||
<!-- <div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
||||
<li class="active">
|
||||
<a href="<%= crm_customers_path %>">Customer</a>
|
||||
</li>
|
||||
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
|
||||
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
|
||||
</a>
|
||||
</ol>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||
<div class="input-append col-md-7 form-group pull-left">
|
||||
<input type="text" name="filter" style="margin-right:5px" placeholder="Search" id="search" class="form-control input-xs col-md-9">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
<button type="submit" class="btn btn-primary btn-md">Search</button>
|
||||
<!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> -->
|
||||
|
||||
<!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
|
||||
</div>
|
||||
<% end %>
|
||||
<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>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Select</th>
|
||||
<th>Sr.no</th>
|
||||
<th>Name</th>
|
||||
<th>Card No</th>
|
||||
<th>Contact no</th>
|
||||
<th>Email</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
|
||||
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<br>
|
||||
<a href="<%= dashboard_path%>" class="btn btn-primary">
|
||||
Back
|
||||
</a>
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :crm %></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||
<!-- <div class="main-box-body clearfix"> -->
|
||||
<div class="body table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<!-- <div class="table-responsive">
|
||||
<table class="table table-striped"> -->
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||
<!-- <div class=" col-md-7 form-group float-left">
|
||||
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control input-xs col-md-9">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
<button type="submit" class="float-right btn btn-primary btn-md">Search</button>
|
||||
</div> -->
|
||||
<% end %>
|
||||
<!-- <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> -->
|
||||
<div class="body">
|
||||
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
|
||||
<input type="hidden" name="type" id="type" value="">
|
||||
</div>
|
||||
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> -->
|
||||
<button type="submit" class="btn bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
|
||||
<!-- </div> -->
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
|
||||
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.email") %></th>
|
||||
<th><%= t("views.right_panel.detail.action") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @i = 0 %>
|
||||
<% @crm_customers.each do |crm_customer| %>
|
||||
|
||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||
<td>
|
||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||
<td>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<%else%>
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4 col-sm-4">
|
||||
<div id="custom-slimscroll">
|
||||
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
|
||||
</div>
|
||||
<!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
|
||||
<br>
|
||||
<a href="<%= dashboard_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
/*$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
$('.datepicker').css('cursor','pointer');*/
|
||||
|
||||
// Read Card Reader
|
||||
$("#member_acc_no").on('click', function(e){
|
||||
@@ -120,7 +130,6 @@ $(function() {
|
||||
var code = "";
|
||||
setTimeout(function(){
|
||||
var hi=getQRCode();
|
||||
alert(hi);
|
||||
},100);
|
||||
});
|
||||
|
||||
@@ -220,39 +229,31 @@ $(document).on('click',".customer_tr",function(){
|
||||
})
|
||||
|
||||
function update_sale(customer_id,sale_id) {
|
||||
$.confirm({
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to assign this customer!',
|
||||
buttons: {
|
||||
swal({
|
||||
title: "Confirmation",
|
||||
text: "Are You Sure to assign this customer!",
|
||||
type: "success",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "green",
|
||||
confirmButtonText: "Yes, delete it!",
|
||||
closeOnConfirm: false
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "update_sale/" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
window.location.href = '/origami'
|
||||
}else{
|
||||
swal("Alert!", "Record not found!", "error");
|
||||
location.reload();
|
||||
}
|
||||
|
||||
cancel: function () {
|
||||
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "update_sale/" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
window.location.href = '/origami'
|
||||
}else{
|
||||
alert('Record not found!');
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
0
app/views/crm/customers/index.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/index.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/new.html.erb
Normal file → Executable file
0
app/views/crm/customers/new.html.erb
Normal file → Executable file
75
app/views/crm/customers/show.html.erb
Normal file → Executable file
75
app/views/crm/customers/show.html.erb
Normal file → Executable file
@@ -1,17 +1,17 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
<!-- Column One -->
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#customer" role="tab">Customer Details</a>
|
||||
<ul class="nav nav-tabs tab-nav-right" role="tablist">
|
||||
|
||||
<li role="presentation" class="active nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#customer" ><%= t :customer_details %></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link " data-toggle="tab" href="#order" role="tab">Order Details</a>
|
||||
<li role="presentation" class="nav-item" >
|
||||
<a class="nav-link" data-toggle="tab" href="#order" ><%= t :order_details %></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#sale" role="tab">Sale Details</a>
|
||||
<li role="presentation" class="nav-item" >
|
||||
<a class="nav-link" data-toggle="tab" href="#sale" ><%= t :sale_details %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Nav tabs - End -->
|
||||
@@ -24,15 +24,15 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Card No</th>
|
||||
<th>Name</th>
|
||||
<th>Company</th>
|
||||
<th>Contact no</th>
|
||||
<th>Email</th>
|
||||
<th>NRC/Passport No</th>
|
||||
<th>Address</th>
|
||||
<th>DOB</th>
|
||||
<th>Membership Type</th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.company") %></th>
|
||||
<th><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.email") %></th>
|
||||
<th><%= t("views.right_panel.detail.nrc_passport_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.address") %></th>
|
||||
<th><%= t("views.right_panel.detail.dob") %></th>
|
||||
<th><%= t("views.right_panel.detail.membership_type") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th><%= t("views.right_panel.detail.date") %></th>
|
||||
<!-- <th>Redeem</th> -->
|
||||
<th>Discount Amount</th>
|
||||
<th><%= t("views.right_panel.detail.discount_amount") %></th>
|
||||
<!-- <th>Balance</th> -->
|
||||
<th>From Account</th>
|
||||
<th>Status</th>
|
||||
<th>Receipt No</th>
|
||||
<th><%= t("views.right_panel.detail.from_account") %></th>
|
||||
<th><%= t("views.right_panel.detail.status") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -97,16 +97,17 @@
|
||||
|
||||
<div class="tab-pane" id="order" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||
|
||||
<h3>Order Details</h3>
|
||||
<h3><%= t :order_details %></h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order ID </th>
|
||||
<th>Type</th>
|
||||
<th>Order status</th>
|
||||
<th>Order date</th>
|
||||
<th>Items Count</th>
|
||||
<th><%= t("views.right_panel.detail.order_id") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.order_date") %></th>
|
||||
<th><%= t("views.right_panel.detail.items_count") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -127,18 +128,18 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="sale" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||
<h3>Sale Details</h3>
|
||||
<h3><%= t :sale_details %></h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sale Id </th>
|
||||
<th>Receipt no </th>
|
||||
<th>Grand total</th>
|
||||
<th>Tax amount</th>
|
||||
<th>Cashier</th>
|
||||
<th>Sales status</th>
|
||||
<th>Receipt Date</th>
|
||||
<th><%= t("views.right_panel.detail.sale_id") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||
<th><%= t("views.right_panel.detail.tax_amount") %></th>
|
||||
<th><%= t :cashier %></th>
|
||||
<th><%= t("views.right_panel.detail.sales_status") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_date") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -166,7 +167,7 @@
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<br><br>
|
||||
<a href="<%= crm_customers_path%>" class="btn btn-primary btn-lg">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
<i class="fa fa-arrow-left fa-lg"></i> <%= t("views.btn.back") %>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
0
app/views/crm/customers/show.json.jbuilder
Normal file → Executable file
0
app/views/crm/customers/show.json.jbuilder
Normal file → Executable file
0
app/views/crm/dining_queues/_crm_dining_queue.json.jbuilder
Normal file → Executable file
0
app/views/crm/dining_queues/_crm_dining_queue.json.jbuilder
Normal file → Executable file
62
app/views/crm/dining_queues/_form.html.erb
Normal file → Executable file
62
app/views/crm/dining_queues/_form.html.erb
Normal file → Executable file
@@ -1,23 +1,51 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<p class="hidden generate_no"><%= @queue_no %></p>
|
||||
<div class="col-md-6">
|
||||
<div class="form-inputs">
|
||||
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :contact_no %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :remark %>
|
||||
|
||||
|
||||
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<p class="hidden generate_no"><%= @queue_no %></p>
|
||||
<div class="col-md-6">
|
||||
<div class="form-inputs">
|
||||
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :contact_no %>
|
||||
<%= f.input :seater %>
|
||||
<%= f.input :remark %>
|
||||
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit,"Create Queue" %>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit,"Create Queue" ,:class=>"btn btn-primary bg-blue btn-lg waves-effect"%>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-93 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.queue_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.queue_no_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.contact_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.contact_no_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.seater") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.seat_txt") %> <br>
|
||||
5) <%= t("views.right_panel.detail.remark") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.remark_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.create") %> <%= t("views.right_panel.button.queue") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.queue_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
131
app/views/crm/dining_queues/assign.html.erb
Normal file → Executable file
131
app/views/crm/dining_queues/assign.html.erb
Normal file → Executable file
@@ -1,46 +1,43 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li>Queue</li>
|
||||
<li>Assign Queue <%=@queue.queue_no%></li>
|
||||
|
||||
</ul>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>">Queue</a></li>
|
||||
<li class="breadcrumb-item active">Assign Queue <%=@queue.queue_no%></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
|
||||
<div class="tab-content" style="max-height:670px; overflow:auto">
|
||||
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" id="tables" role="tabpanel">
|
||||
<div class="tab-pane" id="rooms" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 2.2rem;">
|
||||
<% @i =0 %>
|
||||
<% DiningFacility.all.each do |table| %>
|
||||
<div class="card assign_table <%= table.status=="available" ? "green" : "red"%>" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= @queue.id %></p>
|
||||
<p class="hidden queue-status"><%= table.status %></p>
|
||||
<p style="text-align: center"><%= table.name %></p>
|
||||
<p style="text-align: center">Seat : <%= table.seater %></p>
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div id="custom-slimscroll">
|
||||
<div class="tab-content">
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" id="tables" role="tabpanel">
|
||||
<div class="tab-pane" id="rooms" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 2.2rem;">
|
||||
<% @i =0 %>
|
||||
<% DiningFacility.all.each do |table| %>
|
||||
<div class="card assign_table <%= table.status=="available" ? "green" : "red"%>" data-id="<%= table.id %>">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= @queue.id %></p>
|
||||
<p class="hidden queue-status"><%= table.status %></p>
|
||||
<p style="text-align: center"><%= table.name %></p>
|
||||
<p style="text-align: center">Seat : <%= table.seater %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<br>
|
||||
<a href="<%= crm_dining_queues_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.js"></script> -->
|
||||
@@ -57,56 +54,32 @@ $(document).on('click',".assign_table",function(){
|
||||
if (status == "available") {
|
||||
assign_table(queue_id,table_id,url);
|
||||
} else {
|
||||
$.confirm({
|
||||
title: 'Alert!',
|
||||
content: 'You cannot assign this table',
|
||||
buttons: {
|
||||
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green',
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
swal ( "Alert!" , "You cannot assign this table!" , "warning" );
|
||||
}
|
||||
})
|
||||
|
||||
function assign_table(id,table_id,url) {
|
||||
$.confirm({
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to assign this customer!',
|
||||
buttons: {
|
||||
|
||||
cancel: function () {
|
||||
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id,table_id:table_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
window.location.href = '<%=crm_dining_queues_path%>'
|
||||
}else{
|
||||
alert('Record not found!');
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
swal({
|
||||
title: "Confirm!",
|
||||
text: "Are You Sure to assign this customer!",
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id,table_id:table_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
window.location.href = '<%=crm_dining_queues_path%>'
|
||||
}else{
|
||||
swal ( "Alert!" , "Record not found!" , "warning" );
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
6
app/views/crm/dining_queues/edit.html.erb
Normal file → Executable file
6
app/views/crm/dining_queues/edit.html.erb
Normal file → Executable file
@@ -2,9 +2,9 @@
|
||||
<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>
|
||||
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>"><%= t("en.queue") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', dining_queue: @dining_queue %>
|
||||
|
||||
74
app/views/crm/dining_queues/index.html.erb
Normal file → Executable file
74
app/views/crm/dining_queues/index.html.erb
Normal file → Executable file
@@ -1,12 +1,13 @@
|
||||
<!-- <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> -->
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("en.queue") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
@@ -48,13 +49,15 @@
|
||||
<!-- tabs - End -->
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-lg btn-block' %>
|
||||
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block' %>
|
||||
<hr>
|
||||
<button type="button" id="assign" class="btn btn-primary btn-lg btn-block" disabled>Assign</button>
|
||||
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
|
||||
<a href="<%= dashboard_path %>" class="btn btn-primary btn-lg btn-block" role="button" aria-haspopup="true" aria-expanded="false"> Back </a>
|
||||
|
||||
<button type="button" id="assign" class="btn btn-primary btn-block btn-lg waves-effect" disabled>Assign</button>
|
||||
<button type="button" id="cancel" class="btn btn-danger btn-block btn-lg waves-effect" disabled>Cancel</button>
|
||||
<!-- <a href="<%= dashboard_path %>" class="btn btn-default btn-block waves-effect" role="button" aria-haspopup="true" aria-expanded="false"> Back </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
@@ -88,35 +91,24 @@ $('#cancel').click(function() {
|
||||
|
||||
|
||||
function cancel_queue(id,url) {
|
||||
$.confirm({
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to cancel this Queue!',
|
||||
buttons: {
|
||||
cancel: function () {
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
swal({
|
||||
title: "Confirm!",
|
||||
text: "Are You Sure to cancel this Queue!",
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
0
app/views/crm/dining_queues/index.json.jbuilder
Normal file → Executable file
0
app/views/crm/dining_queues/index.json.jbuilder
Normal file → Executable file
2
app/views/crm/dining_queues/index_bk.html.erb
Normal file → Executable file
2
app/views/crm/dining_queues/index_bk.html.erb
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
<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' %>
|
||||
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
20
app/views/crm/dining_queues/new.html.erb
Normal file → Executable file
20
app/views/crm/dining_queues/new.html.erb
Normal file → Executable file
@@ -1,11 +1,15 @@
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>"><%= t("en.queue") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', crm_dining_queues_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
2
app/views/crm/dining_queues/show.html.erb
Normal file → Executable file
2
app/views/crm/dining_queues/show.html.erb
Normal file → Executable file
@@ -15,5 +15,5 @@
|
||||
<%= @crm_dining_queue.queue_no %>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Edit', edit_crm_dining_queue_path(@crm_dining_queue) %> |
|
||||
<%= link_to t("views.btn.edit"), edit_crm_dining_queue_path(@crm_dining_queue) %> |
|
||||
<%= link_to 'Back', crm_dining_queues_path %>
|
||||
|
||||
0
app/views/crm/dining_queues/show.json.jbuilder
Normal file → Executable file
0
app/views/crm/dining_queues/show.json.jbuilder
Normal file → Executable file
0
app/views/crm/home/_booking.html.erb
Normal file → Executable file
0
app/views/crm/home/_booking.html.erb
Normal file → Executable file
0
app/views/crm/home/_customer.html.erb
Normal file → Executable file
0
app/views/crm/home/_customer.html.erb
Normal file → Executable file
0
app/views/crm/home/_queue.html.erb
Normal file → Executable file
0
app/views/crm/home/_queue.html.erb
Normal file → Executable file
0
app/views/crm/home/index.html.erb
Normal file → Executable file
0
app/views/crm/home/index.html.erb
Normal file → Executable file
0
app/views/home/create.html.erb
Normal file → Executable file
0
app/views/home/create.html.erb
Normal file → Executable file
168
app/views/home/dashboard.html.erb
Normal file → Executable file
168
app/views/home/dashboard.html.erb
Normal file → Executable file
@@ -1,74 +1,98 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-lg-9">
|
||||
<div class="panel-group" id="accordion">
|
||||
<% if current_user.role == 'administrator' || current_user.role == 'manager' %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><h4>Top Products</h4></div>
|
||||
<div class="panel-body">
|
||||
<canvas id="top_products" width="400" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><h4>Inventory</h4></div>
|
||||
<div class="panel-body">
|
||||
<canvas id="inventory" width="400" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><h4>Hourly Sales</h4></div>
|
||||
<div class="panel-body">
|
||||
<canvas id="hourly_sales" width="400" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><h4>Employee Sales</h4></div>
|
||||
<div class="panel-body">
|
||||
<canvas id="employee_sales" width="400" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif current_user.role == 'manager' %>
|
||||
|
||||
<% elsif current_user.role == 'supervisour' %>
|
||||
|
||||
<% elsif current_user.role == 'cashier' %>
|
||||
|
||||
|
||||
<% elsif current_user.role == 'account' %>
|
||||
|
||||
<% end %>
|
||||
<div class="container-fluid">
|
||||
<div class="block-header">
|
||||
<h2><%= t :dashboard %></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="card" id="oqs" onclick="location.href='<%= oqs_root_path %>'">
|
||||
<div class="card-content dashboard-nav">OQS</div>
|
||||
<!-- Widgets -->
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-cyan hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">help</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text"><%= t :sale_count %></div>
|
||||
<div class="number count-to" data-from="0" data-to="<%= @total_count%>" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-pink hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">attach_money</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text"><%= t :total_sale %></div>
|
||||
<div class="number count-to" data-from="0" data-to="<%= @total_sale%>" data-speed="15" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-light-green hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">person_add</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text"><%= t :total_credit %></div>
|
||||
<div class="number count-to" data-from="0" data-to="<%= @total_credit%>" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-orange hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">credit_card</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text"><%= t :total_card %></div>
|
||||
<div class="number count-to" data-from="0" data-to="<%= @total_card%>" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Widgets -->
|
||||
<!-- CPU Usage -->
|
||||
|
||||
<div class="card" id="origami" onclick="location.href='<%= origami_root_path %>'">
|
||||
<div class="card-content dashboard-nav">Cashier</div>
|
||||
<% if current_user.role == 'administrator' || current_user.role == 'manager' %>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h4><i class="material-icons md-24">dashboard</i><%= (t :top) + " " + (t :products) %></h4>
|
||||
<canvas id="top_products" class="col-md-12"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h4><i class="material-icons md-24">store</i><%= t :inventory %></h4>
|
||||
<canvas id="inventory" class="col-md-12"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="crm" onclick="location.href='<%= crm_root_path %>'">
|
||||
<div class="card-content dashboard-nav">CRM</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h4><i class="material-icons md-24">av_timer</i><%= (t :hourly) + " " + (t :sale) %></h4>
|
||||
<canvas id="hourly_sales" class="col-md-12"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h4><i class="material-icons md-24">assignment_ind</i><%= (t :staff) + " " + (t :sale) %></h4>
|
||||
<canvas id="employee_sales" class="col-md-12"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="backend" onclick="location.href='<%= inventory_path %>'">
|
||||
<div class="card-content dashboard-nav">Inventory</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -99,8 +123,10 @@
|
||||
datasets.push(val.total_item);
|
||||
backgroundColor.push(randomColorGenerator());
|
||||
});
|
||||
|
||||
var ctx = $("#top_products").get(0).getContext("2d");
|
||||
|
||||
var chart = new Chart("top_products", {
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: labels,
|
||||
@@ -134,8 +160,9 @@
|
||||
backgroundColor.push(randomColorGenerator());
|
||||
});
|
||||
|
||||
var ctx = $("#hourly_sales").get(0).getContext("2d");
|
||||
|
||||
var myChart = new Chart("hourly_sales", {
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
@@ -181,8 +208,9 @@
|
||||
datasets.push(val);
|
||||
backgroundColor.push(randomColorGenerator());
|
||||
});
|
||||
var ctx = $("#employee_sales").get(0).getContext("2d");
|
||||
|
||||
var myChart = new Chart("employee_sales", {
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
@@ -229,7 +257,9 @@
|
||||
borderColor.push(randomColorGenerator());
|
||||
});
|
||||
|
||||
var myChart = new Chart("inventory", {
|
||||
var ctx = $("#inventory").get(0).getContext("2d");
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labels,
|
||||
|
||||
201
app/views/home/dashboard_backup.html.erb
Executable file
201
app/views/home/dashboard_backup.html.erb
Executable file
@@ -0,0 +1,201 @@
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-lg-9">
|
||||
<h4><strong>Role Features</strong></h4>
|
||||
<!-- <p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.</p> -->
|
||||
<div class="panel-group" id="accordion">
|
||||
<% if current_user.role == 'administrator' %>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Administrator
|
||||
</h4>
|
||||
</div>
|
||||
<div id="admin" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="col-md-4">
|
||||
<li><strong>All Settings</strong></li>
|
||||
<ul>
|
||||
<li>Zone</li>
|
||||
<li>OQS</li>
|
||||
<li>Menu</li>
|
||||
<li>Cashier Terminal</li>
|
||||
<li>Payment</li>
|
||||
<li>Merbership</li>
|
||||
<li>Print</li>
|
||||
<li>Employees</li>
|
||||
<li>Accounts</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="col-md-4">
|
||||
<li><strong>Transactions</strong></li>
|
||||
<ul class="">
|
||||
<li>Order</li>
|
||||
<li>Sale</li>
|
||||
<li>Credit Note</li>
|
||||
</ul><br>
|
||||
<li><strong>Reports</strong></li>
|
||||
<ul class="">
|
||||
<li>Daily Sale</li>
|
||||
<li>Sale Item</li>
|
||||
<li>Receipt</li>
|
||||
<li>Shift Sale</li>
|
||||
<li>Credit Sale</li>
|
||||
<li>Void Sale</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="col-md-4">
|
||||
<li><strong>OQS</strong></li><br>
|
||||
<li><strong>Cashier</strong></li><br>
|
||||
<li><strong>CRM</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif current_user.role == 'manager' %>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Manager
|
||||
</h4>
|
||||
</div>
|
||||
<div id="admin" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="col-md-4">
|
||||
<li class="">All Settings</li>
|
||||
<ul class="">
|
||||
<li>Zone</li>
|
||||
<li>OQS</li>
|
||||
<li>Menu</li>
|
||||
<li>Cashier Terminal</li>
|
||||
<li>Print</li>
|
||||
<li>Employees</li>
|
||||
<li>Accounts</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="col-md-4">
|
||||
<li class="">Transactions</li>
|
||||
<ul class="">
|
||||
<li>Order</li>
|
||||
<li>Sale</li>
|
||||
<li>Credit Note</li>
|
||||
</ul><br>
|
||||
<li>Reports</li>
|
||||
<ul class="">
|
||||
<li>Daily Sale</li>
|
||||
<li>Sale Item</li>
|
||||
<li>Receipt</li>
|
||||
<li>Shift Sale</li>
|
||||
<li>Credit Sale</li>
|
||||
<li>Void Sale</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="col-md-4">
|
||||
<li>OQS</li><br>
|
||||
<li>Cashier</li><br>
|
||||
<li>CRM</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif current_user.role == 'supervisour' %>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Supervisor
|
||||
</h4>
|
||||
</div>
|
||||
<div id="supervisor" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li>OQS</li>
|
||||
<ul>
|
||||
<li class="">Void</li>
|
||||
<li class="">FOC</li>
|
||||
<li class="">Edit</li>
|
||||
<li class="">Credit</li>
|
||||
<li class="">Payment</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif current_user.role == 'cashier' %>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Cashier
|
||||
</h4>
|
||||
</div>
|
||||
<div id="cashier" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">Cashier Panel except Edit and Void</li>
|
||||
<li class="">Sale and Order</li>
|
||||
<li class="">and Queue in CRM</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif current_user.role == 'account' %>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Accountant
|
||||
</h4>
|
||||
</div>
|
||||
<div id="accountant" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">Daily Sale Report</li>
|
||||
<li class="">Sale Item Report</li>
|
||||
<li class="">Receipt No Report</li>
|
||||
<li class="">ShiftSale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="card" id="oqs" onclick="location.href='<%= oqs_root_path %>'">
|
||||
<div class="card-content dashboard-nav">OQS</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="origami" onclick="location.href='<%= origami_root_path %>'">
|
||||
<div class="card-content dashboard-nav">Cashier</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="crm" onclick="location.href='<%= crm_root_path %>'">
|
||||
<div class="card-content dashboard-nav">CRM</div>
|
||||
</div>
|
||||
|
||||
<!-- No Needs
|
||||
<div class="card" id="backend" onclick="location.href='<%= dashboard_path %>'">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Backend</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="card" id="backend" onclick="location.href='<%= inventory_path %>'">
|
||||
<div class="card-content dashboard-nav">Inventory</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer" style="background-color: inherit">
|
||||
<div class="card">
|
||||
<div class="page-header center-text">
|
||||
<h4 class="footer-header">
|
||||
<%= @shop.name %>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
<%= @shop.address %>
|
||||
</div>
|
||||
<div class="center-text">
|
||||
<%= @shop.phone_no %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
0
app/views/home/destroy.html.erb
Normal file → Executable file
0
app/views/home/destroy.html.erb
Normal file → Executable file
308
app/views/home/index-old.html.erb
Executable file
308
app/views/home/index-old.html.erb
Executable file
@@ -0,0 +1,308 @@
|
||||
<div class="container-fluid">
|
||||
<div class="block-header">
|
||||
<h2>DASHBOARD</h2>
|
||||
</div>
|
||||
|
||||
<!-- Widgets -->
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-pink hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">playlist_add_check</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text">NEW TASKS</div>
|
||||
<div class="number count-to" data-from="0" data-to="125" data-speed="15" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-cyan hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">help</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text">NEW TICKETS</div>
|
||||
<div class="number count-to" data-from="0" data-to="257" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-light-green hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">forum</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text">NEW COMMENTS</div>
|
||||
<div class="number count-to" data-from="0" data-to="243" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-orange hover-expand-effect">
|
||||
<div class="icon">
|
||||
<i class="material-icons">person_add</i>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="text">NEW VISITORS</div>
|
||||
<div class="number count-to" data-from="0" data-to="1225" data-speed="1000" data-fresh-interval="20"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Widgets -->
|
||||
<!-- CPU Usage -->
|
||||
<div class="row clearfix">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<div class="row clearfix">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<h2>CPU USAGE (%)</h2>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 align-right">
|
||||
<div class="switch panel-switch-btn">
|
||||
<span class="m-r-10 font-12">REAL TIME</span>
|
||||
<label>OFF<input type="checkbox" id="realtime" checked><span class="lever switch-col-cyan"></span>ON</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="header-dropdown m-r--5">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="javascript:void(0);">Action</a></li>
|
||||
<li><a href="javascript:void(0);">Another action</a></li>
|
||||
<li><a href="javascript:void(0);">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div id="real_time_chart" class="dashboard-flot-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# CPU Usage -->
|
||||
<div class="row clearfix">
|
||||
<!-- Visitors -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body bg-pink">
|
||||
<div class="sparkline" data-type="line" data-spot-Radius="4" data-highlight-Spot-Color="rgb(233, 30, 99)" data-highlight-Line-Color="#fff"
|
||||
data-min-Spot-Color="rgb(255,255,255)" data-max-Spot-Color="rgb(255,255,255)" data-spot-Color="rgb(255,255,255)"
|
||||
data-offset="90" data-width="100%" data-height="92px" data-line-Width="2" data-line-Color="rgba(255,255,255,0.7)"
|
||||
data-fill-Color="rgba(0, 188, 212, 0)">
|
||||
12,10,9,6,5,6,10,5,7,5,12,13,7,12,11
|
||||
</div>
|
||||
<ul class="dashboard-stat-list">
|
||||
<li>
|
||||
TODAY
|
||||
<span class="pull-right"><b>1 200</b> <small>USERS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
YESTERDAY
|
||||
<span class="pull-right"><b>3 872</b> <small>USERS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
LAST WEEK
|
||||
<span class="pull-right"><b>26 582</b> <small>USERS</small></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Visitors -->
|
||||
<!-- Latest Social Trends -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body bg-cyan">
|
||||
<div class="m-b--35 font-bold">LATEST SOCIAL TRENDS</div>
|
||||
<ul class="dashboard-stat-list">
|
||||
<li>
|
||||
#socialtrends
|
||||
<span class="pull-right">
|
||||
<i class="material-icons">trending_up</i>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
#materialdesign
|
||||
<span class="pull-right">
|
||||
<i class="material-icons">trending_up</i>
|
||||
</span>
|
||||
</li>
|
||||
<li>#adminbsb</li>
|
||||
<li>#freeadmintemplate</li>
|
||||
<li>#bootstraptemplate</li>
|
||||
<li>
|
||||
#freehtmltemplate
|
||||
<span class="pull-right">
|
||||
<i class="material-icons">trending_up</i>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Latest Social Trends -->
|
||||
<!-- Answered Tickets -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body bg-teal">
|
||||
<div class="font-bold m-b--35">ANSWERED TICKETS</div>
|
||||
<ul class="dashboard-stat-list">
|
||||
<li>
|
||||
TODAY
|
||||
<span class="pull-right"><b>12</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
YESTERDAY
|
||||
<span class="pull-right"><b>15</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
LAST WEEK
|
||||
<span class="pull-right"><b>90</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
LAST MONTH
|
||||
<span class="pull-right"><b>342</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
LAST YEAR
|
||||
<span class="pull-right"><b>4 225</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
<li>
|
||||
ALL
|
||||
<span class="pull-right"><b>8 752</b> <small>TICKETS</small></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Answered Tickets -->
|
||||
|
||||
<div class="row clearfix">
|
||||
<!-- Task Info -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h2>TASK INFOS</h2>
|
||||
<ul class="header-dropdown m-r--5">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="javascript:void(0);">Action</a></li>
|
||||
<li><a href="javascript:void(0);">Another action</a></li>
|
||||
<li><a href="javascript:void(0);">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover dashboard-task-infos">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Task</th>
|
||||
<th>Status</th>
|
||||
<th>Manager</th>
|
||||
<th>Progress</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Task A</td>
|
||||
<td><span class="label bg-green">Doing</span></td>
|
||||
<td>John Doe</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Task B</td>
|
||||
<td><span class="label bg-blue">To Do</span></td>
|
||||
<td>John Doe</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-blue" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Task C</td>
|
||||
<td><span class="label bg-light-blue">On Hold</span></td>
|
||||
<td>John Doe</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-light-blue" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100" style="width: 72%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Task D</td>
|
||||
<td><span class="label bg-orange">Wait Approvel</span></td>
|
||||
<td>John Doe</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-orange" role="progressbar" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100" style="width: 95%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>Task E</td>
|
||||
<td>
|
||||
<span class="label bg-red">Suspended</span>
|
||||
</td>
|
||||
<td>John Doe</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-red" role="progressbar" aria-valuenow="87" aria-valuemin="0" aria-valuemax="100" style="width: 87%"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Task Info -->
|
||||
<!-- Browser Usage -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h2>BROWSER USAGE</h2>
|
||||
<ul class="header-dropdown m-r--5">
|
||||
<li class="dropdown">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="javascript:void(0);">Action</a></li>
|
||||
<li><a href="javascript:void(0);">Another action</a></li>
|
||||
<li><a href="javascript:void(0);">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div id="donut_chart" class="dashboard-donut-chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- #END# Browser Usage -->
|
||||
</div>
|
||||
</div>
|
||||
0
app/views/home/index.html.erb
Normal file → Executable file
0
app/views/home/index.html.erb
Normal file → Executable file
173
app/views/home/index_backup.html.erb
Executable file
173
app/views/home/index_backup.html.erb
Executable file
@@ -0,0 +1,173 @@
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||
<%= simple_form_for(@login_form, url: login_path, method: "POST") do |f| %>
|
||||
<div class="card">
|
||||
<h4 class="card-title text-center" style="margin:10px">Login</h4>
|
||||
<div class="content" style="margin:10px">
|
||||
<div class="form-group">
|
||||
<%= f.input :emp_id, required: false, autofocus: true, class: "form-control" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.input :password, required: false, class: "form-control" %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="footer text-center" style="margin:10px">
|
||||
<%= f.button :submit, "Log in", class: "form-control btn btn-fill btn-warning btn-wd" %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-lg-8">
|
||||
<div class="card-columns" style="column-gap: 10px;">
|
||||
|
||||
<% @employees.each do |employee| %>
|
||||
|
||||
<div data-formid="#form_<%= employee.emp_id %>" class="empBtn card card-primary white mb-3 text-center" style="">
|
||||
<form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH"></form>
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">
|
||||
<%= employee.name %>
|
||||
</h4>
|
||||
<div class="card-content">
|
||||
(<%= employee.emp_id %>)
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small><%= employee.role %></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<h4 class="card-title text-center">Role Features</h4>
|
||||
<!-- <p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.</p> -->
|
||||
<div class="panel-group" id="accordion">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#admin">Administrator
|
||||
<span class="glyphicon glyphicon-plus"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="admin" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">All Accept</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#manager">Manager
|
||||
<span class="glyphicon glyphicon-plus"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="manager" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">All Accept except Membership and Payment Settings</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#supervisor">Supervisor
|
||||
<span class="glyphicon glyphicon-plus"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="supervisor" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">Void</li>
|
||||
<li class="">FOC</li>
|
||||
<li class="">Edit</li>
|
||||
<li class="">Credit</li>
|
||||
<li class="">and Payment</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#cashier">Cashier
|
||||
<span class="glyphicon glyphicon-plus"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="cashier" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">Orgami Panel except Edit and Void</li>
|
||||
<li class="">Sale and Order</li>
|
||||
<li class="">and Queue in CRM</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#accountant">Accountant
|
||||
<span class="glyphicon glyphicon-plus"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="accountant" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ul class="">
|
||||
<li class="">Daily Sale Report</li>
|
||||
<li class="">Sale Item Report</li>
|
||||
<li class="">Receipt No Report</li>
|
||||
<li class="">ShiftSale Report</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end accordion id -->
|
||||
</div>
|
||||
</div> <!-- end col-md-4 -->
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).on('turbolinks:load', function () {
|
||||
$(".empBtn").click(function (event) {
|
||||
event.preventDefault();
|
||||
console.log($(this).data("formid"));
|
||||
var item = $(this).data("formid");
|
||||
$(item).submit();
|
||||
|
||||
});
|
||||
// Add minus icon for collapse element which is open by default
|
||||
$(".collapse.in").each(function () {
|
||||
$(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus");
|
||||
});
|
||||
// Toggle plus minus icon on show hide of collapse element
|
||||
$(".collapse").on('show.bs.collapse', function () {
|
||||
$(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus");
|
||||
}).on('hide.bs.collapse', function () {
|
||||
$(this).parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
0
app/views/home/show.html.erb
Normal file → Executable file
0
app/views/home/show.html.erb
Normal file → Executable file
0
app/views/install/_form.html.erb
Normal file → Executable file
0
app/views/install/_form.html.erb
Normal file → Executable file
0
app/views/install/create.html.erb
Normal file → Executable file
0
app/views/install/create.html.erb
Normal file → Executable file
0
app/views/install/index.html.erb
Normal file → Executable file
0
app/views/install/index.html.erb
Normal file → Executable file
78
app/views/inventory/inventory/_inventory_list.html.erb
Normal file → Executable file
78
app/views/inventory/inventory/_inventory_list.html.erb
Normal file → Executable file
@@ -1,48 +1,34 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8"><h2> Inventoy Product Lists</h2></div>
|
||||
<div class="col-md-4"><button id='new_inventory_product' class='btn btn-primary' style='margin-top:15px;'>New Inventory Product</button></div>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><%= t("views.right_panel.detail.product") %></th>
|
||||
<th><%= t("views.right_panel.detail.min_order") %></th>
|
||||
<th><%= t("views.right_panel.detail.max_stock") %></th>
|
||||
<th><%= t("views.right_panel.detail.created_by") %></th>
|
||||
<th><%= t("views.right_panel.detail.created_time") %></th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@products.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td>
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue "-" %>
|
||||
- <%= menu_item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= item.min_order_level %></td>
|
||||
<td><%= item.max_stock_level %></td>
|
||||
<td><%= Employee.find(item.created_by).name rescue '-' %></td>
|
||||
<td><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Min Order</th>
|
||||
<th>Max Stock</th>
|
||||
<th>Created by</th>
|
||||
<th>Created Time</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@products.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td>
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue "-" %>
|
||||
- <%= menu_item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= item.min_order_level %></td>
|
||||
<td><%= item.max_stock_level %></td>
|
||||
<td><%= Employee.find(item.created_by).name rescue '-' %></td>
|
||||
<td><%= item.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#new_inventory_product').on('click',function(){
|
||||
window.location.href = '/inventory/inventory_definitions/new';
|
||||
})
|
||||
</script>
|
||||
|
||||
69
app/views/inventory/inventory/index.html.erb
Normal file → Executable file
69
app/views/inventory/inventory/index.html.erb
Normal file → Executable file
@@ -1,27 +1,62 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t :inventory %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-md-10 col-sm-10">
|
||||
<%= render 'inventory_list' %>
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="m-b-10 clearfix">
|
||||
<button id="stock_check_report" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> <%= t("views.btn.stock_check_report") %>
|
||||
</button>
|
||||
<button id="stock_taking" type="button" class="btn bg-blue float-right waves-effect" style='margin-left:5px;'> <%= t("views.btn.new_stock_taking") %></button>
|
||||
<button id='new_inventory_product' class='btn btn-primary float-right waves-effect' style='margin-left:5px;'><%= t("views.btn.new") + " " + (t :inventory) %>
|
||||
</button>
|
||||
</div>
|
||||
<div class="card">
|
||||
<%= render 'inventory_list' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<% if current_login_employee.role == "administrator" || current_login_employee.role == 'manager' %>
|
||||
<button id="back" type="button" class="btn btn-block btn-primary"> Back</button>
|
||||
<% end %>
|
||||
<button id="stock_taking" type="button" class="btn btn-block btn-primary"> New Stock Taking</button>
|
||||
<button id="stock_check_report" type="button" class="btn btn-block btn-primary"> Stock Check Report</button>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.new") + " " + (t :inventory) %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.inventory") %> <br>
|
||||
</p>
|
||||
<p>
|
||||
2) <%= t("views.btn.new") + " " + t("views.right_panel.detail.stock_taking") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.stock_taking_txt") %> <br>
|
||||
</p>
|
||||
<p>
|
||||
3) <%= t("views.right_panel.detail.stock_check_report") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.stock_check_report_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$('#stock_taking').on('click', function () {
|
||||
window.location.href = '<%= inventory_stock_checks_path %>';
|
||||
});
|
||||
$('#stock_taking').on('click', function () {
|
||||
window.location.href = '<%= inventory_stock_checks_path %>';
|
||||
});
|
||||
|
||||
$('#stock_check_report').on('click', function () {
|
||||
window.location.href = '<%= reports_stock_check_index_path %>';
|
||||
});
|
||||
$('#stock_check_report').on('click', function () {
|
||||
window.location.href = '<%= reports_stock_check_index_path %>';
|
||||
});
|
||||
|
||||
$('#back').on('click', function () {
|
||||
window.location.href = '<%= dashboard_path %>';
|
||||
});
|
||||
$('#new_inventory_product').on('click',function(){
|
||||
window.location.href = '/inventory/inventory_definitions/new';
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
51
app/views/inventory/inventory_definitions/_form.html.erb
Normal file → Executable file
51
app/views/inventory/inventory_definitions/_form.html.erb
Normal file → Executable file
@@ -1,4 +1,7 @@
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<div class="p-l-10">
|
||||
<%= simple_form_for([:inventory, @inventory_definition]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
@@ -7,8 +10,9 @@
|
||||
<% Product.order("name desc").pluck(:name, :item_code).each do |p| %>
|
||||
<% arr.push(p) %>
|
||||
<% end %>
|
||||
<div class="col-md-3">
|
||||
<label class="control-label"><abbr title="required">*</abbr> Item</label>
|
||||
<div class="col-md-4 ">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><abbr title="required">*</abbr>Select Item</label>
|
||||
<select class="form-control item_code_place" id="item">
|
||||
<% if !@inventory_definition.item_code.nil? %>
|
||||
<% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %>
|
||||
@@ -27,6 +31,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% sample = [] %>
|
||||
@@ -45,19 +50,45 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= link_to 'Back', inventory_path, class: 'btn btn-success' %>
|
||||
<%= f.button :submit, class: 'btn btn-primary' %>
|
||||
<%= f.submit t("views.btn.submit"), class: 'btn bg-blue waves-effect' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.select_item") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.item_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.item_code") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.item_code_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.min_order") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.min_order_level_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.max_stock") %> <%= t("views.right_panel.detail.level") %> - <%= t("views.right_panel.detail.write_txt") %><%= t("views.right_panel.detail.max_stock_level_txt") %><br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.submit") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.inventory") %> <br>
|
||||
</p>
|
||||
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".item_code_place").select2({
|
||||
placeholder: 'Select Item'
|
||||
});
|
||||
$("select#inventory_definition_item_code").select2();
|
||||
// $(".item_code_place").select2({
|
||||
// placeholder: 'Select Item'
|
||||
// });
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
|
||||
$(".item_code_place").on('change', function (event) {
|
||||
var ajax_url = "<%= settings_find_item_instance_path %>";
|
||||
@@ -74,7 +105,7 @@
|
||||
$("select#inventory_definition_item_code").append(itemlist);
|
||||
}
|
||||
// $("select#inventory_definition_item_code").append(itemlist);
|
||||
$("select#inventory_definition_item_code").select2();
|
||||
// $("select#inventory_definition_item_code").select2();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
0
app/views/inventory/inventory_definitions/_inventory_definition.json.jbuilder
Normal file → Executable file
0
app/views/inventory/inventory_definitions/_inventory_definition.json.jbuilder
Normal file → Executable file
6
app/views/inventory/inventory_definitions/edit.html.erb
Normal file → Executable file
6
app/views/inventory/inventory_definitions/edit.html.erb
Normal file → Executable file
@@ -1,9 +1,9 @@
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||
<li>Edit</li>
|
||||
<li><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li><a href="<%= inventory_path %>"><%= t("views.right_panel.detail.product") %> <%= t :inventory %></a></li>
|
||||
<li><%= t("views.btn.edit") %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', inventory: @inventory_definition %>
|
||||
|
||||
10
app/views/inventory/inventory_definitions/index.html.erb
Normal file → Executable file
10
app/views/inventory/inventory_definitions/index.html.erb
Normal file → Executable file
@@ -1,6 +1,7 @@
|
||||
<div class="container-fluid">
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Inventory Definitions</h1>
|
||||
<h1><%= t :inventory_definitions %></h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -12,9 +13,9 @@
|
||||
<tbody>
|
||||
<% @inventory_definitions.each do |inventory_definition| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', inventory_definition %></td>
|
||||
<td><%= link_to 'Edit', edit_inventory_definition_path(inventory_definition) %></td>
|
||||
<td><%= link_to 'Destroy', inventory_definition, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
<td><%= link_to t("views.btn.show"), inventory_definition %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_inventory_definition_path(inventory_definition) %></td>
|
||||
<td><%= link_to t("views.btn.delete"), inventory_definition, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
@@ -23,3 +24,4 @@
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Inventory Definition', new_inventory_definition_path %>
|
||||
</div>
|
||||
0
app/views/inventory/inventory_definitions/index.json.jbuilder
Normal file → Executable file
0
app/views/inventory/inventory_definitions/index.json.jbuilder
Normal file → Executable file
21
app/views/inventory/inventory_definitions/new.html.erb
Normal file → Executable file
21
app/views/inventory/inventory_definitions/new.html.erb
Normal file → Executable file
@@ -1,11 +1,12 @@
|
||||
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= inventory_path %>">Product Inventory</a></li>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', inventory: @inventory_definition %>
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%= inventory_path %>"><%= t :inventory %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<br>
|
||||
<%= render 'form', inventory: @inventory_definition %>
|
||||
2
app/views/inventory/inventory_definitions/show.html.erb
Normal file → Executable file
2
app/views/inventory/inventory_definitions/show.html.erb
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_inventory_definition_path(@inventory_definition) %> |
|
||||
<%= link_to t("views.btn.edit"), edit_inventory_definition_path(@inventory_definition) %> |
|
||||
<%= link_to 'Back', inventory_definitions_path %>
|
||||
|
||||
0
app/views/inventory/inventory_definitions/show.json.jbuilder
Normal file → Executable file
0
app/views/inventory/inventory_definitions/show.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_check_items/_form.html.erb
Normal file → Executable file
0
app/views/inventory/stock_check_items/_form.html.erb
Normal file → Executable file
0
app/views/inventory/stock_check_items/_stock_check_item.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_check_items/_stock_check_item.json.jbuilder
Normal file → Executable file
2
app/views/inventory/stock_check_items/edit.html.erb
Normal file → Executable file
2
app/views/inventory/stock_check_items/edit.html.erb
Normal file → Executable file
@@ -2,5 +2,5 @@
|
||||
|
||||
<%= render 'form', stock_check_item: @stock_check_item %>
|
||||
|
||||
<%= link_to 'Show', @stock_check_item %> |
|
||||
<%= link_to t("views.btn.show"), @stock_check_item %> |
|
||||
<%= link_to 'Back', stock_check_items_path %>
|
||||
|
||||
6
app/views/inventory/stock_check_items/index.html.erb
Normal file → Executable file
6
app/views/inventory/stock_check_items/index.html.erb
Normal file → Executable file
@@ -12,9 +12,9 @@
|
||||
<tbody>
|
||||
<% @stock_check_items.each do |stock_check_item| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', stock_check_item %></td>
|
||||
<td><%= link_to 'Edit', edit_stock_check_item_path(stock_check_item) %></td>
|
||||
<td><%= link_to 'Destroy', stock_check_item, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
<td><%= link_to t("views.btn.show"), stock_check_item %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_stock_check_item_path(stock_check_item) %></td>
|
||||
<td><%= link_to t("views.btn.delete"), stock_check_item, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
0
app/views/inventory/stock_check_items/index.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_check_items/index.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_check_items/new.html.erb
Normal file → Executable file
0
app/views/inventory/stock_check_items/new.html.erb
Normal file → Executable file
2
app/views/inventory/stock_check_items/show.html.erb
Normal file → Executable file
2
app/views/inventory/stock_check_items/show.html.erb
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_stock_check_item_path(@stock_check_item) %> |
|
||||
<%= link_to t("views.btn.edit"), edit_stock_check_item_path(@stock_check_item) %> |
|
||||
<%= link_to 'Back', stock_check_items_path %>
|
||||
|
||||
0
app/views/inventory/stock_check_items/show.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_check_items/show.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_checks/create.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_checks/create.json.jbuilder
Normal file → Executable file
173
app/views/inventory/stock_checks/index.html.erb
Normal file → Executable file
173
app/views/inventory/stock_checks/index.html.erb
Normal file → Executable file
@@ -1,85 +1,106 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<!-- <div class="m-b-10 clearfix">
|
||||
<%= link_to t("views.btn.new"),new_settings_account_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
||||
</div -->
|
||||
<div class="card">
|
||||
<div class="p-l-15 p-r-15 p-t-10">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="remark">Remark</label> -->
|
||||
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="password_2">Item</label> -->
|
||||
<select class='form-control' id='product_sku'>
|
||||
<option value="">Select Product</option>
|
||||
<% @inventory_definitions.each do |id| %>
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-10 col-md-10 col-sm-8 col-xs-7">
|
||||
<!-- <label for="email_address_2">Qty</label> -->
|
||||
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type='text' id='stock_check_reason' class='form-control' placeholder="Set Stock Check Reason" value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-2">
|
||||
Item
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<select class='form-control' id='product_sku'>
|
||||
<option value="">Select Product</option>
|
||||
<% @inventory_definitions.each do |id| %>
|
||||
<option value="<%= id.item_code %>">
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(id.item_code) %>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(id.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue '-' %> - <%= menu_item.item_instance_name rescue '-' %>
|
||||
<% end %>
|
||||
</option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-2">
|
||||
Qty
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<input type='text' class='form-control' placeholder="Qty" id='product_qty' value=''/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-7">
|
||||
<button class="btn btn-primary form-control" id='save_to_stock_check'> Save</button>
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped" id='stock_item'>
|
||||
<tr>
|
||||
<!--<th>#</th>-->
|
||||
<th><%= t("views.right_panel.detail.product") %></th>
|
||||
<th><%= t("views.right_panel.detail.balance") %></th>
|
||||
<th><button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> <%= t("views.btn.finish") %></button></th>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td colspan="3">
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button></td>
|
||||
</tr> -->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped" id='stock_item'>
|
||||
<tr>
|
||||
<!--<th>#</th>-->
|
||||
<th>Product</th>
|
||||
<th>Balance</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.set_stock_check_reason") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.stock_check_reason_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.select") +" "+ t("views.right_panel.detail.product") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.product_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.qty") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.qty_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.btn.save") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.stock_check_txt") %> <br>
|
||||
2) <%= t("views.btn.finish") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.stock_check_txt") +" "+ t("views.right_panel.detail.detail_txt") %> <br>
|
||||
</p>
|
||||
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="row">
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='back'> Back</button>
|
||||
<button class="btn btn-primary pull-right form-control" style='margin-bottom:2px;' id='finish'> Finish</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#product_sku').select2({
|
||||
allowClear: true,
|
||||
placeholder: 'Select Product'
|
||||
})
|
||||
});
|
||||
|
||||
var count = 0;
|
||||
|
||||
@@ -92,8 +113,8 @@
|
||||
//+ '<td>' + count + '</td>'
|
||||
+ '<td><input type=hidden value="' + product_sku + '" id="item_sku_' + count + '" name=' + count + '/>'
|
||||
+ product_name + '</td>'
|
||||
+ '<td><input type=text value="' + product_qty + '" id="item_qty_' + count + '" name=' + count + '/></td>'
|
||||
+ '<td><input type=button value="X" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
|
||||
+ '<td><input type=text value="' + product_qty + '" class="form-control col-md-9" id="item_qty_' + count + '" name=' + count + '/></td>'
|
||||
+ '<td><input type=button value="X" class="btn btn-danger p-l-15 p-r-15" id="item_remove_' + count + '" name=' + count + ' onclick="remove_row('+ count +')"/></td>'
|
||||
+ '</tr>';
|
||||
$('#stock_item').append(tr);
|
||||
// $('#product_sku').val('');
|
||||
@@ -124,10 +145,6 @@
|
||||
})
|
||||
});
|
||||
|
||||
$('#back').on('click', function () {
|
||||
window.location.href = '/inventory';
|
||||
});
|
||||
|
||||
function remove_row(row) {
|
||||
$("#item_remove_"+row).parent().parent().remove();
|
||||
}
|
||||
|
||||
146
app/views/inventory/stock_checks/show.html.erb
Normal file → Executable file
146
app/views/inventory/stock_checks/show.html.erb
Normal file → Executable file
@@ -1,72 +1,92 @@
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li>
|
||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check by
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= Employee.find(@check.check_by).name rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Check At
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Reason
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.reason %>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<table class="table table-striped col-md-12">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Product</th>
|
||||
<th>Stock Count</th>
|
||||
<th>Stock Balance</th>
|
||||
<th>Different</th>
|
||||
<th>Remark</th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@check.stock_check_items.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td>
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue "-" %>
|
||||
- <%= menu_item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= item.stock_count %></td>
|
||||
<td><%= item.stock_balance %></td>
|
||||
<td><%= item.different %></td>
|
||||
<td><%= item.remark %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<div class="col-xs-12 col-sm-12 col-md-10 col-lg-10">
|
||||
<div class="card">
|
||||
<input type='hidden' id='stock_check_id' value='<%= @check.id %>'/>
|
||||
<div class="p-l-20 p-t-15">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<%= t("views.right_panel.detail.check_by") %>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= Employee.find(@check.check_by).name rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<%= t("views.right_panel.detail.check_at") %>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.created_at.utc.getlocal.strftime("%e %b %Y %I:%M %p") rescue '-' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<%= t("views.right_panel.detail.reason") %>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<%= @check.reason %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped col-md-12">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><%= t("views.right_panel.detail.product") %></th>
|
||||
<th><%= t("views.right_panel.detail.stock_count") %></th>
|
||||
<th><%= t("views.right_panel.detail.stock_balance") %></th>
|
||||
<th><%= t("views.right_panel.detail.different") %></th>
|
||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||
</tr>
|
||||
<%
|
||||
count = 0
|
||||
@check.stock_check_items.each do |item|
|
||||
count += 1
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td>
|
||||
<% menu_item = MenuItemInstance.find_by_item_instance_code(item.item_code)%>
|
||||
<% if menu_item.nil? %>
|
||||
<%= Product.find_by_item_code(item.item_code).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= menu_item.menu_item.name rescue "-" %>
|
||||
- <%= menu_item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= item.stock_count %></td>
|
||||
<td><%= item.stock_balance %></td>
|
||||
<td><%= item.different %></td>
|
||||
<td><%= item.remark %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button id="back" type="button" class="btn btn-block btn-primary"> Back</button>
|
||||
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> Save to Journal</button>
|
||||
<button id="print" type="button" class="btn btn-block btn-primary"> Print</button>
|
||||
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||
|
||||
<div class="body">
|
||||
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> <%= t("views.right_panel.button.save_to_journal") %></button>
|
||||
<button id="print" type="button" class="btn btn-block btn-primary"> <%= t :print %></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('#save_to_journal').on('click', function () {
|
||||
|
||||
0
app/views/inventory/stock_journals/_form.html.erb
Normal file → Executable file
0
app/views/inventory/stock_journals/_form.html.erb
Normal file → Executable file
0
app/views/inventory/stock_journals/_stock_journal.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_journals/_stock_journal.json.jbuilder
Normal file → Executable file
2
app/views/inventory/stock_journals/edit.html.erb
Normal file → Executable file
2
app/views/inventory/stock_journals/edit.html.erb
Normal file → Executable file
@@ -2,5 +2,5 @@
|
||||
|
||||
<%= render 'form', stock_journal: @stock_journal %>
|
||||
|
||||
<%= link_to 'Show', @stock_journal %> |
|
||||
<%= link_to t("views.btn.show"), @stock_journal %> |
|
||||
<%= link_to 'Back', stock_journals_path %>
|
||||
|
||||
6
app/views/inventory/stock_journals/index.html.erb
Normal file → Executable file
6
app/views/inventory/stock_journals/index.html.erb
Normal file → Executable file
@@ -12,9 +12,9 @@
|
||||
<tbody>
|
||||
<% @stock_journals.each do |stock_journal| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', stock_journal %></td>
|
||||
<td><%= link_to 'Edit', edit_stock_journal_path(stock_journal) %></td>
|
||||
<td><%= link_to 'Destroy', stock_journal, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
<td><%= link_to t("views.btn.show"), stock_journal %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_stock_journal_path(stock_journal) %></td>
|
||||
<td><%= link_to t("views.btn.delete"), stock_journal, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
0
app/views/inventory/stock_journals/index.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_journals/index.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_journals/new.html.erb
Normal file → Executable file
0
app/views/inventory/stock_journals/new.html.erb
Normal file → Executable file
2
app/views/inventory/stock_journals/show.html.erb
Normal file → Executable file
2
app/views/inventory/stock_journals/show.html.erb
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_stock_journal_path(@stock_journal) %> |
|
||||
<%= link_to t("views.btn.edit"), edit_stock_journal_path(@stock_journal) %> |
|
||||
<%= link_to 'Back', stock_journals_path %>
|
||||
|
||||
0
app/views/inventory/stock_journals/show.json.jbuilder
Normal file → Executable file
0
app/views/inventory/stock_journals/show.json.jbuilder
Normal file → Executable file
0
app/views/kaminari/_first_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_first_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_gap.html.erb
Normal file → Executable file
0
app/views/kaminari/_gap.html.erb
Normal file → Executable file
0
app/views/kaminari/_last_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_last_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_next_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_next_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_paginator.html.erb
Normal file → Executable file
0
app/views/kaminari/_paginator.html.erb
Normal file → Executable file
0
app/views/kaminari/_prev_page.html.erb
Normal file → Executable file
0
app/views/kaminari/_prev_page.html.erb
Normal file → Executable file
85
app/views/layouts/CRM.html.erb
Normal file → Executable file
85
app/views/layouts/CRM.html.erb
Normal file → Executable file
@@ -1,34 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<%= stylesheet_link_tag 'CRM', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'CRM', 'data-turbolinks-track': 'reload' %>
|
||||
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header_crm' %>
|
||||
<div class="container-fluid">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert-danger fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
|
||||
<% if !flash["errors"]%>
|
||||
<%=message%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<%= stylesheet_link_tag 'CRM', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'CRM', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body class="theme-indigo">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<% if !flash["errors"]%>
|
||||
<%
|
||||
if type == "notice"
|
||||
color = "alert-success"
|
||||
elsif type == "error"
|
||||
color = "alert-danger"
|
||||
else
|
||||
color = "bg-black"
|
||||
end
|
||||
%>
|
||||
|
||||
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
70
app/views/layouts/OQS.html.erb
Normal file → Executable file
70
app/views/layouts/OQS.html.erb
Normal file → Executable file
@@ -1,28 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<title>SmartSales : Restaurant</title>
|
||||
<%= csrf_meta_tags %>
|
||||
<!-- Favicon-->
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
<%= stylesheet_link_tag 'OQS', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'OQS', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
<!-- Google Fonts -->
|
||||
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
|
||||
-->
|
||||
<%= stylesheet_link_tag 'OQS', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'OQS', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header' %>
|
||||
<div class="container-fluid">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
<%= message %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
<body class="theme-indigo">
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="preloader">
|
||||
<div class="spinner-layer pl-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Please wait...</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!-- #END# Page Loader -->
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
<%= message %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
186
app/views/layouts/_header.html.erb
Normal file → Executable file
186
app/views/layouts/_header.html.erb
Normal file → Executable file
@@ -1,139 +1,47 @@
|
||||
|
||||
<nav class="navbar navbar-toggleable-md fixed-top navbar-light setting_nav">
|
||||
|
||||
<a href="#" class=" btn btn-info btn-sm " id="sx-menu-toggle" data-toggle="push-menu" role="button">
|
||||
<span class="fa fa-bars" ></span>
|
||||
</a>
|
||||
|
||||
<a class="navbar-brand" href="<%= dashboard_path %>" style="color: #fff">
|
||||
<img src="<%= asset_path('SX-Logo-small.png') %>" width="30" height="30" alt="Logo" />
|
||||
<span class="navbar-brand-txt">SX Restaurant</span>
|
||||
</a>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<!-- <ul class="navbar-nav mr-auto">
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Zones (Zone,Table,Rooms)", settings_zones_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Menus ", settings_menus_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Item Sets ", settings_item_sets_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Sets ", settings_menu_item_sets_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Categories", settings_menu_categories_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Attributes", settings_menu_item_attributes_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Cashier Terminals", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Payment Methods", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commissions", settings_commissions_path , :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commissioners", settings_commissioners_path , :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Promotion", settings_promotions_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Products", settings_products_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Transactions</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Orders ", transactions_orders_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Sales ", transactions_sales_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Credit Note ", transactions_credit_notes_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Reports</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Sales Item Report", reports_saleitem_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Credit Sale Report", reports_credit_payment_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Void Sale Report", reports_void_sale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commission Report", reports_commission_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Stock Check Report", reports_stock_check_index_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= oqs_root_path %>" role="button" aria-haspopup="true" aria-expanded="false"> OQS</a>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= origami_root_path %>" role="button" aria-haspopup="true" aria-expanded="false"> Cashier</a>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= crm_customers_path %>" role="button" aria-haspopup="true" aria-expanded="false"> CRM</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul> -->
|
||||
|
||||
</div>
|
||||
<% if current_login_employee %>
|
||||
<div class="right">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<li style="color: #959595"><%= current_login_employee.name %> </li>
|
||||
|
||||
<li style="padding-right:10px;padding-left:10px"> | </li>
|
||||
<li ><%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</nav>
|
||||
<style type="text/css">
|
||||
hr.hr_advance {
|
||||
margin-top: 10px !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
</style>
|
||||
<!-- Menu Toggle Script -->
|
||||
|
||||
<script>
|
||||
$("#sx-menu-toggle").click(function(e) {
|
||||
e.preventDefault();
|
||||
$("#wrapper").toggleClass("toggled");
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var Accordion = function(el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
|
||||
// Variables privadas
|
||||
var links = this.el.find('.link');
|
||||
// Evento
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
|
||||
}
|
||||
|
||||
Accordion.prototype.dropdown = function(e) {
|
||||
var $el = e.data.el;
|
||||
$this = $(this),
|
||||
$next = $this.next();
|
||||
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
|
||||
};
|
||||
}
|
||||
|
||||
var accordion = new Accordion($('#accordion'), false);
|
||||
});
|
||||
|
||||
</script>
|
||||
<!-- Search Bar -->
|
||||
<!-- <div class="search-bar">
|
||||
<div class="search-icon">
|
||||
<i class="material-icons">search</i>
|
||||
</div>
|
||||
<input type="text" placeholder="START TYPING...">
|
||||
<div class="close-search">
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- #END# Search Bar -->
|
||||
<!-- Top Bar -->
|
||||
<nav class="navbar">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
|
||||
<a href="javascript:void(0);" class="bars"></a>
|
||||
<a class="navbar-brand" href="<%=dashboard_path%>">
|
||||
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo" />
|
||||
<span class="navbar-brand-txt">SX Restaurant</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Start Delete confirrm text !-->
|
||||
<div class="navbar-right">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<% if current_login_employee %>
|
||||
<span><%= current_login_employee.name %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<p class="delete waves-effect waves-block" style="padding:0.5rem 1rem; margin-bottom: 0rem;" data-ref="<%=logout_path%>" data-method="delete">Logout</p>
|
||||
<span class="hidden" id="delete_text">
|
||||
<h6>Are you sure you want to Logout ?</h6>
|
||||
<!-- <h6>This action can't be undo. </h6> -->
|
||||
</span>
|
||||
<%end%>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- NO Need for color Change
|
||||
<a href="javascript:void(0);" class="js-right-sidebar" data-close="true">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
94
app/views/layouts/_header_backup.html.erb
Executable file
94
app/views/layouts/_header_backup.html.erb
Executable file
@@ -0,0 +1,94 @@
|
||||
<nav class="navbar navbar-toggleable-md fixed-top navbar-light setting_nav">
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<%= root_path %>" style="color: rgba(67, 185, 220, 0.9)">E-menu</a>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Zones (Zone,Table,Rooms)", settings_zones_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Menus ", settings_menus_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Item Sets ", settings_item_sets_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Sets ", settings_menu_item_sets_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Categories", settings_menu_categories_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Attributes", settings_menu_item_attributes_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Cashier Terminals", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Payment Methods", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commissions", settings_commissions_path , :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commissioners", settings_commissioners_path , :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
|
||||
<hr class="hr_advance" />
|
||||
<li><%= link_to "Promotion", settings_promotions_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Products", settings_products_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Transactions</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Orders ", transactions_orders_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Sales ", transactions_sales_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Credit Note ", transactions_credit_notes_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Reports</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Sales Item Report", reports_saleitem_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Credit Sale Report", reports_credit_payment_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Void Sale Report", reports_void_sale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Commission Report", reports_commission_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Stock Check Report", reports_stock_check_index_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= oqs_root_path %>" role="button" aria-haspopup="true" aria-expanded="false"> OQS</a>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= origami_root_path %>" role="button" aria-haspopup="true" aria-expanded="false"> Cashier</a>
|
||||
</li>
|
||||
<li class="navbar-nav mr-auto">
|
||||
<a href="<%= crm_customers_path %>" role="button" aria-haspopup="true" aria-expanded="false"> CRM</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<% if current_login_employee %>
|
||||
<div class="right">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<li style="color: #959595"><%= current_login_employee.name %> </li>
|
||||
|
||||
<li style="padding-right:10px;padding-left:10px"> | </li>
|
||||
<li ><%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</nav>
|
||||
<style type="text/css">
|
||||
hr.hr_advance {
|
||||
margin-top: 10px !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
</style>
|
||||
0
app/views/layouts/_header_crm.html.erb
Normal file → Executable file
0
app/views/layouts/_header_crm.html.erb
Normal file → Executable file
0
app/views/layouts/_header_inventory.html.erb
Normal file → Executable file
0
app/views/layouts/_header_inventory.html.erb
Normal file → Executable file
0
app/views/layouts/_header_oqs.html.erb
Normal file → Executable file
0
app/views/layouts/_header_oqs.html.erb
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user