2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2016-09-29 22:20:58 -07:00
|
|
|
{{ trans('admin/consumables/general.checkout') }}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-9">
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2024-01-10 11:35:32 -08:00
|
|
|
<form class="form-horizontal" id="checkout_form" method="post" action="" autocomplete="off">
|
2016-03-25 01:18:05 -07:00
|
|
|
<!-- CSRF Token -->
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
|
|
|
|
|
|
|
<div class="box box-default">
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($consumable->id)
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<div class="box-heading">
|
2020-03-31 23:36:56 -07:00
|
|
|
<h2 class="box-title">{{ $consumable->name }} </h2>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.box-header -->
|
|
|
|
@endif
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
@if ($consumable->name)
|
|
|
|
<!-- consumable name -->
|
|
|
|
<div class="form-group">
|
2016-12-27 12:03:47 -08:00
|
|
|
<label class="col-sm-3 control-label">{{ trans('admin/consumables/general.consumable_name') }}</label>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<p class="form-control-static">{{ $consumable->name }}</p>
|
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2024-07-11 09:26:43 -07:00
|
|
|
<!-- total -->
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">{{ trans('admin/components/general.total') }}</label>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<p class="form-control-static">{{ $consumable->qty }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- remaining -->
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">{{ trans('admin/components/general.remaining') }}</label>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<p class="form-control-static">{{ $consumable->numRemaining() }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
<!-- User -->
|
2017-11-03 12:17:41 -07:00
|
|
|
@include ('partials.forms.edit.user-select', ['translated_name' => trans('general.select_user'), 'fieldname' => 'assigned_to', 'required'=> 'true'])
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
|
2023-03-22 14:43:00 -07:00
|
|
|
@if ($consumable->requireAcceptance() || $consumable->getEula() || ($snipeSettings->webhook_endpoint!=''))
|
2018-03-25 13:46:57 -07:00
|
|
|
<div class="form-group notification-callout">
|
|
|
|
<div class="col-md-8 col-md-offset-3">
|
|
|
|
<div class="callout callout-info">
|
|
|
|
|
|
|
|
@if ($consumable->category->require_acceptance=='1')
|
2021-09-24 13:07:02 -07:00
|
|
|
<i class="far fa-envelope"></i>
|
2018-03-25 13:46:57 -07:00
|
|
|
{{ trans('admin/categories/general.required_acceptance') }}
|
|
|
|
<br>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if ($consumable->getEula())
|
2021-09-24 13:07:02 -07:00
|
|
|
<i class="far fa-envelope"></i>
|
2018-03-25 13:46:57 -07:00
|
|
|
{{ trans('admin/categories/general.required_eula') }}
|
|
|
|
<br>
|
|
|
|
@endif
|
|
|
|
|
2023-03-22 14:43:00 -07:00
|
|
|
@if ($snipeSettings->webhook_endpoint!='')
|
2021-09-26 01:11:08 -07:00
|
|
|
<i class="fab fa-slack"></i>
|
2023-03-22 14:43:00 -07:00
|
|
|
{{ trans('general.webhook_msg_note') }}
|
2018-03-25 13:46:57 -07:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-05-21 06:19:00 -07:00
|
|
|
|
|
|
|
<!-- Checkout QTY -->
|
|
|
|
<div class="form-group {{ $errors->has('qty') ? 'error' : '' }} ">
|
|
|
|
<label for="qty" class="col-md-3 control-label">{{ trans('general.qty') }}</label>
|
|
|
|
<div class="col-md-7 col-sm-12 required">
|
|
|
|
<div class="col-md-2" style="padding-left:0px">
|
2024-10-23 07:05:35 -07:00
|
|
|
<input class="form-control" type="number" name="checkout_qty" id="checkout_qty" value="1" min="1" max="{{$consumable->numRemaining()}}" maxlength="999999" />
|
2023-05-21 06:19:00 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{!! $errors->first('qty', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
|
|
|
</div>
|
|
|
|
|
2018-05-28 14:30:18 -07:00
|
|
|
<!-- Note -->
|
|
|
|
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
|
|
|
<label for="note" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
|
|
|
<div class="col-md-7">
|
2022-08-10 15:15:29 -07:00
|
|
|
<textarea class="col-md-6 form-control" name="note">{{ old('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>') !!}
|
2018-05-28 14:30:18 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div> <!-- .box-body -->
|
2024-07-26 04:47:33 -07:00
|
|
|
<x-redirect_submit_options
|
|
|
|
index_route="consumables.index"
|
|
|
|
:button_label="trans('general.checkout')"
|
|
|
|
:options="[
|
|
|
|
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.consumables')]),
|
|
|
|
'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.consumable')]),
|
|
|
|
'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
|
|
|
|
]"/>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</form>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
|
|
|
@stop
|