2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2022-06-21 10:50:37 -07:00
|
|
|
{{ $model->name }}
|
|
|
|
{{ ($model->model_number) ? '(#'.$model->model_number.')' : '' }}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('header_right')
|
2022-06-21 10:50:37 -07:00
|
|
|
@can('update', \App\Models\AssetModel::class)
|
|
|
|
<div class="btn-group pull-right">
|
|
|
|
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
@if ($model->deleted_at=='')
|
|
|
|
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li>
|
2022-08-01 16:03:45 -07:00
|
|
|
<li><a href="{{ route('models.clone.create', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
2022-06-21 10:50:37 -07:00
|
|
|
<li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
|
|
|
|
@else
|
2022-08-01 16:03:45 -07:00
|
|
|
<li><a href="{{ route('models.restore.store', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
2022-06-21 10:50:37 -07:00
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endcan
|
2016-03-25 01:18:05 -07:00
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
2022-06-21 10:50:37 -07:00
|
|
|
<div class="col-md-9">
|
|
|
|
<div class="nav-tabs-custom">
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li class="active">
|
|
|
|
<a href="#assets" data-toggle="tab">
|
|
|
|
|
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fas fa-barcode fa-2x"></i>
|
|
|
|
</span>
|
|
|
|
<span class="hidden-xs hidden-sm">
|
2024-06-18 02:27:11 -07:00
|
|
|
{{ trans('general.assets') }}
|
|
|
|
{!! ($model->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
2022-06-21 10:50:37 -07:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="#uploads" data-toggle="tab">
|
|
|
|
|
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fas fa-barcode fa-2x"></i>
|
|
|
|
</span>
|
|
|
|
<span class="hidden-xs hidden-sm">
|
|
|
|
{{ trans('general.files') }}
|
2022-06-28 15:50:07 -07:00
|
|
|
{!! ($model->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->uploads->count()).'</badge>' : '' !!}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="pull-right">
|
|
|
|
<a href="#" data-toggle="modal" data-target="#uploadFileModal">
|
2024-08-18 10:13:49 -07:00
|
|
|
<x-icon type="paperclip" />
|
2022-06-28 15:50:07 -07:00
|
|
|
{{ trans('button.upload') }}
|
2022-06-21 10:50:37 -07:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane fade in active" id="assets">
|
|
|
|
|
|
|
|
@include('partials.asset-bulk-actions')
|
|
|
|
|
|
|
|
<table
|
|
|
|
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
|
|
|
data-cookie-id-table="assetListingTable"
|
|
|
|
data-pagination="true"
|
|
|
|
data-id-table="assetListingTable"
|
|
|
|
data-search="true"
|
|
|
|
data-side-pagination="server"
|
|
|
|
data-show-columns="true"
|
|
|
|
data-show-fullscreen="true"
|
|
|
|
data-toolbar="#assetsBulkEditToolbar"
|
|
|
|
data-bulk-button-id="#bulkAssetEditButton"
|
|
|
|
data-bulk-form-id="#assetsBulkForm"
|
|
|
|
data-click-to-select="true"
|
|
|
|
data-show-export="true"
|
|
|
|
data-show-refresh="true"
|
|
|
|
data-sort-order="asc"
|
|
|
|
id="assetListingTable"
|
|
|
|
data-url="{{ route('api.assets.index',['model_id'=> $model->id]) }}"
|
|
|
|
class="table table-striped snipe-table"
|
|
|
|
data-export-options='{
|
2022-04-28 13:55:26 -07:00
|
|
|
"fileName": "export-models-{{ str_slug($model->name) }}-assets-{{ date('Y-m-d') }}",
|
2018-02-16 13:22:55 -08:00
|
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
|
|
}'>
|
2022-06-21 10:50:37 -07:00
|
|
|
</table>
|
|
|
|
{{ Form::close() }}
|
|
|
|
</div> <!-- /.tab-pane assets -->
|
|
|
|
|
2022-06-28 15:50:07 -07:00
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
<div class="tab-pane fade" id="uploads">
|
|
|
|
|
2022-06-28 15:50:07 -07:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
|
|
@if ($model->uploads->count() > 0)
|
|
|
|
<table
|
|
|
|
class="table table-striped snipe-table"
|
|
|
|
id="modelFileHistory"
|
|
|
|
data-pagination="true"
|
|
|
|
data-id-table="modelFileHistory"
|
|
|
|
data-search="true"
|
|
|
|
data-side-pagination="client"
|
|
|
|
data-sortable="true"
|
|
|
|
data-show-columns="true"
|
|
|
|
data-show-fullscreen="true"
|
|
|
|
data-show-refresh="true"
|
|
|
|
data-sort-order="desc"
|
|
|
|
data-sort-name="created_at"
|
|
|
|
data-show-export="true"
|
|
|
|
data-export-options='{
|
|
|
|
"fileName": "export-asset-{{ $model->id }}-files",
|
|
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
|
|
}'
|
|
|
|
data-cookie-id-table="assetFileHistory">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-visible="true" data-field="icon" data-sortable="true">{{trans('general.file_type')}}</th>
|
|
|
|
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="image">{{ trans('general.image') }}</th>
|
|
|
|
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="filename" data-sortable="true">{{ trans('general.file_name') }}</th>
|
|
|
|
<th class="col-md-1" data-searchable="true" data-visible="true" data-field="filesize">{{ trans('general.filesize') }}</th>
|
|
|
|
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="notes" data-sortable="true">{{ trans('general.notes') }}</th>
|
|
|
|
<th class="col-md-1" data-searchable="true" data-visible="true" data-field="download">{{ trans('general.download') }}</th>
|
|
|
|
<th class="col-md-2" data-searchable="true" data-visible="true" data-field="created_at" data-sortable="true">{{ trans('general.created_at') }}</th>
|
|
|
|
<th class="col-md-1" data-searchable="true" data-visible="true" data-field="actions">{{ trans('table.actions') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
@foreach ($model->uploads as $file)
|
|
|
|
<tr>
|
|
|
|
<td><i class="{{ Helper::filetype_icon($file->filename) }} icon-med" aria-hidden="true"></i></td>
|
|
|
|
<td>
|
2022-11-14 14:01:33 -08:00
|
|
|
@if ((Storage::exists('private_uploads/assetmodels/'.$file->filename)) && ( Helper::checkUploadIsImage($file->get_src('assetmodels'))))
|
2022-11-03 13:51:48 -07:00
|
|
|
<a href="{{ route('show/modelfile', ['modelID' => $model->id, 'fileId' => $file->id]) }}" data-toggle="lightbox" data-type="image" data-title="{{ $file->filename }}">
|
|
|
|
<img src="{{ route('show/modelfile', ['modelID' => $model->id, 'fileId' =>$file->id]) }}" style="max-width: 50px;">
|
2022-06-28 15:50:07 -07:00
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
2022-11-14 14:01:33 -08:00
|
|
|
@if (Storage::exists('private_uploads/assetmodels/'.$file->filename))
|
|
|
|
{{ $file->filename }}
|
|
|
|
@else
|
|
|
|
<del>{{ $file->filename }}</del>
|
|
|
|
@endif
|
2022-06-28 15:50:07 -07:00
|
|
|
</td>
|
2022-11-14 14:01:33 -08:00
|
|
|
<td data-value="{{ (Storage::exists('private_uploads/assetmodels/'.$file->filename)) ? Storage::size('private_uploads/assetmodels/'.$file->filename) : '' }}">
|
|
|
|
{{ (Storage::exists('private_uploads/assetmodels/'.$file->filename)) ? Helper::formatFilesizeUnits(Storage::size('private_uploads/assetmodels/'.$file->filename)) : '' }}
|
2022-06-28 15:50:07 -07:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if ($file->note)
|
|
|
|
{{ $file->note }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
2022-11-14 14:04:06 -08:00
|
|
|
@if (($file->filename) && (Storage::exists('private_uploads/assetmodels/'.$file->filename)))
|
2023-09-05 10:28:01 -07:00
|
|
|
<a href="{{ route('show/modelfile', [$model->id, $file->id]) }}" class="btn btn-sm btn-default">
|
2022-06-28 15:50:07 -07:00
|
|
|
<i class="fas fa-download" aria-hidden="true"></i>
|
|
|
|
</a>
|
2023-09-05 10:28:01 -07:00
|
|
|
|
|
|
|
<a href="{{ route('show/modelfile', [$model->id, $file->id, 'inline'=>'true']) }}" class="btn btn-sm btn-default" target="_blank">
|
2024-08-18 12:30:53 -07:00
|
|
|
<x-icon type="external-link" />
|
2023-09-05 10:28:01 -07:00
|
|
|
</a>
|
|
|
|
|
2022-06-28 15:50:07 -07:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if ($file->created_at)
|
|
|
|
{{ Helper::getFormattedDateObject($file->created_at, 'datetime', false) }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@can('update', \App\Models\AssetModel::class)
|
|
|
|
<a class="btn delete-asset btn-sm btn-danger btn-sm" href="{{ route('delete/assetfile', [$model->id, $file->id]) }}" data-tooltip="true" data-title="Delete" data-content="{{ trans('general.delete_confirm', ['item' => $file->filename]) }}"><i class="fas fa-trash icon-white" aria-hidden="true"></i></a>
|
|
|
|
@endcan
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
@else
|
|
|
|
|
|
|
|
<div class="alert alert-info alert-block">
|
|
|
|
<i class="fas fa-info-circle"></i>
|
|
|
|
{{ trans('general.no_results') }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</div> <!-- /.col-md-12 -->
|
|
|
|
</div> <!-- /.row -->
|
2022-06-21 10:50:37 -07:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- /.tab-content -->
|
|
|
|
</div> <!-- /.nav-tabs-custom -->
|
|
|
|
</div><!-- /. col-md-12 -->
|
2022-06-28 15:50:07 -07:00
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
<div class="col-md-3">
|
2022-06-28 15:50:07 -07:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="box box-default">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<div class="box-heading">
|
|
|
|
<h2 class="box-title"> {{ trans('general.moreinfo') }}:</h2>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.box-header -->
|
|
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
|
|
|
|
@if ($model->image)
|
|
|
|
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($model->image)) }}" class="img-responsive"></li>
|
2018-09-24 19:10:24 -07:00
|
|
|
@endif
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
|
|
|
|
<ul class="list-unstyled" style="line-height: 25px;">
|
2022-08-14 14:01:58 -07:00
|
|
|
@if ($model->category)
|
|
|
|
<li>{{ trans('general.category') }}:
|
|
|
|
<a href="{{ route('categories.show', $model->category->id) }}">{{ $model->category->name }}</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
2024-03-26 01:18:59 -07:00
|
|
|
@if ($model->created_at)
|
|
|
|
<li>{{ trans('general.created_at') }}:
|
|
|
|
{{ Helper::getFormattedDateObject($model->created_at, 'datetime', false) }}
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
2023-10-30 06:19:59 -07:00
|
|
|
@if ($model->min_amt)
|
|
|
|
<li>{{ trans('general.min_amt') }}:
|
|
|
|
{{$model->min_amt }}
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
@if ($model->manufacturer)
|
|
|
|
<li>
|
|
|
|
{{ trans('general.manufacturer') }}:
|
|
|
|
@can('view', \App\Models\Manufacturer::class)
|
|
|
|
<a href="{{ route('manufacturers.show', $model->manufacturer->id) }}">
|
|
|
|
{{ $model->manufacturer->name }}
|
|
|
|
</a>
|
|
|
|
@else
|
|
|
|
{{ $model->manufacturer->name }}
|
|
|
|
@endcan
|
|
|
|
</li>
|
|
|
|
|
|
|
|
@if ($model->manufacturer->url)
|
|
|
|
<li>
|
|
|
|
<i class="fas fa-globe-americas"></i> <a href="{{ $model->manufacturer->url }}">{{ $model->manufacturer->url }}</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->manufacturer->support_url)
|
|
|
|
<li>
|
2024-08-18 10:34:13 -07:00
|
|
|
<x-icon type="more-info" /> <a href="{{ $model->manufacturer->support_url }}">{{ $model->manufacturer->support_url }}</a>
|
2022-06-21 10:50:37 -07:00
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->manufacturer->support_phone)
|
|
|
|
<li>
|
|
|
|
<i class="fas fa-phone"></i>
|
|
|
|
<a href="tel:{{ $model->manufacturer->support_phone }}">{{ $model->manufacturer->support_phone }}</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->manufacturer->support_email)
|
|
|
|
<li>
|
|
|
|
<i class="far fa-envelope"></i> <a href="mailto:{{ $model->manufacturer->support_email }}">{{ $model->manufacturer->support_email }}</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
@if ($model->model_number)
|
|
|
|
<li>
|
|
|
|
{{ trans('general.model_no') }}:
|
|
|
|
{{ $model->model_number }}
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->depreciation)
|
|
|
|
<li>
|
|
|
|
{{ trans('general.depreciation') }}:
|
|
|
|
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->eol)
|
|
|
|
<li>{{ trans('general.eol') }}:
|
|
|
|
{{ $model->eol .' '. trans('general.months') }}
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->fieldset)
|
|
|
|
<li>{{ trans('admin/models/general.fieldset') }}:
|
|
|
|
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($model->notes)
|
|
|
|
<li>
|
|
|
|
{{ trans('general.notes') }}:
|
2023-10-27 07:37:56 -07:00
|
|
|
{!! nl2br(Helper::parseEscapedMarkedownInline($model->notes)) !!}
|
2022-06-21 10:50:37 -07:00
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
@if ($model->note)
|
|
|
|
Notes:
|
|
|
|
<p>
|
|
|
|
{!! $model->present()->note() !!}
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-28 15:50:07 -07:00
|
|
|
</div>
|
2022-06-28 16:25:22 -07:00
|
|
|
@can('update', \App\Models\AssetModel::class)
|
|
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
|
|
<a href="{{ route('models.edit', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/models/table.edit') }}</a>
|
|
|
|
</div>
|
|
|
|
@endcan
|
|
|
|
|
|
|
|
@can('create', \App\Models\AssetModel::class)
|
|
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
2024-03-26 01:18:59 -07:00
|
|
|
<a href="{{ route('models.clone.create', $model->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/models/table.clone') }}</a>
|
2022-06-28 16:25:22 -07:00
|
|
|
</div>
|
|
|
|
@endcan
|
|
|
|
|
|
|
|
@can('delete', \App\Models\AssetModel::class)
|
2024-01-24 16:14:51 -08:00
|
|
|
@if ($model->assets_count > 0)
|
2022-06-28 16:25:22 -07:00
|
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
2024-03-26 01:18:59 -07:00
|
|
|
<button class="btn btn-block btn-sm btn-primary hidden-print disabled" data-tooltip="true" data-placement="top" data-title="{{ trans('general.cannot_be_deleted') }}">{{ trans('general.delete') }}</button>
|
2022-06-28 16:25:22 -07:00
|
|
|
</div>
|
|
|
|
@else
|
2024-03-26 01:18:59 -07:00
|
|
|
|
2022-06-28 16:25:22 -07:00
|
|
|
@endif
|
2024-03-26 01:18:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
<div class="text-center col-md-12" style="padding-top: 30px; padding-bottom: 30px;">
|
|
|
|
@if ($model->deleted_at!='')
|
|
|
|
<form method="POST" action="{{ route('models.restore.store', $model->id) }}">
|
|
|
|
@csrf
|
|
|
|
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</button>
|
|
|
|
</form>
|
|
|
|
@else
|
|
|
|
<button class="btn btn-block btn-sm btn-danger delete-asset" data-toggle="modal" title="{{ trans('general.delete_what', ['item'=> trans('general.asset_model')]) }}" data-content="{{ trans('general.sure_to_delete_var', ['item' => $model->name]) }}" data-target="#dataConfirmModal" data-tooltip="true" data-placement="top" data-title="{{ trans('general.delete_what', ['item'=> trans('general.asset_model')]) }}">{{ trans('general.delete') }} </button>
|
|
|
|
<span class="sr-only">{{ trans('general.delete') }}</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
2022-06-28 16:25:22 -07:00
|
|
|
@endcan
|
2022-06-28 15:50:07 -07:00
|
|
|
</div>
|
2022-06-21 10:50:37 -07:00
|
|
|
</div> <!-- /.row -->
|
2022-06-28 15:50:07 -07:00
|
|
|
|
|
|
|
@can('update', \App\Models\AssetModel::class)
|
|
|
|
@include ('modals.upload-file', ['item_type' => 'models', 'item_id' => $model->id])
|
|
|
|
@endcan
|
Partialize forms (#2884)
* Consolidate edit form elements into reusable partials.
This is a large code change that doesn't do much immediately. It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.
In addition, I've gone ahead and renamed a few database fields. We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number. We had items using ::note and ::notes, I've standardized
on ::notes. Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.
TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.
Rename assetmodel::modelno to model_number for clarity and consistency
Rename consumable::model_no to model_number for clarity and consistency
Rename assetmodel::note to notes for clarity and consistency
Port asset and assetmodel to new partials layout. Adapt all code to the renamed model_number and notes database changes. Fix some stying.
* Share a settings variable with all views.
* Allow editing the per_page setting. We showed the value, but we never showed it on the edit page..
* use snipeSettings in all views instead of the long ugly path.
* War on partials. Centralize all bootstrap table javascript
* Use model_number instead of modelno in importer
* Codacy fix.
* More unification/deduplication. Create an edit form template layout that we use as the base for all edit forms. This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.
* Use a ViewComposer instead of sharing the variable directly. Fixes artisan optimize trying to hit the db--which ruins new installs
* Fix DB seeder.
* Base sql dump and csv's to import data from for tests.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* A few things to make acceptance tests work. Add a name to the companies table, and make the locations table have the correct name
* Use a .env.tests file for testing functional and unit to allow a separate database.
* Add functional tests for compoents, groups, and licenses.
* Now that the config is in the functional.yml, this just confuses things.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* update db dump
* Update tests to new reality
* env for the test setup
* only load the database at beginning of tests, not between each Functional test.
* Fix a miss from renaming note to notes.
* Set Termination date when creating an asset. It was only set on edit.
* Rename serial_number to serial in components for consistency.
* Update validation rules to match limits in database. Currently we just accepted the values and they were truncated when adding to DB.
* Much more detailed functional testing of creating items. This checks to make sure all values on form have been successfully persisted to database.
2016-11-16 16:56:57 -08:00
|
|
|
@stop
|
2016-03-25 01:18:05 -07:00
|
|
|
|
Partialize forms (#2884)
* Consolidate edit form elements into reusable partials.
This is a large code change that doesn't do much immediately. It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.
In addition, I've gone ahead and renamed a few database fields. We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number. We had items using ::note and ::notes, I've standardized
on ::notes. Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.
TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.
Rename assetmodel::modelno to model_number for clarity and consistency
Rename consumable::model_no to model_number for clarity and consistency
Rename assetmodel::note to notes for clarity and consistency
Port asset and assetmodel to new partials layout. Adapt all code to the renamed model_number and notes database changes. Fix some stying.
* Share a settings variable with all views.
* Allow editing the per_page setting. We showed the value, but we never showed it on the edit page..
* use snipeSettings in all views instead of the long ugly path.
* War on partials. Centralize all bootstrap table javascript
* Use model_number instead of modelno in importer
* Codacy fix.
* More unification/deduplication. Create an edit form template layout that we use as the base for all edit forms. This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.
* Use a ViewComposer instead of sharing the variable directly. Fixes artisan optimize trying to hit the db--which ruins new installs
* Fix DB seeder.
* Base sql dump and csv's to import data from for tests.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* A few things to make acceptance tests work. Add a name to the companies table, and make the locations table have the correct name
* Use a .env.tests file for testing functional and unit to allow a separate database.
* Add functional tests for compoents, groups, and licenses.
* Now that the config is in the functional.yml, this just confuses things.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* update db dump
* Update tests to new reality
* env for the test setup
* only load the database at beginning of tests, not between each Functional test.
* Fix a miss from renaming note to notes.
* Set Termination date when creating an asset. It was only set on edit.
* Rename serial_number to serial in components for consistency.
* Update validation rules to match limits in database. Currently we just accepted the values and they were truncated when adding to DB.
* Much more detailed functional testing of creating items. This checks to make sure all values on form have been successfully persisted to database.
2016-11-16 16:56:57 -08:00
|
|
|
@section('moar_scripts')
|
2023-09-14 15:35:44 -07:00
|
|
|
|
|
|
|
<script>
|
|
|
|
$('#dataConfirmModal').on('show.bs.modal', function (event) {
|
|
|
|
var content = $(event.relatedTarget).data('content');
|
|
|
|
var title = $(event.relatedTarget).data('title');
|
|
|
|
$(this).find(".modal-body").text(content);
|
|
|
|
$(this).find(".modal-header").text(title);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-06-21 10:50:37 -07:00
|
|
|
@include ('partials.bootstrap-table', ['exportFile' => 'manufacturer' . $model->name . '-export', 'search' => false])
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
@stop
|