  <aside class="main-sidebar">
  <!-- sidebar: style can be found in sidebar.less -->
  <section class="sidebar">
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <ul class="sidebar-menu">
      <li><a href="{{route('dashboard')}}"><i class="fa fa-dashboard"></i> <span>Dashboard</span></a></li>
      <li><a href="{{route('installments.index') }}"><i class="fa fa-calendar-o"></i> <span>{{ trans('installments.menu') }}</span></a></li>
      <li class="treeview">
        <a href="#">
          <i class="fa fa-credit-card"></i> <span>{{ Trans("mortgages.menu")}}</span> <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li><a href="{{ Route('mortgages.create') }}"><i class="fa fa-plus"></i>{{ Trans('customers.add')}}</a></li>
          <li><a href="{{ Route('mortgages.index') }}"><i class="fa fa-list"></i> {{ Trans("dashboard.others.show_all")}}</a></li>
        </ul>
      </li>
     
      {{-- Customer --}}
      @if(UserRole::has('create_customer') || UserRole::has('list_customer'))
      <li class="treeview">
        <a href="#">
          <i class="fa fa-user-plus"></i> <span>{{ Trans('customers.menu')}}</span> <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          @if(UserRole::has("create_customer"))
            <li><a href="{{ Route('loan_customers.create')}}"><i class="fa fa-plus"></i> {{ Trans('customers.add')}}</a></li>
          @endif
          @if(UserRole::has("list_customer"))
            <li><a href="{{ Route('loan_customers.index')}}"><i class="fa fa-list"></i> {{ Trans('customers.show')}}</a></li>
          @endif
        </ul>
      </li>
      @endif
      {{-- Role --}}
      @if(UserRole::has('create_role') || UserRole::has('list_role'))
        <li class="treeview">
          <a href="#">
            <i class="fa fa-check-circle"></i>
            <span>{{Trans("roles.roles")}}</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
            @if(UserRole::has("create_role"))
              <li><a href="{{ Route('roles.create') }}"><i class="fa fa-plus"></i> {{ Trans('dashboard.crud.add') }}</a></li>
            @endif
            @if(UserRole::has("list_role"))
              <li><a href="{{ Route('roles.index') }}"><i class="fa fa-list"></i> {{ Trans('dashboard.others.show_all') }}</a></li>
            @endif
          </ul>
        </li>
      @endif
      {{-- User --}}
      @if(UserRole::has('create_user') || UserRole::has('list_user'))
      <li class="treeview">
        <a href="#">
          <i class="fa fa-users"></i>
          <span>{{Trans("users.users")}}</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          @if(UserRole::has("create_user"))
            <li><a href="{{ Route('user.create') }}"><i class="fa fa-plus"></i> {{ Trans('dashboard.crud.add') }}</a></li>
          @endif
          @if(UserRole::has("list_user"))
            <li><a href="{{ Route('user.index') }}"><i class="fa fa-list"></i>{{ Trans('dashboard.others.show_all') }}</a></li>
          @endif
        </ul>
      </li>
    @endif
      {{-- settings --}}
      @if(user_can('ms_company')
      || user_can("ms_invoice")
      || user_can('ms_style'))
      <li class="">
        <a href="{{Route('settings.index')}}">
          <i class="fa fa-cog"></i>
          <span>{{Trans("dashboard.others.settings")}}</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
      </li>
      @endif
      {{-- Position --}}
      @if(UserRole::has("create_position"))
        <li class="treeview">
          <a href="{{ Route('positions.index') }}">
            <i class="fa fa-user" aria-hidden="true"></i>
            <span>{{Trans("positions.menu")}}</span>
          </a>
        </li>
      @endif
      {{-- Position --}}
      @if(UserRole::has("create_income") || user_can("show_debt"))
        <li class="treeview">
          <a href="#">
            <i class="fa fa-usd" aria-hidden="true"></i>
            <span>{{Trans("debts.profit_and_debt")}}</span>
          </a>
          <ul class="treeview-menu">
            @if (user_can('create_income'))
            <li class="treeview">
              <a href="{{ Route('profits.index') }}">
                <i class="fa fa-usd" aria-hidden="true"></i>
                <span>{{Trans("profits.menu")}}</span>
              </a>
            </li>
            @endif
            
          </ul>
        </li>
      @endif
       

    @if(UserRole::has('profit_report')
      || UserRole::has('product_in_out')
      || UserRole::has('sale_history')
      || UserRole::has('transfer_history')
      || UserRole::has('product_warehouse'))
      <li class="treeview">
        <a href="#">
          <i class="fa fa-filter" aria-hidden="true"></i>
          <span>{{Trans("reports.menu")}}</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          @if(UserRole::has("profit_report"))
            <li><a href="{{ Route('reportProfit') }}"><i class="fa fa-usd"></i> {{Trans('reports.sub_title')}}</a></li>
             <li><a href="{{ Route('reports.payments') }}"><i class="fa fa-th-list"></i> {{Trans('payments.payment_history') }}</a></li>
             <li><a href="{{ Route('reports.mortgagePayments') }}"><i class="fa fa-credit-card"></i> {{Trans('reports.mortgage_payments') }}</a></li>
             <li><a href="{{ Route('reports.graph') }}"><i class="fa fa-line-chart"></i> Monthly Graph</a></li>
          @endif
          @if(UserRole::has("sale_history"))
            {{--  <li><a href="{{ Route('reportSaleHistory') }}"><i class="fa fa-history"></i> {{Trans('sale_history.menu')}}</a></li>  --}}
          @endif
          @if(UserRole::has('product_warehouse'))
          {{--  <li><a href="{{ Route('productsWarehouse') }}"><i class="fa fa-folder"></i> {{Trans('reports.products_warehouse')}}</a></li>  --}}
        @endif
        </ul>
      </li>
    @endif
    </ul>

  </section>
  <!-- /.sidebar -->
</aside>
