Fixing function names

This commit is contained in:
Luis Fernando Molina committed 2021-07-15 11:28:31 +02:00
1 parent c687fb8237
commit 6ce6e59974
5 files changed
+35 -7

No files matched your search

@@ -1,4 +1,4 @@
function newFoundationsUtilitiesBonusProgram() {
function newGovernanceUtilitiesBonusProgram() {
let thisObject = {
run: run
}
@@ -1,4 +1,4 @@
function newFoundationsUtilitiesDecendentProgram() {
function newGovernanceUtilitiesDecendentProgram() {
let thisObject = {
run: run
}
+1 -1
View File
@@ -1,4 +1,4 @@
function newFoundationsUtilitiesPools() {
function newGovernanceUtilitiesPools() {
let thisObject = {
findPool: findPool
}
@@ -0,0 +1,23 @@
function newGovernanceUtilitiesTables() {
let thisObject = {
onlyOneProgram: onlyOneProgram
}
return thisObject
function onlyOneProgram(userProfile, programNodeType) {
/*
Find all the nodes representing the current program.
*/
let programs = UI.projects.foundations.utilities.branches.nodeBranchToArray(userProfile, programNodeType)
if (programs !== undefined) {
if (programs.length > 1) {
userProfile.payload.uiObject.setErrorMessage('Only one ' + programNodeType + ' is allowed.')
return
}
if (programs.length === 1) {
return programs[0]
}
}
}
}
+9 -4
View File
@@ -1052,22 +1052,27 @@
{
"name": "Pools",
"propertyName": "pools",
"functionName": "newFoundationsUtilitiesPools"
"functionName": "newGovernanceUtilitiesPools"
},
{
"name": "Decendent Program",
"propertyName": "decendentProgram",
"functionName": "newFoundationsUtilitiesDecendentProgram"
"functionName": "newGovernanceUtilitiesDecendentProgram"
},
{
"name": "Bonus Program",
"propertyName": "bonusProgram",
"functionName": "newFoundationsUtilitiesBonusProgram"
"functionName": "newGovernanceUtilitiesBonusProgram"
},
{
"name": "Validations",
"propertyName": "validations",
"functionName": "newFoundationsUtilitiesValidations"
"functionName": "newGovernanceUtilitiesValidations"
},
{
"name": "Tables",
"propertyName": "tables",
"functionName": "newGovernanceUtilitiesTables"
}
],
"spaces": [