refs #1147 invoice item create inline..

This commit is contained in:
Cüneyt Şentürk
2020-01-21 17:05:37 +03:00
parent 0876197e35
commit a8522812b2
7 changed files with 164 additions and 23 deletions

View File

@@ -0,0 +1,25 @@
{!! Form::open([
'route' => 'items.store',
'id' => 'item',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), ['path' => route('modals.taxes.create')]) }}
{{ 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::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
{!! Form::hidden('enabled', '1', []) !!}
</div>
{!! Form::close() !!}

View File

@@ -38,6 +38,10 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:remote-action="'{{ $attributes['remote_action'] }}'"
:remote-type="'{{ $attributes['remote_type'] }}'"
:currency-code="{{ $attributes['currecny_code'] }}"
:loading-text="'{{ trans('general.loading') }}'"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"

View File

@@ -24,22 +24,10 @@
:value="'{{ old('item_id', '') }}'"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.form.add_new', ['field' => trans_choice('general.items', 1)]),
'path' => isset($attributes['path']) ? $attributes['path']: false,
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
'field' => isset($attributes['field']) ? $attributes['field'] : 'name',
'buttons' => [
'cancel' => [
'text' => trans('general.cancel'),
'icon' => 'fas fa-times',
'class' => 'btn-outline-secondary'
],
'confirm' => [
'text' => trans('general.save'),
'icon' => 'fas fa-save',
'class' => 'btn-success'
]
]
'text' => trans('general.form.add_new', ['field' => '']),
'path' => route('modals.items.store'),
'type' => 'inline',
'field' => 'name',
])}}"
@interface="row.item_id = $event"
@label="row.name = $event"