Update Qa

{!! Form::label('resolved', trans('global.qa.fields.action_required').'', ['class' => 'control-label']) !!}
{!! Form::radio('resolved', '0', !is_null($qa) && $qa->resolved ? false : true , []) !!} {!! Form::label('Yes', 'Yes', ['class' => 'floating-label']) !!}
{!! Form::radio('resolved', '1', !is_null($qa) && $qa->resolved ? true : false, []) !!} {!! Form::label('No', 'No', ['class' => 'floating-label']) !!}
{!! Form::label('resolved', 'Actions', ['class' => 'control-label']) !!}
{!! Form::checkbox('actions[]', 'Cut CNC' , in_array('Cut CNC', @$qa->actions ?? []), ['class' => '', 'placeholder' => '', 'id' => 'Cut CNC']) !!} {!! Form::label('Cut CNC', 'Cut CNC', ['class' => 'floating-label']) !!}
{!! Form::checkbox('actions[]', 'Cut Panel Saw' , in_array('Cut Panel Saw', @$qa->actions ?? []), ['class' => '', 'placeholder' => '', 'id' => 'Cut Panel Saw']) !!} {!! Form::label('Cut Panel Saw', 'Cut Panel Saw', ['class' => 'floating-label']) !!}
{!! Form::checkbox('actions[]', 'Edge' , in_array('Edge', @$qa->actions ?? []), ['class' => '', 'placeholder' => '', 'id' => 'Edge']) !!} {!! Form::label('Edge', 'Edge', ['class' => 'floating-label']) !!}
{!! Form::label('notes', 'Action required', ['class' => 'control-label']) !!} {!! Form::textarea('notes', @$qa->notes, ['class' => 'form-control ', 'placeholder' => '']) !!}

@if($errors->has('notes'))

{{ $errors->first('notes') }}

@endif
{!! Form::label('caused_by', 'Cause', ['class' => 'control-label']) !!}
{!! Form::radio('caused_by', 'Customer' , @$qa->caused_by == 'Customer', ['class' => '', 'onclick' => 'hideCause(this, true);', 'placeholder' => '', 'id' => 'Customer']) !!} {!! Form::label('Customer', 'Customer', ['class' => 'floating-label']) !!}
{!! Form::radio('caused_by', 'Design' , @$qa->caused_by == 'Design', ['class' => '', 'onclick' => 'showDesignCause(this, true);', 'placeholder' => '', 'id' => 'Design']) !!} {!! Form::label('Design', 'Design', ['class' => 'floating-label']) !!}
{!! Form::radio('caused_by', 'Production' , @$qa->caused_by == 'Production', ['class' => '', 'onclick' => 'showProductionCause(this, true);', 'placeholder' => '', 'id' => 'Production']) !!} {!! Form::label('Production', 'Production', ['class' => 'floating-label']) !!}
{!! Form::radio('caused_by', 'Other' , @$qa->caused_by == 'Other', ['class' => '', 'onclick' => 'showOtherCause(this, true);showDesignCause(this, false);', 'placeholder' => '', 'id' => 'Other']) !!} {!! Form::label('Other', 'Other', ['class' => 'floating-label']) !!}
{!! Form::radio('caused_by', 'Not Sure' , @$qa->caused_by == 'Not Sure', ['class' => '', 'onclick' => 'hideCause(this, false);', 'placeholder' => '', 'id' => 'Other']) !!} {!! Form::label('Not Sure', 'Not Sure', ['class' => 'floating-label']) !!}
{!! Form::text('other_cause', @$qa->other_cause , ['class' => 'form-control other_cause', 'placeholder' => 'Other Cause', 'id' => 'Other Cause']) !!}
{!! Form::label('production_cause', 'Production Causes', ['class' => 'floating-label']) !!} {!! Form::select('production_cause', ['Defect board' => 'Defect board', 'Damaged during handling' => 'Damaged during handling', 'Machining issue' => 'Machining issue', 'Incorrect processing' => 'Incorrect processing', 'Lost' => 'Lost', 'Other' => 'Other'], @$qa->production_cause, ['class' => 'form-control select2','id' => 'production_cause', 'onchange' => 'showOtherProductionCause(this, $(this).val() == "Other");']); !!}
{!! Form::text('other_production_cause', @$qa->other_production_cause , ['class' => 'form-control other_production_cause', 'placeholder' => 'Other Production Cause', 'id' => 'other_production_cause']) !!}
{!! Form::label('design_cause', 'Design Causes', ['class' => 'floating-label']) !!} {!! Form::select('design_cause', ['Qty/measurement error' => 'Qty/measurement error', 'Missed/Misunderstood detail' => 'Missed/Misunderstood detail', 'Program technical issue' => 'Program technical issue', 'Other' => 'Other'], @$qa->design_cause, ['class' => 'form-control select2','id' => 'design_cause', 'onchange' => 'showOtherDesignCause(this, $(this).val() == "Other");']) !!}
{!! Form::text('other_design_cause', @$qa->other_design_cause , ['class' => 'form-control other_design_cause', 'placeholder' => 'Other Design Cause', 'id' => 'other_design_cause']) !!}
{!! Form::label('caused_by_notes', 'Additional notes about cause', ['class' => 'control-label']) !!} {!! Form::text('caused_by_notes', @$qa->caused_by_notes, ['class' => 'form-control ', 'placeholder' => 'Additional notes about cause']) !!}

{!! Form::label('images', trans('global.qa.fields.images').'', ['class' => 'control-label']) !!} {!! Form::file('images[]', [ 'multiple', 'class' => 'form-control file-upload', 'data-url' => route('admin.media.upload'), 'data-bucket' => 'images', 'data-filekey' => 'images', ]) !!}

 
@if( is_null($qa) || @$qa->resolved)
@else
@foreach($qa->getMedia('images') as $media)

{{ $media->name }} ({{ $media->size }} KB) Remove

@endforeach
@endif
@if($errors->has('images'))

{{ $errors->first('images') }}

@endif