@extends('frontend.template', ['title'=>strtoupper($action). ' TICKET']) @section('content')
{{ csrf_field() }}
{{ $ticket->title }}
{{ $ticket->ticket_code }} @if($ticket->stat == TicketStat::Declined) @endif
{{ ViewHelper::ticketStatFrontend($ticket) }}
{{ $ticket->category_name }}
{{ TicketUrgency::$values[$ticket->urgency] }}
@if(! in_array($ticket->stat, [TicketStat::Drafted, TicketStat::Opened]))
{{ ViewHelper::formatCurrency($ticket->quoted_price) }}
@endif
{{ $ticket->company_name }}
{{ $ticket->office_name }}
{{ $ticket->office_addr }}
{{ $ticket->office_postal }}
{{ $ticket->requested_by }} on {{ ViewHelper::formatDateTime($ticket->requested_on) }}
{!! nl2br($ticket->requester_desc) !!}
@if($ticket->payment_method)
{{ PaymentMethod::$values[$ticket->payment_method] }}
{{ $ticket->ref_no }}
@endif
@if(count($ticket->issues)) @foreach($ticket->issues as $issue) @endforeach
Image / Video Issue Expected Outcome
@if($issue->image != '') @if(ViewHelper::isImage($issue->image)) @elseif(ViewHelper::isVideo($issue->image)) @else {{$issue->image}} @endif @endif {{ $issue->issue_desc }} {{ $issue->expected_desc }}
@else
No issues
@endif
@if(count($ticket->preferred_slots)) @foreach($ticket->preferred_slots as $slot) @endforeach
Date Time
{{ ViewHelper::formatDate($slot->date)}} {{ ViewHelper::formatTime($slot->time_start) }} to {{ ViewHelper::formatTime($slot->time_end) }}
@else
No preferred slots
@endif
@foreach($ticket->attachments as $a) @endforeach
File Attachment
Attachment {{$a->filename}}
@if(ViewHelper::ticketShowStaffAssignments($ticket->stat) )
@if(count($ticket->staff_assignments)) @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) }}
@else
No staff assignments
@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) @if($quote_valid)
@else
Sorry, the quotation has expired. Please create another ticket.
@endif @elseif($ticket->stat == TicketStat::Invoiced)

{!! nl2br($frontend['contents']['payment_cash']) !!}
{!! nl2br($frontend['contents']['payment_nets']) !!}
{!! nl2br($frontend['contents']['payment_cheque']) !!}
{!! nl2br($frontend['contents']['payment_banktransfer']) !!}
{!! nl2br($frontend['contents']['payment_creditcard']) !!}
@elseif($ticket->stat == TicketStat::PaymentIndicated) @endif
@if($ticket->stat == TicketStat::Invoiced) @endif
@if($ticket->stat == TicketStat::Declined) @endif @endsection @section('script') @endsection