2020-11-10 19:15:54 +03:00
|
|
|
@stack($name . '_input_start')
|
2022-06-01 10:15:55 +03:00
|
|
|
<div
|
|
|
|
@class([
|
2023-02-14 11:45:41 +03:00
|
|
|
'grid sm:grid-cols-6 lg:gap-8 col-span-3',
|
2022-06-01 10:15:55 +03:00
|
|
|
$formGroupClass,
|
|
|
|
'required' => $required,
|
|
|
|
'readonly' => $readonly,
|
|
|
|
'disabled' => $disabled,
|
|
|
|
])
|
|
|
|
|
|
|
|
@if (isset($attributes['v-show']))
|
|
|
|
v-if="{{ $attributes['v-show'] }}"
|
|
|
|
@endif
|
|
|
|
|
|
|
|
:class="[
|
|
|
|
{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }
|
|
|
|
]"
|
|
|
|
>
|
|
|
|
<akaunting-select
|
|
|
|
@class([
|
2022-06-29 12:49:23 +03:00
|
|
|
'relative',
|
2022-06-01 10:15:55 +03:00
|
|
|
$formGroupClass,
|
|
|
|
'required' => $required,
|
|
|
|
'readonly' => $readonly,
|
|
|
|
'disabled' => $disabled,
|
|
|
|
])
|
|
|
|
|
2022-11-07 17:36:32 +03:00
|
|
|
ref="{{ $name }}"
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
id="form-invoice-{{ $name }}"
|
|
|
|
|
|
|
|
@if (isset($attributes['v-show']))
|
|
|
|
v-if="{{ $attributes['v-show'] }}"
|
|
|
|
@endif
|
2020-11-10 19:15:54 +03:00
|
|
|
|
|
|
|
@if (!empty($attributes['v-error']))
|
|
|
|
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
|
|
|
@else
|
2022-06-01 10:15:55 +03:00
|
|
|
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }]"
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if (! $attributes->has('icon') && ! empty($icon->contents))
|
|
|
|
{!! $icon ?? '' !!}
|
|
|
|
@elseif (! empty($icon))
|
|
|
|
<x-form.icon icon="{{ $icon }}" />
|
|
|
|
@endif
|
|
|
|
|
2022-06-03 09:12:58 +03:00
|
|
|
title="{!! $label !!}"
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
@if (isset($attributes['placeholder']))
|
|
|
|
placeholder="{{ $attributes['placeholder'] }}"
|
|
|
|
@else
|
|
|
|
placeholder="{{ trans('general.form.select.field', ['field' => $label]) }}"
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
|
|
|
|
|
|
|
name="{{ $name }}"
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
:options="{{ json_encode($options) }}"
|
2020-11-10 19:15:54 +03:00
|
|
|
|
2020-12-22 10:49:29 +03:00
|
|
|
@if (isset($attributes['disabledOptions']))
|
|
|
|
:disabled-options="{{ json_encode($attributes['disabledOptions']) }}"
|
|
|
|
@endif
|
|
|
|
|
2020-12-31 13:55:47 +03:00
|
|
|
@if (isset($attributes['dynamicOptions']))
|
|
|
|
:dynamic-options="{{ $attributes['dynamicOptions'] }}"
|
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (empty($multiple))
|
|
|
|
@if (isset($selected) || old($name))
|
|
|
|
value="{{ old($name, $selected) }}"
|
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
@if (isset($selected) || old($name))
|
|
|
|
:value="{{ json_encode(old($name, $selected)) }}"
|
|
|
|
@endif
|
|
|
|
|
|
|
|
multiple
|
|
|
|
|
|
|
|
@if (! empty($attributes['collapse']))
|
|
|
|
collapse
|
|
|
|
@endif
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($attributes['model']))
|
2020-11-10 19:15:54 +03:00
|
|
|
:model="{{ $attributes['model'] }}"
|
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($addNew))
|
2020-11-10 19:15:54 +03:00
|
|
|
:add-new="{{ json_encode([
|
|
|
|
'status' => true,
|
|
|
|
'text' => trans('general.add_new'),
|
|
|
|
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
|
|
|
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
|
|
|
'field' => [
|
|
|
|
'key' => isset($attributes['field']['key']) ? $attributes['field']['key'] : 'id',
|
|
|
|
'value' => isset($attributes['field']['value']) ? $attributes['field']['value'] : 'name'
|
|
|
|
],
|
|
|
|
'new_text' => trans('modules.new'),
|
|
|
|
'buttons' => [
|
|
|
|
'cancel' => [
|
|
|
|
'text' => trans('general.cancel'),
|
|
|
|
'class' => 'btn-outline-secondary'
|
|
|
|
],
|
|
|
|
'confirm' => [
|
|
|
|
'text' => trans('general.save'),
|
2022-06-01 10:15:55 +03:00
|
|
|
'class' => 'disabled:bg-green-100'
|
2020-11-10 19:15:54 +03:00
|
|
|
]
|
|
|
|
]
|
|
|
|
])}}"
|
2022-06-01 10:15:55 +03:00
|
|
|
@endif
|
2020-11-10 19:15:54 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($group))
|
|
|
|
group
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($attributes['v-model']))
|
2020-11-10 19:15:54 +03:00
|
|
|
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
|
2022-06-01 10:15:55 +03:00
|
|
|
@elseif (! empty($attributes['data-field']))
|
2020-11-10 19:15:54 +03:00
|
|
|
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
|
|
|
|
@else
|
2022-06-01 10:15:55 +03:00
|
|
|
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event;"
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($attributes['change']))
|
2020-11-10 19:15:54 +03:00
|
|
|
@change="{{ $attributes['change'] }}($event)"
|
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($attributes['visible-change']))
|
2020-12-28 11:47:43 +03:00
|
|
|
@visible-change="{{ $attributes['visible-change'] }}"
|
|
|
|
@endif
|
2022-06-01 10:15:55 +03:00
|
|
|
|
2020-11-10 19:15:54 +03:00
|
|
|
@if (isset($attributes['readonly']))
|
|
|
|
:readonly="{{ $attributes['readonly'] }}"
|
|
|
|
@endif
|
|
|
|
|
2021-08-19 10:19:35 +03:00
|
|
|
@if (isset($attributes['clearable']))
|
|
|
|
:clearable="{{ $attributes['clearable'] }}"
|
|
|
|
@else
|
|
|
|
clearable
|
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (isset($attributes['v-disabled']))
|
|
|
|
:disabled="{{ $attributes['v-disabled'] }}"
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
|
|
|
|
2022-06-28 17:22:39 +03:00
|
|
|
@if (!$required)
|
|
|
|
:not-required={{ $required ? 'false' : 'true' }}
|
|
|
|
@endif
|
|
|
|
|
2020-11-10 19:15:54 +03:00
|
|
|
@if (isset($attributes['v-error-message']))
|
|
|
|
:form-error="{{ $attributes['v-error-message'] }}"
|
|
|
|
@else
|
|
|
|
:form-error="form.errors.get('{{ $name }}')"
|
|
|
|
@endif
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
@if (! empty($remote))
|
2020-11-10 19:15:54 +03:00
|
|
|
remote-action="{{ $attributes['remote_action'] }}"
|
|
|
|
|
2022-11-22 16:43:02 +03:00
|
|
|
@if (! empty($attributes['currency_code']))
|
|
|
|
currency-code="{{ $attributes['currency_code'] }}"
|
2020-11-10 19:15:54 +03:00
|
|
|
@endif
|
2022-06-01 10:15:55 +03:00
|
|
|
@endif
|
2020-11-10 19:15:54 +03:00
|
|
|
|
|
|
|
loading-text="{{ trans('general.loading') }}"
|
|
|
|
no-data-text="{{ trans('general.no_data') }}"
|
|
|
|
no-matching-data-text="{{ trans('general.no_matching_data') }}"
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
:sort-options="false"
|
|
|
|
></akaunting-select>
|
|
|
|
|
|
|
|
@foreach ($options as $option)
|
|
|
|
@if ($option->id == 'custom')
|
2022-11-07 17:36:32 +03:00
|
|
|
<div class="col-span-3" v-if="{{ $attributes['input-name'] }}">
|
|
|
|
<div class="h-6"></div>
|
2022-07-26 13:57:04 +03:00
|
|
|
<x-form.group.text name="{{ $attributes['input-name'] }}" value="{{ $attributes['input-value'] }}" />
|
2022-06-01 10:15:55 +03:00
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@stack($name . '_input_end')
|