@extends('dashboard.layouts.app') @section('content')
{{-- --}}
@php $user = auth('admin')->user(); @endphp
@if (auth('admin')->user()->job_id == 1)

{{\App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->count()}}

اجمالي المعاملات

{{\App\Models\Client::count()}}

اجمالي الجهات

{{\App\Models\User::count()}}

اجمالي المستخدمين

حالات المعاملات

{{--

{{\App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('item_status_id', null)->count() }}

جديده

--}} {{--

{{\App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->whereHas('Assignment')->count() }}

المعاملات المحاله

--}}
@php $user = auth('admin')->user(); if($user->role == 'admin'){ $count = \App\Models\Item::where('item_status_id', 3)->count(); }else{ $count = \App\Models\Item::whereHas('ItemUser', function($q)use($user){ if($user->job_id == 3){ $q->where('is_past', '!=', '3') // ->where('send_accepted', 1) // ->where('recieve_accepted', 1) ->where('user_id', $user->id); }else{ $q->where('is_past', '!=', '3') ->where('user_id', $user->id); } })->where('item_status_id', 3)->count(); } @endphp

{{$count }}

قيد الطلب

@php if($user->role == 'admin'){ $count = \App\Models\Item::where('item_status_id', 5)->count(); }else{ $count = \App\Models\Item::whereHas('ItemUser', function($q)use($user){ if($user->job_id == 3){ $q->where('is_past', '!=', '3') // ->where('send_accepted', 1) // ->where('recieve_accepted', 1) ->where('user_id', $user->id); }else{ $q->where('is_past', '!=', '3') ->where('user_id', $user->id); } })->where('item_status_id', 5)->count(); } @endphp

{{$count }}

قيد التنفيذ

@php if($user->role == 'admin'){ $count = \App\Models\Item::where('item_status_id', 6)->count(); }else{ $count = \App\Models\Item::whereHas('ItemUser', function($q)use($user){ if($user->job_id == 3){ $q->where('is_past', '!=', '3') // ->where('send_accepted', 1) // ->where('recieve_accepted', 1) ->where('user_id', $user->id); }else{ $q->where('is_past', '!=', '3') ->where('user_id', $user->id); } })->where('item_status_id', 6)->count(); } @endphp

{{$count }}

تم الانتهاء

{{--

{{\App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('item_status_id', 7)->count() }}

مؤرشف

--}}

انواع المعاملات

{{-- --}}
معاملات داخليه
صادر عام
وارد عام
ارشيف اليكتروني
صادر عام p ( الاحتراف)
صادر عام y ( الفئات السنية )

مخطط اعداد المعاملات

المعاملات الداخليه
المعاملات الخارجيه

{{\App\Models\Client::count()}}

معدل الجهات

{{\App\Models\User::count()}}

معدل المستخدمين

@elseif(auth('admin')->user()->role == 'admin')

{{\App\Models\Item::count()}}

اجمالي المعاملات

{{\App\Models\Client::count()}}

اجمالي الجهات

{{\App\Models\User::count()}}

اجمالي المستخدمين

حالات المعاملات

Updated 1 month ago

{{--

{{\App\Models\Item::where('item_status_id', null)->count() }}

جديده

--}} {{--

{{\App\Models\Item::whereHas('Assignment')->count() }}

المعاملات المحاله

--}}

{{\App\Models\Item::where('item_status_id', 3)->count() }}

قيد الطلب

{{\App\Models\Item::where('item_status_id', 5)->count() }}

قيد التنفيذ

{{\App\Models\Item::where('item_status_id', 6)->count() }}

تم الانتهاء

{{--

{{\App\Models\Item::where('item_status_id', 7)->count() }}

مؤرشف

--}}

انواع المعاملات

{{-- --}}
معاملات داخليه
صادر عام
وارد عام
ارشيف اليكتروني
صادر عام p ( الاحتراف)
صادر عام y ( الفئات السنية )

مخطط اعداد المعاملات

المعاملات الداخليه
المعاملات الخارجيه

{{\App\Models\Client::count()}}

معدل الجهات

{{\App\Models\User::count()}}

معدل المستخدمين

@endif

المعاملات

@include('dashboard.items.table')
@if (auth('admin')->user()->role == 'admin')
Meeting Pic

نشط الان

Sat, May 25, 2020
10:AM to 6:PM
@foreach (\App\Models\User::limit(4)->get() as $item)
{{$item->name}}
@endforeach
+2
@endif

اخر الانشطه

@foreach ($logs as $item)
{{$item->User->name ?? ''}}
{{$item->description}}
{{\Carbon\Carbon::parse($item->created_at)->format('H:i a')}}
@endforeach
@endsection @section('js') {{-- --}} {{-- --}} {{-- --}} @php $user = auth('admin')->user(); if($user->role == 'admin'){ $n_o_1 = \App\Models\Item::where('type', 'internal')->count(); $n_o_2 = \App\Models\Item::where('type', 'general_exporter')->count(); $n_o_3 = \App\Models\Item::where('type', 'general_importer')->count(); $n_o_4 = \App\Models\Item::where('type', 'archived')->count(); $n_o_5 = \App\Models\Item::where('type', 'general_exporter_p')->count(); $n_o_6 = \App\Models\Item::where('type', 'general_exporter_y')->count(); }else{ $n_o_1 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'internal')->count(); $n_o_2 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'general_exporter')->count(); $n_o_3 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'general_importer')->count(); $n_o_4 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'archived')->count(); $n_o_5 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'general_exporter_p')->count(); $n_o_6 = \App\Models\Item::whereHas('ItemUser', function($q)use($user){$q->where('is_past', '0')->where('user_id', $user->id);})->where('type', 'general_exporter_y')->count(); } @endphp @endsection