@extends("admin.template") @section('content')

{{ucfirst($action)}} Ticket

{!! csrf_field() !!}
{{ $ticket->title }}
{{ $ticket->ticket_code }} @if($ticket->stat == TicketStat::Declined) @endif
{{ ViewHelper::ticketStatFrontend($ticket) }} @if(in_array($ticket->stat, [TicketStat::Accepted, TicketStat::Declined]) && $ticket->accept_decline_reason) - {{ $ticket->accept_decline_reason }} @endif
@if($ticket->payment_method)
@if($ticket->ref_no)
@endif
@endif
{!! $ticket->remarks !!}
@if(Auth::user()->type == \App\Models\Enums\UserType::Operator)
@if($ticket->stat != TicketStat::Completed)
@endif
@if($ticket->stat == TicketStat::Completed)
{{Form::textarea('quotation_desc', $ticket->quotation_desc, ['class'=>'form-control', 'rows'=>5, 'maxlength'=>5000,'id'=>'quotation_desc'])}}
@endif @endif
@foreach($ticket->issues as $issue) @endforeach
Image / Video Issue Expected Outcome
{{ $issue->issue_desc }} {{ $issue->expected_desc }}
@if(Auth::user()->type == \App\Models\Enums\UserType::Operator)
@foreach($ticket->preferred_slots as $slot) @endforeach
Date Time
{{ ViewHelper::formatDate($slot->date)}} {{ ViewHelper::formatTime($slot->time_start) }} to {{ ViewHelper::formatTime($slot->time_end) }}
@endif @if(Auth::user()->type == \App\Models\Enums\UserType::Operator)
@foreach($ticket->attachments as $a) @endforeach
File Attachment
Attachment {{$a->filename}}
@endif @if($ticket->stat == TicketStat::PendingStaffAssignment)
@foreach($skills as $skill_id => $name) @endforeach
@endif @if(ViewHelper::ticketShowStaffAssignments($ticket->stat) )
@foreach(ViewHelper::mergeStaffAssignment($ticket->staff_assignments) as $date => $assignments) @foreach($assignments as $a) @endforeach @endforeach
Date Staff Time
{{ ViewHelper::formatDate($date) }} {{ $a->staff_name }} {{ ViewHelper::formatTime($a->time_start) }} to {{ ViewHelper::formatTime($a->time_end) }}
@if($ticket->stat === TicketStat::ServiceSchedule)
@endif @endif @if(ViewHelper::ticketShowOtps($ticket->stat))
First OTP {{ $ticket->otps->first_otp }} @if ($ticket->otps->manual_complete) Manual complete @elseif($ticket->otps->first_entered_on) Entered by {{ $ticket->otps->first_entered_by }} on {{ ViewHelper::formatDateTime($ticket->otps->first_entered_on) }} @else Provide First OTP to repairman upon arrival. This helps us keep track of attendance and punctuality of our repairman @endif
Second OTP {{ $ticket->otps->second_otp }} @if ($ticket->otps->manual_complete) Manual complete @elseif ($ticket->otps->second_entered_on) Entered by {{ $ticket->otps->second_entered_by }} on {{ ViewHelper::formatDateTime($ticket->otps->second_entered_on) }} @else Provide Second OTP upon the completion of the job. DO NOT give OTP to repairman if job is incomplete @endif
@endif
@if($ticket->stat == TicketStat::Quoted && ViewHelper::hasAccess('ticket_respond'))
@elseif($ticket->stat == TicketStat::ServiceSchedule ||$ticket->stat == TicketStat::Accepted && ViewHelper::hasAccess('ticket_complete'))
@elseif($ticket->stat == TicketStat::Completed && ViewHelper::hasAccess('ticket_invoice'))
@elseif($ticket->stat == TicketStat::Invoiced && ViewHelper::hasAccess('ticket_pay'))
@foreach($payment_methods as $payment_method) @endforeach

@elseif($ticket->stat == TicketStat::PendingStaffAssignment)
@elseif($ticket->stat == TicketStat::PaymentSubmited && ViewHelper::hasAccess('ticket_pay'))
@endif
@if($ticket->stat == TicketStat::Completed && ViewHelper::hasAccess('ticket_invoice')) @endif
@include('admin.ticket.history', ['ticket'=>$ticket])
@if($ticket->stat == TicketStat::Declined)
{!! csrf_field() !!}
@endif @endsection @section('css') @endsection @section('script') @endsection