{{ $pageTitle ?? '-' }}

{{ __('messages.back') }}
{{ __('messages.id') }} : #{{ !empty($helpdeskdata->id) ? $helpdeskdata->id : '-' }}
{{ __('messages.datetime') }} : {{ !empty($helpdeskdata->updated_at) ? date("$datetime->date_format $datetime->time_format", strtotime($helpdeskdata->updated_at)) : '-' }}
{{ __('messages.name') }} : {{ !empty($helpdeskdata->employee_id) ? optional($helpdeskdata->users)->first_name . ' ' . optional($helpdeskdata->users)->last_name . ' (' . ucfirst(optional($helpdeskdata->users)->user_type) . ')' : '-' }}
{{ __('messages.mode') }} : {{ !empty($helpdeskdata->mode) ? ucfirst($helpdeskdata->mode) : '-' }} @if($helpdeskdata->mode === 'phone') ({{ !empty($helpdeskdata->contact_number) ? $helpdeskdata->contact_number : optional($helpdeskdata->users)->contact_number }}) @elseif($helpdeskdata->mode === 'email') ({{ !empty($helpdeskdata->email) ? $helpdeskdata->email : optional($helpdeskdata->users)->email }}) @endif
{{ __('messages.helpdesk') }} {{ __('messages.detail') }}
@if($helpdeskdata->status == '0') Open @else Closed @endif
{{ __('messages.subject') }} : {{ !empty($helpdeskdata->subject) ? $helpdeskdata->subject : '-' }}
{{ __('messages.description') }} :
@php $attachmentUrls = getAttachments($helpdeskdata->getMedia('helpdesk_attachment')); $firstAttachmentUrl = $attachmentUrls[0] ?? null; // Use a default image if empty @endphp @if($firstAttachmentUrl !== null) avatar @endif
{{ $helpdeskdata->description ?? '--' }}
{{ __('messages.note') }}
@if(optional($helpdeskdata->helpdeskactivity)->isNotEmpty() && count($helpdeskdata->helpdeskactivity) <= 1 && $helpdeskdata->status == 0) {{ html()->form('POST', route('helpdesk.activity', $helpdeskdata->id)) ->attribute('enctype', 'multipart/form-data') ->attribute('data-toggle', 'validator') ->id('helpdeskactivty-form') ->open() }} {{ html()->hidden('helpdesk_id', $helpdeskdata->id ?? null) }} @csrf
{{ html()->label(trans('messages.description'). ' *', 'description')->class('form-control-label') }} {{ html()->textarea('description', null)->class('form-control textarea')->required()->rows(3)->placeholder(__('messages.description')) }}
{{ html()->form()->close() }} @elseif(count($helpdeskdata->helpdeskactivity) > 0)
    @foreach($helpdeskdata->helpdeskactivity as $index => $activity)
  • avatar
    @if($activity->activity_type !== 'closed_helpdesk')
    {{ __($index === 0 ? 'messages.created_by_helpdesk' : 'messages.replied_by_helpdesk', [ 'name' => optional($activity->sender)->display_name, 'date' => date("$datetime->date_format $datetime->time_format", strtotime($activity->updated_at)) ])}}
    {{__('messages.show_message')}}
    @php $attachmentUrls = $index === 0 ? getAttachments($helpdeskdata->getMedia('helpdesk_attachment')) : getAttachments($activity->getMedia('helpdesk_activity_attachment')); $firstAttachmentUrl = $attachmentUrls[0] ?? null; // Use a default image if empty @endphp @if($firstAttachmentUrl !== null) avatar @endif
    {{ $activity->messages ?? '--' }}
    @elseif($activity->activity_type == 'closed_helpdesk')
    {{ __('messages.closed_by_helpdesk', [ 'name' => optional($activity->sender)->display_name, 'date' => date("$datetime->date_format $datetime->time_format", strtotime($activity->updated_at)) ])}}
    @endif
  • @endforeach
{{ html()->form('POST', route('helpdesk.activity', $helpdeskdata->id)) ->attribute('enctype', 'multipart/form-data') ->attribute('data-toggle', 'validator') ->id('replyForm') ->style("display: none;") ->open() }} {{ html()->hidden('helpdesk_id', $helpdeskdata->id ?? null) }} @csrf
{{ html()->label(trans('messages.description'). ' *', 'description')->class('form-control-label') }} {{ html()->textarea('description', null)->class('form-control textarea')->required()->rows(3)->placeholder(__('messages.description')) }}
{{ html()->form()->close() }} @if($helpdeskdata->status == 0) @endif
@endif