@extends('layouts.app') @section('title', 'Team Calendar') @php $monthParam = request('month', $currentMonth->month); $yearParam = request('year', $currentMonth->year); @endphp @section('content')

Team Calendar

Plan and track departmental workloads.

@if($canCreateAnyTask ?? false) @endif
@include('partials.alerts')
Today
@foreach(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] as $weekday)
{{ $weekday }}
@endforeach
@foreach($calendar as $week)
@foreach($week as $day) @php $dayKey = $day['date']->format('Y-m-d'); @endphp
{{ $day['date']->format('j') }}
@if($tasksByDate->has($dayKey))
@foreach($tasksByDate->get($dayKey) as $task) @php $isSupportTask = $task->department && (str_contains(strtolower($task->department->name), 'support') || str_contains(strtolower($task->department->name), 'eshikshya')); $isMarketingTask = $task->department && (str_contains(strtolower($task->department->name), 'marketing') || str_contains(strtolower($task->department->name), 'digital')); $isPaymentPlanningTask = isset($task->is_payment_planning) && $task->is_payment_planning; @endphp @if($isSupportTask) {{ $task->title }} @elseif($isPaymentPlanningTask) {{ $task->title }} @elseif($isMarketingTask) {{ $task->title }} @else {{ $task->title }} @endif @endforeach
@endif
@endforeach
@endforeach
@if($canViewUpcomingTasks ?? false)
Upcoming Tasks
@if(($canUpdateUpcomingTasks ?? false) || ($canDeleteUpcomingTasks ?? false) || ($isSuperAdmin ?? false)) @endif @forelse($tasksByDate->flatten() as $task) @php $isSupportTask = $task->department && (str_contains(strtolower($task->department->name), 'support') || str_contains(strtolower($task->department->name), 'eshikshya')); $isMarketingTask = $task->department && (str_contains(strtolower($task->department->name), 'marketing') || str_contains(strtolower($task->department->name), 'digital')); $isPaymentPlanningTask = isset($task->is_payment_planning) && $task->is_payment_planning; if ($isSupportTask) { $taskType = 'Support'; $taskTypeBadge = 'bg-label-info'; } elseif ($isPaymentPlanningTask) { $taskType = 'Payment Planning'; $taskTypeBadge = 'bg-label-success'; } elseif ($isMarketingTask) { $taskType = 'Tele-Marketing'; $taskTypeBadge = 'bg-label-warning'; } else { $taskType = 'Internal'; $taskTypeBadge = 'bg-label-secondary'; } @endphp @if(($canDeleteUpcomingTasks ?? false) || ($isSuperAdmin ?? false)) @endif @empty @endforelse
Task Type StatusAction
{{ $taskType }} {{ ucfirst(str_replace('_', ' ', $task->status)) }}
No tasks scheduled for this month.
@endif
@endsection @push('head') @endpush @push('scripts') @endpush