@extends('layouts.dashboard') @section('template_title') Editing Complaint @endsection @section('header') Editing Complaint @endsection @section('breadcrumbs')
  • {{ trans('titles.app') }} chevron_right
  • My Complaints chevron_right
  • {{$task->complaint_number}} chevron_right
  • {{$task->id}}
  • @endsection @section('content')

    {{$task->title}}

    {!! Form::model($task, array('action' => array('ComplaintController@update', $task->id), 'method' => 'PUT', 'role' => 'form')) !!}
    {!! Form::text('title', NULL, array('id' => 'title', 'class' => 'mdl-textfield__input mdl-color-text--white')) !!} {!! Form::label('title', 'Title', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!} Title is required
    {!! Form::textarea('description', NULL, array('id' => 'description', 'class' => 'mdl-textfield__input mdl-color-text--white')) !!} {!! Form::label('description', 'Complaint Description', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!}
    @if($role == 'Admin')
    {!! Form::label('completion_date', 'Completion Date', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!}

    Address is required
    @else
    {!! Form::label('completion_date', 'Completion Date', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!}

    {{$task->final_date}} Address is required
    @endif
    {!! Form::text('address', NULL, array('id' => 'address', 'class' => 'mdl-textfield__input mdl-color-text--white')) !!} {!! Form::label('address', 'Address', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!} Address is required
    @if($task->created_by != 'user')
    {!! Form::text('phone', $task->phone, array('id' => 'phone', 'class' => 'mdl-textfield__input mdl-color-text--white')) !!} {!! Form::label('phone', 'User Mobile', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!} User Phone is required
    @else
    {!! Form::text('phone', $task->phone, array('id' => 'phone', 'class' => 'mdl-textfield__input mdl-color-text--white', 'disabled' => 'disabled')) !!} {!! Form::label('phone', 'User Mobile', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!} User Phone is required
    @endif
    {!! Form::select('complaint_status', array( 'open' => 'Open', 'pending' => 'Pending', 'resolved' => 'Resolved', 'closed' => 'Closed'), $task->complaint_status, array('class' => 'mdl-selectfield__select mdl-textfield__input', 'id' => 'status')) !!} {!! Form::label('completed', 'Complaint Status', array('class' => 'mdl-textfield__label mdl-selectfield__label mdl-color-text--primary')); !!}
    {!! Form::select('assign', array( 'admin' => 'Admin', 'engineer' => 'Engineer', 'technician' => 'Technician'), $task->assign, array('class' => 'mdl-selectfield__select mdl-textfield__input ', 'id' => 'assign')) !!} {!! Form::label('assign', 'Assign', array('class' => 'mdl-textfield__label mdl-selectfield__label mdl-color-text--primary')); !!}
    @if($task->img_url)
    Image!
    @endif @if($task->img_url1)
    Image!
    @endif @if($task->img_url2)
    Image!
    @endif @if($task->img_url3)
    Image!
    @endif @if($task->img_url4)
    Image!
    @endif @if($task->img_url5)
    Image!
    @endif
    @if($comments) @foreach ($comments as $comment)

    Comment

    {{ $comment->comment }}

    Author:- {{ $comment->author }}

    @if($comment->comment_img_url) Image! @endif @if($comment->comment_img_url1) Image! @endif @if($comment->comment_img_url2) Image! @endif @if($comment->comment_img_url3) Image! @endif @if($comment->comment_img_url4) Image! @endif @endforeach @else

    No Comments Available !

    @endif
    {{-- SAVE BUTTON--}} {!! Form::button('Update Complaint', array('class' => 'dialog-button-save mdl-button mdl-js-button mdl-js-ripple-effect mdl-color--primary mdl-color-text--white mdl-button--raised margin-bottom-1 margin-top-1 margin-top-0-desktop margin-right-1 padding-left-1 padding-right-1 ')) !!} {{-- DELETE Complaint BUTTON--}} {!! Form::button('Delete Complaint', array('class' => 'dialog-button-delete mdl-button mdl-js-button mdl-js-ripple-effect mdl-color--accent mdl-button-colored mdl-color-text--white mdl-button--raised margin-bottom-1 margin-top-1 margin-top-0-desktop padding-left-1 padding-right-1 ')) !!}
    {{-- SAVE ICON --}} {!! Form::button('save', array('class' => 'dialog-button-icon-save mdl-button mdl-button--icon mdl-js-button mdl-js-ripple-effect mdl-button-colored', 'title' => 'Update Complaint')) !!} {{-- DELETE USER ICON --}} delete
    @include('dialogs.dialog-save') {!! Form::close() !!} {!! Form::open(array('class' => '', 'id' => 'delete', 'method' => 'DELETE', 'route' => array('complaints.destroy', $task->id))) !!} {{ method_field('DELETE') }} @include('dialogs.dialog-delete', ['dialogTitle' => 'Confirm Complaint Deletion', 'dialogSaveBtnText' => 'Delete']) {!! Form::close() !!}

    Add Comment

    {!! Form::textarea('comment', NULL, array('id' => 'comment', 'class' => 'mdl-textfield__input mdl-color-text--white')) !!} {!! Form::label('comment', 'Comment Description', array('class' => 'mdl-textfield__label mdl-color-text--primary')); !!}
    @if($role == 'Admin')
    Location's Image
    Place
    @endif
    @endsection @section('footer_scripts') @include('scripts.mdl-required-input-fix') @endsection