@extends('layouts.app') @push('styles') @endpush @php $editTicketPermission = user()->permission('edit_tickets'); $deleteTicketPermission = user()->permission('delete_tickets'); $manageTypePermission = user()->permission('manage_ticket_type'); $manageAgentPermission = user()->permission('manage_ticket_agent'); $manageChannelPermission = user()->permission('manage_ticket_channel'); $manageGroupPermission = user()->permission('manage_ticket_groups'); $canEditTicket = ($editTicketPermission == 'all' || ($editTicketPermission == 'owned' && $ticket->agent_id == user()->id)); @endphp @section('filter-section')
@lang('app.reply') {{-- add note --}}
status == 'closed') style="display:none" @endif> @lang('app.close')
@if ($deleteTicketPermission == 'all' || ($deleteTicketPermission == 'owned' && $ticket->agent_id == user()->id)) @lang('app.delete') @endif
@endsection @section('content')

{{ $ticket->subject }}

@lang('modules.tickets.requestedOn') {{ $ticket->created_at->timezone(company()->timezone)->translatedFormat(company()->date_format . ' ' . company()->time_format) }}

@if ($ticket->status == 'open') @php $statusColor = 'red'; @endphp @elseif($ticket->status == 'pending') @php $statusColor = 'yellow'; @endphp @elseif($ticket->status == 'resolved') @php $statusColor = 'dark-green'; @endphp @elseif($ticket->status == 'closed') @php $statusColor = 'blue'; @endphp @endif

{!! $ticket->badge('span') !!}

@foreach ($ticket->reply as $reply) @endforeach
@if ($ticket->requester->id != user()->id || (!is_null($ticket->agent_id) && $ticket->agent_id != user()->id))

@lang('app.to'): {{ ($ticket->requester->id != user()->id) ? $ticket->requester->name : $ticket->agent->name }}

@endif
@lang('app.reply') @lang('app.back')
@if ($editTicketPermission == 'all' || ($editTicketPermission == 'added' && user()->id == $ticket->added_by) || ($editTicketPermission == 'owned' && (user()->id == $ticket->user_id || $ticket->agent_id == user()->id)) || ($editTicketPermission == 'both' && (user()->id == $ticket->user_id || $ticket->agent_id == user()->id || $ticket->added_by == user()->id)))
@else @lang('app.submit') @endif @if (!in_array('client', user_roles()))
@endif @lang('app.cancel')
@endsection @push('scripts') @endpush