diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 77dbb850..518265d3 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -45,3 +45,5 @@ function export_to(path) var form_params = $("#frm_report").serialize(); window.location = path+"?"+ form_params; } + + diff --git a/app/assets/javascripts/popper.min.js b/app/assets/javascripts/popper.min.js new file mode 100644 index 00000000..95e9ef5a --- /dev/null +++ b/app/assets/javascripts/popper.min.js @@ -0,0 +1,5 @@ +/* + Copyright (C) Federico Zivolo 2017 + Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). + */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var f=a.commonAncestorContainer;if(e!==f&&t!==f||i.contains(n))return p(f)?f:r(f);var l=s(e);return l.host?d(l.host,t):d(e,s(t).host)}function a(e){var t=1=o.clientWidth&&i>=o.clientHeight}),f=0i[e]&&!t.escapeWithReference&&(n=z(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=V,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,p=n.reference,s=-1!==['left','right'].indexOf(i),d=s?'height':'width',a=s?'top':'left',f=s?'left':'top',l=s?'bottom':'right',m=O(o)[d];p[l]-mr[l]&&(e.offsets.popper[a]+=p[a]+m-r[l]);var h=p[a]+p[d]/2-m/2,g=h-c(e.offsets.popper)[a];return g=_(z(r[d]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[a]=Math.round(g),e.offsets.arrow[f]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,f=e.offsets.reference,l=V,m='left'===i&&l(a.right)>l(f.left)||'right'===i&&l(a.left)l(f.top)||'bottom'===i&&l(a.top)l(o.right),g=l(a.top)l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[t]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.rightli.header { + color: #4b646f; + background-color: #1a2226; + line-height: 35px !important; +} +.main-nav { + + /* background-color: #161926 !important;*/ +} +/*.main-nav a { + color: #fff !important; +} +*/ +.sidebar-nav li a { + display: block; + text-decoration: none; + color: #999999; +} + +.sidebar-nav li a:hover { + text-decoration: none; + color: #fff; + background: rgba(255, 255, 255, 0.2); +} + +.sidebar-nav li a:active, +.sidebar-nav li a:focus { + text-decoration: none; +} + +.sidebar-nav > .sidebar-brand { + height: 65px; + font-size: 18px; + line-height: 60px; +} + +.sidebar-nav > .sidebar-brand a { + color: #999999; +} + +.sidebar-nav > .sidebar-brand a:hover { + color: #fff; + background: none; +} + +@media(min-width:768px) { + #wrapper { + padding-left: 0; + } + #wrapper.toggled { + padding-left: 210px; + } + #sidebar-wrapper { + width: 0; + } + #wrapper.toggled #sidebar-wrapper { + width: 216px; + } + #page-content-wrapper { + padding: 0px; + position: relative; + } + #wrapper.toggled #page-content-wrapper { + position: relative; + margin-right: 0; + } +} + +.dropdown-item{ + padding: 0px 1.5rem !important; +} + +.sidebar-sub-menu { + position: relative !important; + width: 200px; + list-style: none; + font-size: 14px; + background-color: #161926; + padding: 0px !important; + margin: 0px !important; +} + +.sidebar-sub-item { + display: block; + width: 100%; + + /*clear: both;*/ + /*font-weight: normal;*/ + /*color: #292b2c; + text-align: inherit; + white-space: nowrap; + background: none; + border: 0;*/ +} +.fa{ + +} +.custom-fa-arrow{ + font-size: 20px !important; + font-weight: bold; + padding: 9px 20px; +} + + diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index 0883cc92..7863008d 100644 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -1,195 +1,192 @@ -
-
-

Role Features

- -
- <% if current_user.role == 'administrator' %> -
-
-

- Administrator -

-
-
-
-
    -
  • All Settings
  • -
      -
    • Zone
    • -
    • OQS
    • -
    • Menu
    • -
    • Cashier Terminal
    • -
    • Payment
    • -
    • Merbership
    • -
    • Print
    • -
    • Employees
    • -
    • Accounts
    • -
    -
-
    -
  • Transactions
  • -
      -
    • Order
    • -
    • Sale
    • -
    • Credit Note
    • -

    -
  • Reports
  • -
      -
    • Daily Sale
    • -
    • Sale Item
    • -
    • Receipt
    • -
    • Shift Sale
    • -
    • Credit Sale
    • -
    • Void Sale
    • -
    -
-
    -
  • OQS

  • -
  • Cashier

  • -
  • CRM
  • -
-
-
+ + +
+
+

Role Features

+ +
+ <% if current_user.role == 'administrator' %> +
+
+

+ Administrator +

- <% elsif current_user.role == 'manager' %> -
-
-

- Manager -

-
-
-
-
    -
  • All Settings
  • -
      -
    • Zone
    • -
    • OQS
    • -
    • Menu
    • -
    • Cashier Terminal
    • -
    • Print
    • -
    • Employees
    • -
    • Accounts
    • -
    -
-
    -
  • Transactions
  • -
      -
    • Order
    • -
    • Sale
    • -
    • Credit Note
    • -

    -
  • Reports
  • -
      -
    • Daily Sale
    • -
    • Sale Item
    • -
    • Receipt
    • -
    • Shift Sale
    • -
    • Credit Sale
    • -
    • Void Sale
    • -
    -
-
    -
  • OQS

  • -
  • Cashier

  • -
  • CRM
  • -
-
-
-
- <% elsif current_user.role == 'supervisour' %> -
-
-

- Supervisor -

-
-
-
-
    +
    +
    +
      +
    • All Settings
    • +
        +
      • Zone
      • OQS
      • -
          -
        • Void
        • -
        • FOC
        • -
        • Edit
        • -
        • Credit
        • -
        • Payment
        • -
        +
      • Menu
      • +
      • Cashier Terminal
      • +
      • Payment
      • +
      • Merbership
      • +
      • Print
      • +
      • Employees
      • +
      • Accounts
      -
    -
    -
- <% elsif current_user.role == 'cashier' %> -
-
-

- Cashier -

-
-
-
+ +
    +
  • Transactions
    • -
    • Cashier Panel except Edit and Void
    • -
    • Sale and Order
    • -
    • and Queue in CRM
    • -
    -
-
-
- <% elsif current_user.role == 'account' %> -
-
-

- Accountant -

-
-
-
+
  • Order
  • +
  • Sale
  • +
  • Credit Note
  • +
    +
  • Reports
    • -
    • Daily Sale Report
    • -
    • Sale Item Report
    • -
    • Receipt No Report
    • -
    • ShiftSale Report
    • +
    • Daily Sale
    • +
    • Sale Item
    • +
    • Receipt
    • +
    • Shift Sale
    • +
    • Credit Sale
    • +
    • Void Sale
    -
    + +
      +
    • OQS

    • +
    • Cashier

    • +
    • CRM
    • +
    - <% end %> -
    -
    - -
    -
    -
    OQS
    -
    - -
    -
    Cashier
    -
    - -
    -
    CRM
    -
    - - - -
    -
    Inventory
    -
    -
    -
    -