2017-08-25 10:04:19 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
|
|
|
{{ trans('general.audit') }}
|
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.input-group {
|
|
|
|
padding-left: 0px !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<!-- left column -->
|
2024-05-31 10:46:57 -07:00
|
|
|
<div class="col-md-8 col-md-offset-2">
|
2017-08-25 10:04:19 -07:00
|
|
|
<div class="box box-default">
|
2018-04-24 02:54:54 -07:00
|
|
|
|
|
|
|
{{ Form::open([
|
|
|
|
'method' => 'POST',
|
|
|
|
'route' => ['asset.audit.store', $asset->id],
|
|
|
|
'files' => true,
|
|
|
|
'class' => 'form-horizontal' ]) }}
|
|
|
|
|
2017-08-25 10:04:19 -07:00
|
|
|
<div class="box-header with-border">
|
2020-03-31 23:36:56 -07:00
|
|
|
<h2 class="box-title"> {{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h2>
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
|
|
|
<div class="box-body">
|
|
|
|
{{csrf_field()}}
|
2024-05-31 10:46:57 -07:00
|
|
|
|
|
|
|
<!-- Asset model -->
|
2024-05-15 06:22:52 -07:00
|
|
|
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
2024-06-23 10:24:23 -07:00
|
|
|
<label class="col-sm-3 control-label">
|
|
|
|
{{ trans('admin/hardware/form.model') }}
|
|
|
|
</label>
|
2017-08-25 10:04:19 -07:00
|
|
|
<div class="col-md-8">
|
2024-05-31 10:46:57 -07:00
|
|
|
<p class="form-control-static">
|
|
|
|
@if (($asset->model) && ($asset->model->name))
|
|
|
|
{{ $asset->model->name }}
|
|
|
|
@else
|
|
|
|
<span class="text-danger text-bold">
|
2024-08-18 10:13:49 -07:00
|
|
|
<x-icon type="warning" />
|
2024-05-31 10:46:57 -07:00
|
|
|
{{ trans('admin/hardware/general.model_invalid')}}
|
|
|
|
</span>
|
|
|
|
{{ trans('admin/hardware/general.model_invalid_fix')}}
|
|
|
|
<a href="{{ route('hardware.edit', $asset->id) }}">
|
|
|
|
<strong>{{ trans('admin/hardware/general.edit') }}</strong>
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</p>
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-05-31 10:46:57 -07:00
|
|
|
|
2017-08-25 10:04:19 -07:00
|
|
|
|
|
|
|
<!-- Asset Name -->
|
2024-05-15 06:22:52 -07:00
|
|
|
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
2024-06-23 10:24:23 -07:00
|
|
|
<label for="name" class="col-sm-3 control-label">
|
|
|
|
{{ trans('general.name') }}
|
|
|
|
</label>
|
2017-08-25 10:04:19 -07:00
|
|
|
<div class="col-md-8">
|
|
|
|
<p class="form-control-static">{{ $asset->name }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-08-25 18:40:20 -07:00
|
|
|
<!-- Locations -->
|
2017-10-28 11:17:52 -07:00
|
|
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
2017-08-25 10:04:19 -07:00
|
|
|
|
2018-09-07 05:39:41 -07:00
|
|
|
<!-- Update location -->
|
|
|
|
<div class="form-group">
|
|
|
|
|
2023-04-03 19:19:12 -07:00
|
|
|
<div class="col-md-8 col-md-offset-3">
|
|
|
|
<label class="form-control">
|
2024-06-27 07:05:47 -07:00
|
|
|
<input type="checkbox" value="1" name="update_location" {{ old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
|
2023-04-03 19:19:12 -07:00
|
|
|
</label>
|
|
|
|
<p class="help-block">{!! trans('help.audit_help') !!}</p>
|
2018-09-07 05:39:41 -07:00
|
|
|
</div>
|
2023-04-03 19:19:12 -07:00
|
|
|
|
2018-09-07 05:39:41 -07:00
|
|
|
</div>
|
|
|
|
|
2017-08-25 10:04:19 -07:00
|
|
|
|
2024-05-15 06:22:52 -07:00
|
|
|
<!-- Show last audit date -->
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
{{ trans('general.last_audit') }}
|
|
|
|
</label>
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
|
|
|
<p class="form-control-static">
|
|
|
|
@if ($asset->last_audit_date)
|
|
|
|
{{ Helper::getFormattedDateObject($asset->last_audit_date, 'datetime', false) }}
|
|
|
|
@else
|
|
|
|
{{ trans('admin/settings/general.none') }}
|
|
|
|
@endif
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2017-08-25 10:04:19 -07:00
|
|
|
<!-- Next Audit -->
|
2024-05-15 06:22:52 -07:00
|
|
|
<div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
|
2024-06-23 10:24:23 -07:00
|
|
|
<label for="next_audit_date" class="col-sm-3 control-label">
|
|
|
|
{{ trans('general.next_audit_date') }}
|
|
|
|
</label>
|
2024-05-15 06:22:52 -07:00
|
|
|
<div class="col-md-8">
|
2022-09-26 14:34:35 -07:00
|
|
|
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-clear-btn="true">
|
2020-04-21 03:58:31 -07:00
|
|
|
<input type="text" class="form-control" placeholder="{{ trans('general.next_audit_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $next_audit_date) }}">
|
2024-08-18 10:24:26 -07:00
|
|
|
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
2021-09-26 01:11:08 -07:00
|
|
|
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
2024-05-15 06:22:52 -07:00
|
|
|
<p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Note -->
|
2024-05-15 06:22:52 -07:00
|
|
|
<div class="form-group{{ $errors->has('note') ? ' has-error' : '' }}">
|
2024-06-23 10:24:23 -07:00
|
|
|
<label for="note" class="col-sm-3 control-label">
|
|
|
|
{{ trans('general.notes') }}
|
|
|
|
</label>
|
2017-08-25 10:04:19 -07:00
|
|
|
<div class="col-md-8">
|
2020-04-21 03:58:31 -07:00
|
|
|
<textarea class="col-md-6 form-control" id="note" name="note">{{ old('note', $asset->note) }}</textarea>
|
2021-09-26 01:11:08 -07:00
|
|
|
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-05-15 06:22:52 -07:00
|
|
|
<!-- Audit Image -->
|
|
|
|
@include ('partials.forms.edit.image-upload', ['help_text' => trans('general.audit_images_help')])
|
2018-04-24 02:54:54 -07:00
|
|
|
|
2017-08-25 10:04:19 -07:00
|
|
|
|
|
|
|
</div> <!--/.box-body-->
|
|
|
|
<div class="box-footer">
|
|
|
|
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
2024-05-31 10:46:57 -07:00
|
|
|
<button type="submit" class="btn btn-success pull-right{{ (!$asset->model ? ' disabled' : '') }}"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'" disabled' : '') !!}>
|
2024-08-18 09:26:44 -07:00
|
|
|
<x-icon type="checkmark" />
|
2024-05-31 10:46:57 -07:00
|
|
|
{{ trans('general.audit') }}
|
|
|
|
</button>
|
2017-08-25 10:04:19 -07:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div> <!--/.col-md-7-->
|
|
|
|
</div>
|
|
|
|
@stop
|