Skip to content

Commit

Permalink
fix forbiddenapi (#6909)
Browse files Browse the repository at this point in the history
  • Loading branch information
pethers authored Dec 27, 2024
1 parent b4f8b3d commit 6da0dde
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
public final class CommitteeRankingDataGridPageModContentFactoryImpl extends AbstractCommitteeRankingPageModContentFactoryImpl {

/** The Constant COLUMN_ORDER. */
private static final String[] COLUMN_ORDER = {
"embeddedId.detail",
"embeddedId",
private static final String[] COLUMN_ORDER = {
"embeddedId.detail",
"embeddedId",
"currentMemberSize",
"currentLeadershipPositions",
"currentSubstitutePositions",
Expand All @@ -55,21 +55,21 @@ public final class CommitteeRankingDataGridPageModContentFactoryImpl extends Abs
"avgDocumentsPerMember",
"documentsLastYear",
"totalDocuments",
"totalAssignments",
"firstAssignmentDate",
"totalAssignments",
"firstAssignmentDate",
"lastAssignmentDate",
"totalDaysServed",
"totalDaysServed",
"totalLeadershipPositions",
"totalSubstitutePositions"
};

/** The Constant HIDE_COLUMNS. */
private static final String[] HIDE_COLUMNS = {
"active",
private static final String[] HIDE_COLUMNS = {
"active",
"embeddedId",
"totalFollowUpMotions"
};

/** The Constant COMMITTEES. */
private static final String COMMITTEES = "Committees";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
public final class MinistryRankingDataGridPageModContentFactoryImpl
extends AbstractMinistryRankingPageModContentFactoryImpl {

private static final String[] COLUMN_ORDER = {
"nameId",
"currentMemberSize",
private static final String[] COLUMN_ORDER = {
"nameId",
"currentMemberSize",
"activityLevel",
"avgDocumentsPerMember",
"totalPropositions",
"totalGovernmentBills",
"totalDocuments",
"documentsLastYear",
"totalDaysServed",
"totalDaysServed",
"totalAssignments",
"firstAssignmentDate",
"firstAssignmentDate",
"lastAssignmentDate"
};
/** The Constant DATAGRID. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package com.hack23.cia.web.impl.ui.application.views.user.party.pagemode;

import java.util.Locale;

import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -246,7 +248,7 @@ private void addParliamentaryEngagementMetrics(VerticalLayout layout,
if (summary != null) {
// Active Participation
layout.addComponent(createInfoRow("Parliament Activity:",
String.format("%.1f%%", calculateActivityRate(summary.getTotalActiveParliament(), party.getHeadCount())),
String.format(Locale.ENGLISH,"%.1f%%", calculateActivityRate(summary.getTotalActiveParliament(), party.getHeadCount())),
VaadinIcons.CHART_LINE,
"Percentage of active members in parliament"));

Expand All @@ -258,12 +260,12 @@ private void addParliamentaryEngagementMetrics(VerticalLayout layout,

// Historical Presence
layout.addComponent(createInfoRow("Days in Government:",
String.format("%,d", summary.getTotalDaysServedGovernment()),
String.format(Locale.ENGLISH,"%,d", summary.getTotalDaysServedGovernment()),
VaadinIcons.CLOCK,
"Total days served in government"));

layout.addComponent(createInfoRow("Parliamentary Experience:",
String.format("%,d", summary.getTotalDaysServedParliament()),
String.format(Locale.ENGLISH,"%,d", summary.getTotalDaysServedParliament()),
VaadinIcons.CALENDAR_CLOCK,
"Total days served in parliament"));
}
Expand Down Expand Up @@ -295,7 +297,7 @@ private void addLegislativeImpactMetrics(VerticalLayout layout,

// Cross-party Cooperation
layout.addComponent(createInfoRow("Collaboration Rate:",
String.format("%.1f%%", summary.getAvgCollaborationPercentage()),
String.format(Locale.ENGLISH,"%.1f%%", summary.getAvgCollaborationPercentage()),
VaadinIcons.CONNECT,
"Cross-party collaboration percentage"));

Expand All @@ -306,7 +308,7 @@ private void addLegislativeImpactMetrics(VerticalLayout layout,

// Legislative Efficiency
layout.addComponent(createInfoRow("Productivity:",
String.format("%.1f", summary.getAvgDocumentsPerMember()),
String.format(Locale.ENGLISH,"%.1f", summary.getAvgDocumentsPerMember()),
VaadinIcons.CHART_GRID,
"Average documents per member"));
}
Expand All @@ -327,30 +329,30 @@ private void addMemberPerformanceMetrics(VerticalLayout layout,
if (summary != null) {
// Activity Distribution
layout.addComponent(createInfoRow("High Performers:",
String.format("%d (%d%%)",
String.format(Locale.ENGLISH,"%d (%d%%)",
summary.getVeryHighActivityMembers(),
calculatePercentage(summary.getVeryHighActivityMembers(), party.getHeadCount())),
VaadinIcons.STAR,
"Members with very high activity levels"));

// Member Focus Areas
layout.addComponent(createInfoRow("Party Policy Focus:",
String.format("%d (%d%%)",
String.format(Locale.ENGLISH,"%d (%d%%)",
summary.getPartyFocusedMembers(),
calculatePercentage(summary.getPartyFocusedMembers(), party.getHeadCount())),
VaadinIcons.FLAG,
"Members focused on party policy work"));

layout.addComponent(createInfoRow("Committee Focus:",
String.format("%d (%d%%)",
String.format(Locale.ENGLISH,"%d (%d%%)",
summary.getCommitteeFocusedMembers(),
calculatePercentage(summary.getCommitteeFocusedMembers(), party.getHeadCount())),
VaadinIcons.CLIPBOARD_USER,
"Members focused on committee work"));

// Collaboration Metrics
layout.addComponent(createInfoRow("Collaborative Members:",
String.format("%d (%d%%)",
String.format(Locale.ENGLISH,"%d (%d%%)",
summary.getHighlyCollaborativeMembers(),
calculatePercentage(summary.getHighlyCollaborativeMembers(), party.getHeadCount())),
VaadinIcons.CONNECT,
Expand Down

0 comments on commit 6da0dde

Please sign in to comment.