Document item tax add new fixed..

This commit is contained in:
Cüneyt Şentürk 2021-01-01 16:47:00 +03:00
parent 8a13227cb0
commit 44bf805d1b
3 changed files with 21 additions and 6 deletions

View File

@ -2,9 +2,10 @@
namespace App\Http\Controllers\Modals; namespace App\Http\Controllers\Modals;
use App\Models\Setting\Tax;
use App\Jobs\Setting\CreateTax;
use App\Abstracts\Http\Controller; use App\Abstracts\Http\Controller;
use App\Http\Requests\Setting\Tax as Request; use App\Http\Requests\Setting\Tax as Request;
use App\Jobs\Setting\CreateTax;
class Taxes extends Controller class Taxes extends Controller
{ {

View File

@ -87,7 +87,7 @@
</el-option> </el-option>
</el-option-group> </el-option-group>
<el-option v-if="!loading && addNew.status && options.length != 0" class="el-select__footer" :disabled="disabled" :value="add_new"> <el-option v-if="!loading && addNew.status && options.length != 0" class="el-select__footer" :disabled="disabled" :value="''">
<div @click="onAddItem"> <div @click="onAddItem">
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
<span> <span>
@ -425,11 +425,17 @@ export default {
methods: { methods: {
change() { change() {
// This controll added add new changed..
if (typeof(this.selected) === 'object' && typeof(this.selectedz.type) !== 'undefined') {
return false;
}
this.$emit('interface', this.selected); this.$emit('interface', this.selected);
this.$emit('change', this.selected); this.$emit('change', this.selected);
// Option changed sort_option data // Option changed sort_option data
/*
if (this.group) { if (this.group) {
this.sort_options.forEach(function (option_group, group_index) { this.sort_options.forEach(function (option_group, group_index) {
this.option_group.value.forEach(function (option, index) { this.option_group.value.forEach(function (option, index) {
@ -493,6 +499,7 @@ export default {
} }
}, this); }, this);
} }
*/
}, },
visibleChange(event) { visibleChange(event) {
@ -520,11 +527,11 @@ export default {
if (this.title) { if (this.title) {
var value = this.$children[0].$children[0].$children[0].$refs.input.value; var value = this.$children[0].$children[0].$children[0].$refs.input.value;
} else { } else {
var value = this.$children[0].$children[0].$refs.input.value; var value = this.$children[0].$children[0].$children[0].$refs.input.value;
} }
if (value === '') { if (value === '') {
return false; //return false;
} }
if (this.add_new.type == 'inline') { if (this.add_new.type == 'inline') {

View File

@ -88,7 +88,7 @@
</el-option> </el-option>
</el-option-group> </el-option-group>
<el-option v-if="!loading && addNew.status && options.length != 0" class="el-select__footer" :disabled="disabled" :value="add_new"> <el-option v-if="!loading && addNew.status && options.length != 0" class="el-select__footer" :disabled="disabled">
<div @click="onAddItem"> <div @click="onAddItem">
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
<span> <span>
@ -541,11 +541,17 @@ export default {
}, },
change() { change() {
// This controll added add new changed..
if (typeof(this.selected) === 'object' && typeof(this.selected.type) !== 'undefined') {
return false;
}
this.$emit('interface', this.selected); this.$emit('interface', this.selected);
this.$emit('change', this.selected); this.$emit('change', this.selected);
// Option changed sort_option data // Option changed sort_option data
/*
if (this.group) { if (this.group) {
this.sort_options.forEach(function (option_group, group_index) { this.sort_options.forEach(function (option_group, group_index) {
this.option_group.value.forEach(function (option, index) { this.option_group.value.forEach(function (option, index) {
@ -609,6 +615,7 @@ export default {
} }
}, this); }, this);
} }
*/
}, },
visibleChange(event) { visibleChange(event) {
@ -695,7 +702,7 @@ export default {
if (this.title) { if (this.title) {
var value = this.$children[0].$children[0].$children[0].$refs.input.value; var value = this.$children[0].$children[0].$children[0].$refs.input.value;
} else { } else {
var value = this.$children[0].$children[0].$refs.input.value; var value = this.$children[0].$children[0].$children[0].$refs.input.value;
} }
if (this.add_new.type == 'inline') { if (this.add_new.type == 'inline') {