merge with augn myo
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
class Settings::CommissionersController < ApplicationController
|
class Settings::CommissionersController < ApplicationController
|
||||||
|
load_and_authorize_resource except: [:create]
|
||||||
before_action :set_commissioner, only: [:show, :edit, :update, :destroy]
|
before_action :set_commissioner, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /commissioners
|
# GET /commissioners
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Settings::CommissionsController < ApplicationController
|
class Settings::CommissionsController < ApplicationController
|
||||||
|
load_and_authorize_resource except: [:create]
|
||||||
before_action :set_commission, only: [:show, :edit, :update, :destroy]
|
before_action :set_commission, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /commissions
|
# GET /commissions
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Settings::ProductsController < ApplicationController
|
class Settings::ProductsController < ApplicationController
|
||||||
|
load_and_authorize_resource except: [:create]
|
||||||
before_action :set_settings_product, only: [:show, :edit, :update, :destroy]
|
before_action :set_settings_product, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /settings/products
|
# GET /settings/products
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Settings::PromotionsController < ApplicationController
|
class Settings::PromotionsController < ApplicationController
|
||||||
|
load_and_authorize_resource except: [:create]
|
||||||
before_action :set_promotion, only: [:show, :edit, :update, :destroy]
|
before_action :set_promotion, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /promotions
|
# GET /promotions
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Transactions::CreditNotesController < ApplicationController
|
class Transactions::CreditNotesController < ApplicationController
|
||||||
|
|
||||||
before_action :set_transactions_sale, only: [:show, :edit, :update, :destroy]
|
before_action :set_transactions_sale, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
# GET /transactions/sales
|
# GET /transactions/sales
|
||||||
|
|||||||
@@ -25,10 +25,16 @@ class Ability
|
|||||||
can :manage, TaxProfile
|
can :manage, TaxProfile
|
||||||
can :manage, PrintSetting
|
can :manage, PrintSetting
|
||||||
can :manage, Account
|
can :manage, Account
|
||||||
|
can :manage, Commission
|
||||||
|
can :manage, Commissioner
|
||||||
|
can :manage, Promotion
|
||||||
|
can :manage, Product
|
||||||
|
|
||||||
|
|
||||||
can :manage, Order
|
can :manage, Order
|
||||||
can :manage, Sale
|
can :manage, Sale
|
||||||
|
|
||||||
|
|
||||||
can :manage, Customer
|
can :manage, Customer
|
||||||
can :manage, DiningQueue
|
can :manage, DiningQueue
|
||||||
|
|
||||||
|
|||||||
@@ -73,15 +73,21 @@
|
|||||||
<span><%= t :transactions %></span>
|
<span><%= t :transactions %></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="ml-menu">
|
<ul class="ml-menu">
|
||||||
<li>
|
<% if can? :menage, Order %>
|
||||||
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
|
<li>
|
||||||
</li>
|
<a href="<%= transactions_orders_path %>"><%= t :orders %></a>
|
||||||
<li>
|
</li>
|
||||||
<a href="<%= transactions_sales_path %>"><%= t :sale %></a>
|
<% end %>
|
||||||
</li>
|
<% if can? :menage, Sale %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= transactions_credit_notes_path %>"><%= (t :credit) + " " + (t :reports) %></a>
|
<a href="<%= transactions_sales_path %>"><%= t :sale %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if can? :menage, Sale %>
|
||||||
|
<li>
|
||||||
|
<a href="<%= transactions_credit_notes_path %>"><%= (t :credit) + " " + (t :reports) %></a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -117,86 +123,108 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="header"><%= t :settings %></li>
|
<li class="header"><%= t :settings %></li>
|
||||||
|
<% if can? :menage, Zone %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= settings_zones_path %>">
|
<a href="<%= settings_zones_path %>">
|
||||||
<i class="material-icons col-red">donut_large</i>
|
<i class="material-icons col-red">donut_large</i>
|
||||||
<span><%= t :dinings %></span>
|
<span><%= t :dinings %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<% end %>
|
||||||
<a href="<%= settings_menus_path %>">
|
<% if can? :menage, Menu %>
|
||||||
<i class="material-icons col-amber">donut_large</i>
|
<li>
|
||||||
<span><%= t :menu %></span>
|
<a href="<%= settings_menus_path %>">
|
||||||
</a>
|
<i class="material-icons col-amber">donut_large</i>
|
||||||
</li>
|
<span><%= t :menu %></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if can? :menage, OrderQueueStation %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= settings_order_queue_stations_path %>">
|
<a href="<%= settings_order_queue_stations_path %>">
|
||||||
<i class="material-icons col-indigo">donut_large</i>
|
<i class="material-icons col-indigo">donut_large</i>
|
||||||
<span><%= t :oqs %></span>
|
<span><%= t :oqs %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<% end %>
|
||||||
<a href="<%= settings_employees_path %>">
|
<% if can? :menage, Employee %>
|
||||||
<i class="material-icons col-light-blue">donut_large</i>
|
<li>
|
||||||
<span><%= t :staff %></span>
|
<a href="<%= settings_employees_path %>">
|
||||||
</a>
|
<i class="material-icons col-light-blue">donut_large</i>
|
||||||
</li>
|
<span><%= t :staff %></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if can? :menage, CashierTerminal %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= settings_cashier_terminals_path %>">
|
<a href="<%= settings_cashier_terminals_path %>">
|
||||||
<i class="material-icons col-green">donut_large</i>
|
<i class="material-icons col-green">donut_large</i>
|
||||||
<span><%= (t :cashier) + " " + (t :terminal) %></span>
|
<span><%= (t :cashier) + " " + (t :terminal) %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if can? :menage, PrintSetting %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= print_settings_path %>">
|
<a href="<%= print_settings_path %>">
|
||||||
<i class="material-icons col-pupple">donut_large</i>
|
<i class="material-icons col-pupple">donut_large</i>
|
||||||
<span><%= t :printer %></span>
|
<span><%= t :printer %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if can? :menage, TaxProfile %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= settings_tax_profiles_path %>">
|
<a href="<%= settings_tax_profiles_path %>">
|
||||||
<i class="material-icons col-green">donut_large</i>
|
<i class="material-icons col-green">donut_large</i>
|
||||||
<span><%= t :tax_profile %></span>
|
<span><%= t :tax_profile %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<% end %>
|
||||||
<a href="<%= settings_payment_method_settings_path %>">
|
<% if can? :menage, PaymentMethodSetting %>
|
||||||
<i class="material-icons col-light-blue">donut_large</i>
|
<li>
|
||||||
<span><%= t :payment_methods %></span>
|
<a href="<%= settings_payment_method_settings_path %>">
|
||||||
</a>
|
<i class="material-icons col-light-blue">donut_large</i>
|
||||||
</li>
|
<span><%= t :payment_methods %></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<!-- <li>
|
<!-- <li>
|
||||||
<a href="<%= settings_accounts_path %>">
|
<a href="<%= settings_accounts_path %>">
|
||||||
<i class="material-icons col-amber">donut_large</i>
|
<i class="material-icons col-amber">donut_large</i>
|
||||||
<span><%= t :accounts %></span>
|
<span><%= t :accounts %></span>
|
||||||
</a>
|
</a>
|
||||||
</li> -->
|
</li> -->
|
||||||
<li>
|
<% if can? :menage, Product %>
|
||||||
<a href="<%= settings_products_path %>">
|
<li>
|
||||||
<i class="material-icons col-brown">donut_large</i>
|
<a href="<%= settings_products_path %>">
|
||||||
<span><%= t :products %></span>
|
<i class="material-icons col-brown">donut_large</i>
|
||||||
</a>
|
<span><%= t :products %></span>
|
||||||
</li>
|
</a>
|
||||||
<li>
|
</li>
|
||||||
<a href="<%= settings_promotions_path %>">
|
<% end %>
|
||||||
<i class="material-icons col-red">donut_large</i>
|
<% if can? :menage, Promotion %>
|
||||||
<span><%= t :promotions %></span>
|
<li>
|
||||||
</a>
|
<a href="<%= settings_promotions_path %>">
|
||||||
</li>
|
<i class="material-icons col-red">donut_large</i>
|
||||||
<li>
|
<span><%= t :promotions %></span>
|
||||||
<a href="<%= settings_commissions_path %>">
|
</a>
|
||||||
<i class="material-icons col-green">donut_large</i>
|
</li>
|
||||||
<span><%= t :commissions %></span>
|
<% end %>
|
||||||
</a>
|
<% if can? :menage, Commission %>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<a href="<%= settings_commissions_path %>">
|
||||||
<a href="<%= settings_commissioners_path %>">
|
<i class="material-icons col-green">donut_large</i>
|
||||||
<i class="material-icons col-teal">donut_large</i>
|
<span><%= t :commissions %></span>
|
||||||
<span><%= t :commissioners %></span>
|
</a>
|
||||||
</a>
|
</li>
|
||||||
</li>
|
<% end %>
|
||||||
|
<% if can? :menage, Commissioner %>
|
||||||
|
<li>
|
||||||
|
<a href="<%= settings_commissioners_path %>">
|
||||||
|
<i class="material-icons col-teal">donut_large</i>
|
||||||
|
<span><%= t :commissioners %></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- #Menu -->
|
<!-- #Menu -->
|
||||||
|
|||||||
Reference in New Issue
Block a user