@extends('layouts.crmtab')
@section('crm_content') @section('title', 'Tables - Basic Tables') @section('page-script') @endsection @if (session('success') || session('error'))
{{ session('success') ? session('success') : session('error') }}
@endif
@if (isset($userGroupPermissions['contacts']) && $userGroupPermissions['contacts']['adds'] == 1) Add Crm Progress @endif
 
@foreach ($boards as $board)
{{ $board->name }}
@foreach ($paginationdata as $item) @if ($item->status == $board->id)
{{--
{{ $board->name }}
--}}
{{ $board->name }}
{{ $item->name }}

{{ $item->email }}

{{ $item->phone_number }}

    @foreach($item->followUps->filter(function($followUp) { $nextFollowUpDate = \Carbon\Carbon::parse($followUp->next_follow_up_date); return $nextFollowUpDate->isToday() || $nextFollowUpDate->isAfter(\Carbon\Carbon::now()); // Include Today })->sortBy('next_follow_up_date')->take(1) as $followUp)
  • Current Interaction : {{ optional($followUp->crmstatusmodal)->name ?? 'N/A' }}
  • Upcoming Follow-up : @php $nextFollowUpDate = \Carbon\Carbon::parse($followUp->next_follow_up_date); if ($nextFollowUpDate->isToday()) { echo 'Today '; } elseif ($nextFollowUpDate->isTomorrow()) { echo 'Tomorrow '; // Notification dot for tomorrow } else { echo $nextFollowUpDate->format('d M, Y'); // Future dates } @endphp
  • @if (optional($followUp->crmstatusmodal)->description)
  • Details of Current Status: {{ optional($followUp->crmstatusmodal)->description ?? 'No Description' }}
  • @endif @endforeach
{{-- --}} Next Followups
@endif {{-- /edit followup --}} @endforeach
@endforeach
{{-- offcanvas --}} @foreach ($paginationdata as $item)
Edit CRM
@csrf @method('PATCH')
@foreach($columns as $column) @if($column != 'id' && $column != 'add_to_crm' && $column != 'user_id' && $column != 'created_at' && $column != 'updated_at' && $column != 'type')
@if($column == 'message') @elseif($column == 'address') @elseif($column == 'state') @elseif($column == 'district') @elseif($column == 'status') @elseif($column == 'industry') @elseif($column == 'solution') @elseif($column == 'phone_number') @elseif($column == 'email') @else @endif
@endif @endforeach
Add Item
@csrf
@foreach($columns as $column) @if($column != 'id' && $column != 'add_to_crm' && $column != 'user_id' && $column != 'created_at' && $column != 'updated_at' && $column != 'type')
@if($column == 'message') @elseif($column == 'user_id')
@elseif($column == 'address') @elseif($column == 'state') @elseif($column == 'district') @elseif($column == 'industry') @elseif($column == 'solution') @elseif($column == 'phone_number') @elseif($column == 'email') @elseif($column == 'status') @else @endif
@endif @endforeach
{{-- edit followup --}}
Edit Task
@csrf @foreach ($columns1 as $column1) @if ($column1 === 'file')
@elseif ($column1 === 'created_at' || $column1 === 'updated_at' || $column1 === 'id') @elseif ($column1 === 'next_follow_up_date')
@elseif ($column1 === 'status')
@elseif($column1 == 'contact_id')
@elseif ($column1 === 'notes')
@else
@endif @endforeach
@if(isset($followups[$item->id]) && $followups[$item->id] instanceof \Illuminate\Support\Collection && $followups[$item->id]->isNotEmpty())
    @foreach($followups[$item->id]->sortBy('next_follow_up_date') as $followUp) @php // Check if the follow-up date is in the past $isPastDue = optional($followUp)->next_follow_up_date ? \Carbon\Carbon::parse($followUp->next_follow_up_date)->isPast() : false; @endphp
  • {{ optional($followUp)->title ?? 'No Title' }}
    {{ optional($followUp)->next_follow_up_date ? \Carbon\Carbon::parse($followUp->next_follow_up_date)->format('d M, Y') : 'N/A' }}

    Status: {{ optional($followUp->crmstatusmodal)->name ?? 'N/A' }}

    {{ optional($followUp)->notes ?? 'No Notes' }}

    @if(optional($followUp)->file) @endif
  • @endforeach
@else

No follow-ups recorded yet.

@endif
{{-- /end offcanvas --}} @endforeach
@endsection