{{ __('messages.Opportunity') }} {{ $opportunity->name }}

{{ __('messages.Opportunity') }}
{{ $opportunity->name }} @if (auth()->user()->id == $opportunity->created_by && $opportunity->opportunity_status_id == 1) {{ __('messages.Edit') }} {{ __('messages.Opportunity') }} {{ $opportunity->name }} update_name
@endif
{{ __('messages.Opportunity Type') }}
{{ $opportunity->opportunity_type->name }}
{{ __('messages.Opportunity Status') }}
{{ $opportunity->opportunity_status->name }} @if ($opportunity->opportunity_status_id == 1 || $opportunity->opportunity_status_id == 2) {{ __('messages.Edit') }} {{ __('messages.Opportunity') }} {{ $opportunity->name }} update
opportunity_status_id @foreach (\App\Models\OpportunityStatus::get() as $status) @endforeach
@if (auth()->user()->id == $opportunity->created_by || !$opportunity->account_id)
comment
@endif
@endif
{{ __('messages.Main lead source') }}
{{ $opportunity->lead_source ? $opportunity->lead_source->name : '' }}
{{ __('messages.Expected Close') }}
{{ $opportunity->expected_close }} @if (auth()->user()->id == $opportunity->created_by && $opportunity->opportunity_status_id == 1) {{ __('messages.Edit') }} {{ __('messages.Opportunity') }} {{ $opportunity->name }} update_expected_close
@endif
{{ __('messages.Forecast Amount') }}
{{ $opportunity->forecast_amount }} {{ $opportunity->currency ? $opportunity->currency->name : '' }} @if (auth()->user()->id == $opportunity->created_by && $opportunity->opportunity_status_id == 1) {{ __('messages.Edit') }} {{ __('messages.Opportunity') }} {{ $opportunity->name }} update_forecast_amount
@endif
{{ __('messages.Account Type') }}
@php if ($opportunity->account_type) { $arr = explode('\\', $opportunity->account_type); echo $arr[count($arr) - 1]; } else { echo '-'; } @endphp
{{ __('messages.Account name') }}
@if ($opportunity->account_id) @switch($opportunity->account_type) @case('App\Models\Customer') {{ $opportunity->account->name }} {{ $opportunity->account->mobile }} @break @case('App\Models\CustomerGroup') {{ $opportunity->account->name }} @break @case('App\Models\Corporate') {{ $opportunity->account->name }} @break @case('App\Models\LeadCustomer') {{ $opportunity->account->name }} ( {{ $opportunity->account->mobile }} ) @break @case('App\Models\Order') {{ $opportunity->account->account->name }} #{{ $opportunity->account_id }} @break @default {{ $opportunity->account->name }} @endswitch @else - @endif
{{ __('messages.Created by') }}
{{ $opportunity->created_by_user->name }}
{{ __('messages.assigned_to') }}
{{ $opportunity->assigned_to_user->name }}
{{ __('messages.Created At') }}
{{ $opportunity->created_at }}
{{ __('messages.Updated By') }}
{{ $opportunity->last_updated_by_user->name }}
{{ __('messages.Updated At') }}
{{ $opportunity->updated_at }}
{{ __('messages.comment') }}
{{ $opportunity->comment }}
{{-- @if ($opportunity->account_id)
@livewire('add-comment-component', ['account' => $opportunity->account ,'account_type'=>$opportunity->account_type ,'current_page' => 'opportunity' ],key("add_comment_". $opportunity->account_id)) @livewire('comment-show-all-component', ['account' => $opportunity->account ],key("show_comment_". $opportunity->account_id))
@endif --}}