Select remote fixed searching value..
This commit is contained in:
parent
64dee4cfde
commit
152e5db02b
@ -206,7 +206,7 @@ return [
|
||||
'contact_phone' => ['searchable' => true],
|
||||
'contact_address' => ['searchable' => true],
|
||||
'category_id' => [
|
||||
'route' => 'categories.index'
|
||||
'route' => ['categories.index', 'search=type:expense']
|
||||
],
|
||||
'parent_id',
|
||||
],
|
||||
@ -252,7 +252,7 @@ return [
|
||||
'contact_phone' => ['searchable' => true],
|
||||
'contact_address' => ['searchable' => true],
|
||||
'category_id' => [
|
||||
'route' => 'categories.index'
|
||||
'route' => ['categories.index', 'search=type:income']
|
||||
],
|
||||
'parent_id',
|
||||
],
|
||||
|
@ -625,15 +625,15 @@ export default {
|
||||
path = url + '/common/items/autocomplete';
|
||||
}
|
||||
|
||||
if (path.indexOf('?') === -1) {
|
||||
if (path.indexOf('?search') === -1) {
|
||||
path += '?search="' + query + '"';
|
||||
} else {
|
||||
path += '&search="' + query + '"';
|
||||
path += ' "' + query + '"';
|
||||
}
|
||||
|
||||
path += '¤cy_code=' + this.currencyCode;
|
||||
path += ' limit:10';
|
||||
|
||||
path += '&limit:10';
|
||||
path += '¤cy_code=' + this.currencyCode;
|
||||
|
||||
window.axios({
|
||||
method: 'GET',
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?type=item']) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?search=type:item']) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus', ['dropzone-class' => 'form-file']) }}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
{{ 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::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'). '?search=type:item']) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
@if (!$hideCategory || !$hideAttachment)
|
||||
<div class="{{ $more_class }}">
|
||||
@if (!$hideCategory)
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $document->category_id ?? setting('default.' . $categoryType . '_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=' . $categoryType, 'remote_action' => route('categories.index'). '?type=' . $categoryType], $more_form_class) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $document->category_id ?? setting('default.' . $categoryType . '_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=' . $categoryType, 'remote_action' => route('categories.index'). '?search=type:' . $categoryType], $more_form_class) }}
|
||||
@endif
|
||||
|
||||
@if (!$hideAttachment)
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.expense_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?type=expense']) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.expense_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?search=type:expense', 'remote_action' => route('categories.index'). '?type=expense']) }}
|
||||
|
||||
{{ Form::recurring('create') }}
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?type=expense']) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $payment->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?search=type:expense']) }}
|
||||
|
||||
{{ Form::recurring('edit', $payment) }}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.income_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?type=income']) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.income_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?search=type:income']) }}
|
||||
|
||||
{{ Form::recurring('create') }}
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?type=income']) }}
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?search=type:income']) }}
|
||||
|
||||
{{ Form::recurring('edit', $revenue) }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user