@extends('layouts.admin.master') @section('title')Academic {{ $title }} @endsection @push('css') @endpush @section('content') @php $userList = getUserList(); $contact = $data->PrimaryContact ? $data->PrimaryContact : $data->SecondaryContact; $sec_contact = $data->SecondaryContact ? $data->SecondaryContact : ""; if(strlen($contact) < 3 ) { $len = 0; } else { $len = 3; } $contact = substr_replace($contact,str_repeat("*",strlen($contact)-$len),0,strlen($contact)-3); if(Session::get('isPhone')=="Detail" || Session::get('isPhone')=="ALL") { $contact = $data->PrimaryContact ? $data->PrimaryContact : $data->SecondaryContact; } if($sec_contact) { if(strlen($sec_contact) < 3 ) { $len = 0; } else { $len = 3; } $sec_contact = substr_replace($sec_contact,str_repeat("*",strlen($sec_contact)-$len),0,strlen($sec_contact)-3); if(Session::get('isPhone')=="Detail" || Session::get('isPhone')=="ALL") { $sec_contact = $data->SecondaryContact ? $data->SecondaryContact : ""; } } $fup_arr = $followup->toArray(); $ncd_arr = array_column($fup_arr,"nextFollowupDate"); $ncd = array_values($ncd_arr); $nc_arr = []; foreach($ncd as $nc) { if($nc) { if(strtotime(date('Y-m-d')) <= strtotime($nc)) { $nc_arr[] = $nc; } } } $last_fup = count($followup); if($last_fup) { $last_fup = $followup[0]->addDate; } $fup_user = array_column($fup_arr,"followupBy"); $fup_user = array_count_values($fup_user); $Flist = array_column($fup_arr,'followupType'); $Flist = array_count_values($Flist); if(Session::has('page')) { $page =Session::get('page'); } else { $temp_id_arr[] = request()->route()->Id; Session::put('page',$temp_id_arr) ; $page =Session::get('page'); } $page_count = count($page); $next_page_disable = false; $prev_page_disable = false; $currentPageIndex = array_search($data->enquire_id,$page); if($page_count <=1) { $prevPg = "javascript:void(0)"; $nextPg = $page[$currentPageIndex]; $prev_page_disable = true; $next_page_disable = true; } else { if($currentPageIndex == 0) { $prevPg = "javascript:void(0)"; $nextPg = $page[$currentPageIndex + 1]; $prev_page_disable = true; } elseif($currentPageIndex == $page_count -1) { $nextPg = "javascript:void(0)"; $prevPg = $page[$currentPageIndex - 1]; $next_page_disable = true; } else { $nextPg = $page[$currentPageIndex + 1]; $prevPg = $page[$currentPageIndex - 1]; $next_page_disable = false; $prev_page_disable = false; } } $datetime1 = new \DateTime($data->enquireDate); $datetime2 = new \DateTime(date('Y-m-d')); $interval = $datetime1->diff($datetime2); $leadAge = $interval->format('%a'); $feedbackList = getLeadFeedbackType('all'); @endphp