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() {
|
||||
let created_option = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||
let created_options = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||
|
||||
if (this.group) {
|
||||
// Option set sort_option data
|
||||
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 = [];
|
||||
|
||||
for (const [key, value] of Object.entries(options)) {
|
||||
@ -315,7 +315,7 @@ export default {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_option.forEach(function (option, index) {
|
||||
created_options.forEach(function (option, index) {
|
||||
if (typeof(option) == 'string') {
|
||||
this.sort_options.push({
|
||||
index: index,
|
||||
@ -333,15 +333,15 @@ export default {
|
||||
}
|
||||
} else {
|
||||
// Option set sort_option data
|
||||
if (!Array.isArray(created_option)) {
|
||||
for (const [key, value] of Object.entries(created_option)) {
|
||||
if (!Array.isArray(created_options)) {
|
||||
for (const [key, value] of Object.entries(created_options)) {
|
||||
this.sort_options.push({
|
||||
key: key,
|
||||
value: value
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_option.forEach(function (option, index) {
|
||||
created_options.forEach(function (option, index) {
|
||||
if (typeof(option) == 'string') {
|
||||
this.sort_options.push({
|
||||
index: index,
|
||||
|
@ -468,12 +468,12 @@ export default {
|
||||
},
|
||||
|
||||
setSortOptions() {
|
||||
let created_option = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||
let created_options = (this.dynamicOptions) ? this.dynamicOptions : this.options;
|
||||
|
||||
if (this.group) {
|
||||
// Option set sort_option data
|
||||
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 = [];
|
||||
|
||||
for (const [key, value] of Object.entries(options)) {
|
||||
@ -489,7 +489,7 @@ export default {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_option.forEach(function (option, index) {
|
||||
created_options.forEach(function (option, index) {
|
||||
this.sort_options.push({
|
||||
index: index,
|
||||
key: option.id,
|
||||
@ -499,15 +499,15 @@ export default {
|
||||
}
|
||||
} else {
|
||||
// Option set sort_option data
|
||||
if (!Array.isArray(created_option)) {
|
||||
for (const [key, value] of Object.entries(created_option)) {
|
||||
if (!Array.isArray(created_options)) {
|
||||
for (const [key, value] of Object.entries(created_options)) {
|
||||
this.sort_options.push({
|
||||
key: key,
|
||||
value: value
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_option.forEach(function (option, index) {
|
||||
created_options.forEach(function (option, index) {
|
||||
this.sort_options.push({
|
||||
index: index,
|
||||
key: option.id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user