@php $tz = config('app.display_timezone'); $tabMeta = ['' => ['label' => __('All'), 'icon' => 'queue-list']] + [ 'competitor_profile' => ['label' => __('Competitor profiles'), 'icon' => 'trophy'], 'note' => ['label' => __('Research notes'), 'icon' => 'beaker'], 'sector' => ['label' => __('Sector insight'), 'icon' => 'building-office'], 'market' => ['label' => __('Market insight'), 'icon' => 'chart-bar'], ]; $kindColor = ['competitor_profile' => 'rose', 'note' => 'indigo', 'sector' => 'sky', 'market' => 'violet']; $hasFilters = trim($q) !== '' || $sector !== '' || $organisationFilter; @endphp
@if ($canCreate) {{ __('New note') }} @endif
@foreach ($tabMeta as $key => $meta) @endforeach

{{ $tabMeta[$kind]['label'] }}

{{ __('Everyone on the team can read every note.') }} @if ($organisationFilter) · {{ $organisationFilter->name }} @endif

@forelse ($notes as $note) @empty @endforelse
{{ __('Note') }} {{ __('Kind') }} {{ __('About') }} {{ __('Written by') }} {{ __('Updated') }} {{ __('Actions') }}
@if ($note->body)

{{ \Illuminate\Support\Str::limit($note->body, 140) }}

@endif @if ($note->tags)
@foreach ($note->tags as $tag) {{ $tag }} @endforeach
@endif
{{ __(\App\Models\Crm\ResearchNote::KINDS[$note->kind] ?? $note->kind) }} @if ($note->competitor_name) {{ $note->competitor_name }} @endif @if ($note->customer) {{ $note->customer->name }} @endif @if ($note->sector) {{ $sectors[$note->sector] ?? $note->sector }} @endif @if (! $note->competitor_name && ! $note->customer && ! $note->sector) {{ __('General') }} @endif {{ $note->author?->name ?? __('A former member') }} {{ $note->updated_at?->copy()->timezone($tz)->format('j M Y') }}
@can('update', $note) @endcan @can('delete', $note) @endcan
@if ($hasFilters) @else @endif
@if ($notes->hasPages())
{{ $notes->links() }}
@endif
{{-- One note, read --}} @if ($viewing)
{{ $viewing->title }} {{ __(\App\Models\Crm\ResearchNote::KINDS[$viewing->kind] ?? $viewing->kind) }}
@endif
@if ($viewing)

{{ __('Written by :name, last updated :when', ['name' => $viewing->author?->name ?? __('a former member'), 'when' => $viewing->updated_at?->copy()->timezone($tz)->format('j M Y, H:i')]) }} @if ($viewing->customer) · {{ $viewing->customer->name }} @endif @if ($viewing->sector) · {{ $sectors[$viewing->sector] ?? $viewing->sector }} @endif

@if ($viewing->body)
{{ $viewing->body }}
@else

{{ __('No text yet.') }}

@endif @if ($viewing->source_url) {{ __('Source') }} @endif @if ($viewing->kind === 'competitor_profile')

{{ __('Where :name has come up', ['name' => $viewing->competitor_name]) }}

@if ($mentions['opportunities']->isEmpty() && $mentions['meetings']->isEmpty())

{{ __('Not named on any opportunity or tagged in any meeting note yet.') }}

@else
    @foreach ($mentions['opportunities'] as $opportunity)
  • {{ $opportunity->title }} {{ $opportunity->customer?->name }} · {{ __(\App\Models\Opportunity::STAGES[$opportunity->stage] ?? $opportunity->stage) }}
  • @endforeach @foreach ($mentions['meetings'] as $meeting)
  • {{ $meeting->title ?: __('Meeting note') }} {{ $meeting->held_at?->copy()->timezone($tz)->format('j M Y') }}
  • @endforeach
@endif
@endif
@endif
@if ($viewing) @can('update', $viewing) {{ __('Edit') }} @endcan @endif {{ __('Close') }}
{{-- Add or edit --}} {{ $editingId ? __('Edit research note') : __('New research note') }}
@if (($form['kind'] ?? '') === 'competitor_profile')
@else
@endif
@if ($pickedOrganisation)
{{ $pickedOrganisation->name }}
@else @if ($organisationMatches->isNotEmpty())
    @foreach ($organisationMatches as $match)
  • @endforeach
@endif @endif
{{ __('Cancel') }} {{ __('Save') }} {{ __('Saving…') }}