diff --git a/resources/assets/js/components/AkauntingSelect.vue b/resources/assets/js/components/AkauntingSelect.vue index e7dfc1dcc..6033ab965 100644 --- a/resources/assets/js/components/AkauntingSelect.vue +++ b/resources/assets/js/components/AkauntingSelect.vue @@ -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, diff --git a/resources/assets/js/components/AkauntingSelectRemote.vue b/resources/assets/js/components/AkauntingSelectRemote.vue index 0ca43d8d8..36d62d8f6 100644 --- a/resources/assets/js/components/AkauntingSelectRemote.vue +++ b/resources/assets/js/components/AkauntingSelectRemote.vue @@ -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,