@php
$mwsDashboardQueryKeys = ['planner', 'date', 'q', 'status', 'type', 'host', 'participant', 'priority', 'from', 'to'];
$mwsDashboardQueryForLinks = [];
foreach ($mwsDashboardQueryKeys as $_mwsQkey) {
if (! request()->has($_mwsQkey)) {
continue;
}
$_mwsQval = request()->query($_mwsQkey);
if ($_mwsQval === null || $_mwsQval === '') {
continue;
}
if (is_array($_mwsQval)) {
$_mwsQfiltered = array_values(array_filter($_mwsQval, static fn ($x) => $x !== null && $x !== ''));
if ($_mwsQfiltered === []) {
continue;
}
$mwsDashboardQueryForLinks[$_mwsQkey] = $_mwsQfiltered;
} else {
$mwsDashboardQueryForLinks[$_mwsQkey] = $_mwsQval;
}
}
$mwsLifecycleBadgeClasses = [
'draft' => 'badge-secondary',
'scheduled' => 'badge-info',
'confirmed' => 'badge-primary',
'ongoing' => 'badge-warning',
'completed' => 'badge-success',
'rescheduled' => 'badge-dark',
'missed' => 'badge-danger',
'cancelled' => 'badge-secondary',
];
$mwsPriorityBadgeClasses = [
'low' => 'badge-secondary',
'normal' => 'badge-info',
'high' => 'badge-warning',
'critical' => 'badge-danger',
];
$mwsFilterInputKeys = ['q', 'status', 'type', 'host', 'participant', 'priority', 'from', 'to'];
$mwsAnyFilterInputPresent = false;
foreach ($mwsFilterInputKeys as $_mwsFk) {
if (! request()->has($_mwsFk)) {
continue;
}
$_mwsFv = request()->query($_mwsFk);
if ($_mwsFv === null || $_mwsFv === '') {
continue;
}
if (is_array($_mwsFv)) {
$_mwsFfiltered = array_values(array_filter($_mwsFv, static fn ($x) => $x !== null && $x !== ''));
if ($_mwsFfiltered !== []) {
$mwsAnyFilterInputPresent = true;
break;
}
} else {
if (in_array($_mwsFk, ['q', 'status', 'type', 'priority', 'from', 'to'], true) && trim((string) $_mwsFv) === '') {
continue;
}
if (in_array($_mwsFk, ['host', 'participant'], true) && (int) $_mwsFv === 0) {
continue;
}
$mwsAnyFilterInputPresent = true;
break;
}
}
$mwsStatusFilterTokens = array_values(array_filter(array_map('trim', explode(',', (string) request('status', '')))));
$mwsStatusFilterSingleValue = count($mwsStatusFilterTokens) === 1 ? $mwsStatusFilterTokens[0] : null;
@endphp
{{ mws_workspace_nav_label() }}
Planner, lifecycle, participants, minutes, and reminders in one place.
{{ $summary['today_count'] }}
Today
{{ $summary['week_count'] }}
This week
{{ $summary['missed_count'] }}
{{ $mecPlannerEnabled ? __('Over Due') : 'Missed / overdue' }}
{{ $summary['month_count'] }}
This month
@if ($mecPlannerEnabled)
@foreach ($todayVisitActivities as $visit)
{{ __('Visit') }} · {{ $visit['plan_type'] }}
{{ $visit['scheme_line'] }}
@endforeach
@endif
@forelse ($todayMeetings as $m)
{{ $m->reference_id }}
{{ $m->title }}
{{ \Illuminate\Support\Str::substr((string) $m->start_time, 0, 5) }} – {{ \Illuminate\Support\Str::substr((string) $m->end_time, 0, 5) }} · {{ $m->priority->label() }} · {{ $m->status->label() }}
@empty
@if (! $mecPlannerEnabled || $todayVisitActivities->isEmpty())
{{ $mecPlannerEnabled ? __('No visits or meetings for today.') : 'No meetings scheduled for today.' }}
@endif
@endforelse
@if ($mecPlannerEnabled)
@foreach ($upcomingVisitActivities as $visit)
@php $visitDay = \Carbon\Carbon::parse($visit['event_date']); @endphp
{{ $visitDay->format('M j') }} · {{ __('Visit') }}
{{ $visit['scheme_line'] }}
@endforeach
@endif
@forelse ($upcomingMeetings as $m)
{{ $m->meeting_date->format('M j') }}
{{ $m->title }}
{{ $m->priority->label() }} · {{ $m->status->label() }}
@empty
@if (! $mecPlannerEnabled || $upcomingVisitActivities->isEmpty())
{{ $mecPlannerEnabled ? __('No upcoming visits or meetings.') : 'No upcoming meetings.' }}
@endif
@endforelse
@if ($mecPlannerEnabled)
@foreach ($attentionVisitActivities ?? collect() as $visit)
@php $attentionVisitDay = \Carbon\Carbon::parse($visit['event_date']); @endphp
{{ $attentionVisitDay->format('M j') }} · {{ __('Visit') }} · {{ __('Overdue') }}
{{ $visit['scheme_line'] }}
@endforeach
@endif
@forelse ($missedMeetings as $m)
{{ $m->reference_id }}
{{ $m->title }}
{{ $m->meeting_date->format('M j') }} · {{ $m->priority->label() }} · {{ $m->status->label() }}
@empty
@if (! $mecPlannerEnabled || ($attentionVisitActivities ?? collect())->isEmpty())
{{ $mecPlannerEnabled ? __('No overdue visits without an initiated monitoring report.') : 'Nothing flagged here.' }}
@endif
@endforelse
@forelse ($recentMeetings as $m)
{{ $m->reference_id }}
{{ $m->title }}
{{ $m->meeting_date->format('M j') }} · {{ $m->updated_at->diffForHumans() }}
@empty
No meetings match the current filters.
@endforelse
@php
if ($plannerView === 'month') {
$mwsPlannerCalHeaderLabel = $anchor->format('F Y');
} elseif ($plannerView === 'week') {
$mwsPlannerCalHeaderLabel = $rangeStart->format('M j').' – '.$rangeEnd->format('M j, Y');
} else {
$mwsPlannerCalHeaderLabel = $anchor->format('l, F j, Y');
}
$mwsPlannerCalPrev = $plannerView === 'month' ? $anchor->copy()->subMonth() : ($plannerView === 'day' ? $anchor->copy()->subDay() : $anchor->copy()->subWeek());
$mwsPlannerCalNext = $plannerView === 'month' ? $anchor->copy()->addMonth() : ($plannerView === 'day' ? $anchor->copy()->addDay() : $anchor->copy()->addWeek());
@endphp
@php
$grouped = $plannerMeetingsGrouped ?? $plannerMeetings->groupBy(fn ($m) => $m->meeting_date->format('Y-m-d'));
$mecVisitsGrouped = $mecPlannerEnabled
? $mecVisitActivities->groupBy(fn (array $row) => (string) ($row['event_date'] ?? ''))
: collect();
@endphp
@if ($plannerView === 'month')
@include('meeting-workspace.partials.planner-month-calendar', [
'anchor' => $anchor,
'grouped' => $grouped,
'mecVisitsGrouped' => $mecVisitsGrouped,
'mecPlannerEnabled' => $mecPlannerEnabled,
'mwsDashboardQueryForLinks' => $mwsDashboardQueryForLinks,
])
@else
@php $h = $rangeStart->copy(); @endphp
@while($h->lte($rangeEnd))
|
{{ $h->format('D') }}
{{ $h->format('M j') }}
|
@php $h->addDay(); @endphp
@endwhile
@php $c = $rangeStart->copy(); @endphp
@while($c->lte($rangeEnd))
@php $k = $c->format('Y-m-d'); @endphp
@if ($mecPlannerEnabled)
@foreach ($mecVisitsGrouped[$k] ?? [] as $visit)
{{ __('Visit') }} · {{ $visit['plan_type'] }}
{{ $visit['scheme_line'] }}
@endforeach
@endif
@foreach ($grouped[$k] ?? [] as $m)
{{ $m->reference_id }}
{{ $m->title }}
{{ \Illuminate\Support\Str::substr((string) $m->start_time, 0, 5) }} – {{ \Illuminate\Support\Str::substr((string) $m->end_time, 0, 5) }}
{{ $m->priority->label() }}{{ $m->status->label() }}
@endforeach
|
@php $c->addDay(); @endphp
@endwhile
@endif
@if ($mecPlannerEnabled)
{{ __('Loading') }}…
{{ __('Loading') }}…
@include('meeting-workspace.partials.mec-add-activity-modal')
@endif
@if ($plannerView === 'month')
@endif