History

@foreach($this->ticketActivities() as $key => $grouped_activities)
@if (\Carbon\Carbon::today()->format('Y-m-d') === \Carbon\Carbon::create($key)->format('Y-m-d')) Today, {{\Carbon\Carbon::create($key)->format('d M, Y')}} @elseif(\Carbon\Carbon::yesterday()->format('Y-m-d') === \Carbon\Carbon::parse($key)->format('Y-m-d')) Yesterday, {{\Carbon\Carbon::create($key)->format('d M, Y')}} @else {{\Carbon\Carbon::create($key)->format('d M, Y')}} @endif
@foreach ($grouped_activities as $inner_key => $activity)
@if($activity->flag === 'ticket_created')
Ticket
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
{{ucfirst($activity->message)}}
@php $stage = $this->pipelineStageRepo->find($activity->status); @endphp {{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif($activity->flag === 'issue_logged')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Issue
@empty($activity->user)
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
@else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}}
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif($activity->flag === 'changed_ticket_status')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
@empty($activity->user) @if ($activity->is_system_generated === 1)
SA
System Admin
@else
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
@endif @else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}}
@php $stage = $this->pipelineStageRepo->find($activity->status); @endphp {{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@if ($activity->reason)
Reason: {{$activity->reason->activity_reason}}
@endif
@elseif($activity->flag === 'ticket_escalated')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
SA
System Admin
{{ucfirst($activity->message)}}
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@if ($activity->reason)
Reason: {{$activity->reason->activity_reason}}
@endif
@elseif($activity->flag === 'ticket_task_added')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
@empty($activity->user)
SA
System Admin
@else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}}
@if ($activity->status === 'High') {{ucfirst($activity->status)}} @elseif ($activity->status === 'Medium') {{ucfirst($activity->status)}} @else {{ucfirst($activity->status)}} @endif {{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif($activity->flag === 'notes_added')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Notes
@empty($activity->user)
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
@else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}}
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif($activity->flag === 'customer_reject_date')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
{{$activity->message}} {{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@if ($activity->reason)
Reason: {{$activity->reason->activity_reason}}
@endif
@elseif($activity->flag === 'ticket_assigned')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
@empty($activity->user)
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
@else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}} to
@if ($activity->receiver?->profile_picture) Avatar @else {{ $activity->receiver->name[0] . "" . $activity->receiver->surname[0] }} @endif
{{ $activity->receiver->name . " " . $activity->receiver->surname }}
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif($activity->message === 'removed')
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
{{ucfirst($activity->message)}}
@if ($activity->receiver?->profile_picture) Avatar @else {{ $activity->receiver->name[0] . "" . $activity->receiver->surname[0] }} @endif
{{ $activity->receiver->name . " " . $activity->receiver->surname }}
from this ticket
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@elseif(!empty($activity->receiver))
@if ($inner_key !== count($grouped_activities) - 1)
@endif
Ticket
@empty($activity->user)
{{ $ticket->contact->first_name[0] . "" . $ticket->contact->last_name[0] }}
{{ $ticket->contact->first_name }} {{ $ticket->contact->last_name }}
@else
@if ($activity->user?->profile_picture) Avatar @else {{ $activity->user->name[0] . "" . $activity->user->surname[0] }} @endif
{{ $activity->user->name . " " . $activity->user->surname }}
@endempty
{{ucfirst($activity->message)}} to
@if ($activity->receiver?->profile_picture) Avatar @else {{ $activity->receiver->name[0] . "" . $activity->receiver->surname[0] }} @endif
{{ $activity->receiver->name . " " . $activity->receiver->surname }}
{{\Carbon\Carbon::create($activity->created_at)->format('Y-m-d, h:i A')}}
@endif
@endforeach
@endforeach

Questionnaire Responses

@if ($ticket->responses->count() === 0)
There are currently no answers recorded.
@else @foreach ($ticket->pipelineStage->pipeline->surveyQuestions as $question)
{{$question->question}}
@if ($ticket->responses()->where('pipeline_survey_question_id', $question->id)->first()) {{$ticket->responses()->where('pipeline_survey_question_id', $question->id)->first()->response['data']}} @else N/A @endif
@endforeach @endif

Logged Issues

@foreach ($ticket->loggedIssues as $loggedIssue) @endforeach
Issue ID Reported By Description Status Priority Logged On
{{ $loggedIssue->issue_id }}
@if ($loggedIssue->created_by) Agent @else Customer @endif
{{ Str::limit($loggedIssue->description, 50) }} {{ $loggedIssue->status }} @if ($loggedIssue->priority === 'High') {{ucfirst($loggedIssue->priority)}} @elseif ($loggedIssue->priority === 'Medium') {{ucfirst($loggedIssue->priority)}} @else {{ucfirst($loggedIssue->priority)}} @endif {{\Carbon\Carbon::create($loggedIssue->created_at)->format('M d, Y')}}