Akaunting select vue component enhancement
This commit is contained in:
parent
50f2e7d991
commit
31f2732ae4
@ -384,13 +384,13 @@ export default {
|
||||
|
||||
for (const [key, value] of Object.entries(options)) {
|
||||
values.push({
|
||||
key: key,
|
||||
key: key.toString(),
|
||||
value: value
|
||||
});
|
||||
}
|
||||
|
||||
this.sorted_options.push({
|
||||
key: index,
|
||||
key: index.toString(),
|
||||
value: values
|
||||
});
|
||||
}
|
||||
@ -405,7 +405,7 @@ export default {
|
||||
} else {
|
||||
this.sorted_options.push({
|
||||
index: index,
|
||||
key: option.id,
|
||||
key: option.id.toString(),
|
||||
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
|
||||
});
|
||||
}
|
||||
@ -416,7 +416,7 @@ export default {
|
||||
if (!Array.isArray(created_options)) {
|
||||
for (const [key, value] of Object.entries(created_options)) {
|
||||
this.sorted_options.push({
|
||||
key: key,
|
||||
key: key.toString(),
|
||||
value: value
|
||||
});
|
||||
}
|
||||
@ -431,7 +431,7 @@ export default {
|
||||
} else {
|
||||
this.sorted_options.push({
|
||||
index: index,
|
||||
key: option.id,
|
||||
key: option.id.toString(),
|
||||
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
|
||||
});
|
||||
}
|
||||
@ -654,6 +654,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.loading = false;
|
||||
this.form.loading = false;
|
||||
|
||||
if (response.data.success) {
|
||||
@ -675,10 +676,14 @@ export default {
|
||||
this.add_new.html = '';
|
||||
this.add_new_html = null;
|
||||
|
||||
response.data.data.mark_new = true;
|
||||
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
|
||||
this.$emit('visible-change', event);
|
||||
|
||||
let documentClasses = document.body.classList;
|
||||
|
||||
documentClasses.remove("modal-open");
|
||||
|
Loading…
x
Reference in New Issue
Block a user