@forelse ($histories as $history)
@if ($history->user)
{{ $history->user->name }}
@endif

@switch($history->event_type) @case("file-added") {{ __(ucfirst($history->event_type)) }} @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @break @case("proposal-created") {{ __(ucfirst($history->event_type)) }} @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @break @case("note-added") {{ __(ucfirst($history->event_type)) }} @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @break @case("followup-created") {{ __(ucfirst($history->event_type)) }} @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @break @case($history->event_type == "agent-assigned" || $history->event_type == "deal-updated" || $history->event_type == "pipeline-updated") {{ __(ucfirst($history->event_type)) }} @lang('app.by') @if ($history->user && $history->user->image_url){{ $history->user->name }}@endif {{__('modules.client.viewDetails')}} @break @case("stage-updated") @if ($history->deal_stage_from_id && $history->deal_stage_to_id) @lang('app.stageUpdated') @lang('app.from') {{ $history->dealStageFrom->name }} @lang('app.to') {{ $history->dealStageTo->name }} @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @else @lang('app.stageUpdated') @lang('app.by') {{ $history->user->name }} {{ __('modules.client.viewDetails') }} @endif @break @case($history->event_type == "followup-deleted" ) {{ __(ucfirst($history->event_type)) }} @lang('app.by') @if ($history->user && $history->user->image_url){{ $history->user->name }}@endif @break @case($history->event_type == "proposal-deleted" ) {{ __(ucfirst($history->event_type)) }} @lang('app.by') @if ($history->user && $history->user->image_url){{ $history->user->name }}@endif @break @case($history->event_type == "note-deleted" ) {{ __(ucfirst($history->event_type)) }} @lang('app.by') @if ($history->user && $history->user->image_url){{ $history->user->name }}@endif @break @case($history->event_type == "file-deleted" ) {{ __(ucfirst($history->event_type)) }} @lang('app.by') @if ($history->user && $history->user->image_url){{ $history->user->name }}@endif @break @endswitch

{{ $history->created_at->timezone(company()->timezone)->translatedFormat(company()->date_format .' '. company()->time_format) }}
@empty @endforelse