@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @section('content') {!! Form::model($healthRecord, ['method' => 'post', 'files' => 'true', 'id' => 'form-data']) !!}
@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 @foreach($workmans as $workman) @endforeach {!! $errors->first('workman_id', '')!!}
{!! $errors->first('compliance_type_id', '')!!}
@foreach($childHealthRecords as $childHealthRecord)
{!! $errors->first('compliance_type_id', '')!!}
{!! $errors->first('frequency', '')!!}
{!! $errors->first('status', '')!!}
@php if($childHealthRecord->status == 'pending'){ $date = date('m/d/Y', strtotime($childHealthRecord->next_due_date)); } else{ $date = date('m/d/Y', strtotime($childHealthRecord->completed_date)); } @endphp
{!! Form::text('date[]',$date,['class' => 'form-control date']) !!} {!! $errors->first('date', '')!!}
{!! Form::textarea('remark[]',$childHealthRecord->remark,['class' => 'form-control', 'rows' => 2, 'style' => 'resize:none;']) !!} {!! $errors->first('remark', '')!!}
@if($childHealthRecord->attachments) @foreach($childHealthRecord->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[]', '')!!}
@endforeach @foreach($leftTypes as $leftType)
{!! $errors->first('compliance_type_id', '')!!}
{!! $errors->first('frequency', '')!!}
{!! $errors->first('status', '')!!}
{!! Form::text('date[]','',['class' => 'form-control date']) !!} {!! $errors->first('date', '')!!}
{!! $errors->first('attachments[]', '')!!}
@endforeach
{!! Form::close() !!} @endsection @push('footer-script') @endpush