1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-02-09 08:18:43 +01:00

fix: launch from shortcut of procedures or functions with parameters without name dont works

This commit is contained in:
Fabio Di Stasio 2021-04-19 15:40:25 +02:00
parent 6eb2977568
commit f82dbd24dc
3 changed files with 5 additions and 15 deletions

View File

@ -26,7 +26,7 @@
<div class="input-group"> <div class="input-group">
<input <input
:ref="i === 0 ? 'firstInput' : ''" :ref="i === 0 ? 'firstInput' : ''"
v-model="values[parameter.name]" v-model="values[`${i}-${parameter.name}`]"
class="form-input" class="form-input"
type="text" type="text"
> >
@ -88,7 +88,7 @@ export default {
return ''; return '';
}, },
runRoutine () { runRoutine () {
const valArr = Object.keys(this.values).reduce((acc, curr) => { const valArr = Object.keys(this.values).reduce((acc, curr, i) => {
let qc; let qc;
switch (this.client) { switch (this.client) {
case 'maria': case 'maria':
@ -102,7 +102,7 @@ export default {
qc = '"'; qc = '"';
} }
const param = this.localRoutine.parameters.find(param => param.name === curr); const param = this.localRoutine.parameters.find(param => `${i}-${param.name}` === curr);
const value = [...NUMBER, ...FLOAT].includes(param.type) ? this.values[curr] : `${qc}${this.values[curr]}${qc}`; const value = [...NUMBER, ...FLOAT].includes(param.type) ? this.values[curr] : `${qc}${this.values[curr]}${qc}`;
acc.push(value); acc.push(value);

View File

@ -185,15 +185,10 @@ export default {
isInDataTypes () { isInDataTypes () {
let typeNames = []; let typeNames = [];
for (const group of this.workspace.dataTypes) { for (const group of this.workspace.dataTypes) {
const groupTypeNames = group.types.reduce((acc, curr) => { typeNames = group.types.reduce((acc, curr) => {
acc.push(curr.name); acc.push(curr.name);
return acc; return acc;
}, []); }, []);
typeNames = [
...groupTypeNames,
...typeNames
];
} }
return typeNames.includes(this.localOptions.returns); return typeNames.includes(this.localOptions.returns);
} }

View File

@ -381,15 +381,10 @@ export default {
isInDataTypes () { isInDataTypes () {
let typeNames = []; let typeNames = [];
for (const group of this.dataTypes) { for (const group of this.dataTypes) {
const groupTypeNames = group.types.reduce((acc, curr) => { typeNames = group.types.reduce((acc, curr) => {
acc.push(curr.name); acc.push(curr.name);
return acc; return acc;
}, []); }, []);
typeNames = [
...groupTypeNames,
...typeNames
];
} }
return typeNames.includes(this.row.type); return typeNames.includes(this.row.type);
} }