Merge pull request #1882 from SevanNerse/fix-akaunting-select
fixing typo and bug when group is true
This commit is contained in:
commit
909f4f663f
@ -294,12 +294,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
let created_option = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
let created_options = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||||
|
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
// Option set sort_option data
|
// Option set sort_option data
|
||||||
if (!Array.isArray(created_options)) {
|
if (!Array.isArray(created_options)) {
|
||||||
for (const [index, options] of Object.entries(created_option)) {
|
for (const [index, options] of Object.entries(created_options)) {
|
||||||
let values = [];
|
let values = [];
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(options)) {
|
for (const [key, value] of Object.entries(options)) {
|
||||||
@ -315,7 +315,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
created_option.forEach(function (option, index) {
|
created_options.forEach(function (option, index) {
|
||||||
if (typeof(option) == 'string') {
|
if (typeof(option) == 'string') {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
index: index,
|
index: index,
|
||||||
@ -333,15 +333,15 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Option set sort_option data
|
// Option set sort_option data
|
||||||
if (!Array.isArray(created_option)) {
|
if (!Array.isArray(created_options)) {
|
||||||
for (const [key, value] of Object.entries(created_option)) {
|
for (const [key, value] of Object.entries(created_options)) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
key: key,
|
key: key,
|
||||||
value: value
|
value: value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
created_option.forEach(function (option, index) {
|
created_options.forEach(function (option, index) {
|
||||||
if (typeof(option) == 'string') {
|
if (typeof(option) == 'string') {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
index: index,
|
index: index,
|
||||||
|
@ -468,12 +468,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setSortOptions() {
|
setSortOptions() {
|
||||||
let created_option = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
let created_options = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||||
|
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
// Option set sort_option data
|
// Option set sort_option data
|
||||||
if (!Array.isArray(created_options)) {
|
if (!Array.isArray(created_options)) {
|
||||||
for (const [index, options] of Object.entries(created_option)) {
|
for (const [index, options] of Object.entries(created_options)) {
|
||||||
let values = [];
|
let values = [];
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(options)) {
|
for (const [key, value] of Object.entries(options)) {
|
||||||
@ -489,7 +489,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
created_option.forEach(function (option, index) {
|
created_options.forEach(function (option, index) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
index: index,
|
index: index,
|
||||||
key: option.id,
|
key: option.id,
|
||||||
@ -499,15 +499,15 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Option set sort_option data
|
// Option set sort_option data
|
||||||
if (!Array.isArray(created_option)) {
|
if (!Array.isArray(created_options)) {
|
||||||
for (const [key, value] of Object.entries(created_option)) {
|
for (const [key, value] of Object.entries(created_options)) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
key: key,
|
key: key,
|
||||||
value: value
|
value: value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
created_option.forEach(function (option, index) {
|
created_options.forEach(function (option, index) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
index: index,
|
index: index,
|
||||||
key: option.id,
|
key: option.id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user