edms2023/resources/views/includes/sidebar.blade.php

150 lines
7.6 KiB
PHP
Raw Permalink Normal View History

2023-09-14 20:59:46 +00:00
<div class="site-menubar">
<div class="site-menubar-body">
<div>
<div>
@php
$setting = App\Setting::first();
@endphp
<div class="" style="/*margin-top: 30px;*/ font-size: 20px; padding: 7px; color: #ffffff;"> {{ dataTranslation($setting->organization_name) }}</div>
<ul class="site-menu" data-plugin="menu">
<li class="site-menu-category">{{ __('General') }}</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('dashboard.basic', 'dashboard.advanced'))) ? 'active open' : '' }}">
<a href="javascript:void(0)">
<i class="site-menu-icon wb-dashboard" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Dashboard') }}</span>
<span class="site-menu-arrow"></span>
</a>
<ul class="site-menu-sub" style="">
<li class="site-menu-item has-sub is-shown">
<a href="{{ route('dashboard.basic') }}"><span class="site-menu-title">{{ __('User Dashboard') }}</span></a>
</li>
<li class="site-menu-item has-sub is-shown">
<a href="{{ route('dashboard.advanced') }}"><span class="site-menu-title">{{ __('General Dashboard') }}</span></a>
</li>
</ul>
</li>
{{-- <li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('basic-dashboard', 'advanced-dashboard'))) ? 'active' : '' }}">
<a href="{{ route('user-dashboard') }}">
<i class="site-menu-icon wb-dashboard" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Dashboard') }}</span>
</a>
</li> --}}
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('my-files'))) ? 'active' : '' }}">
<a href="{{ route('my-files') }}">
<i class="site-menu-icon wb-file" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('My Files') }}</span>
</a>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('shared-files'))) ? 'active' : '' }}">
<a href="{{ route('shared-files', ['share_id'=>base64_encode('0'), 'directory'=>null]) }}">
<i class="site-menu-icon wb-share" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Shared Files') }}</span>
</a>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('contact-list', 'add-contact-list', 'edit-contact-list'))) ? 'active open' : '' }}">
<a href="{{ route('contact-list') }}">
<i class="site-menu-icon fa fa-address-book-o " aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Contact List') }}</span>
</a>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('people'))) ? 'active open' : '' }}">
<a href="{{ route('people') }}">
<i class="site-menu-icon wb-users" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('People') }}</span>
</a>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('calendar', 'edit-event'))) ? 'active' : '' }}">
<a href="{{ route('calendar') }}">
<i class="site-menu-icon wb-calendar" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Calendar') }}</span>
</a>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('transfers.index', 'documents','document_workflow','details','view_document','reply_document','view_workflow','related_documents','create_document_workflow','create_outgoing_document_workflow','create_internal_document_workflow','create_workflow_free_outgoing_document','document_assign','edit_document','edit_supporter_document','edit_registry_document','approval'))) ? 'active open' : '' }}">
<a href="javascript:void(0)">
<i class="site-menu-icon wb-book" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Document') }}</span>
<span class="site-menu-arrow"></span>
</a>
<ul class="site-menu-sub" style="">
@php
$workflow_types = App\WorkflowType::where('id', '<', 4)->orderBy('id', 'asc')->get();
@endphp
@foreach($workflow_types as $workflow_type)
@php
$doc_types = json_decode($workflow_type->name, true);
$doc_type = $doc_types['en'];
$total_documents=0;
$total_doce = App\WorkflowDocumentUser::join('workflow_documents', 'workflow_document_users.workflow_document_id', '=', 'workflow_documents.id')
->where('workflow_documents.workflow_type_name', 'like', '%'.$doc_type.'%')
->where('workflow_documents.is_deleted', 0)
->where('workflow_document_users.user_id', Auth::user()->id)
->where('workflow_document_users.is_read', '0')
->where('workflow_document_users.status', 'Y')
->select(DB::raw('count(workflow_documents.id) as row_count', 'workflow_documents.id'))
->get()
->toArray();
if($total_doce !==null)
{
$total_documents=$total_doce[0]['row_count'];
}
@endphp
<li class="site-menu-item has-sub is-shown">
<a href="{{ route('documents', $doc_type) }}">
<span class="site-menu-title">{{ dataTranslation($workflow_type->name) }} ({{ $total_documents }})</span>
</a>
</li>
@endforeach
@if(in_array(12, auth()->user()->getPermissionList()))
<li class="site-menu-item has-sub is-shown">
<a href="{{ route('transfers.index') }}">
<span class="site-menu-title">
{{ __('Api') }}
({{App\RemoteTransfer::where('direction', 0)->whereNull('read_at')->count()}}/{{App\RemoteTransfer::where('direction', 1)->whereNull('receipt')->count()}})
</span>
</a>
</li>
@endif
</ul>
</li>
<li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('approval'))) ? 'active open' : '' }}">
<a href="{{ route('listings.index') }}">
<i class="site-menu-icon wb-time" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Listings') }}</span>
</a>
</li>
{{-- <li class="site-menu-item has-sub {{ (in_array(\Request::route()->getName(), array('approval'))) ? 'active open' : '' }}">
<a href="javascript:void(0)">
<i class="site-menu-icon wb-time" aria-hidden="true"></i>
<span class="site-menu-title">{{ __('Listings') }}</span>
<span class="site-menu-arrow"></span>
</a>
<ul class="site-menu-sub" style="">
@if(in_array(App\User::getUserRole()->where('users.id', auth()->user()->id)->first()->role_id, [8, 9, 11, 12]))
<li class="site-menu-item has-sub is-shown">
<a href="{{ route('reports.index') }}"><span class="site-menu-title">{{ __('Reports') }}</span></a>
<a href="{{ route('listings.index') }}"><span class="site-menu-title">{{ __('Listings') }}</span></a>
</li>
@endif
</ul>
</li> --}}
</ul>
</div>
</div>
</div>
<div class="site-menubar-footer">
<a href="javascript: void(0);" class="fold-show" data-placement="top">
&nbsp;
</a>
<a href="{{ route('logout') }}" onclick="event.preventDefault();document.getElementById('logout-form').submit();" data-placement="top" data-toggle="tooltip" data-original-title="{{ __('Logout') }}">
<span class="icon wb-power" aria-hidden="true"></span>
</a>
<a href="javascript: void(0);" data-placement="top">
&nbsp;
</a>
</div>
</div>
<style type="text/css">
.site-menu-item .fa{margin-right:14px;}
</style>