dashboard link

This commit is contained in:
Zin Lin Phyo
2017-08-14 16:43:35 +06:30
parent 5c2928166d
commit 7dae1c2c27
8 changed files with 811 additions and 777 deletions

3
.gitignore vendored
View File

@@ -51,3 +51,6 @@ dump.rdb
# Fonts # Fonts
public/fonts/* public/fonts/*
# Ruby-Mine IDE folder
.idea

2
.idea/.generators generated
View File

@@ -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

File diff suppressed because one or more lines are too long

28
.idea/sxrestaurant.iml generated
View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,11 @@ 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
@@ -70,7 +70,7 @@ class Ability
can :overall_void, :void can :overall_void, :void
elsif user.role == "cashier" elsif user.role == 'cashier'
# can :overall_void, :void # can :overall_void, :void
@@ -109,7 +109,7 @@ class Ability
can :manage, DiningQueue can :manage, DiningQueue
elsif user.role == "account" elsif user.role == 'account'
can :index, :dailysale can :index, :dailysale
can :index, :saleitem can :index, :saleitem
@@ -118,7 +118,7 @@ class Ability
can :index, :credit_payment can :index, :credit_payment
can :index, :void_sale can :index, :void_sale
elsif user.role == "supervisour" elsif user.role == 'supervisour'
can :edit, :sale_edit can :edit, :sale_edit
can :item_void, :sale_edit can :item_void, :sale_edit

View File

@@ -1,4 +1,4 @@
<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" %>
@@ -15,13 +15,218 @@
<% end %> <% end %>
<% shop = Shop.first %> <% shop = Shop.first %>
<!-- -->
</div> </div>
</div> </div>
<div class="footer">
<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 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="card">
<div class="page-header" style="width:100%;text-align:center;background-color:#ddd;"> <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> <h4 style="color : #ef404a;font-weight:bold;font-style:italic;margin-bottom:0px;"><%= shop.name %></h4>
@@ -32,16 +237,55 @@
<div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;"> <div class="card-block" style="text-align:center;background-color:#ddd;padding:0rem;">
<%= shop.phone_no %> <%= shop.phone_no %>
</div> </div>
</div>
</div>
<style type="text/css">
</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>

View File

@@ -1,24 +1,28 @@
<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{
.bottom {
margin-bottom: 1px; 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>
@@ -28,7 +32,7 @@
<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>
@@ -64,23 +68,24 @@
<% end %> <% 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>