mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-19 10:19:35 +00:00
Use label instead of value for Aggregator name params if available
This commit is contained in:
@@ -33,9 +33,17 @@ export default {
|
||||
|
||||
return this.activeAggregator.label.replace(
|
||||
/\{\s*([^\}]+)\s*\}/g,
|
||||
(match, key) => this.calledVars[key] === undefined
|
||||
? match
|
||||
: this.calledVars[key]
|
||||
(match, key) => {
|
||||
if (this.calledVars[key] === undefined)
|
||||
return match;
|
||||
if (this.config.vars[key].detail?.options) {
|
||||
const options = this.config.vars[key].detail.options;
|
||||
const res = options.find(opt => opt.value == this.calledVars[key]);
|
||||
if (res?.label)
|
||||
return res.label;
|
||||
}
|
||||
return this.calledVars[key];
|
||||
}
|
||||
);
|
||||
},
|
||||
activeAggregator() {
|
||||
|
||||
Reference in New Issue
Block a user