@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @section('content') {!! Form::model($dsr, ['method' => isset($dsr) && $dsr->id ? 'put' : 'post', 'enctype' => 'multipart/form-data']) !!}
{!! Form::text('title', isset($dsr) && $dsr->title ? $dsr->title : old('title'), ['class' => 'form-control', 'id' => 'title']) !!} {!! $errors->first('title', '')!!}
{!! $errors->first('visit_id', '')!!}
{!! $errors->first('visit_name', '')!!}

{!! Form::text('venue', isset($dsr) && $dsr->venue ? $dsr->venue : old('venue'), ['class' => 'form-control', 'id' => 'venue']) !!}
@if(isset($fromTime)) {!! Form::text('from_time',$fromTime,['class' => 'form-control', 'id' => 'from_time']) !!} @else {!! Form::text('from_time', isset($dsr) && $dsr->from_time ? $dsr->from_time : old('from_time'),['class' => 'form-control', 'id' => 'from_time']) !!} @endif
@if(isset($toTime)) {!! Form::text('to_time',$toTime,['class' => 'form-control', 'id' => 'to_time']) !!} @else {!! Form::text('to_time', isset($dsr) && $visit->to_time ? $dsr->to_time : old('to_time'),['class' => 'form-control', 'id' => 'to_time']) !!} @endif

@if(isset($customers) && ($dsr->id))
@else
@endif
@if(isset($customers) && ($dsr->id))
@else
@endif
{!! Form::textarea('address', isset($dsr->address) ? $dsr->address : old('address'), ['class' => 'form-control', 'id' => 'address', 'rows' => 3, 'style' => 'resize:none;']) !!}
{!! Form::textarea('geo_address', isset($dsr->geo_address) ? $dsr->geo_address : old('geo_address'), ['class' => 'form-control', 'id' => 'geo_address', 'rows' => 3, 'style' => 'resize:none;']) !!}
@if(isset($currEmp) && (($currEmp->employee_type=="employee") || ($currEmp->employee_type=="workman") )) @endif {!! $errors->first('type', '')!!}

@if(isset($currEmp) && ($currEmp->employee_type == 'employee')) @endif @foreach($employees as $employee) @endforeach {!! $errors->first('employee_id', '')!!}

@if(isset($currEmp) && ($currEmp->employee_type == 'workman')) @endif @if($user->employee_type == "workman") @foreach($workmans as $workman) @endforeach @else @foreach($workmans as $workman) @endforeach @endif {!! $errors->first('workman_id', '')!!}
{!! Form::textarea('description', isset($dsr->description) ? $dsr->description : old('description'), ['class' => 'form-control', 'id' => 'description', 'rows' => 3, 'style' => 'resize:none;']) !!} {!! $errors->first('description', '')!!}
@if($dsr->attachments) @foreach($dsr->getMedia('attachments') as $attachment)
@if($attachment->mime_type=="application/msword" || $attachment->mime_type=="appplication/docx" || $attachment->mime_type=="appplication/doc") attachment @elseif($attachment->mime_type=="application/pdf") attachment @else attachment @endif

{{$attachment->file_name}}

@endforeach @endif {!! $errors->first('attachments[]', '')!!}
{!! Form::close() !!} @endsection @push('footer-script') @endpush