@extends('admin.template.master') @section('stylesheets') {!! Html::style('assets/admin/bower_components/select2/dist/css/select2.min.css') !!} @endsection @section('title')

Complaints

@endsection @section('main-content')

Complaint ID #{{$complaint->complaint_id}}

Details: {{$complaint->complaint_details}}
Branch: {{ is_array($branches) ? implode(', ', $branches) : $branches }}
Type: {{ is_array($types) ? implode(', ', $types) : $types }}
Remarks: {{$complaint->remarks}}

Name: {{$complaint->name}}
Phone/ Email: {{$complaint->phone}}
{{-- Preffered Time: {{ $complaint->preffered_time }}
--}} Related Person: {{ $complaint->related_person }}

{!! Form::open(['url' => '/admin/complaints/edit/' . $complaint->id]) !!}
{!! Form::label('Type') !!} {!! Form::select( 'type[]', [ 'Service' => 'Service', 'Behavior' => 'Behavior', 'Website' => 'Website', 'Price' => 'Price', 'Product information' => 'Product information', 'General' => 'General', 'Ryans Care Ltd.' => 'Ryans Care Ltd.', 'Warranty' => 'Warranty', ], isset($complaint->type) ? (is_array(json_decode($complaint->type, true)) ? json_decode($complaint->type, true) : [$complaint->type]) : null, ['class' => 'form-control', 'id' => 'is_type', 'multiple' => true], ) !!}
{!! Form::label('Branch/Location/Platform') !!} {!! Form::select( 'branch[]', $availableLocations, isset($complaint->branch) ? (is_array(json_decode($complaint->branch, true)) ? json_decode($complaint->branch, true) : [$complaint->branch]) : null, ['class' => 'form-control', 'id' => 'is_branch', 'multiple' => true], ) !!}
{!! Form::label('Related Person') !!} {!! Form::text('related_person', isset($complaint->related_person) ? $complaint->related_person : null, [ 'class' => 'form-control', 'placeholder' => 'Select Related Person', ]) !!}
{!! Form::label('Status') !!} {!! Form::select( 'status', ['Pending' => 'Pending', 'Working' => 'Working', 'Finished' => 'Finished'], isset($complaint->status) ? $complaint->status : null, ['class' => 'form-control', 'placeholder' => 'Select Status'], ) !!}
{!! Form::label('remarks', 'Remarks') !!} {!! Form::textarea('remarks', null, [ 'class' => 'form-control', 'rows' => '8', 'placeholder' => 'Remarks', 'id' => 'answer', ]) !!} @if ($errors->has('remarks')) {!! $errors->first('remarks') !!} @endif
{!! Form::close() !!}
@endsection @section('javascripts') {!! Html::script('assets/admin/bower_components/select2/dist/js/select2.full.min.js') !!} @endsection