Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Aung Myo
2018-09-24 15:57:13 +06:30
11 changed files with 57 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
$(function(){
});

View File

View File

@@ -80,6 +80,17 @@ class Origami::DashboardController < BaseOrigamiController
end
end
end
#reservation
reservation = Lookup.collection_of('reservation')
@reservation = 0
if !reservation.empty?
reservation.each do |reserve|
if reserve[0] == 'Reservation'
@reservation = reserve[1]
end
end
end
end
def get_all_menu

View File

@@ -0,0 +1,6 @@
class Origami::ReservationController < BaseOrigamiController
def index
end
end

View File

@@ -22,7 +22,7 @@
<!-- Widgets -->
<div class="row clearfix">
<% if @quick_service == '1' %>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 qs_view">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 qs_view">
<div class="info-box bg-purple">
<div class="icon" >
<i class="material-icons">arrow_forward</i>
@@ -32,7 +32,7 @@
</div>
<% end %>
<% if @dinein_cashier == '1' %>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 cashier_view">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 cashier_view">
<div class="info-box bg-green">
<div class="icon" >
<i class="material-icons">arrow_forward</i>
@@ -40,9 +40,19 @@
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
</div>
</div>
<% end %>
<% end %>
<% if @reservation == '1' %>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 reservation">
<div class="info-box bg-orange">
<div class="icon" >
<i class="material-icons">arrow_forward</i>
</div>
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :reservation %></div>
</div>
</div>
<% end %>
<% if @order_reservation == '1' %>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-10 order_reservation">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 order_reservation">
<div class="info-box bg-blue">
<div class="icon" >
<i class="material-icons">arrow_forward</i>
@@ -240,5 +250,9 @@ $(function() {
var url = $(this).attr("data-href");
window.open(url,'_blank');
});
$(".reservation").on("click", function(){
window.location.href = '/origami/reservation';
});
});
</script>

View File

@@ -0,0 +1,5 @@
<%= stylesheet_link_tag 'reservation', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'reservation', 'data-turbolinks-track': 'reload' %>
<div class="container-fluid">
</div>

View File

@@ -42,9 +42,11 @@
<th><%= t("views.right_panel.detail.sales_status") %></th>
<th><%= t("views.right_panel.detail.receipt_generated_at") %></th>
<% if @sale.sale_status == "completed" %>
<th>
<button type="button" class="btn btn-block bg-red waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
</th>
<% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
<th>
<button type="button" class="btn btn-block bg-red waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
</th>
<% end %>
<% else %>
<% if current_login_employee.role == "administrator" %>
<%if @membership.discount && @sale.customer.membership_id %>

View File

@@ -57,3 +57,6 @@ Rails.application.config.assets.precompile += %w( inventory.js )
Rails.application.config.assets.precompile += %w( order_reservation.css )
Rails.application.config.assets.precompile += %w( order_reservation.js )
# --- Reservation ----
Rails.application.config.assets.precompile += %w( reservation.css )
Rails.application.config.assets.precompile += %w( reservation.js )

View File

@@ -86,6 +86,7 @@ en:
credits: "Credits"
track: "Track"
debit: "Debit"
reservation: "Reservation"
views:
btn:

View File

@@ -81,6 +81,7 @@ mm:
credits: "အကြွေးများ"
track: "Track"
debit: "Debit"
reservation: "Reservation"
views:
btn:

View File

@@ -324,6 +324,10 @@ scope "(:locale)", locale: /en|mm/ do
get 'sale/:sale_id/:type/credit_payment/others_payment/Alipay' => "alipay#index"
# get 'sale/:sale_id/:type/credit_payment/others_payment/DINGA' => "dinga#index"
# get 'sale/:sale_id/:type/credit_payment/others_payment/GiftVoucher' => "gift_voucher#index"
#------------- Start Reservation -------------------#
get '/reservation' => "reservation#index"
#------------- End Reservation -------------------#
end
#--------- Waiter/Ordering Station ------------#