not required edited for .vue files
This commit is contained in:
parent
7f4818c0f7
commit
d21d8e373b
@ -2,6 +2,7 @@
|
|||||||
<base-input :label="title" :name="name"
|
<base-input :label="title" :name="name"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:not-required="notRequired"
|
||||||
:class="[
|
:class="[
|
||||||
{'readonly': readonly},
|
{'readonly': readonly},
|
||||||
{'disabled': disabled},
|
{'disabled': disabled},
|
||||||
@ -105,6 +106,11 @@ export default {
|
|||||||
description: "Selectbox disabled status"
|
description: "Selectbox disabled status"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
notRequired: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
small: {
|
small: {
|
||||||
type: [Boolean, String],
|
type: [Boolean, String],
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
:appendIcon="icon"
|
:appendIcon="icon"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:not-required="notRequired"
|
||||||
@focus="focus"
|
@focus="focus"
|
||||||
>
|
>
|
||||||
<flat-picker slot-scope="{focus, blur}"
|
<flat-picker slot-scope="{focus, blur}"
|
||||||
@ -64,6 +65,11 @@ export default {
|
|||||||
description: "Input readonly status"
|
description: "Input readonly status"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
notRequired: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
period: {
|
period: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: "0",
|
default: "0",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<base-input :label="title" :name="name"
|
<base-input :label="title" :name="name"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:not-required="notRequired"
|
||||||
:class="[
|
:class="[
|
||||||
{'readonly': readonly},
|
{'readonly': readonly},
|
||||||
{'disabled': disabled},
|
{'disabled': disabled},
|
||||||
@ -254,6 +255,11 @@ export default {
|
|||||||
description: "Selectbox clearable status"
|
description: "Selectbox clearable status"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
notRequired: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<base-input v-if="title" :label="title" :name="name"
|
<base-input v-if="title" :label="title" :name="name"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:not-required="notRequired"
|
||||||
:class="[
|
:class="[
|
||||||
{'readonly': readonly},
|
{'readonly': readonly},
|
||||||
{'disabled': disabled},
|
{'disabled': disabled},
|
||||||
@ -359,6 +360,11 @@ export default {
|
|||||||
description: "Selectbox clearable status"
|
description: "Selectbox clearable status"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
notRequired: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
|
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
|
||||||
<div class="form-group sm:col-span-3">
|
<div class="form-group sm:col-span-3">
|
||||||
<base-input
|
<base-input
|
||||||
required
|
|
||||||
class="required"
|
|
||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
:label="text.name"
|
:label="text.name"
|
||||||
:placeholder="placeholder.name"
|
:placeholder="placeholder.name"
|
||||||
@ -22,8 +20,6 @@
|
|||||||
|
|
||||||
<div class="form-group sm:col-span-3">
|
<div class="form-group sm:col-span-3">
|
||||||
<base-input
|
<base-input
|
||||||
required
|
|
||||||
class="required"
|
|
||||||
:error="form.errors.class[0]"
|
:error="form.errors.class[0]"
|
||||||
:label="text.type">
|
:label="text.type">
|
||||||
|
|
||||||
@ -41,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group sm:col-span-3">
|
<div class="form-group sm:col-span-3">
|
||||||
<base-input :label="text.width">
|
<base-input :label="text.width" not-required>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.width" filterable
|
v-model="form.width" filterable
|
||||||
:placeholder="placeholder.width">
|
:placeholder="placeholder.width">
|
||||||
@ -56,6 +52,7 @@
|
|||||||
|
|
||||||
<div class="form-group sm:col-span-3">
|
<div class="form-group sm:col-span-3">
|
||||||
<base-input
|
<base-input
|
||||||
|
not-required
|
||||||
v-model="form.sort"
|
v-model="form.sort"
|
||||||
:label="text.sort"
|
:label="text.sort"
|
||||||
:placeholder="placeholder.sort"
|
:placeholder="placeholder.sort"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<slot name="label">
|
<slot name="label">
|
||||||
<label v-if="label" :class="labelClasses">
|
<label v-if="label" :class="labelClasses">
|
||||||
{{label}}
|
{{label}}
|
||||||
<span v-if="required" class="text-red ltr:ml-1 rtl:mr-1">*</span>
|
<span v-if="!notRequired" class="text-red ltr:ml-1 rtl:mr-1">*</span>
|
||||||
</label>
|
</label>
|
||||||
</slot>
|
</slot>
|
||||||
<div class="relative" :class="[
|
<div class="relative" :class="[
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="flex flex-col justify-between">
|
<div class="flex flex-col justify-between">
|
||||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5 menu-scroll gap-10">
|
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5 menu-scroll gap-10">
|
||||||
<div class="sm:col-span-6">
|
<div class="sm:col-span-6">
|
||||||
<base-input :label="translations.company.api_key" name="api_key" data-name="api_key" :placeholder="translations.company.api_key" v-model="company.api_key"/>
|
<base-input not-required :label="translations.company.api_key" name="api_key" data-name="api_key" :placeholder="translations.company.api_key" v-model="company.api_key"/>
|
||||||
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<small>
|
<small>
|
||||||
@ -23,11 +23,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:col-span-3">
|
<div class="sm:col-span-3">
|
||||||
<base-input type="text" :label="translations.company.tax_number" name="tax_number" data-name="tax_number" :placeholder="translations.company.tax_number" v-model="company.tax_number"/>
|
<base-input not-required type="text" :label="translations.company.tax_number" name="tax_number" data-name="tax_number" :placeholder="translations.company.tax_number" v-model="company.tax_number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:col-span-3">
|
<div class="sm:col-span-3">
|
||||||
<akaunting-date :title="translations.company.financial_start" data-name="financial_start" :placeholder="translations.company.financial_start" icon="calendar_today"
|
<akaunting-date not-required :title="translations.company.financial_start" data-name="financial_start" :placeholder="translations.company.financial_start" icon="calendar_today"
|
||||||
:date-config="{
|
:date-config="{
|
||||||
dateFormat: 'd-m',
|
dateFormat: 'd-m',
|
||||||
allowInput: false,
|
allowInput: false,
|
||||||
@ -40,13 +40,13 @@
|
|||||||
|
|
||||||
<div class="sm:col-span-3 grid gap-10">
|
<div class="sm:col-span-3 grid gap-10">
|
||||||
<div class="sm:col-span-3">
|
<div class="sm:col-span-3">
|
||||||
<base-input :label="translations.company.address">
|
<base-input not-required :label="translations.company.address">
|
||||||
<textarea class="w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple" name="address" data-name="address" rows="3" :placeholder="translations.company.address" v-model="company.address"></textarea>
|
<textarea class="w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple" name="address" data-name="address" rows="3" :placeholder="translations.company.address" v-model="company.address"></textarea>
|
||||||
</base-input>
|
</base-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:col-span-3">
|
<div class="sm:col-span-3">
|
||||||
<base-input :label="translations.company.country">
|
<base-input not-required :label="translations.company.country">
|
||||||
<el-select v-model="company.country" filterable>
|
<el-select v-model="company.country" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(country, index) in sortedCountries"
|
v-for="(country, index) in sortedCountries"
|
||||||
|
@ -62,12 +62,11 @@
|
|||||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
||||||
<base-input name="name" data-name="name"
|
<base-input name="name" data-name="name"
|
||||||
form-classes="sm:col-span-2"
|
form-classes="sm:col-span-2"
|
||||||
class="required"
|
|
||||||
v-model="model.name"
|
v-model="model.name"
|
||||||
:error="onFailErrorGet('name')"
|
:error="onFailErrorGet('name')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<base-input class="sm:col-span-2 required" :error="onFailErrorGet('code')">
|
<base-input class="sm:col-span-2" :error="onFailErrorGet('code')">
|
||||||
<el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable>
|
<el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in currency_codes"
|
v-for="option in currency_codes"
|
||||||
@ -81,7 +80,6 @@
|
|||||||
|
|
||||||
<base-input name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
<base-input name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||||
form-classes="sm:col-span-2"
|
form-classes="sm:col-span-2"
|
||||||
class="required"
|
|
||||||
v-model="model.rate"
|
v-model="model.rate"
|
||||||
:error="onFailErrorGet('rate')"
|
:error="onFailErrorGet('rate')"
|
||||||
/>
|
/>
|
||||||
@ -131,13 +129,13 @@
|
|||||||
|
|
||||||
<div v-if="new_datas" class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5 w-full">
|
<div v-if="new_datas" class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5 w-full">
|
||||||
<base-input :label="translations.currencies.name" name="name" data-name="name" :placeholder="translations.currencies.name"
|
<base-input :label="translations.currencies.name" name="name" data-name="name" :placeholder="translations.currencies.name"
|
||||||
class="sm:col-span-3 required"
|
class="sm:col-span-3"
|
||||||
v-model="model.name"
|
v-model="model.name"
|
||||||
:error="onFailErrorGet('name')"
|
:error="onFailErrorGet('name')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<base-input :label="translations.currencies.code" class="sm:col-span-2 required" :error="onFailErrorGet('code')">
|
<base-input :label="translations.currencies.code" class="sm:col-span-2" :error="onFailErrorGet('code')">
|
||||||
<el-select name="code" v-model="model.select" required="required" @change="onChangeCodeItem(model.select)"filterable>
|
<el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)"filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in currency_codes"
|
v-for="option in currency_codes"
|
||||||
:key="option"
|
:key="option"
|
||||||
@ -149,7 +147,7 @@
|
|||||||
</base-input>
|
</base-input>
|
||||||
|
|
||||||
<base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
<base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||||
class="sm:col-span-2 required"
|
class="sm:col-span-2"
|
||||||
v-model="model.rate"
|
v-model="model.rate"
|
||||||
:error="onFailErrorGet('rate')"
|
:error="onFailErrorGet('rate')"
|
||||||
/>
|
/>
|
||||||
|
@ -54,7 +54,6 @@
|
|||||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
||||||
<base-input name="name" data-name="name" :placeholder="translations.taxes.name"
|
<base-input name="name" data-name="name" :placeholder="translations.taxes.name"
|
||||||
form-classes="sm:col-span-2"
|
form-classes="sm:col-span-2"
|
||||||
class="required"
|
|
||||||
v-model="model.name"
|
v-model="model.name"
|
||||||
:error="onFailErrorGet('name')"
|
:error="onFailErrorGet('name')"
|
||||||
/>
|
/>
|
||||||
@ -63,7 +62,6 @@
|
|||||||
|
|
||||||
<base-input name="rate" data-name="rate" :placeholder="translations.taxes.rate"
|
<base-input name="rate" data-name="rate" :placeholder="translations.taxes.rate"
|
||||||
form-classes="sm:col-span-2"
|
form-classes="sm:col-span-2"
|
||||||
class="required"
|
|
||||||
v-model="model.rate"
|
v-model="model.rate"
|
||||||
:error="onFailErrorGet('rate')"
|
:error="onFailErrorGet('rate')"
|
||||||
/>
|
/>
|
||||||
@ -114,14 +112,14 @@
|
|||||||
|
|
||||||
<div v-if="new_datas" class="grid sm:grid-cols-4 gap-x-8 gap-y-6 my-3.5 w-full">
|
<div v-if="new_datas" class="grid sm:grid-cols-4 gap-x-8 gap-y-6 my-3.5 w-full">
|
||||||
<base-input :label="translations.taxes.name" name="name" data-name="name" :placeholder="translations.taxes.name"
|
<base-input :label="translations.taxes.name" name="name" data-name="name" :placeholder="translations.taxes.name"
|
||||||
class="sm:col-span-2 required"
|
class="sm:col-span-2"
|
||||||
v-model="model.name"
|
v-model="model.name"
|
||||||
:error="onFailErrorGet('name')"
|
:error="onFailErrorGet('name')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<base-input :label="translations.taxes.rate" name="rate" data-name="rate"
|
<base-input :label="translations.taxes.rate" name="rate" data-name="rate"
|
||||||
:placeholder="translations.taxes.rate"
|
:placeholder="translations.taxes.rate"
|
||||||
class="sm:col-span-2 required"
|
class="sm:col-span-2"
|
||||||
v-model="model.rate"
|
v-model="model.rate"
|
||||||
:error="onFailErrorGet('rate')"
|
:error="onFailErrorGet('rate')"
|
||||||
/>
|
/>
|
||||||
|
@ -46,6 +46,10 @@
|
|||||||
small="{{ $attributes['small'] }}"
|
small="{{ $attributes['small'] }}"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (!$required)
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (! empty($attributes['v-model']))
|
@if (! empty($attributes['v-model']))
|
||||||
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
|
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
|
||||||
@elseif (! empty($attributes['data-field']))
|
@elseif (! empty($attributes['data-field']))
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
@if ($required)
|
@if ($required)
|
||||||
:required="{{ $required ? 'true' : 'false' }}"
|
:required="{{ $required ? 'true' : 'false' }}"
|
||||||
|
@else
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($readonly)
|
@if ($readonly)
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
:disabled="{{ $disabled }}"
|
:disabled="{{ $disabled }}"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (!$required)
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (!empty($attributes['v-error']))
|
@if (!empty($attributes['v-error']))
|
||||||
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
||||||
@else
|
@else
|
||||||
|
@ -125,6 +125,10 @@
|
|||||||
:no-arrow="{{ $attributes['no-arrow'] }}"
|
:no-arrow="{{ $attributes['no-arrow'] }}"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (!$required)
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (isset($attributes['v-disabled']))
|
@if (isset($attributes['v-disabled']))
|
||||||
:disabled="{{ $attributes['v-disabled'] }}"
|
:disabled="{{ $attributes['v-disabled'] }}"
|
||||||
@endif
|
@endif
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
@if ($required)
|
@if ($required)
|
||||||
:required="{{ $required ? 'true' : 'false' }}"
|
:required="{{ $required ? 'true' : 'false' }}"
|
||||||
|
@else
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($readonly)
|
@if ($readonly)
|
||||||
|
@ -125,6 +125,10 @@
|
|||||||
:no-arrow="{{ $attributes['no-arrow'] }}"
|
:no-arrow="{{ $attributes['no-arrow'] }}"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (!$required)
|
||||||
|
:not-required={{ $required ? 'false' : 'true' }}
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (isset($attributes['v-disabled']))
|
@if (isset($attributes['v-disabled']))
|
||||||
:disabled="{{ $attributes['v-disabled'] }}"
|
:disabled="{{ $attributes['v-disabled'] }}"
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user