@extends('layouts.admin') @section('title', 'My Tasks') @php $priorityClass = ['urgent' => 'danger', 'high' => 'warning', 'normal' => 'secondary', 'low' => 'light']; $statusClass = ['pending' => 'secondary', 'in_progress' => 'info', 'done' => 'success', 'cancelled' => 'dark']; @endphp @section('content') @if (! $employee)
Nothing here right now.
@else| Task | Source | Due | Work times ({{ config('app.attendance_timezone') }}) | Priority | Status | Update |
|---|---|---|---|---|---|---|
|
{{ $task['title'] }}
@if ($task['description'])
{{ \Illuminate\Support\Str::limit($task['description'], 120) }}
@endif
|
@php
$kindLabel = ['visa' => 'Visa', 'visa_submission' => 'Visa Submission'][$task['kind']] ?? 'General';
$kindTone = ['visa' => 'info', 'visa_submission' => 'primary'][$task['kind']] ?? 'light';
@endphp
{{ $kindLabel }}
@if ($task['context'])
@if ($task['context_url'])
{{ $task['context'] }}
@else
{{ $task['context'] }}
@endif
@endif
|
@if ($task['due_date'])
{{ $task['due_date']->format('d M Y') }}
@if ($overdue)
Overdue
@endif
@else
—
@endif
|
Created: {{ $task['model']->created_at?->timezone(config('app.attendance_timezone'))->format('d M Y, h:i:s A') ?? '—' }}
@if ($task['kind'] !== 'visa_submission')
Started: {{ $task['model']->started_at?->timezone(config('app.attendance_timezone'))->format('d M Y, h:i:s A') ?? '—' }}
Completed: {{ $task['model']->completed_at?->timezone(config('app.attendance_timezone'))->format('d M Y, h:i:s A') ?? '—' }}
@endif
|
{{ ucfirst($task['priority']) }} | {{ $task['status'] === 'done' ? 'Completed' : ucfirst(str_replace('_', ' ', $task['status'])) }} | @if (! $task['update_url']) {{-- Worked on its own screen rather than by a status dropdown. --}} {{ in_array($task['status'], ['done', 'cancelled'], true) ? 'View' : 'Open and work on it' }} @elseif (in_array($task['status'], ['done', 'cancelled'], true)) Closed @else @endif |