acces level for transaction/sale VOID
This commit is contained in:
3
app/assets/javascripts/reservation.js
Normal file
3
app/assets/javascripts/reservation.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
$(function(){
|
||||||
|
|
||||||
|
});
|
||||||
0
app/assets/stylesheets/reservation.scss
Normal file
0
app/assets/stylesheets/reservation.scss
Normal file
@@ -80,6 +80,17 @@ class Origami::DashboardController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
def get_all_menu
|
def get_all_menu
|
||||||
|
|||||||
6
app/controllers/origami/reservation_controller.rb
Normal file
6
app/controllers/origami/reservation_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
class Origami::ReservationController < BaseOrigamiController
|
||||||
|
|
||||||
|
def index
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<!-- Widgets -->
|
<!-- Widgets -->
|
||||||
<div class="row clearfix">
|
<div class="row clearfix">
|
||||||
<% if @quick_service == '1' %>
|
<% 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="info-box bg-purple">
|
||||||
<div class="icon" >
|
<div class="icon" >
|
||||||
<i class="material-icons">arrow_forward</i>
|
<i class="material-icons">arrow_forward</i>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @dinein_cashier == '1' %>
|
<% 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="info-box bg-green">
|
||||||
<div class="icon" >
|
<div class="icon" >
|
||||||
<i class="material-icons">arrow_forward</i>
|
<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 class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
|
||||||
</div>
|
</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' %>
|
<% 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="info-box bg-blue">
|
||||||
<div class="icon" >
|
<div class="icon" >
|
||||||
<i class="material-icons">arrow_forward</i>
|
<i class="material-icons">arrow_forward</i>
|
||||||
@@ -240,5 +250,9 @@ $(function() {
|
|||||||
var url = $(this).attr("data-href");
|
var url = $(this).attr("data-href");
|
||||||
window.open(url,'_blank');
|
window.open(url,'_blank');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".reservation").on("click", function(){
|
||||||
|
window.location.href = '/origami/reservation';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
5
app/views/origami/reservation/index.html.erb
Normal file
5
app/views/origami/reservation/index.html.erb
Normal 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>
|
||||||
@@ -42,9 +42,11 @@
|
|||||||
<th><%= t("views.right_panel.detail.sales_status") %></th>
|
<th><%= t("views.right_panel.detail.sales_status") %></th>
|
||||||
<th><%= t("views.right_panel.detail.receipt_generated_at") %></th>
|
<th><%= t("views.right_panel.detail.receipt_generated_at") %></th>
|
||||||
<% if @sale.sale_status == "completed" %>
|
<% if @sale.sale_status == "completed" %>
|
||||||
<th>
|
<% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
|
||||||
<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>
|
||||||
</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 %>
|
<% else %>
|
||||||
<% if current_login_employee.role == "administrator" %>
|
<% if current_login_employee.role == "administrator" %>
|
||||||
<%if @membership.discount && @sale.customer.membership_id %>
|
<%if @membership.discount && @sale.customer.membership_id %>
|
||||||
|
|||||||
@@ -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.css )
|
||||||
Rails.application.config.assets.precompile += %w( order_reservation.js )
|
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 )
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ en:
|
|||||||
credits: "Credits"
|
credits: "Credits"
|
||||||
track: "Track"
|
track: "Track"
|
||||||
debit: "Debit"
|
debit: "Debit"
|
||||||
|
reservation: "Reservation"
|
||||||
|
|
||||||
views:
|
views:
|
||||||
btn:
|
btn:
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ mm:
|
|||||||
credits: "အကြွေးများ"
|
credits: "အကြွေးများ"
|
||||||
track: "Track"
|
track: "Track"
|
||||||
debit: "Debit"
|
debit: "Debit"
|
||||||
|
reservation: "Reservation"
|
||||||
|
|
||||||
views:
|
views:
|
||||||
btn:
|
btn:
|
||||||
|
|||||||
@@ -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/Alipay' => "alipay#index"
|
||||||
# get 'sale/:sale_id/:type/credit_payment/others_payment/DINGA' => "dinga#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"
|
# get 'sale/:sale_id/:type/credit_payment/others_payment/GiftVoucher' => "gift_voucher#index"
|
||||||
|
|
||||||
|
#------------- Start Reservation -------------------#
|
||||||
|
get '/reservation' => "reservation#index"
|
||||||
|
#------------- End Reservation -------------------#
|
||||||
end
|
end
|
||||||
|
|
||||||
#--------- Waiter/Ordering Station ------------#
|
#--------- Waiter/Ordering Station ------------#
|
||||||
|
|||||||
Reference in New Issue
Block a user