@if ($customer->active ==1)
@can('show customer train')
@livewire('customer-train-component', ['customer_id' => $customer->id ,'customer'=>$customer ,'component_name'=>"customer-show"])
@endcan
@endif
@if(! ($customer->nationality_id && $customer->identity_no))
Be Warned
Must Customer Have Nationality and Identity to make order
@endif
{{trans_choice('messages.Customer', 1)}} {{ $customer->name}}
{{__('messages. Full details of Customer.')}}
{{-- @if($customer->nationality_id && $customer->identity_no) --}}
@can("delete customers")
@endcan
{{-- $this->account_ids = $account_ids; --}}
{{-- $this->account_type = $account_type; --}}
@can("deactivate customers")
@if ($customer->active)
@endif
@endcan
@can("activate customers")
@if (!$customer->active == 1)
@endif
@endcan
@if ($customer->active)
@can("add tickets")
@livewire("add-button-component",["link_route" => route('control.customers.openTicket',$customer->id),"value" => __('messages.new ticket')])
@endcan
@can("add orders")
@livewire("add-button-component",["link_route" => "/crm/orders/create/$customer->id/customer","value" => __('messages.Add Order')])
@endcan
{{-- @endif --}}
{{-- @can('generate_placement_test')
{{__('messages.Generate Placement Test')}}
@if(session()->has('link_copy'))
@endif
{{__('messages.Link Of Placement Test :')}}
{{__('messages.Close')}}
@if(!$course_c_e)
{{__('messages.Generate Placement Test')}}
@elseif($course_c_e->token == null)
{{__('messages.Generate Placement Test')}}
@endif
@endcan --}}
@endif
{{-- @livewire('request-follow-up-customer-component',['customer'=>$customer]) --}}
@if (auth()->user()->can('add any opportunity'))
@livewire('create-new-opportunity-component' ,["account_ids"=>[$customer->id] ,"account_type" =>"App\Models\Customer"])
@elseif(auth()->user()->id == $customer->last_follow_up_by)
@can('add opportunities')
@livewire('create-new-opportunity-component' ,["account_ids"=>[$customer->id] ,"account_type" =>"App\Models\Customer"])
@endcan
@endif
@if (session()->has('message'))
{{ session('message') }}
@endif
@if (session()->has('error'))
{{ session('error') }}
@endif
{{__('messages.Code')}}
{{ $customer->code}}
{{__('messages.English Name')}}
{{$customer->en_certificate_name}}
@can("edit customer en_certificate_name")
{{-- {{$order_detail->id}} --}}
{{__('messages.English Name')}}
m-0
update_en_certificate_name()
edit_en_certificate_name()
@endcan
{{__('messages.Arabic Name')}}
{{$customer->ar_certificate_name}}
@can("edit customer ar_certificate_name")
{{-- {{$order_detail->id}} --}}
{{__('messages.Arabic Name')}}
m-0
update_ar_certificate_name()
edit_ar_certificate_name()
@endcan
{{__('messages.Identity No.')}}
{{ $customer->identity_no}}
@can("edit customer identity_no")
{{-- {{$order_detail->id}} --}}
{{__('messages.Identity No.')}}
m-0
update_identity_no()
edit_identity_no()
@endcan
{{__('messages.email')}}
{{($customer->email) ? $customer->email : '-'}}
{{__('messages.mobile')}}
{{$customer->mobile}}
{{__('messages.phone')}}
{{$customer->phone}}
{{__('messages.address')}}
{{$customer->address}}
{{__('messages.education')}}
{{$customer->education}}
{{__('messages.gender')}}
{{$customer->gender}}
{{__('messages.Date of Birth')}}
{{$customer->birth_date}}
{{__('messages.Age Category')}}
{{$customer->age_category}}
{{__('messages.wallet')}}
{{$customer->wallet}} {{$customer->currency}}
{{__('messages.topic')}}
{{ $customer->topic}}
{{__('messages.comment')}}
{{ $customer->comment}}
{{__('messages.User Name')}}
{{ $customer->user_name}}
@if($customer->lead_customer_id)
@if(\App\Models\LeadCustomer::find($customer->lead_customer_id))
@endif
@endif
{{trans_choice('messages.nationalities',1)}}
@if(app()->getLocale() == "ar")
{{($customer->nationality)? $customer->nationality->name_ar:""}}
@else
{{($customer->nationality)? $customer->nationality->name_en:""}}
@endif
{{__('messages.Lead Source')}}
{{($customer->lead_source_id)? $customer->lead_source->name : "-"}}
{{--
{{__('messages.Hows')}}
{{($customer->how_id)? $customer->how->name : "-"}}
--}}
{{--
{{__('messages.Account Source')}}
{{($customer->account_source_id)? $customer->account_source->name : ""}}
--}}
{{__('messages.Opened By')}}
{{($customer->opened_by)? $customer->opened_by_user->name :""}}
{{__('messages.last_follow_up_by')}}
{{($customer->last_follow_up_by)? $customer->last_follow_up_by_user->name :""}}
{{__('messages.start_follow_up_At')}}
{{($customer->start_follow_up_at)? \Carbon\Carbon::createFromTimeString($customer->start_follow_up_at)->translatedFormat('M j, Y, g:i a') :""}}
{{__('messages.last_follow_up_At')}}
{{($customer->last_follow_up_at)? \Carbon\Carbon::createFromTimeString($customer->last_follow_up_at)->translatedFormat('M j, Y, g:i a') :""}}
{{__('messages.free')}}
@if($customer->free == 1) @else @endif
{{trans_choice('messages.branch',1)}}
{{($customer->branch_id)? $customer->branch->name :"-"}}
{{__('messages.Updated By')}}
{{($customer->last_updated_by)?$customer->last_updated_by_user->name:"-"}}
{{trans_choice('messages.Interests' , 5)}}
@if($customer->interests->first())
@forelse($customer->interests as $interest)
{{$interest->name}}
@empty
-
@endforelse
@endif
{{__('messages.follow cycle')}}
{{ $customer->user_follow_count}}
{{__('messages.Created At')}}
{{ ($customer->created_at)?$customer->created_at:""}}
{{__('messages.Updated At')}}
{{( $customer->updated_at)? $customer->updated_at :""}}
{{--
{{__('messages.placement_test')}}
@if($course_c_e == null)
{{__('messages.No placement test yet')}}
@endif
@if($course_c_e)
@if($course_level)
{{$course_level->name}} - {{$course_level->product->name}}
@endif
@endif
@if($course_c_e)
@if($course_c_e->pass_course_level_id == null)
@if($course_customer_exam_questions)
{{__('messages.He did not succeed in any level')}}
@else
Copy Like of Exam:
@endif
@endif
@endif
--}}
@if (session()->has('message_r'))
{{ session('message_r') }}
@endif
@if (session()->has('message_f'))
{{ session('message_f') }}
@endif
@if ($customer_placement_tests && $customer_placement_tests->count() >0 )
{{__('messages.placement_test')}} - {{$customer->name}}
#
{{__('messages.Pass Course Level')}}
{{__('messages.Updated By')}}
{{__('messages.Created At')}}
{{__('messages.Report')}}
@forelse ($customer_placement_tests as $test)
@if(\App\Models\CourseCustomerExamQuestion::where('course_customer_exam_id' , $test->id)->get()->first())
# {{$loop->iteration}}
{{__('messages.Pass Course Level')}}
{{($test->pass_course_level_id)?\App\Models\CourseLevel::find($test->pass_course_level_id)->name . '-' . \App\Models\CourseLevel::find($test->pass_course_level_id)->product->name
: __('messages.He did not succeed in any level')}}
{{__('messages.Updated By')}} {{($test->last_updated_by_user)?$test->last_updated_by_user->name:"-"}}
{{__('messages.Created At')}} {{($test->created_at)?$test->created_at:""}}
@endif
@empty
{{__('messages.Empty Result')}}
@endforelse
@endif
@can('show owner_histories')
{{__('messages.Owner History')}}
#
{{__('messages.from')}}
{{__('messages.to')}}
{{__('messages.By')}}
{{__('messages.comment')}}
{{__('messages.Created At')}}
@forelse ($customer->owner_histories as $key =>$owner_history)
# {{++$key}}
{{__('messages.from')}}
{{($owner_history->from_last_follow_up_by)?$owner_history->from_last_follow_up_by_user->name:""}}
{{__('messages.to')}}
{{($owner_history->to_last_follow_up_by)?$owner_history->to_last_follow_up_by_user->name:""}}
{{__('messages.By')}} {{($owner_history->last_updated_by_user)?$owner_history->last_updated_by_user->name:''}}
{{__('messages.comment')}} {{$owner_history->comment}}
{{__('messages.Created At')}} {{($owner_history->created_at)?$owner_history->created_at:""}}
@empty
{{__('messages.Empty Result')}}
@endforelse
@endcan
@if ($groups && $groups->count() >0 )
{{__('messages.Customer Group')}} {{$customer->name}}
#
{{__('messages.Name')}}
{{__('messages.comment')}}
{{__('messages.Updated By')}}
{{__('messages.Updated At')}}
{{__('messages.Created At')}}
@forelse ($groups as $key =>$group)
# {{$groups->firstItem() + $key}}
{{__('messages.Name')}}
{{$group->name}}
{{__('messages.comment')}} {{$group->comment}}
{{__('messages.Updated By')}} {{($group->last_updated_by_user)?$group->last_updated_by_user->name:"-"}}
{{__('messages.Updated At')}} {{($group->updated_at)?$group->updated_at:""}}
{{__('messages.Created At')}} {{($group->created_at)?$group->created_at:""}}
@empty
{{__('messages.Empty Result')}}
@endforelse
@endif
{{__('messages.Customer Files')}} {{$customer->name}}
@if ($customer->active ==1)
@can('add customer_files')
@livewire('customer-file-component', ['customer' => $customer])
@endcan
@endif
@if ($files && $files->count() >0 )
#
{{__('messages.Name')}}
{{__('messages.comment')}}
{{__('messages.file_type')}}
{{__('messages.Updated By')}}
{{__('messages.Created At')}}
@forelse ($files as $key =>$file)
# {{$files->firstItem() + $key}}
{{__('messages.Name')}}
{{$file->name}}
{{__('messages.comment')}} {{$file->comment}}
{{__('messages.file_type')}} {{$file->file_type->name}}
{{__('messages.Updated By')}} {{($file->last_updated_by_user)?$file->last_updated_by_user->name:"-"}}
{{__('messages.Created At')}} {{($file->created_at)?$file->created_at:""}}
@can('edit customer_files')
{{$file->id}}
{{__('messages.File')}} {{$file->name}}
edit_file_type_id
@foreach(\App\Models\FileType::all() as $type)
{{$type->name}}
@endforeach
@endcan
@can('delete customer_files')
{{__("messages.File")}} {{$file->name}}
{{$file->id}}
@endcan
@empty
{{__('messages.Empty Result')}}
@endforelse
@endif
{{__('messages.Customer Relative')}} {{$customer->name}}
@if ($customer->active ==1)
@can('add customer_relatives')
@livewire("add-button-component",["link_route" => "/control/crm/customer_relative/create/$customer->id","value" => __('messages.add customer_relatives')])
@endcan
@endif
@if ($relatives && $relatives->count() > 0)
#
{{__('messages.Name')}}
{{__('messages.Relative Type')}}
{{__('messages.Updated By')}}
{{__('messages.Updated At')}}
{{__('messages.Created At')}}
@forelse ($relatives as $key =>$relative)
# {{$relatives->firstItem() + $key}}
{{__('messages.Name')}}
{{$relative->relative->name}}
{{__('messages.Relative Type')}} {{($relative->relative_type)?$relative->relative_type->name:'-'}}
{{__('messages.Updated By')}} {{($relative->last_updated_by_user)?$relative->last_updated_by_user->name:"-"}}
{{__('messages.Updated At')}} {{($relative->updated_at)?$relative->updated_at:""}}
{{__('messages.Created At')}} {{($relative->created_at)?$relative->created_at:""}}
deleteCustomerRelative({{$relative->id}})
{{__('messages.Customer Relative')}} {{$relative->relative->name}}
editCustomerRelative({{$relative->id}})
updateCustomerRelative
{{__('messages.Customer Relative')}} {{$relative->relative->name}}
relative_id
@foreach(\App\Models\Customer::where('id','!=',$customer->id)->get() as $customer_relative)
{{$customer_relative->name}}
@endforeach
relative_type_id
@foreach(\App\Models\RelativeType::all() as $type)
{{$type->name}}
@endforeach
@empty
{{__('messages.Empty Result')}}
@endforelse
{{$relatives->links()}}
@endif
@livewire('show-tickets-component',['model' => $customer])
@if ($customer->active ==1)
@livewire('add-comment-component', ['account' => $customer ,'account_type'=>'App\Models\Customer','current_page' => 'customer'],key("add_comment_". $customer->id))
@endif
@livewire('comment-show-all-component', ['account' => $customer ],key("show_comment_". $customer->id))