100 lines
5.6 KiB
PHP
100 lines
5.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('maintenance::lang.edit') . ' — ' . $overhaul->title)
|
|
|
|
@section('content')
|
|
@include('maintenance::layouts.nav')
|
|
|
|
@php $util = app(\Modules\Maintenance\Utils\MaintenanceUtil::class); @endphp
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1>@lang('maintenance::lang.edit') — {{ $overhaul->title }}</h1>
|
|
<a href="{{ action([\Modules\Maintenance\Http\Controllers\OverhaulController::class, 'show'], [$overhaul->id]) }}" class="btn btn-default">@lang('maintenance::lang.view')</a>
|
|
</div>
|
|
<div class="mt-card">
|
|
<div class="mt-card-body">
|
|
{!! Form::open(['url' => action([\Modules\Maintenance\Http\Controllers\OverhaulController::class, 'update'], [$overhaul->id]), 'method' => 'put']) !!}
|
|
@include('maintenance::partials.scope_fields', ['projects' => $projects, 'production_lines' => $production_lines, 'equipment' => $equipment, 'model' => $overhaul])
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{!! Form::label('title', __('maintenance::lang.title') . ':*') !!}
|
|
{!! Form::text('title', $overhaul->title, ['class' => 'form-control', 'required']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('status', __('maintenance::lang.status') . ':') !!}
|
|
{!! Form::select('status', $statuses, $overhaul->status, ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('supervisor_id', __('maintenance::lang.supervisor') . ':') !!}
|
|
{!! Form::select('supervisor_id', $users, $overhaul->supervisor_id, ['class' => 'form-control select2', 'placeholder' => __('maintenance::lang.select'), 'style' => 'width:100%']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('start_date', __('maintenance::lang.start_date') . ':') !!}
|
|
{!! Form::text('start_date', $util->formatDate($overhaul->start_date), ['class' => 'form-control mm-datepicker']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('end_date', __('maintenance::lang.end_date') . ':') !!}
|
|
{!! Form::text('end_date', $util->formatDate($overhaul->end_date), ['class' => 'form-control mm-datepicker']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('estimated_duration_hours', __('maintenance::lang.estimated_duration_hours') . ':') !!}
|
|
{!! Form::number('estimated_duration_hours', $overhaul->estimated_duration_hours, ['class' => 'form-control', 'step' => '0.01']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="form-group">
|
|
{!! Form::label('actual_duration_hours', __('maintenance::lang.actual_duration_hours') . ':') !!}
|
|
{!! Form::number('actual_duration_hours', $overhaul->actual_duration_hours, ['class' => 'form-control', 'step' => '0.01']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{!! Form::label('estimated_cost', __('maintenance::lang.estimated_cost') . ':') !!}
|
|
{!! Form::number('estimated_cost', $overhaul->estimated_cost, ['class' => 'form-control', 'min' => '0']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
{!! Form::label('actual_cost', __('maintenance::lang.actual_cost') . ':') !!}
|
|
{!! Form::number('actual_cost', $overhaul->actual_cost, ['class' => 'form-control', 'min' => '0']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('safety_requirements', __('maintenance::lang.safety_requirements') . ':') !!}
|
|
{!! Form::textarea('safety_requirements', $overhaul->safety_requirements, ['class' => 'form-control', 'rows' => 2]) !!}
|
|
</div>
|
|
<div class="form-group">
|
|
{!! Form::label('description', __('maintenance::lang.description') . ':') !!}
|
|
{!! Form::textarea('description', $overhaul->description, ['class' => 'form-control', 'rows' => 2]) !!}
|
|
</div>
|
|
<div class="checkbox">
|
|
<label>{!! Form::checkbox('shutdown_required', 1, $overhaul->shutdown_required) !!} @lang('maintenance::lang.shutdown_required')</label>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">@lang('maintenance::lang.update_btn')</button>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>$(function(){ $('.select2').select2(); if (typeof MmDate !== 'undefined') MmDate.initDatepicker('.mm-datepicker'); });</script>
|
|
@endsection
|