@extends ('../welcome') @section('content')
{{-- Basic Data Card --}}

{{ $ticket->unit->name }} - {{ $ticket->client->name }}

@if ($ticket->status != 'done') {{-- Re-Assign User --}}
@if (auth()->user()->type == 'admin' || auth()->user()->role->hasPermission('tickets-assignUser'))
@csrf @method('PUT')
@endif
{{-- Change Status --}}
@if (auth()->user()->type == 'admin' || auth()->user()->role->hasPermission('tickets-changeStatus'))
@csrf @method('PUT')
@if ($ticket->status == 'pending') @else @endif
@endif
@endif

{{-- Ticket Data --}}
ID : {{ $ticket->id }} {{ $ticket->delay == 1 ? 'Delay ticket' : '' }}
Client ID : {{ $ticket->client->name }}
Assigned User: {{ $ticket->assigned_to->name }}
Created By: {{ $ticket->ticket_created_by->name }}
Project: {{ $ticket->project->name }}
Unit: {{ $ticket->unit->name }}
Description: {{ $ticket->description }}
Communication Method : {{ $ticket->method->name }}
Ticket Type : {{ $ticket->ticket_type->name }}
Status : {{ $ticket->status }}
Call Date: {{ Carbon\Carbon::parse($ticket->call_date)->format('Y-m-d') ?? '' }}
Created at : {{ Carbon\Carbon::parse($ticket->created_at)->format('Y-m-d H:i:s') ?? '' }}
Deadline : {{ Carbon\Carbon::parse($ticket->deadline)->format('Y-m-d') ?? '' }}
Total Impression : {{ $ticket->client->tag?->name ?? '' }}
@if (count($ticket->files) != 0)
Attached Files
@foreach ($ticket->files as $file)
  • {{ $file->file }}
  • @endforeach
    @endif
    {{-- Notes || Comments Card --}}
    {{-- Comment Form --}} @if ($ticket->status != 'done') @if (auth()->user()->type == 'admin' || auth()->user()->role->hasPermission('tickets-createComment'))
    @csrf
    @endif @endif
    {{-- Comments --}}
    @foreach ($ticket->comments as $comment) @if (isset($comment->files) != 0) @endif
    Description : {{ $comment->description }}
    Status : {{ $comment->status }}
    Created by : {{ $comment->user->id ?? '' }} - {{ $comment->user->name ?? '' }}
    Date : {{ Carbon\Carbon::parse($comment->created_at)->format('Y-m-d H:i:s') ?? '' }}
    Files: @foreach ($comment->files as $file)
  • {{ $file->file }}
  • @endforeach

    @endforeach

    {{-- Ticket Actions Table --}}
    user()->type == 'admin' ||auth()->user()->role->hasPermission('ticket-history-export')? 'example1': 'nonExport' }} class="table table-bordered table-striped"> @foreach ($actions as $action) {{-- @if ($action->event == 'follow_up' || $action->event == 'done' || $action->event == 'Create' || $action->event == 'Assign-User') --}}
    Ticket ID Ticket Creator Ticket Type Ticket Creation Date Client Name Client Mobile Action Details Assigned User Action created at