dashboard link
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -51,3 +51,6 @@ dump.rdb
|
|||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
public/fonts/*
|
public/fonts/*
|
||||||
|
|
||||||
|
# Ruby-Mine IDE folder
|
||||||
|
.idea
|
||||||
|
|||||||
2
.idea/.generators
generated
2
.idea/.generators
generated
@@ -5,4 +5,4 @@ You are allowed to:
|
|||||||
2. Remove generators
|
2. Remove generators
|
||||||
3. Add installed generators
|
3. Add installed generators
|
||||||
To add new installed generators automatically delete this file and reload the project.
|
To add new installed generators automatically delete this file and reload the project.
|
||||||
--><GeneratorsGroup><Generator name="active_record:migration" /><Generator name="active_record:model" /><Generator name="active_record:observer" /><Generator name="active_record:session_migration" /><Generator name="controller" /><Generator name="erb:controller" /><Generator name="erb:mailer" /><Generator name="erb:scaffold" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="mailer" /><Generator name="metal" /><Generator name="migration" /><Generator name="model" /><Generator name="model_subclass" /><Generator name="observer" /><Generator name="performance_test" /><Generator name="plugin" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="session_migration" /><Generator name="stylesheets" /><Generator name="test_unit:controller" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:observer" /><Generator name="test_unit:performance" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /></GeneratorsGroup></Settings>
|
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /></GeneratorsGroup></Settings>
|
||||||
|
|||||||
2
.idea/.rakeTasks
generated
2
.idea/.rakeTasks
generated
File diff suppressed because one or more lines are too long
28
.idea/sxrestaurant.iml
generated
28
.idea/sxrestaurant.iml
generated
@@ -124,14 +124,14 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="arel (v8.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="arel (v8.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v7.1.1.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v7.1.1.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -142,6 +142,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="cancancan (v1.17.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="cancancan (v1.17.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="chronic (v0.10.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.12.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -150,7 +151,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="cups (v0.0.7, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="cups (v0.0.7, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="database_cleaner (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="database_cleaner (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.6.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.6.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="factory_girl (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="factory_girl (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="factory_girl_rails (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="factory_girl_rails (v4.8.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -160,7 +161,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="font-awesome-rails (v4.7.0.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.4.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.15.5, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.4, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.7.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.3.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.3.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v6.0.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="jquery-ui-rails (v6.0.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -175,7 +176,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.2.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.2.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -190,10 +191,10 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="rack-cors (v0.4.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rack-cors (v0.4.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rack-protection (v2.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rack-protection (v2.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rails (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rails (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="railties (v5.1.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="railties (v5.1.3, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.10, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.10, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
@@ -228,6 +229,7 @@
|
|||||||
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.5.1, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.5.1, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.5, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.5, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.3) [gem]" level="application" />
|
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="whenever (v0.9.7, rbenv: 2.3.3) [gem]" level="application" />
|
||||||
</component>
|
</component>
|
||||||
<component name="RModuleSettingsStorage">
|
<component name="RModuleSettingsStorage">
|
||||||
<LOAD_PATH number="0" />
|
<LOAD_PATH number="0" />
|
||||||
|
|||||||
910
.idea/workspace.xml
generated
910
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@@ -4,135 +4,135 @@ class Ability
|
|||||||
def initialize(user)
|
def initialize(user)
|
||||||
user ||= Employee.new
|
user ||= Employee.new
|
||||||
|
|
||||||
if user.role == "administrator"
|
if user.role == 'administrator'
|
||||||
|
|
||||||
can :manage, :all
|
can :manage, :all
|
||||||
|
|
||||||
elsif user.role == "manager"
|
elsif user.role == 'manager'
|
||||||
|
|
||||||
can :manage, Menu
|
can :manage, Menu
|
||||||
can :manage, MenuCategory
|
can :manage, MenuCategory
|
||||||
can :manage, MenuItemAttribute
|
can :manage, MenuItemAttribute
|
||||||
can :manage, MenuItemInstance
|
can :manage, MenuItemInstance
|
||||||
can :manage, MenuItemOption
|
can :manage, MenuItemOption
|
||||||
can :manage, SetMenuItem
|
can :manage, SetMenuItem
|
||||||
can :manage, OrderQueueStation
|
can :manage, OrderQueueStation
|
||||||
can :manage, Zone
|
can :manage, Zone
|
||||||
can :manage, CashierTerminal
|
can :manage, CashierTerminal
|
||||||
can :manage, Employee
|
can :manage, Employee
|
||||||
# can :manage, MembershipSetting
|
# can :manage, MembershipSetting
|
||||||
# can :manage, MembershipAction
|
# can :manage, MembershipAction
|
||||||
# can :manage, PaymentMethodSetting
|
# can :manage, PaymentMethodSetting
|
||||||
can :manage, TaxProfile
|
can :manage, TaxProfile
|
||||||
can :manage, PrintSetting
|
can :manage, PrintSetting
|
||||||
can :manage, Account
|
can :manage, Account
|
||||||
|
|
||||||
can :manage, Order
|
can :manage, Order
|
||||||
can :manage, Sale
|
can :manage, Sale
|
||||||
|
|
||||||
can :manage, Customer
|
can :manage, Customer
|
||||||
can :manage, DiningQueue
|
can :manage, DiningQueue
|
||||||
|
|
||||||
can :index, :dailysale
|
can :index, :dailysale
|
||||||
can :index, :saleitem
|
can :index, :saleitem
|
||||||
can :index, :receipt_no
|
can :index, :receipt_no
|
||||||
can :index, :shiftsale
|
can :index, :shiftsale
|
||||||
can :index, :credit_payment
|
can :index, :credit_payment
|
||||||
can :index, :void_sale
|
can :index, :void_sale
|
||||||
|
|
||||||
can :get_customer, Customer
|
can :get_customer, Customer
|
||||||
can :add_customer, Customer
|
can :add_customer, Customer
|
||||||
can :update_sale_by_customer, Customer
|
can :update_sale_by_customer, Customer
|
||||||
|
|
||||||
can :index, :other_charge
|
can :index, :other_charge
|
||||||
can :create, :other_charge
|
can :create, :other_charge
|
||||||
can :index, :discount
|
can :index, :discount
|
||||||
can :create, :discount
|
can :create, :discount
|
||||||
can :remove_discount_items, :discount
|
can :remove_discount_items, :discount
|
||||||
can :remove_all_discount, :discount
|
can :remove_all_discount, :discount
|
||||||
|
|
||||||
can :first_bill, :payment
|
can :first_bill, :payment
|
||||||
can :show, :payment
|
can :show, :payment
|
||||||
can :create, :payment
|
can :create, :payment
|
||||||
can :reprint, :payment
|
can :reprint, :payment
|
||||||
can :rounding_adj, :payment
|
can :rounding_adj, :payment
|
||||||
|
|
||||||
can :move_dining, :movetable
|
can :move_dining, :movetable
|
||||||
can :moving, :movetable
|
can :moving, :movetable
|
||||||
|
|
||||||
can :move_dining, :moveroom
|
can :move_dining, :moveroom
|
||||||
|
|
||||||
can :edit, :sale_edit
|
can :edit, :sale_edit
|
||||||
can :item_void, :sale_edit
|
can :item_void, :sale_edit
|
||||||
can :item_void_cancel, :sale_edit
|
can :item_void_cancel, :sale_edit
|
||||||
can :cancel_all_void, :sale_edit
|
can :cancel_all_void, :sale_edit
|
||||||
can :apply_void, :sale_edit
|
can :apply_void, :sale_edit
|
||||||
|
|
||||||
can :overall_void, :void
|
can :overall_void, :void
|
||||||
|
|
||||||
elsif user.role == "cashier"
|
elsif user.role == 'cashier'
|
||||||
|
|
||||||
# can :overall_void, :void
|
|
||||||
|
|
||||||
can :read, Order
|
# can :overall_void, :void
|
||||||
can :update, Order
|
|
||||||
|
|
||||||
can :read, Sale
|
|
||||||
can :update, Sale
|
|
||||||
can :get_customer, Customer
|
|
||||||
can :add_customer, Customer
|
|
||||||
can :update_sale_by_customer, Customer
|
|
||||||
|
|
||||||
can :index, :other_charge
|
can :read, Order
|
||||||
can :create, :other_charge
|
can :update, Order
|
||||||
can :index, :discount
|
|
||||||
can :create, :discount
|
|
||||||
can :remove_discount_items, :discount
|
|
||||||
can :remove_all_discount, :discount
|
|
||||||
can :member_discount, :discount
|
|
||||||
|
|
||||||
can :first_bill, :payment
|
can :read, Sale
|
||||||
can :show, :payment
|
can :update, Sale
|
||||||
can :create, :payment
|
can :get_customer, Customer
|
||||||
can :reprint, :payment
|
can :add_customer, Customer
|
||||||
can :rounding_adj, :payment
|
can :update_sale_by_customer, Customer
|
||||||
|
|
||||||
can :move_dining, :movetable
|
can :index, :other_charge
|
||||||
can :moving, :movetable
|
can :create, :other_charge
|
||||||
|
can :index, :discount
|
||||||
|
can :create, :discount
|
||||||
|
can :remove_discount_items, :discount
|
||||||
|
can :remove_all_discount, :discount
|
||||||
|
can :member_discount, :discount
|
||||||
|
|
||||||
can :move_dining, :moveroom
|
can :first_bill, :payment
|
||||||
|
can :show, :payment
|
||||||
|
can :create, :payment
|
||||||
|
can :reprint, :payment
|
||||||
|
can :rounding_adj, :payment
|
||||||
|
|
||||||
can :first_bill, :payment
|
can :move_dining, :movetable
|
||||||
can :show, :payment
|
can :moving, :movetable
|
||||||
can :create, :payment
|
|
||||||
can :reprint, :payment
|
|
||||||
|
|
||||||
can :manage, DiningQueue
|
can :move_dining, :moveroom
|
||||||
|
|
||||||
elsif user.role == "account"
|
|
||||||
|
|
||||||
can :index, :dailysale
|
can :first_bill, :payment
|
||||||
can :index, :saleitem
|
can :show, :payment
|
||||||
can :index, :receipt_no
|
can :create, :payment
|
||||||
can :index, :shiftsale
|
can :reprint, :payment
|
||||||
can :index, :credit_payment
|
|
||||||
can :index, :void_sale
|
|
||||||
|
|
||||||
elsif user.role == "supervisour"
|
can :manage, DiningQueue
|
||||||
|
|
||||||
can :edit, :sale_edit
|
elsif user.role == 'account'
|
||||||
can :item_void, :sale_edit
|
|
||||||
can :item_edit, :sale_edit
|
|
||||||
can :item_void_cancel, :sale_edit
|
|
||||||
can :cancel_all_void, :sale_edit
|
|
||||||
can :apply_void, :sale_edit
|
|
||||||
can :overall_void, :void
|
|
||||||
|
|
||||||
can :first_bill, :payment
|
can :index, :dailysale
|
||||||
can :create, :payment
|
can :index, :saleitem
|
||||||
can :show, :payment
|
can :index, :receipt_no
|
||||||
can :reprint, :payment
|
can :index, :shiftsale
|
||||||
can :rounding_adj, :payment
|
can :index, :credit_payment
|
||||||
|
can :index, :void_sale
|
||||||
|
|
||||||
|
elsif user.role == 'supervisour'
|
||||||
|
|
||||||
|
can :edit, :sale_edit
|
||||||
|
can :item_void, :sale_edit
|
||||||
|
can :item_edit, :sale_edit
|
||||||
|
can :item_void_cancel, :sale_edit
|
||||||
|
can :cancel_all_void, :sale_edit
|
||||||
|
can :apply_void, :sale_edit
|
||||||
|
can :overall_void, :void
|
||||||
|
|
||||||
|
can :first_bill, :payment
|
||||||
|
can :create, :payment
|
||||||
|
can :show, :payment
|
||||||
|
can :reprint, :payment
|
||||||
|
can :rounding_adj, :payment
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,47 +1,291 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||||
|
|
||||||
<% if current_login_employee.role = "admin" %>
|
<% if current_login_employee.role = "admin" %>
|
||||||
|
|
||||||
<% elsif current_login_employee.role = "cashier" %>
|
<% elsif current_login_employee.role = "cashier" %>
|
||||||
<%= link_to "Cashier Station", origami_path %>
|
<%= link_to "Cashier Station", origami_path %>
|
||||||
|
|
||||||
<% elsif current_login_employee = "account" %>
|
<% elsif current_login_employee = "account" %>
|
||||||
<%= link_to "Cashier Station", oishi_path %>
|
<%= link_to "Cashier Station", oishi_path %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "Cashier Station", oishi_path %>
|
<%= link_to "Cashier Station", oishi_path %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% shop = Shop.first %>
|
<% shop = Shop.first %>
|
||||||
|
|
||||||
<!-- -->
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
|
||||||
<div class="card">
|
|
||||||
<div class="page-header" style="width:100%;text-align:center;background-color:#ddd;">
|
|
||||||
<h4 style="color : #ef404a;font-weight:bold;font-style:italic;margin-bottom:0px;"><%= shop.name %></h4>
|
|
||||||
</div>
|
|
||||||
<div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;">
|
|
||||||
<%= shop.address %>
|
|
||||||
</div>
|
|
||||||
<div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;">
|
|
||||||
<%= shop.phone_no %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div class="col-md-2 container pull-right" style="margin: 0px !important;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card" id="oqs" onclick="location.href='<%= oqs_root_path %>'">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">OQS</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style type="text/css">
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card" id="origami" onclick="location.href='<%= origami_root_path %>'">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">Origami</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card" id="crm" onclick="location.href='<%= crm_root_path %>'">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">CRM</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card" id="backend" onclick="location.href='<%= dashboard_path %>'">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">Backend</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-8 col-lg-8">
|
||||||
|
<div class="" style="max-height:550px; overflow:auto;padding: 15px">
|
||||||
|
<h4 class="card-title"><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">
|
||||||
|
<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="col-md-4">
|
||||||
|
<li class="">All Settings</li>
|
||||||
|
<ul class="">
|
||||||
|
<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 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>Origami</li><br>
|
||||||
|
<li>CRM</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% elsif current_user.role == 'manager' %>
|
||||||
|
<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="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>Origami</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">
|
||||||
|
<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 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">
|
||||||
|
<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 in">
|
||||||
|
<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>
|
||||||
|
<% elsif current_user.role == 'account' %>
|
||||||
|
<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 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> <!-- end accordion id -->
|
||||||
|
</div>
|
||||||
|
</div> <!-- end col-md-4 -->
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="card">
|
||||||
|
<div class="page-header" style="width:100%;text-align:center;background-color:#ddd;">
|
||||||
|
<h4 style="color : #ef404a;font-weight:bold;font-style:italic;margin-bottom:0px;"><%= shop.name %></h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;">
|
||||||
|
<%= shop.address %>
|
||||||
|
</div>
|
||||||
|
<div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;">
|
||||||
|
<%= shop.phone_no %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
height: auto;
|
height: auto;
|
||||||
background-color: #ef404a;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.card {
|
||||||
|
margin-top: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-clip: padding-box;
|
||||||
|
transition: 0.3s ease;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card span.card-title {
|
||||||
|
color: purple;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
text-transform: uppercase;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
line-height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .card-content {
|
||||||
|
padding: 15%;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
background-clip: padding-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 120px;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .card-content p {
|
||||||
|
margin: 0;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card:hover {
|
||||||
|
box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.16), 0 10px 20px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,86 +1,91 @@
|
|||||||
<style>
|
<style>
|
||||||
.pin_pad {
|
.pin_pad {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
height:70px;
|
height: 70px;
|
||||||
line-height:70px;
|
line-height: 70px;
|
||||||
text-align:center;
|
text-align: center;
|
||||||
background:#54A5AF;
|
background: #54A5AF;
|
||||||
font-size:20px;
|
font-size: 20px;
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
.bottom{
|
|
||||||
margin-bottom: 1px;
|
.bottom {
|
||||||
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
.left{
|
|
||||||
margin-left:1px;
|
.left {
|
||||||
|
margin-left: 1px;
|
||||||
}
|
}
|
||||||
.orange{
|
|
||||||
background-color:#FF7F50;
|
.orange {
|
||||||
|
background-color: #FF7F50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.purple {
|
.purple {
|
||||||
background-color:#7a62d3;
|
background-color: #7a62d3;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
|
||||||
<%= simple_form_for(@login_form, url: emp_login_update_path, method: "PATCH") do |f| %>
|
<%= simple_form_for(@login_form, url: emp_login_update_path, method: "PATCH") do |f| %>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="content" style="margin:10px">
|
<div class="content" style="margin:10px">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.input :emp_id,as: :hidden, label: "Access PIN", required: false, class: "form-control" %>
|
<%= f.input :emp_id, as: :hidden, label: "Access PIN", required: false, class: "form-control" %>
|
||||||
|
|
||||||
<%= f.input :password, label: "Access PIN", required: false, class: "form-control" %>
|
<%= f.input :password, label: "Access PIN", required: false, class: "form-control" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content row" style="padding-left:10px;margin-left:10px; margin-top:0px; text-align:center">
|
<div class="content row" style="padding-left:10px;margin-left:10px; margin-top:0px; text-align:center">
|
||||||
<div class='col-md-12'>
|
<div class='col-md-12'>
|
||||||
<div class='row bottom'>
|
<div class='row bottom'>
|
||||||
<div class="pin_pad " data-value="1">1</div>
|
<div class="pin_pad " data-value="1">1</div>
|
||||||
<div class="pin_pad left" data-value="2">2</div>
|
<div class="pin_pad left" data-value="2">2</div>
|
||||||
<div class="pin_pad left" data-value="3">3</div>
|
<div class="pin_pad left" data-value="3">3</div>
|
||||||
</div>
|
|
||||||
<div class='row bottom'>
|
|
||||||
<div class="pin_pad" data-value="4">4</div>
|
|
||||||
<div class="pin_pad left" data-value="5">5</div>
|
|
||||||
<div class="pin_pad left" data-value="6">6</div>
|
|
||||||
</div>
|
|
||||||
<div class='row bottom'>
|
|
||||||
<div class="pin_pad" data-value="7">7</div>
|
|
||||||
<div class="pin_pad left" data-value="8">8</div>
|
|
||||||
<div class="pin_pad left" data-value="9">9</div>
|
|
||||||
</div>
|
|
||||||
<div class='row bottom'>
|
|
||||||
<div class="pin_pad orange" data-value="CLR">CLR</div>
|
|
||||||
<div class="pin_pad left" data-value="0">0</div>
|
|
||||||
<div class="pin_pad left purple" data-value="ENT">ENT</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer text-center" style="margin:10px">
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad" data-value="4">4</div>
|
||||||
</div>
|
<div class="pin_pad left" data-value="5">5</div>
|
||||||
|
<div class="pin_pad left" data-value="6">6</div>
|
||||||
|
</div>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad" data-value="7">7</div>
|
||||||
|
<div class="pin_pad left" data-value="8">8</div>
|
||||||
|
<div class="pin_pad left" data-value="9">9</div>
|
||||||
|
</div>
|
||||||
|
<div class='row bottom'>
|
||||||
|
<div class="pin_pad orange" data-value="CLR">CLR</div>
|
||||||
|
<div class="pin_pad left" data-value="0">0</div>
|
||||||
|
<div class="pin_pad left purple" data-value="ENT">ENT</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer text-center" style="margin:10px">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function () {
|
||||||
$(".pin_pad").click(function(event){
|
$(".pin_pad").click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log($(this).data("value"));
|
console.log($(this).data("value"));
|
||||||
var value = $(this).data("value");
|
var value = $(this).data("value");
|
||||||
|
|
||||||
if (value == "CLR") {
|
if (value == "CLR") {
|
||||||
$("#login_form_password").val("");
|
$("#login_form_password").val("");
|
||||||
} else if(value == "ENT") {
|
} else if (value == "ENT") {
|
||||||
$("#new_login_form").submit();
|
$("#new_login_form").submit();
|
||||||
} else {
|
} else {
|
||||||
var old_value = $("#login_form_password").val();
|
var old_value = $("#login_form_password").val();
|
||||||
$("#login_form_password").val(old_value + value);
|
$("#login_form_password").val(old_value + value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user