Fixed autocomplete enabled issue
This commit is contained in:
@ -316,7 +316,7 @@ export default {
|
||||
},
|
||||
|
||||
onInput() {
|
||||
window.axios.get(this.searchRoute + '?search="' + this.search + '" limit:10')
|
||||
window.axios.get(this.searchRoute + '?search="' + this.search + '" enabled:1 limit:10')
|
||||
.then(response => {
|
||||
this.contact_list = [];
|
||||
|
||||
|
@ -331,7 +331,7 @@ export default {
|
||||
},
|
||||
|
||||
async fetchMatchedItems() {
|
||||
await window.axios.get(url + '/common/items?search=enabled:1 "' + this.search + '" limit:10')
|
||||
await window.axios.get(url + '/common/items?search="' + this.search + '" enabled:1 limit:10')
|
||||
.then(response => {
|
||||
this.item_list = [];
|
||||
let items = response.data.data;
|
||||
@ -390,7 +390,7 @@ export default {
|
||||
price: 0,
|
||||
tax_ids: [],
|
||||
};
|
||||
|
||||
|
||||
this.newItems.push(item);
|
||||
|
||||
this.addItem(item, 'newItem');
|
||||
@ -524,6 +524,7 @@ export default {
|
||||
sortedItems() {
|
||||
return this.sortItems();
|
||||
},
|
||||
|
||||
currentIndex() {
|
||||
return this.$root.form.items.length;
|
||||
},
|
||||
@ -559,6 +560,6 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.highlightItem:first-child {
|
||||
background-color: #F5F7FA;
|
||||
background-color: #F5F7FA;
|
||||
}
|
||||
</style>
|
||||
|
@ -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'). '?search=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 enabled:1']) }}
|
||||
|
||||
{{ 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'). '?search=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 enabled:1']) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file'], $item->picture) }}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
@if (!$hideCategory)
|
||||
<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'). '?search=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 . ' enabled:1'], $more_form_class) }}
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
||||
|
||||
{{ Form::selectRemoteGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['remote_action' => route('categories.index'). '?search=type:item']) }}
|
||||
{{ Form::selectRemoteGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['remote_action' => route('categories.index'). '?search=type:item enabled:1']) }}
|
||||
|
||||
{!! Form::hidden('enabled', '1', []) !!}
|
||||
</div>
|
||||
|
@ -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'). '?search=type:expense']) }}
|
||||
{{ 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'). '?search=type:expense enabled:1']) }}
|
||||
|
||||
{{ 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'). '?search=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 enabled:1']) }}
|
||||
|
||||
{{ 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'). '?search=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 enabled:1']) }}
|
||||
|
||||
{{ 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'). '?search=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 enabled:1']) }}
|
||||
|
||||
{{ Form::recurring('edit', $revenue) }}
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
{{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), []) }}
|
||||
|
||||
{{ Form::selectRemoteGroup('income_category', trans('settings.default.income_category'), 'folder', $sales_categories, setting('default.income_category'), ['remote_action' => route('categories.index'). '?search=type:income']) }}
|
||||
{{ Form::selectRemoteGroup('income_category', trans('settings.default.income_category'), 'folder', $sales_categories, setting('default.income_category'), ['remote_action' => route('categories.index'). '?search=type:income enabled:1']) }}
|
||||
|
||||
{{ Form::selectRemoteGroup('expense_category', trans('settings.default.expense_category'), 'folder', $purchases_categories, setting('default.expense_category'), ['remote_action' => route('categories.index'). '?search=type:expense']) }}
|
||||
{{ Form::selectRemoteGroup('expense_category', trans('settings.default.expense_category'), 'folder', $purchases_categories, setting('default.expense_category'), ['remote_action' => route('categories.index'). '?search=type:expense enabled:1']) }}
|
||||
|
||||
{{ Form::selectGroup('tax', trans_choice('general.taxes', 1), 'percent', $taxes, setting('default.tax'), []) }}
|
||||
|
||||
|
Reference in New Issue
Block a user