<template>
  <div>
    <div class="navbar-inner">
      <!-- Collapse -->
      <div class="collapse navbar-collapse" id="sidenav-collapse-main">
        <!-- Nav items -->
        <ul class="navbar-nav">
          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('dashboard_access')"
          >
            <router-link to="/dashboard" class="nav-link">
              <i class="ni ni-shop text-primary"></i>
              <span class="nav-link-text">Dashboards</span>
            </router-link>
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('pos_access')"
          >
            <router-link to="/pos" class="nav-link">
              <i class="fas fa-cart-plus text-orange"></i>
              <span class="nav-link-text">POS</span>
            </router-link>
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('pos_access')"
          >
            <router-link to="/customerdisplay" class="nav-link" target="_blank">
              <i class="fas fa-shopping-basket text-primary"></i>
              <span class="nav-link-text">ສະແດງລາຍການບິນ</span>
            </router-link>
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('work_assess')"
          >
            <a
              class="nav-link collapsed"
              href="#service"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="service"
            >
              <i class="ni ni-bullet-list-67 text-default"></i>
              <span class="nav-link-text">ວຽກບໍລິການ</span>
            </a>
            <div class="collapse" id="service">
              <ul class="nav nav-sm flex-column">
                <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('repaire_assess')"
                >
                  <router-link to="/service/repaire">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ສ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ສ້ອມແປງເຄື່ອງ
                      </span>
                    </a></router-link
                  >
                </li>
                <!-- <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('preorder_access')"
                >
                  <router-link to="/service/preorder">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ຮ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຮັບສັ່ງອາໄຫລ່
                      </span>
                    </a></router-link
                  >
                </li> -->
                <li class="nav-item" v-if="$store.getters['getroles'].includes('preorder_access')">
                  <a
                    href="#list-preorder"
                    class="nav-link collapsed"
                    data-toggle="collapse"
                    role="button"
                    aria-expanded="false"
                    aria-controls="list-preorder"
                  >
                    <span class="sidenav-mini-icon"> ຮ </span>
                    <span class="sidenav-normal"><i class="fas fa-dot-circle"></i> ຮັບສັ່ງອາໄຫລ່ </span>
                  </a>
                  <div class="collapse" id="list-preorder" style="">
                    <ul class="nav nav-sm flex-column">
                      <li class="nav-item">
                        <router-link to="/service/preorder" class="nav-link pt-1"> <i class="fas fa-angle-right mr--3"></i> ລາຍການສັ່ງຊື້ ທັງໝົດ</router-link>
                      </li>
                      <li class="nav-item">
                        <router-link to="/service/preorder-nostore" class="nav-link pt-1"> <i class="fas fa-angle-right mr--3"></i> ລາຍການສັ່ງຊື້ ຍັງບໍ່ໄດ້ຂາຍ</router-link>
                      </li>
                 
                    </ul>
                  </div>
                </li>

              </ul>
            </div>
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('transession_access')"
          >
            <router-link to="/transection">
              <a class="nav-link">
                <i class="ni ni-chart-pie-35 text-info"></i>
                <span class="nav-link-text">ທຸລະກຳ ບັນຊີ</span>
              </a></router-link
            >
          </li>
          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('bill_access')"
          >
            <router-link to="/bills">
              <a class="nav-link">
                <i class="ni ni-single-copy-04 text-green"></i>
                <span class="nav-link-text">ໃບບິນ</span>
              </a></router-link
            >
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('bill_access')"
          >
            <router-link to="/quotation">
              <a class="nav-link">
                <i class="ni ni-single-copy-04 text-red"></i>
                <span class="nav-link-text">ໃບສະເໜີລາຄາ</span>
              </a></router-link
            >
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('store_access')"
          >
            <a
              class="nav-link collapsed"
              href="#store"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="store"
            >
              <i class="fas fa-warehouse text-primary"></i>
              <span class="nav-link-text">ສະຕ໋ອກສິນຄ້າ</span>
            </a>
            <div class="collapse" id="store">
              <ul class="nav nav-sm flex-column">
                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes('store_import_access')
                  "
                >
                  <router-link to="/store/add">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ນ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ນຳສິນຄ້າເຂົ້າໃໝ່
                      </span>
                    </a></router-link
                  >
                </li>
                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes('store_product_access')
                  "
                >
                  <router-link to="/store/product">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ລ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ລາຍການສິນຄ້າ
                      </span>
                    </a></router-link
                  >
                </li>
              </ul>
            </div>
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('supplier_access')"
          >
            <router-link to="/supplier">
              <a class="nav-link">
                <i class="fas fa-project-diagram text-red"></i>
                <span class="nav-link-text">ຜູ້ສະໜອງສິນຄ້າ</span>
              </a></router-link
            >
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('customer_access')"
          >
            <router-link to="/customer">
              <a class="nav-link">
                <i class="ni ni-circle-08"></i>
                <span class="nav-link-text">ຂໍ້ມູນລູກຄ້າ</span>
              </a></router-link
            >
          </li>

          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('report_access')"
          >
            <a
              class="nav-link collapsed"
              href="#report"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="report"
            >
              <i class="ni ni-single-copy-04 text-orange"></i>
              <span class="nav-link-text">ລາຍງານ</span>
            </a>
            <div class="collapse" id="report">
              <ul class="nav nav-sm flex-column">
                <li class="nav-item">
                  <router-link to="/report/accounting">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ກ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ບັນທຶກບັນຊີ
                      </span>
                    </a></router-link
                  >
                </li>
                <li class="nav-item">
                  <router-link to="/report/sell-service">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ຂ-ກ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຍອດຂາຍ - ບໍລິການ
                      </span>
                    </a></router-link
                  >
                </li>
                <li class="nav-item">
                  <router-link to="/report/financial">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ກ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຖານະການເງິນ
                      </span>
                    </a></router-link
                  >
                </li>

                <li class="nav-item">
                  <router-link to="/report/store">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ສ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ສ໋ອກສິນຄ້າ
                      </span>
                    </a></router-link
                  >
                </li>

                <li class="nav-item">
                  <router-link to="/report/customer_log">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ປ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ປະຫວັດບໍລິການ
                        ຂອງລູກຄ້າ
                      </span>
                    </a></router-link
                  >
                </li>
              </ul>
            </div>
          </li>
        </ul>
        <!-- Divider -->
        <hr class="my-3" />
        <!-- Heading -->
        <h6
          class="navbar-heading p-0 text-muted"
          v-if="$store.getters['getroles'].includes('setting_access')"
        >
          <span class="docs-normal">ຈັດການລະບົບ</span>
          <span class="docs-mini">ຈ</span>
        </h6>
        <!-- Navigation -->
        <ul class="navbar-nav mb-md-3">
          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('user_access')"
          >
            <a
              class="nav-link collapsed"
              href="#mg-users"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="mg-users"
            >
              <i class="ni ni-single-02 text-primary"></i>
              <span class="nav-link-text">ຈັດການຜູ້ໃຊ້</span>
            </a>
            <div class="collapse" id="mg-users">
              <ul class="nav nav-sm flex-column">
                <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('user_access')"
                >
                  <router-link to="/users">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ລ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ລາຍການຜູ້ໃຊ້
                      </span>
                    </a>
                  </router-link>
                </li>
              </ul>
            </div>
          </li>
          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('setting_access')"
          >
            <a
              class="nav-link collapsed"
              href="#setting"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="setting"
            >
              <i class="ni ni-settings text-red"></i>
              <span class="nav-link-text">ການຕັ້ງຄ່າ</span>
            </a>
            <div class="collapse" id="setting">
              <ul class="nav nav-sm flex-column">
                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes('setting_normal_access')
                  "
                >
                  <router-link to="/setting/general">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ປ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຕັ້ງຄ່າທົ່ວໄປ
                      </span>
                    </a></router-link
                  >
                </li>
                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes(
                      'setting_permission_access'
                    )
                  "
                >
                  <router-link to="/setting/permissions">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ກ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ກຳນົດສິດຜູ້ໃຊ້
                      </span>
                    </a></router-link
                  >
                </li>
                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes(
                      'setting_session_access'
                    )
                  "
                >
                  <router-link to="/store/setting_category">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ໝ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ໝວດໝູ່ສິນຄ້າ
                      </span>
                    </a></router-link
                  >
                </li>

                <li
                  class="nav-item"
                  v-if="
                    $store.getters['getroles'].includes(
                      'setting_unitband_access'
                    )
                  "
                >
                  <router-link to="/store/brand_unit">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ຍ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຍີ່ຫໍ້ & ຫົວໜ່ວຍ
                      </span>
                    </a></router-link
                  >
                </li>
                <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('users_log_access')"
                >
                  <router-link to="/setting/users_log">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ລ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ປະຫວັດຜູ້ໃຊ້ Logs
                      </span>
                    </a></router-link
                  >
                </li>

                <!---   <li class="nav-item">
                    <router-link to="/importdata">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ນ </span>
                      <span class="sidenav-normal"><i class="fas fa-dot-circle"></i> ນຳເຂົ້າຂໍ້ມູນ </span>
                    </a></router-link>
                  </li> -->
              </ul>
            </div>
          </li>
          <li
            class="nav-item"
            v-if="$store.getters['getroles'].includes('acc_access')"
          >
            <a
              class="nav-link collapsed"
              href="#accmg"
              data-toggle="collapse"
              role="button"
              aria-expanded="false"
              aria-controls="setting"
            >
              <i class="fas fa-book-open text-info"></i>
              <span class="nav-link-text">ລະບົບບັນຊີ</span>
            </a>
            <div class="collapse" id="accmg">
              <ul class="nav nav-sm flex-column">
                <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('acc_access_ph')"
                >
                  <router-link to="/allacc">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ຜ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ຜັງບັນຊີ
                      </span>
                    </a></router-link
                  >
                </li>
                <li
                  class="nav-item"
                  v-if="$store.getters['getroles'].includes('acc_access_phacc')"
                >
                  <router-link to="/acc_tn_mg">
                    <a class="nav-link">
                      <span class="sidenav-mini-icon"> ກ </span>
                      <span class="sidenav-normal"
                        ><i class="fas fa-dot-circle"></i> ການບັນທຶກທຸລະກຳ
                      </span>
                    </a></router-link
                  >
                </li>
              </ul>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="scss" scoped>
</style>