@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.items', 1)])) @section('content')
{!! 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 ]) !!}
{{ Form::textGroup('name', trans('general.name'), 'tag') }} {{ Form::multiSelectAddNewGroup('tax_ids', trans_choice('general.taxes', 1), 'percentage', $taxes, $item->tax_ids, ['path' => route('modals.taxes.create'), 'field' => ['key' => 'id', 'value' => 'title']]) }} {{ Form::textareaGroup('description', trans('general.description')) }} {{ Form::textGroup('sale_price', trans('items.sales_price'), 'money-bill-wave') }} {{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }} {{ 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']) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }} {{ Form::radioGroup('enabled', trans('general.enabled'), $item->enabled) }}
@can('update-common-items') @endcan {!! Form::close() !!}
@endsection @push('scripts_start') @endpush