Select and date vue component fixes.

This commit is contained in:
Cüneyt Şentürk 2020-02-14 14:56:58 +03:00
parent 259a771bbf
commit aa97e6ab16
15 changed files with 161 additions and 79 deletions

View File

@ -419,13 +419,17 @@ export default {
description: "Selectbox attribute name"
},
value: {
type: String,
type: [String, Number],
default: null,
description: "Selectbox selected value"
},
options: null,
model: null,
model: {
type: [String, Number],
default: null,
description: "Selectbox selected model"
},
icon: {
type: String,
@ -605,7 +609,10 @@ export default {
this.selectOptions = options;
},
value: function (value) {
this.real_model = value;
this.real_model = value.toString();
},
model: function (value) {
this.real_model = value.toString();
}
},
}

View File

@ -9,11 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'fa fa-{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
:value="'{{ old($name, $value) }}'"
icon="fa fa-{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
@if(old($name, $value))
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:config="{
allowInput: true,
@if (!empty($attributes['show-date-format']))

View File

@ -9,11 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'fa fa-{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
:value="'{{ old($name, $value) }}'"
icon="fa fa-{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
@if(old($name, $value))
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:config="{
allowInput: true,
@if (!empty($attributes['show-date-format']))

View File

@ -3,7 +3,7 @@
<label class="custom-toggle">
<input type="checkbox"
name="status[{{ $id }}]"
v-on:input="onStatus({{ $id }}, $event)"
@input="onStatus({{ $id }}, $event)"
{{ ($value) ? 'checked' :'' }}>
<span class="custom-toggle-slider rounded-circle status-green"

View File

@ -18,10 +18,10 @@
@endif
:error="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }}"
:name="'{{ $name }}'"
:title="'{{ $text }}'"
name="{{ $name }}"
title="{{ $text }}"
:group_class="'{{ $group_class }}'"
:icon="'{{ $icon }}'"
icon="{{ $icon }}"
:currency="{{ json_encode($attributes['currency']) }}"
:value="{{ $value }}"

View File

@ -9,14 +9,22 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="{{ json_encode(old($name, $selected)) }}"
:multiple="true"
@if(old($name, $selected))
value="{{ json_encode(old($name, $selected)) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
multiple="true"
:add-new="{{ json_encode([
'status' => true,
'text' => trans('general.add_new'),
@ -67,8 +75,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="{{ json_encode(old($name, $selected)) }}"
@if(old($name, $selected))
value="{{ json_encode(old($name, $selected)) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:multiple="true"
@ -48,8 +55,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -16,8 +16,8 @@
<akaunting-recurring
:form-classes="[{'has-error': form.errors.get('recurring_frequency')}]"
:title="'{{ trans('recurring.recurring') }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => trans('recurring.recurring')]) }}'"
title="{{ trans('recurring.recurring') }}"
placeholder="{{ trans('general.form.select.field', ['field' => trans('recurring.recurring')]) }}"
:frequency-options="{{ json_encode($recurring_frequencies) }}"
:frequency-value="'{{ $frequency }}'"

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
@if(old($name, $selected))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:add-new="{{ json_encode([
'status' => true,
@ -62,8 +69,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
@if(old($name, $selected))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@ -42,8 +49,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
@if(old($name, $selected))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:add-new="{{ json_encode([
'status' => true,
@ -35,6 +42,7 @@
]
]
])}}"
:group="true"
@if (!empty($attributes['v-model']))
@ -63,8 +71,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
@if(old($name, $selected))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:group="true"
@ -44,8 +51,8 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
@stack($name . '_input_end')

View File

@ -9,12 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
:value="'{{ old($name, $selected) }}'"
@if(old($name, $selected))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@ -42,13 +49,13 @@
:form-error="form.errors.get('{{ $name }}')"
@endif
:remote-action="'{{ $attributes['remote_action'] }}'"
:remote-type="'{{ $attributes['remote_type'] }}'"
:currency-code="{{ $attributes['currecny_code'] }}"
remote-action="{{ $attributes['remote_action'] }}"
remote-type="'{{ $attributes['remote_type'] }}"
currency-code="{{ $attributes['currecny_code'] }}"
:loading-text="'{{ trans('general.loading') }}'"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
loading-text="{{ trans('general.loading') }}"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select-remote>
@stack($name . '_input_end')

View File

@ -8,7 +8,7 @@
@endif
<html-editor
:name="'{{ $name }}'"
name="{{ $name }}"
@if (!empty($attributes['v-model']))
:value="{{ $attributes['v-model'] . ' = ' . $value }}"

View File

@ -9,11 +9,19 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:icon="'fa fa-{{ $icon }}'"
:title="'{{ $text }}'"
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
:name="'{{ $name }}'"
:value="'{{ old($name, $value) }}'"
icon="fa fa-{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
@if(old($name, $value))
value="{{ old($name, $value) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:config="{
allowInput: true,
wrap: true,