54 lines
2.2 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.items', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
{!! Form::model($item, [
'id' => 'item',
'method' => 'PATCH',
'route' => ['items.update', $item->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
2017-09-14 22:21:00 +03:00
2020-12-08 13:30:06 +03:00
{{ Form::multiSelectAddNewGroup('tax_ids', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_ids, ['path' => route('modals.taxes.create'), 'field' => ['key' => 'id', 'value' => 'title']]) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textareaGroup('description', trans('general.description')) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('sale_price', trans('items.sales_price'), 'money-bill-wave') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
2017-09-14 22:21:00 +03:00
2020-11-10 21:20:50 +03:00
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?type=item']) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
2017-09-14 22:21:00 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('enabled', trans('general.enabled'), $item->enabled) }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
2020-10-14 17:07:59 +03:00
@can('update-common-items')
2019-11-16 10:21:14 +03:00
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('items.index') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2020-10-14 17:07:59 +03:00
@endcan
2020-01-27 22:41:08 +03:00
2019-11-16 10:21:14 +03:00
{!! Form::close() !!}
2017-09-14 22:21:00 +03:00
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/common/items.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush