mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Updates to components
This commit is contained in:
parent
014e7ba9c4
commit
0ca85f8a8a
|
@ -437,7 +437,7 @@ class ComponentsController extends Controller
|
|||
$rows = array();
|
||||
|
||||
foreach ($components as $component) {
|
||||
$actions = '<nobr><a href="'.route('checkout/component', $component->id).'" style="margin-right:5px;" class="btn btn-info btn-sm" '.(($component->numRemaining() > 0 ) ? '' : ' disabled').'>'.trans('general.checkout').'</a><a href="'.route('update/component', $component->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/component', $component->id).'" data-content="'.trans('admin/components/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($component->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></nobr>';
|
||||
$actions = '<nobr><a href="'.route('checkout/component', $component->id).'" style="margin-right:5px;" class="btn btn-info btn-sm '.(($component->numRemaining() > 0 ) ? '' : ' disabled').'" '.(($component->numRemaining() > 0 ) ? '' : ' disabled').'>'.trans('general.checkout').'</a><a href="'.route('update/component', $component->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;"><i class="fa fa-pencil icon-white"></i></a><a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/component', $component->id).'" data-content="'.trans('admin/components/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($component->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></nobr>';
|
||||
$company = $component->company;
|
||||
|
||||
$rows[] = array(
|
||||
|
|
|
@ -30,7 +30,10 @@ class Component extends Model
|
|||
*/
|
||||
public $rules = array(
|
||||
'name' => 'required|min:3|max:255',
|
||||
'min_amt' => 'integer|min:1',
|
||||
'total_qty' => 'required|integer|min:1',
|
||||
'category_id' => 'required|integer',
|
||||
'company_id' => 'integer',
|
||||
'purchase_date' => 'date',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
@if ($component->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title">{{ $component->name }} </h3>
|
||||
<h3 class="box-title">{{ $component->name }} ({{ $component->numRemaining() }} {{ trans('admin/components/general.remaining') }})</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
@ -54,10 +54,13 @@
|
|||
<div class="form-group {{ $errors->has('assigned_qty') ? ' has-error' : '' }}">
|
||||
<label for="assigned_qty" class="col-md-3 control-label">{{ trans('general.qty') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="assigned_qty" id="assigned_qty" style="width: 70px;" value="{{ Input::old('assigned_qty') }}" />
|
||||
<div class="col-md-1">
|
||||
<input class="form-control" type="text" name="assigned_qty" id="assigned_qty" value="{{ Input::old('assigned_qty') }}" />
|
||||
{!! $errors->first('assigned_qty', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ $component->numRemaining() }} Max
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('name', trans('admin/components/table.title')) }}
|
||||
{{ Form::label('name', trans('admin/components/table.title')) }} *
|
||||
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<!-- Category -->
|
||||
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('category_id', trans('general.category')) }}
|
||||
{{ Form::label('category_id', trans('general.category')) }} *
|
||||
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
|
@ -134,7 +134,7 @@
|
|||
<!-- QTY -->
|
||||
<div class="form-group {{ $errors->has('total_qty') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('total_qty', trans('general.quantity')) }}
|
||||
{{ Form::label('total_qty', trans('general.quantity')) }} *
|
||||
</div>
|
||||
<div class="col-md-9" style="margin-left: -15px">
|
||||
<div class="col-md-2">
|
||||
|
|
Loading…
Reference in a new issue