Setting currency set default currency disabled rate field..

This commit is contained in:
Cüneyt Şentürk 2022-09-05 09:45:42 +03:00
parent 4d5781cbc5
commit ba762c001e
3 changed files with 10 additions and 2 deletions

View File

@ -54,5 +54,13 @@ const app = new Vue({
.catch(error => {
});
}
},
watch: {
'form.default_currency': function (newVal, oldVal) {
if (newVal == 1) {
this.form.rate = 1;
}
},
}
});

View File

@ -22,7 +22,7 @@
<x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" />
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" />
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" />
<x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" />

View File

@ -16,7 +16,7 @@
<x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" />
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" />
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" />
<x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" />