dbfdg @extends('layouts.admin') @section('page-title') {{$deal->name}} @endsection @push('css-page') @endpush @push('script-page') @endpush @section('breadcrumb') @endsection @section('action-btn')
@can('convert deal to deal') @if(!empty($deal)) @else @endif @endcan
@endsection @section('content')
tasks; $products = $deal->products(); $sources = $deal->sources(); $calls = $deal->calls; $emails = $deal->emails; ?>

{{__('Pipeline')}}

{{$deal->pipeline->name}}

{{__('Stage')}}

{{$deal->stage->name}}

{{__('Created')}}

{{\Auth::user()->dateFormat($deal->created_at)}}

{{__('Price')}}

{{\Auth::user()->priceFormat($deal->price)}}
{{__('Task')}}

{{count($tasks)}}

{{__('Product')}}

{{count($products)}}

{{__('Source')}}

{{count($sources)}}

{{__('Files')}}

{{count($deal->files)}}

{{__('Tasks')}}
@can('create task') @endcan
@if(!$tasks->isEmpty())
    @foreach($tasks as $task)
  • status) checked="checked" @endcan value="{{$task->status}}" data-url="{{route('deals.tasks.update_status',[$deal->id,$task->id])}}">
    {{$task->name}} @if($task->status)
    {{__(\App\Models\DealTask::$status[$task->status])}}
    @else
    {{__(\App\Models\DealTask::$status[$task->status])}}
    @endif
    {{__(\App\Models\DealTask::$priorities[$task->priority])}} - {{Auth::user()->dateFormat($task->date)}} {{Auth::user()->timeFormat($task->time)}} @if($task->status)
    {{__(\App\Models\DealTask::$status[$task->status])}}
    @else
    {{__(\App\Models\DealTask::$status[$task->status])}}
    @endif
    @can('edit task')
    @endcan @can('delete task')
    {!! Form::open(['method' => 'DELETE', 'route' => ['deals.tasks.destroy',$deal->id,$task->id]]) !!} {!! Form::close() !!}
    @endcan
  • @endforeach
@else
No Tasks Available.!
@endif
{{__('Users')}}
@foreach($deal->users as $user) @can('edit deal') @endcan @endforeach
{{__('Name')}} {{__('Action')}}
avatar) src="{{asset('/storage/uploads/avatar/'.$user->avatar)}}" @else src="{{asset('/storage/uploads/avatar/avatar.png')}}" @endif class="wid-30 rounded-circle me-3" >

{{$user->name}}

{!! Form::open(['method' => 'DELETE', 'route' => ['deals.users.destroy', $deal->id,$user->id],'id'=>'delete-form-'.$deal->id]) !!} {!! Form::close() !!}
{{__('Products')}}
@foreach($deal->products() as $product) @can('edit deal') @endcan @endforeach
{{__('Name')}} {{__('Price')}} {{__('Action')}}
{{$product->name}} {{\Auth::user()->priceFormat($product->sale_price)}}
{!! Form::open(['method' => 'DELETE', 'route' => ['deals.products.destroy', $deal->id,$product->id]]) !!} {!! Form::close() !!}
{{__('Sources')}}
@foreach($sources as $source) @can('edit deal') @endcan @endforeach
{{__('Name')}} {{__('Action')}}
{{$source->name}}
{!! Form::open(['method' => 'DELETE', 'route' => ['deals.sources.destroy', $deal->id,$source->id],'id'=>'delete-form-'.$deal->id]) !!} {!! Form::close() !!}
{{__('Emails')}}
@can('create deal email') @endcan
    @if(!$emails->isEmpty()) @foreach($emails as $email)
  • image
    {{$email->subject}}
    {{$email->to}}
    {{$email->created_at->diffForHumans()}}
  • @endforeach @else
  • {{__(' No Emails Available.!')}}
  • @endif
{{__('Discussion')}}
    @if(!$deal->discussions->isEmpty()) @foreach($deal->discussions as $discussion)
  • image
    {{$discussion->comment}}
    {{$discussion->user->name}}
    {{$discussion->created_at->diffForHumans()}}
  • @endforeach @else
  • {{__(' No Data Available.!')}}
  • @endif
{{__('Notes')}}
@php $user = \App\Models\User::find(\Auth::user()->creatorId()); $plan= \App\Models\Plan::getPlan($user->plan); @endphp @if($plan->chatgpt == 1) @endif
{{__('Files')}}
{{__('Calls')}}
@can('create deal call') @endcan
@foreach($calls as $call) @endforeach
{{__('Subject')}} {{__('Call Type')}} {{__('Duration')}} {{__('User')}} {{__('Action')}}
{{ $call->subject }} {{ ucfirst($call->call_type) }} {{ $call->duration }} {{ isset($call->getLeadCallUser) ? $call->getLeadCallUser->name : '-' }} @can('edit deal call') @endcan @can('delete deal call')
{!! Form::open(['method' => 'DELETE', 'route' => ['deals.calls.destroy', $deal->id,$user->id],'id'=>'delete-form-'.$deal->id]) !!} {!! Form::close() !!}
@endcan
{{__('Activity')}}
    @if(!$deal->activities->isEmpty()) @foreach($deal->activities as $activity)
  • {{ __($activity->log_type) }}
    {!! $activity->getRemark() !!}
    {{$activity->created_at->diffForHumans()}}
  • @endforeach @else No activity found yet. @endif
@endsection