@extends('admin.admin_master') @section('admin')
@php $user = auth()->user(); @endphp @if($user->hasAnyRole(['Super Admin', 'Admin'])) {{-- Admin & Super Admin Dashboard Content --}}

Admin Dashboard

Overview of your account activities

@elseif($user->can('Access Dashboard')) {{-- User Dashboard Content --}}

My Dashboard

Welcome to your personal dashboard

@endif
Current time
{{ now('Indian/Mahe')->format('M d, Y H:i') }}
@hasanyrole('Super Admin|Admin') {{-- Admin Dashboard Content --}}
@isset($workflowCount)
Total Workflows

{{ $workflowCount }}

View All Workflows
@endisset @isset($folderCount)
Folders

{{ $folderCount }}

Manage Folders
@endisset @isset($activeTaskCount)
Active Tasks

{{ $activeTaskCount }}

View Tasks
@endisset
@isset($recentWorkflows)
Recent Workflows
    @foreach($recentWorkflows as $wf)
  • {{ $wf->name }} {{ $wf->created_at->format('Y-m-d') }}
  • @endforeach
@endisset @isset($recentFolders)
Recent Folders
    @foreach($recentFolders as $folder)
  • {{ $folder->name }} {{ $folder->created_at->format('Y-m-d') }}
  • @endforeach
@endisset
@endhasanyrole @can('Access Dashboard') {{-- User Dashboard Content --}}
@isset($myWorkflows)
My Workflows
    @foreach($myWorkflows as $wf)
  • {{ $wf->name }} {{ $wf->created_at->format('Y-m-d') }}
  • @endforeach
View My Workflows
@endisset @isset($myFolders)
My Folders
    @foreach($myFolders as $folder)
  • {{ $folder->name }} {{ $folder->created_at->format('Y-m-d') }}
  • @endforeach
View My Folders
@endisset
@isset($myTasks)
My Pending Tasks
    @foreach($myTasks as $task)
  • {{ $task->workflow->name ?? '-' }} - {{ $task->status }} {{ $task->created_at->format('Y-m-d') }}
  • @endforeach
Go to My Tasks
@endisset
@endcan
@endsection