Select remote fixed searching value..

This commit is contained in:
Cüneyt Şentürk 2021-01-13 00:09:29 +03:00
parent 64dee4cfde
commit 152e5db02b
9 changed files with 17 additions and 17 deletions

View File

@ -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',
],

View File

@ -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 += '&currency_code=' + this.currencyCode;
path += ' limit:10';
path += '&limit:10';
path += '&currency_code=' + this.currencyCode;
window.axios({
method: 'GET',

View File

@ -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']) }}

View 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']) }}

View 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)

View File

@ -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') }}

View File

@ -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) }}

View File

@ -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') }}

View File

@ -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) }}