Filters Implemented
This commit is contained in:
1 parent
072cca8e6b
commit
936ce51b66
9 files changed
+54
-20
No files matched your search
@@ -15,12 +15,13 @@ function newGovernanceReportsAssets() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.commonTables.addHTML(
|
||||
'assets',
|
||||
'Asset',
|
||||
'Assets',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsFeatures() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.commonTables.addHTML(
|
||||
'features',
|
||||
'Feature',
|
||||
'Features',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsMentors() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.decendentTables.addHTML(
|
||||
'mentors',
|
||||
'Mentorship Program',
|
||||
'mentorshipProgram',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsPools() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.commonTables.addHTML(
|
||||
'pools',
|
||||
'Pool',
|
||||
'Pools',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsPositions() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.commonTables.addHTML(
|
||||
'positions',
|
||||
'Position',
|
||||
'Positions',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsReferrals() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.decendentTables.addHTML(
|
||||
'referrals',
|
||||
'Referral Program',
|
||||
'referralProgram',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,13 @@ function newGovernanceReportsSupports() {
|
||||
|
||||
}
|
||||
|
||||
function addHTML(tabIndex) {
|
||||
function addHTML(tabIndex, filters) {
|
||||
return UI.projects.governance.utilities.decendentTables.addHTML(
|
||||
'supports',
|
||||
'Support Program',
|
||||
'supportProgram',
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,18 @@ function newGovernanceUtilitiesCommonTables() {
|
||||
table,
|
||||
nodeType,
|
||||
hierarchyHeadsType,
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
) {
|
||||
/*
|
||||
Setup Filters
|
||||
*/
|
||||
let filtersObject
|
||||
if (filters !== undefined) {
|
||||
try {
|
||||
filtersObject = JSON.parse(filters)
|
||||
} catch (err) { }
|
||||
}
|
||||
let tableRecords = []
|
||||
let tableRecordDefinition = {
|
||||
"properties": [
|
||||
@@ -60,11 +70,13 @@ function newGovernanceUtilitiesCommonTables() {
|
||||
let tableRecord = {
|
||||
"name": node.name,
|
||||
"tokensReward": node.payload.tokens | 0,
|
||||
"weight": node.payload.weight ,
|
||||
"weightPower": node.payload.votingProgram.votes
|
||||
"weight": node.payload.weight,
|
||||
"weightPower": node.payload.votingProgram.votes
|
||||
}
|
||||
|
||||
tableRecords.push(tableRecord)
|
||||
if (UI.projects.governance.utilities.filters.applyFilters(filters, filtersObject, tableRecord) === true) {
|
||||
tableRecords.push(tableRecord)
|
||||
}
|
||||
}
|
||||
/*
|
||||
Get the sorting order for this table.
|
||||
|
||||
@@ -9,8 +9,21 @@ function newGovernanceUtilitiesDecendentTables() {
|
||||
table,
|
||||
programName,
|
||||
programPropertyName,
|
||||
tabIndex
|
||||
tabIndex,
|
||||
filters
|
||||
) {
|
||||
/*
|
||||
Setup Filters
|
||||
*/
|
||||
let filtersObject
|
||||
if (filters !== undefined) {
|
||||
try {
|
||||
filtersObject = JSON.parse(filters)
|
||||
} catch (err) { }
|
||||
}
|
||||
/*
|
||||
Other Variables
|
||||
*/
|
||||
let tableRecords = []
|
||||
let tableRecordDefinition = {
|
||||
"properties": [
|
||||
@@ -87,7 +100,9 @@ function newGovernanceUtilitiesDecendentTables() {
|
||||
"tokensBonus": program.payload[programPropertyName].bonus.tokens | 0
|
||||
}
|
||||
|
||||
tableRecords.push(tableRecord)
|
||||
if (UI.projects.governance.utilities.filters.applyFilters(filters, filtersObject, tableRecord) === true) {
|
||||
tableRecords.push(tableRecord)
|
||||
}
|
||||
}
|
||||
/*
|
||||
Get the sorting order for this table.
|
||||
|
||||
Reference in new issue
Block a user