remote type clear..

This commit is contained in:
Cüneyt Şentürk 2020-11-10 21:20:50 +03:00
parent 870db531fe
commit 8ed62127d1
20 changed files with 29 additions and 43 deletions

View File

@ -124,11 +124,6 @@
default: null,
description: "Selectbox remote action path"
},
remoteType: {
type: String,
default: 'invoice',
description: "Ger remote item type."
},
},
data() {

View File

@ -353,11 +353,6 @@ export default {
default: null,
description: "Selectbox remote action path"
},
remoteType: {
type: String,
default: 'invoice',
description: "Ger remote item type."
},
currencyCode: {
type: String,
default: 'USD',
@ -449,7 +444,7 @@ export default {
this.sort_options.push({
index: index,
key: option.id,
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
});
}, this);
}
@ -523,7 +518,7 @@ export default {
data.forEach(function (option) {
this.sort_options.push({
key: option.id.toString(),
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
});
}, this);
} else {

View File

@ -48,7 +48,7 @@
@endif
@can('read-common-companies')
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, [], ['required' => 'required', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }}
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, [], ['required' => 'required', 'remote_action' => route('companies.index')]) }}
@endcan
@can('read-auth-roles')

View File

@ -49,7 +49,7 @@
@endif
@can('read-common-companies')
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'disabled' => (in_array('customer', $user->roles()->pluck('name')->toArray())) ? 'true' : 'false', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }}
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'disabled' => (in_array('customer', $user->roles()->pluck('name')->toArray())) ? 'true' : 'false', 'remote_action' => route('companies.index')]) }}
@endcan
@can('read-auth-roles')

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', 'remote_type' => 'category']) }}
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item']) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}

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', 'remote_type' => 'category']) }}
{{ 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)) }}

View File

@ -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'). '?type=item', 'remote_type' => 'category']) }}
{{ Form::selectRemoteGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['remote_action' => route('categories.index'). '?type=item']) }}
{!! Form::hidden('enabled', '1', []) !!}
</div>

View File

@ -84,9 +84,8 @@
@endif
remote-action="{{ $attributes['remote_action'] }}"
remote-type="{{ $attributes['remote_type'] }}"
@if (!empty($attributes['currecny_code']))
@if (!empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif

View File

@ -62,9 +62,8 @@
@endif
remote-action="{{ $attributes['remote_action'] }}"
remote-type="{{ $attributes['remote_type'] }}"
@if (!empty($attributes['currecny_code']))
@if (!empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif

View File

@ -78,9 +78,8 @@
@endif
remote-action="{{ $attributes['remote_action'] }}"
remote-type="'{{ $attributes['remote_type'] }}"
@if (!empty($attributes['currecny_code']))
@if (!empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif

View File

@ -56,9 +56,8 @@
@endif
remote-action="{{ $attributes['remote_action'] }}"
remote-type="'{{ $attributes['remote_type'] }}"
@if (!empty($attributes['currecny_code']))
@if (!empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif

View File

@ -17,7 +17,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.contact'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index'), 'remote_type' => 'vendor']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.contact'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index')]) }}
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'model' => 'form.currency_code', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
@ -194,7 +194,7 @@
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('create') }}

View File

@ -18,7 +18,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index'), 'remote_type' => 'vendor']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $bill->contact_id, ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index')]) }}
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $bill->currency_code, ['required' => 'required', 'model' => 'form.currency_code', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
@ -195,7 +195,7 @@
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?type=expense', 'remote_type' => 'category']) }}
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $bill->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=expense', 'remote_action' => route('categories.index'). '?type=expense']) }}
{{ Form::recurring('edit', $bill) }}

View File

@ -26,11 +26,11 @@
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), ['path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index'), 'remote_type' => 'vendor']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, setting('default.vendor'), ['path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index')]) }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('create') }}

View File

@ -45,11 +45,11 @@
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $payment->account_id, ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, ['path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index'), 'remote_type' => 'vendor']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.vendors', 1), 'user', $vendors, $payment->contact_id, ['path' => route('modals.vendors.create'), 'remote_action' => route('vendors.index')]) }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('edit', $payment) }}

View File

@ -17,7 +17,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create'), 'remote_action' => route('customers.index'), 'remote_type' => 'customer']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'model' => 'form.currency_code', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
@ -196,7 +196,7 @@
{{ Form::textareaGroup('footer', trans('general.footer'), '', setting('invoice.footer'), ['rows' => '3'], 'col-md-6') }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('create') }}

View File

@ -18,7 +18,7 @@
<div class="card-body">
<div class="row">
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create'), 'remote_action' => route('customers.index'), 'remote_type' => 'customer']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $invoice->contact_id, ['required' => 'required', 'change' => 'onChangeContact', 'path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $invoice->currency_code, ['required' => 'required', 'model' => 'form.currency_code', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
@ -197,7 +197,7 @@
{{ Form::textareaGroup('footer', trans('general.footer'), '', null, ['rows' => '3'], 'col-md-6') }}
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?type=income', 'remote_type' => 'category']) }}
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $invoice->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?type=income']) }}
{{ Form::recurring('edit', $invoice) }}

View File

@ -26,11 +26,11 @@
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index'), 'remote_type' => 'customer']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, setting('default.contact'), ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('create') }}

View File

@ -45,11 +45,11 @@
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index'), 'remote_type' => 'customer']) }}
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
{{ 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', 'remote_type' => 'category']) }}
{{ 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::recurring('edit', $revenue) }}

View File

@ -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'). '?type=income', 'remote_type' => 'category']) }}
{{ Form::selectRemoteGroup('income_category', trans('settings.default.income_category'), 'folder', $sales_categories, setting('default.income_category'), ['remote_action' => route('categories.index'). '?type=income']) }}
{{ Form::selectRemoteGroup('expense_category', trans('settings.default.expense_category'), 'folder', $purchases_categories, setting('default.expense_category'), ['remote_action' => route('categories.index'). '?type=expense', 'remote_type' => 'category']) }}
{{ Form::selectRemoteGroup('expense_category', trans('settings.default.expense_category'), 'folder', $purchases_categories, setting('default.expense_category'), ['remote_action' => route('categories.index'). '?type=expense']) }}
{{ Form::selectGroup('tax', trans_choice('general.taxes', 1), 'percent', $taxes, setting('default.tax'), []) }}