close #2940 Fixed: If setting use select element clearable, While It broken date and default values

This commit is contained in:
Cüneyt Şentürk 2023-03-16 10:56:14 +03:00
parent 497d36691b
commit 2101a5d95a
4 changed files with 20 additions and 14 deletions

View File

@ -14,9 +14,9 @@
<x-form.group.currency name="currency" not-required /> <x-form.group.currency name="currency" not-required />
<x-form.group.select name="tax" label="{{ trans_choice('general.taxes', 1) }}" :options="$taxes" :selected="setting('default.tax')" not-required /> <x-form.group.select name="tax" label="{{ trans_choice('general.taxes', 1) }}" :options="$taxes" :selected="setting('default.tax')" :clearable="'false'" not-required />
<x-form.group.payment-method not-required /> <x-form.group.payment-method :clearable="'false'" not-required />
</x-slot> </x-slot>
</x-form.section> </x-form.section>
@ -26,9 +26,9 @@
</x-slot> </x-slot>
<x-slot name="body"> <x-slot name="body">
<x-form.group.select remote name="income_category" label="{{ trans('settings.default.income_category') }}" :options="$sales_categories" :selected="setting('default.income_category')" remote_action="{{ route('categories.index'). '?search=type:income enabled:1' }}" sort-options="false" /> <x-form.group.select remote name="income_category" label="{{ trans('settings.default.income_category') }}" :options="$sales_categories" :clearable="'false'" :selected="setting('default.income_category')" remote_action="{{ route('categories.index'). '?search=type:income enabled:1' }}" sort-options="false" />
<x-form.group.select remote name="expense_category" label="{{ trans('settings.default.expense_category') }}" :options="$purchases_categories" :selected="setting('default.expense_category')" remote_action="{{ route('categories.index'). '?search=type:expense enabled:1' }}" sort-options="false" /> <x-form.group.select remote name="expense_category" label="{{ trans('settings.default.expense_category') }}" :options="$purchases_categories" :clearable="'false'" :selected="setting('default.expense_category')" remote_action="{{ route('categories.index'). '?search=type:expense enabled:1' }}" sort-options="false" />
</x-slot> </x-slot>
</x-form.section> </x-form.section>
@ -38,9 +38,9 @@
</x-slot> </x-slot>
<x-slot name="body"> <x-slot name="body">
<x-form.group.locale not-required /> <x-form.group.locale :clearable="'false'" not-required />
<x-form.group.select name="list_limit" label="{{ trans('settings.default.list_limit') }}" :options="['10' => '10', '25' => '25', '50' => '50', '100' => '100']" :selected="setting('default.list_limit')" not-required /> <x-form.group.select name="list_limit" label="{{ trans('settings.default.list_limit') }}" :options="['10' => '10', '25' => '25', '50' => '50', '100' => '100']" :clearable="'false'" :selected="setting('default.list_limit')" not-required />
</x-slot> </x-slot>
</x-form.section> </x-form.section>

View File

@ -14,11 +14,11 @@
<x-slot name="body"> <x-slot name="body">
<x-form.group.text name="number_prefix" label="{{ trans('settings.invoice.prefix') }}" value="{{ setting('invoice.number_prefix') }}" not-required /> <x-form.group.text name="number_prefix" label="{{ trans('settings.invoice.prefix') }}" value="{{ setting('invoice.number_prefix') }}" not-required />
<x-form.group.number_digit not-required /> <x-form.group.number_digit :clearable="'false'" not-required />
<x-form.group.text name="number_next" label="{{ trans('settings.invoice.next') }}" value="{{ setting('invoice.number_next') }}" not-required /> <x-form.group.text name="number_next" label="{{ trans('settings.invoice.next') }}" value="{{ setting('invoice.number_next') }}" not-required />
<x-form.group.select name="payment_terms" label="{{ trans('settings.invoice.payment_terms') }}" :options="$payment_terms" :selected="setting('invoice.payment_terms')" not-required /> <x-form.group.select name="payment_terms" label="{{ trans('settings.invoice.payment_terms') }}" :options="$payment_terms" :clearable="'false'" :selected="setting('invoice.payment_terms')" not-required />
</x-slot> </x-slot>
</x-form.section> </x-form.section>
@ -98,6 +98,7 @@
name="item_name" name="item_name"
label="{{ trans('settings.invoice.item_name') }}" label="{{ trans('settings.invoice.item_name') }}"
:options="$item_names" :options="$item_names"
:clearable="'false'"
:selected="setting('invoice.item_name')" :selected="setting('invoice.item_name')"
change="settingsInvoice" change="settingsInvoice"
input-name="item_name_input" input-name="item_name_input"
@ -109,6 +110,7 @@
name="price_name" name="price_name"
label="{{ trans('settings.invoice.price_name') }}" label="{{ trans('settings.invoice.price_name') }}"
:options="$price_names" :options="$price_names"
:clearable="'false'"
:selected="setting('invoice.price_name')" :selected="setting('invoice.price_name')"
change="settingsInvoice" change="settingsInvoice"
input-name="price_name_input" input-name="price_name_input"
@ -120,6 +122,7 @@
name="quantity_name" name="quantity_name"
label="{{ trans('settings.invoice.quantity_name') }}" label="{{ trans('settings.invoice.quantity_name') }}"
:options="$quantity_names" :options="$quantity_names"
:clearable="'false'"
:selected="setting('invoice.quantity_name')" :selected="setting('invoice.quantity_name')"
change="settingsInvoice" change="settingsInvoice"
input-name="quantity_name_input" input-name="quantity_name_input"

View File

@ -12,7 +12,7 @@
<x-slot name="body"> <x-slot name="body">
<x-form.group.date name="financial_start" label="{{ trans('settings.localisation.financial_start') }}" icon="calendar_today" value="{{ setting('localisation.financial_start') }}" show-date-format="j F" date-format="d-m" autocomplete="off" hidden_year /> <x-form.group.date name="financial_start" label="{{ trans('settings.localisation.financial_start') }}" icon="calendar_today" value="{{ setting('localisation.financial_start') }}" show-date-format="j F" date-format="d-m" autocomplete="off" hidden_year />
<x-form.group.select name="financial_denote" label="{{ trans('settings.localisation.financial_denote.title') }}" :options="$financial_denote_options" :selected="setting('localisation.financial_denote')" not-required /> <x-form.group.select name="financial_denote" label="{{ trans('settings.localisation.financial_denote.title') }}" :options="$financial_denote_options" :clearable="'false'" :selected="setting('localisation.financial_denote')" not-required />
</x-slot> </x-slot>
</x-form.section> </x-form.section>
@ -22,9 +22,9 @@
</x-slot> </x-slot>
<x-slot name="body"> <x-slot name="body">
<x-form.group.select name="date_format" label="{{ trans('settings.localisation.date.format') }}" :options="$date_formats" :selected="setting('localisation.date_format')" autocomplete="off" /> <x-form.group.select name="date_format" label="{{ trans('settings.localisation.date.format') }}" :options="$date_formats" :clearable="'false'" :selected="setting('localisation.date_format')" autocomplete="off" />
<x-form.group.select name="date_separator" label="{{ trans('settings.localisation.date.separator') }}" :options="$date_separators" :selected="setting('localisation.date_separator')" /> <x-form.group.select name="date_separator" label="{{ trans('settings.localisation.date.separator') }}" :options="$date_separators" :clearable="'false'" :selected="setting('localisation.date_separator')" />
</x-slot> </x-slot>
</x-form.section> </x-form.section>
@ -34,11 +34,11 @@
</x-slot> </x-slot>
<x-slot name="body"> <x-slot name="body">
<x-form.group.select group name="timezone" label="{{ trans('settings.localisation.timezone') }}" :options="$timezones" :selected="setting('localisation.timezone')" /> <x-form.group.select group name="timezone" label="{{ trans('settings.localisation.timezone') }}" :options="$timezones" :clearable="'false'" :selected="setting('localisation.timezone')" />
<x-form.group.select name="percent_position" label="{{ trans('settings.localisation.percent.title') }}" :options="$percent_positions" :selected="setting('localisation.percent_position')" not-required /> <x-form.group.select name="percent_position" label="{{ trans('settings.localisation.percent.title') }}" :options="$percent_positions" :clearable="'false'" :selected="setting('localisation.percent_position')" not-required />
<x-form.group.select name="discount_location" label="{{ trans('settings.localisation.discount_location.name') }}" :options="$discount_locations" :selected="setting('localisation.discount_location')" not-required /> <x-form.group.select name="discount_location" label="{{ trans('settings.localisation.discount_location.name') }}" :options="$discount_locations" :clearable="'false'" :selected="setting('localisation.discount_location')" not-required />
</x-slot> </x-slot>
</x-form.section> </x-form.section>

View File

@ -28,6 +28,7 @@
name="{{ $field['name'] }}" name="{{ $field['name'] }}"
label="{{ trans($field['title']) }}" label="{{ trans($field['title']) }}"
:options="$field['values']" :options="$field['values']"
:clearable="'false'"
:selected="setting($module->getAlias() . '.' . $field['name'], $field['selected'])" :selected="setting($module->getAlias() . '.' . $field['name'], $field['selected'])"
:dynamic-attributes="$field['attributes']" :dynamic-attributes="$field['attributes']"
/> />
@ -71,6 +72,7 @@
<x-form.group.account <x-form.group.account
:selected="$account" :selected="$account"
:clearable="'false'"
:dynamic-attributes="$field['attributes']" :dynamic-attributes="$field['attributes']"
without-add-new without-add-new
/> />
@ -81,6 +83,7 @@
<x-form.group.category <x-form.group.category
:value="$category" :value="$category"
:clearable="'false'"
:dynamic-attributes="$field['attributes']" :dynamic-attributes="$field['attributes']"
without-add-new without-add-new
/> />