<aside class="aside">
    <nav class="sidebar">

        <ul class="nav">
            <li>
                <a href="#" title="{{ __('s.tasks') }}" data-toggle="collapse-next" class="has-submenu">
                    <em class="fa fa-circle-o"></em>
                    <span class="item-text">{{ __('s.tasks') }}</span>
                </a>

                <ul class="nav collapse in">

                    {{-- el usuario es teamleader,administrador,supervisor --}}
                    @if($user->hasRole('administrator') ||$user->hasRole('supervisor')||  $user->hasRole('teamleader') )
                        <li class="active">
                            <a href="{{ URL::to('/') }}/task/create-selector" title="{{__('s.create_task')}}" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.create_task')}}</span>
                            </a>
                        </li>
                        
                        
                <li class="{{ (request()->is('filterTask')) ? 'active' : '' }}">
                    <a href="{{ URL::to('/') }}/filterTask" title="filtrar tareas" data-toggle="" class="no-submenu">
                        <span class="item-text">Filtrar Tareas</span>
                    </a>
                </li>
                        
                        <li>
                            <a href="{{ URL::to('/') }}/home/1" title="mis tareas" data-toggle="" class="no-submenu">
                                <span class="item-text">Tareas Creadas</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ URL::to('/') }}/tasks/uninitiated" title="{{__('s.view_tasks')}}" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">Panel de Tareas</span>
                            </a>
                        </li>
                        @if($is_admin)

                            <li>
                                <a href="{{ URL::to('/') }}/tasks/selectbyProfile" title="" data-toggle=""
                                   class="no-submenu">
                                    <span class="item-text">Tareas por perfil</span>
                                </a>
                            </li>
                        @endif

                    @endif


                    {{-- el usuario es teamleader,administrador,supervisor,teammember --}}

                    @if($user->canViewTasksSidebar())
                        <li>
                            <a href="{{ URL::to('/') }}/mytasks" title="{{__('s.view_tasks')}}" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">Mis Tareas</span>
                            </a>
                        </li>
                    @endif

                    @if(!$user->canViewTasksSidebar()) {{--Es cliente--}}

                            <li class="active">
                                <a href="{{ URL::to('/') }}/task/create-selector" title="{{__('s.create_task')}}" data-toggle=""
                                   class="no-submenu">
                                    <span class="item-text">{{__('s.create_task')}}</span>
                                </a>
                            </li>
                            <li>
                                <a href="{{ URL::to('/') }}/home/1" title="mis tareas" data-toggle="" class="no-submenu">
                                    <span class="item-text">Tareas Creadas</span>
                                </a>
                            </li>
                    @endif

                </ul>
            </li>

            @if(!$user->canViewTasksSidebar()) {{--Es cliente--}}
            <li>
                <a href="#" title="{{ __('s.profiles') }}" data-toggle="collapse-next" class="has-submenu">
                    <em class="fa fa-circle-o"></em>
                    <span class="item-text">{{ __('s.profiles') }}</span>
                </a>

                <ul class="nav collapse">
                    <li class="active">
                        <a href="{{ URL::to('/') }}/profile/create" title="{{__('s.create_profile')}}"
                           data-toggle="" class="no-submenu">
                            <span class="item-text">{{__('s.create_profile')}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="{{ URL::to('/') }}/profiles" title="{{__('s.view_profiles')}}" data-toggle=""
                           class="no-submenu">
                            <span class="item-text">{{__('s.view_profiles')}}</span>
                        </a>
                    </li>

                </ul>
            </li>

            @endif


            @if($is_admin)

                <li>
                    <a href="#" title="{{ __('s.profiles') }}" data-toggle="collapse-next" class="has-submenu">
                        <em class="fa fa-circle-o"></em>
                        <span class="item-text">{{ __('s.profiles') }}</span>
                    </a>

                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/profile/create" title="{{__('s.create_profile')}}"
                               data-toggle="" class="no-submenu">
                                <span class="item-text">{{__('s.create_profile')}}</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ URL::to('/') }}/profiles" title="{{__('s.view_profiles')}}" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.view_profiles')}}</span>
                            </a>
                        </li>

                    </ul>
                </li>
            @endif


            @if($is_admin)

                <li>
                    <a href="#" title="{{__('s.unit')}}" data-toggle="collapse-next" class="has-submenu">
                        <em class="fa fa-circle-o"></em>
                        <span class="item-text">{{__('s.unit')}}</span>
                    </a>

                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/admin/unit/create" title="Default" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.add_unit')}}</span>
                            </a>
                        </li>
                    </ul>
                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/admin/unit" title="Default" data-toggle="" class="no-submenu">
                                <span class="item-text">{{__('s.view_units')}}</span>
                            </a>
                        </li>
                    </ul>

                </li>

                <li>
                    <a href="#" title="{{__('s.pipelines')}}" data-toggle="collapse-next" class="has-submenu">
                        <em class="fa fa-circle-o"></em>
                        <span class="item-text">{{__('s.pipelines')}}</span>
                    </a>

                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/admin/pipeline" title="Default" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.view_pipelines')}}</span>
                            </a>
                        </li>
                    </ul>
                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/admin/pipeline/create" title="Default" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.add_pipeline')}}</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" title="{{__('s.users')}}" data-toggle="collapse-next" class="has-submenu">
                        <em class="fa fa-circle-o"></em>
                        <span class="item-text">{{__('s.users')}}</span>
                    </a>

                    <ul class="nav collapse">
                        <li class="active">
                            <a href="{{ URL::to('/') }}/admin/view_users" title="Default" data-toggle=""
                               class="no-submenu">
                                <span class="item-text">{{__('s.view_users')}}</span>
                            </a>
                        </li>
                    </ul>
                </li>
            @endif
            <li>
                <a href="#" title="Instructivo Guntref" data-toggle="collapse-next" class="has-submenu">
                    <em class="fa fa-circle-o"></em>
                    <span class="item-text">Instructivo GUNTREF</span>
                </a>


                <ul class="nav collapse">
                    <li class="active">
                        @if($user->canViewTasksSidebar())
                            <a href="{{ URL::to('/') }}/instructivos/02_GUNTREF_INSTRUCTIVO_USUARIOS_INTERNOS.pdf" target="_blank" title="Default" data-toggle=""
                               class="no-submenu">
                        @elseif($user->isApplicant())
                            <a href="{{ URL::to('/') }}/instructivos/01_GUNTREF_INSTRUCTIVO__SOLICITANTE.pdf"  target="_blank"  title="Default" data-toggle="" class="no-submenu">
                        @endif

                                <span class="item-text">Instructivo</span> </a>

                    </li>
                </ul>

            </li>


            <li>
                <a href="#" title="Matrices" data-toggle="collapse-next" class="has-submenu">
                    <em class="fa fa-circle-o"></em>
                    <span class="item-text">Matrices</span>
                </a>


                <ul class="nav collapse">
                    <li class="active">
                                    <a href="{{ URL::to('/') }}/matriz/Matriz txt flyer evento.doc"  target="_blank"  title="Default" data-toggle="" class="no-submenu">

                                        <span class="item-text">Matriz para flyers</span> </a>
                    </li>
                    <li class="active">
                        <a href="{{ URL::to('/') }}/matriz/Matriz para programas digitales de eventos.docx"  target="_blank"  title="Default" data-toggle="" class="no-submenu">

                            <span class="item-text">Matriz para programas <br> digitales</span> </a>
                    </li>
                    <li class="active">
                        <a href="{{ URL::to('/') }}/matriz/Matriz cambio web 2021.doc"  target="_blank"  title="Default" data-toggle="" class="no-submenu">

                            <span class="item-text">Matriz cambio web</span> </a>
                    </li>
                    <li class="active">
                        <a href="{{ URL::to('/') }}/matriz/Matriz web y dip grado y pregrado 2021.doc"  target="_blank"  title="Default" data-toggle="" class="no-submenu">

                            <span class="item-text">Matriz web y diplomatura <br>de grado y pregrado</span> </a>
                    </li>
                    <li class="active">
                        <a href="{{ URL::to('/') }}/matriz/Matriz web y dip posgrado 2021.doc"  target="_blank"  title="Default" data-toggle="" class="no-submenu">

                            <span class="item-text">Matriz web y diplomatura <br>de posgrado</span> </a>
                    </li>
                </ul>

            </li>

        </ul>
    </nav>
</aside>
