@php $tz = config('app.display_timezone'); $tabMeta = [ 'year' => ['label' => __('Rolling 12 months'), 'icon' => 'calendar'], 'outreach' => ['label' => __('Upcoming Outreach'), 'icon' => 'megaphone'], 'unconfirmed' => ['label' => __('Dates to confirm'), 'icon' => 'question-mark-circle'], 'starter' => ['label' => __('Starter set'), 'icon' => 'sparkles'], ]; $cards = [ ['key' => 'year', 'label' => __('Next 12 months'), 'value' => $counts['year'], 'icon' => 'calendar', 'accent' => '#d97706', 'sub' => __('Entries on the calendar')], ['key' => 'outreach', 'label' => __('Outreach open'), 'value' => $counts['open'], 'icon' => 'megaphone', 'accent' => '#ea580c', 'sub' => __('Windows open now')], ['key' => 'outreach', 'label' => __('Opening soon'), 'value' => $counts['soon'], 'icon' => 'clock', 'accent' => '#6366f1', 'sub' => __('Within :weeks weeks', ['weeks' => \App\Services\Crm\Calendar\CommercialCalendarService::UPCOMING_WEEKS])], ['key' => 'unconfirmed', 'label' => __('Dates to confirm'), 'value' => $counts['unconfirmed'], 'icon' => 'question-mark-circle', 'accent' => '#64748b', 'sub' => __('Not yet checked')], ]; $statusColor = ['planned' => 'sky', 'in_outreach' => 'orange', 'done' => 'emerald', 'cancelled' => 'slate']; $select = 'mt-1 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; // An unconfirmed entry is shown by its month only: its day is not known. $when = function (\App\Models\Crm\CalendarEvent $e) use ($tz): string { $start = $e->all_day ? $e->starts_at : $e->starts_at->copy()->timezone($tz); if (! $e->is_confirmed) { return __('Around :month', ['month' => $start->format('F Y')]); } $text = $start->format($e->all_day ? 'D j M Y' : 'D j M Y, H:i'); if ($e->ends_at !== null) { $end = $e->all_day ? $e->ends_at : $e->ends_at->copy()->timezone($tz); if ($end->format('Y-m-d') !== $start->format('Y-m-d')) { $text .= ' to '.$end->format('j M Y'); } elseif (! $e->all_day) { $text .= ' to '.$end->format('H:i'); } } return $text; }; @endphp
{{ __('From :from to :to. Yearly entries are carried forward automatically and need their new date confirmed.', ['from' => $today->format('j M Y'), 'to' => $today->copy()->addMonths(12)->format('j M Y')]) }}
| {{ __('When') }} | {{ __('Event or opportunity') }} | {{ __('Outreach starts') }} | {{ __('Owner') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
| {{ \Illuminate\Support\Carbon::parse($month.'-01')->format('F Y') }} | |||||
|
|
|||||
{{ __('Windows open now, and those opening in the next :weeks weeks. When a window opens its owner gets a task.', ['weeks' => \App\Services\Crm\Calendar\CommercialCalendarService::UPCOMING_WEEKS]) }}
| {{ __('Outreach') }} | {{ __('Event or opportunity') }} | {{ __('Takes place') }} | {{ __('Owner') }} | {{ __('Task') }} |
|---|---|---|---|---|
|
@if (! $e->is_confirmed)
|
@if ($e->submission_deadline) {{ __('Submission deadline :date', ['date' => $e->submission_deadline->format('j M Y')]) }} @endif | {{ $when($e) }} | {{ $e->owner?->name ?? __('Nobody') }} | @if ($e->outreachTask) {{ __(\App\Models\Crm\Task::STATUSES[$e->outreachTask->status] ?? $e->outreachTask->status) }} @else {{ __('Raised when the window opens') }} @endif |
|
|
||||
{{ __('Starter entries and yearly entries carried forward. Their dates are guesses: check each with the organiser or the official calendar, edit the date, then confirm. Outreach never opens on an unconfirmed entry.') }}
| {{ __('When') }} | {{ __('Event or opportunity') }} | {{ __('Owner') }} | {{ __('Actions') }} |
|---|---|---|---|
|
{{ $when($e) }}
|
{{ $e->title }} @if ($e->recurs_from_id){{ __('Carried forward from last year') }} @endif |
{{ $e->owner?->name ?? __('Nobody') }} |
@if ($canEdit)
|
|
|
|||
{{ __('Occasions buyers commonly plan around. The month is only a hint, not a date. Anything you add arrives unconfirmed, owned by you, and opens no outreach until its real date is checked and confirmed.') }}
| {{ __('Occasion') }} | {{ __('Usual month (hint)') }} | {{ __('Outreach lead time') }} | {{ __('What to check') }} | |
|---|---|---|---|---|
| {{ __($group) }} | ||||
|
@if ($p['added'])
|
{{ __($p['title']) }} @if ($p['added']){{ __('Already on the calendar') }} @endif |
{{ __('Around :month', ['month' => $p['lands_on']->format('F')]) }} | {{ trans_choice('{1} 1 week|[2,*] :count weeks', $p['outreach_weeks'], ['count' => $p['outreach_weeks']]) }} | {{ __($p['hint']) }} |
{{ __('Outreach opens on :date.', ['date' => \Illuminate\Support\Carbon::parse($startsOn)->subWeeks((int) $outreachWeeks)->format('D j M Y')]) }}
@endif