From 210f72effd65951030a221f967548c1a35237633 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 14 Jul 2021 18:16:38 +0200 Subject: [PATCH] Arrows showing --- .../UI/Spaces/Reports-Space/UserProfiles.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Projects/Governance/UI/Spaces/Reports-Space/UserProfiles.js b/Projects/Governance/UI/Spaces/Reports-Space/UserProfiles.js index e2f113926..2aad4a63f 100644 --- a/Projects/Governance/UI/Spaces/Reports-Space/UserProfiles.js +++ b/Projects/Governance/UI/Spaces/Reports-Space/UserProfiles.js @@ -38,7 +38,7 @@ function newGovernanceReportsUserProfiles() { }, { "name": "delegatedPower", - "label": "Name", + "label": "Delegated Power", "type": "number", "order": "descending" }, @@ -77,7 +77,7 @@ function newGovernanceReportsUserProfiles() { Set the default sorting order for this table. */ if (sortingOrder === undefined) { - UI.projects.governance.spaces.reportsSpace.tablesSortingOrders[table] = { + UI.projects.governance.spaces.reportsSpace.tablesSortingOrders[table] = { property: 'name', order: 'ascending' } @@ -130,13 +130,16 @@ function newGovernanceReportsUserProfiles() { Build the HTML */ let odd = false + const upArrow = '↑' + const downArrow = '↓' HTML = HTML + '' HTML = HTML + '' HTML = HTML + '' for (let i = 0; i < tableRecordDefinition.properties.length; i++) { let property = tableRecordDefinition.properties[i] - let newOrder + let newOrder + let orderArrow /* If the property is the one defining the order, then the new order will be the opossite order. @@ -144,10 +147,13 @@ function newGovernanceReportsUserProfiles() { if (property.name === sortingOrder.property) { if (sortingOrder.order === 'ascending') { newOrder = 'descending' + orderArrow = upArrow } else { newOrder = 'ascending' + orderArrow = downArrow } } else { + orderArrow = "" /* If the property is not the current defininf the order, then the new order will be the default order for that property. @@ -160,7 +166,7 @@ function newGovernanceReportsUserProfiles() { } } } - HTML = HTML + '' + HTML = HTML + '' } HTML = HTML + '' HTML = HTML + ''
' + '' + property.label + '' + '' + '' + property.label + ' ' + orderArrow +'' + '