78 lines
4.8 KiB
PHP
78 lines
4.8 KiB
PHP
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
{!! Form::open(['url' => action([\Modules\Maintenance\Http\Controllers\FailureReportController::class, 'update'], [$failure_report->id]), 'method' => 'put', 'id' => 'mm_failure_report_form']) !!}
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
|
|
<h4 class="modal-title">@lang('maintenance::lang.edit') — @lang('maintenance::lang.failure_reports')</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
@php $util = app(\Modules\Maintenance\Utils\MaintenanceUtil::class); @endphp
|
|
@include('maintenance::partials.scope_fields', ['projects' => $projects, 'production_lines' => $production_lines, 'equipment' => $equipment, 'model' => $failure_report])
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('failure_type', __('maintenance::lang.failure_type') . ':') !!}
|
|
{!! Form::text('failure_type', $failure_report->failure_type, ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('reported_at', __('maintenance::lang.reported_at') . ':') !!}
|
|
{!! Form::text('reported_at', $util->formatDateTime($failure_report->reported_at), ['class' => 'form-control mm-datetimepicker']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('cost', __('maintenance::lang.cost') . ':') !!}
|
|
{!! Form::number('cost', $failure_report->cost, ['class' => 'form-control', 'min' => '0']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('downtime_hours', __('maintenance::lang.downtime_hours') . ':') !!}
|
|
{!! Form::number('downtime_hours', $failure_report->downtime_hours, ['class' => 'form-control', 'step' => '0.01']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('repair_hours', __('maintenance::lang.repair_hours') . ':') !!}
|
|
{!! Form::number('repair_hours', $failure_report->repair_hours, ['class' => 'form-control', 'step' => '0.01']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('lost_production', __('maintenance::lang.lost_production') . ':') !!}
|
|
{!! Form::number('lost_production', $failure_report->lost_production, ['class' => 'form-control', 'step' => '0.01']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('root_cause', __('maintenance::lang.root_cause') . ':') !!}
|
|
{!! Form::textarea('root_cause', $failure_report->root_cause, ['class' => 'form-control', 'rows' => 2]) !!}
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('corrective_action', __('maintenance::lang.corrective_action') . ':') !!}
|
|
{!! Form::textarea('corrective_action', $failure_report->corrective_action, ['class' => 'form-control', 'rows' => 2]) !!}
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('preventive_action', __('maintenance::lang.preventive_action') . ':') !!}
|
|
{!! Form::textarea('preventive_action', $failure_report->preventive_action, ['class' => 'form-control', 'rows' => 2]) !!}
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
@can('maintenance.failures.delete')
|
|
<button type="button" class="btn btn-danger pull-left delete_maintenance_failure_report"
|
|
data-href="{{ action([\Modules\Maintenance\Http\Controllers\FailureReportController::class, 'destroy'], [$failure_report->id]) }}">
|
|
@lang('maintenance::lang.delete')
|
|
</button>
|
|
@endcan
|
|
<button type="submit" class="btn btn-primary">@lang('maintenance::lang.update_btn')</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">@lang('maintenance::lang.close')</button>
|
|
</div>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
<script>$(function(){ $('.select2').select2(); if (typeof MmDate !== 'undefined') MmDate.initDatetimepicker('.mm-datetimepicker'); });</script>
|