Skip to content

Commit

Permalink
Uifix (#6817)
Browse files Browse the repository at this point in the history
* party fixes

* party cleanup
  • Loading branch information
pethers authored Dec 10, 2024
1 parent 487f0a5 commit 9744d9b
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.hack23.cia.model.internal.application.system.impl.ApplicationEventGroup;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.MinistryPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.MinistryGhantChartManager;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.MinistryPageMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.hack23.cia.service.external.esv.api.GovernmentBodyAnnualSummary;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.GovernmentBodyChartDataManager;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.GovernmentBodyPageMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.hack23.cia.service.external.esv.api.GovernmentBodyAnnualSummary;
import com.hack23.cia.web.impl.ui.application.action.ViewAction;
import com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.GovernmentBodyChartDataManager;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.GovernmentBodyPageMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@
*/
abstract class AbstractPartyPageModContentFactoryImpl extends AbstractItemPageModContentFactoryImpl<ViewRiksdagenParty> {

/** The Constant CAPTION_SEPARATOR. */
private static final String CAPTION_SEPARATOR = "::";

/** The Constant NAME. */
public static final String NAME = UserViews.PARTY_VIEW_NAME;

/** The Constant PARTY. */
private static final String PARTY = "Party:";

/** The party menu item factory. */
@Autowired
private PartyMenuItemFactory partyMenuItemFactory;
Expand Down Expand Up @@ -76,12 +70,8 @@ protected final PartyMenuItemFactory getPartyMenuItemFactory() {
* the panel
* @param pageId
* the page id
* @param viewRiksdagenParty
* the view riksdagen party
*/
protected final void pageCompleted(final String parameters, final Component panel, final String pageId,
final ViewRiksdagenParty viewRiksdagenParty) {
panel.setCaption(new StringBuilder().append(NAME).append(CAPTION_SEPARATOR).append(PARTY).append(viewRiksdagenParty.getPartyName()).toString());
protected final void pageCompleted(final String parameters, final Component panel, final String pageId) {

getPageActionEventHelper().createPageEvent(ViewAction.VISIT_PARTY_VIEW, ApplicationEventGroup.USER, NAME, parameters,
pageId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.PartyCoalationChartDataManager;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
Expand All @@ -37,8 +36,6 @@
@Component
public final class PartyCoalitionsAgainstAnnualSummaryChartPageModContentFactoryImpl extends AbstractPartyPageModContentFactoryImpl {

/** The Constant TITLE. */
private static final String TITLE = PartyPageMode.PARTYAGAINSTCOALATIONSSUMMARY.toString();

@Autowired
private PartyCoalationChartDataManager chartDataManager;
Expand All @@ -61,10 +58,11 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

LabelFactory.createHeader2Label(panelContent, TITLE);
createPageHeader(panel, panelContent, "Party Coalitions Against " + viewRiksdagenParty.getPartyName(), "Party Coalitions", "Review the summary of party coalitions against the selected party.");

chartDataManager.createPartyChart(panelContent,pageId);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeBallotDecisionPartySummary_;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -60,9 +59,6 @@ public final class PartyCommitteeBallotDecisionSummaryPageModContentFactoryImpl
/** The Constant COMMITTEE_BALLOT_DECISION_PARTY_SUMMARY. */
private static final String COMMITTEE_BALLOT_DECISION_PARTY_SUMMARY = "Committee Ballot Decision Party Summary";

/** The Constant COMMITTEE_BALLOT_DECISION_SUMMARY. */
private static final String COMMITTEE_BALLOT_DECISION_SUMMARY = "CommitteeBallotDecisionSummary";

private static final String[] HIDE_COLUMNS = { "embeddedId", BALLOT_ID, "decisionType", "ballotType",
"againstProposalNumber", "embeddedId.id", "embeddedId.party", "createdDate", "publicDate", "label",
"endNumber", "org", "partyPercentageYes", "partyPercentageNo", "partyPercentageAbsent",
Expand Down Expand Up @@ -94,7 +90,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Committee Ballot Decision Summary", "Ballot Decisions", "Review the summary of committee ballot decisions for the selected party.");
createPageHeader(panel, panelContent, "Committee Ballot Decision Summary " + viewRiksdagenParty.getPartyName(), "Ballot Decisions", "Review the summary of committee ballot decisions for the selected party.");

final DataContainer<ViewRiksdagenCommitteeBallotDecisionPartySummary, ViewRiksdagenCommitteeBallotDecisionPartyEmbeddedId> committeeBallotDecisionPartyDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenCommitteeBallotDecisionPartySummary.class);
Expand All @@ -111,7 +107,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
COMMITTEE_BALLOT_DECISION_PARTY_SUMMARY, NESTED_PROPERTIES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER,
BALLOT_ID, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);

return panelContent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommitteeRoleMember_;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -65,7 +64,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina

getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Committee Roles", "Committee Members", "Explore the roles and members of various committees within the party.");
createPageHeader(panel, panelContent, "Committee Roles " +viewRiksdagenParty.getPartyName(), "Committee Members", "Explore the roles and members of various committees within the party.");

final DataContainer<ViewRiksdagenCommitteeRoleMember, String> committeeRoleMemberDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenCommitteeRoleMember.class);
Expand All @@ -76,7 +75,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
ViewRiksdagenCommitteeRoleMember_.party, ViewRiksdagenCommitteeRoleMember_.active),
COMMITTEE_ROLES, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartyRoleMember;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenPartyRoleMember_;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -64,7 +63,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Current Leaders", "Party Leadership", "Meet the current leaders of the party and their roles.");
createPageHeader(panel, panelContent, "Current Leaders " + viewRiksdagenParty.getPartyName(), "Party Leadership", "Meet the current leaders of the party and their roles.");

final DataContainer<ViewRiksdagenPartyRoleMember, String> partyRoleMemberDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenPartyRoleMember.class);
Expand All @@ -75,7 +74,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
ViewRiksdagenPartyRoleMember_.party, ViewRiksdagenPartyRoleMember_.active),
CURRENT_LEADERS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician;
import com.hack23.cia.model.internal.application.data.politician.impl.ViewRiksdagenPolitician_;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -54,8 +53,6 @@ public final class PartyCurrentMembersPageModContentFactoryImpl extends Abstract
"currentPartyAssignments", "currentMinistryAssignments", "currentCommitteeAssignments",
"currentSpeakerAssignments", "gender" };

/** The Constant CURRENT_MEMBERS. */
private static final String CURRENT_MEMBERS = "Current Members";
private static final String[] HIDE_COLUMNS = { "personId", "active", "activeEu", "party",
"activeGovernment", "activeCommittee", "activeParliament", "activeParty", "activeSpeaker", "bornYear" };
private static final PageItemPropertyClickListener LISTENER = new PageItemPropertyClickListener(
Expand All @@ -78,7 +75,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Current Members", "Party Members", "Discover the current members of the party and their roles.");
createPageHeader(panel, panelContent, "Current Members " +viewRiksdagenParty.getPartyName(), "Party Members", "Discover the current members of the party and their roles.");

final DataContainer<ViewRiksdagenPolitician, String> politicianDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenPolitician.class);
Expand All @@ -89,7 +86,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
ViewRiksdagenPolitician_.active),
POLITICIANS, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.web.impl.ui.application.views.common.chartfactory.api.PartyDocumentChartDataManager;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
Expand All @@ -37,9 +36,6 @@
@Component
public final class PartyDocumentActivityPageModContentFactoryImpl extends AbstractPartyPageModContentFactoryImpl {

/** The Constant DOCUMENT_ACTIVITY. */
private static final String DOCUMENT_ACTIVITY = "Document Activity";

/** The document chart data manager. */
@Autowired
private PartyDocumentChartDataManager documentChartDataManager;
Expand All @@ -61,11 +57,11 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

LabelFactory.createHeader2Label(panelContent, DOCUMENT_ACTIVITY);
createPageHeader(panel, panelContent, "Document Activity " + viewRiksdagenParty.getPartyName(), "Document Activity details", "Review the summary of document activity for the selected party.");

documentChartDataManager.createDocumentHistoryPartyChart(panelContent, pageId);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.hack23.cia.model.internal.application.data.document.impl.ViewRiksdagenPoliticianDocument_;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand All @@ -43,8 +42,6 @@ public final class PartyDocumentHistoryPageModContentFactoryImpl extends Abstrac
private static final String[] COLUMN_ORDER = { "rm", "madePublicDate", "title", "subTitle", "id",
"docId", "referenceName", "partyShortCode", "personReferenceId", "roleDescription", "documentType",
"subType", "org", "label", "numberValue", "status", "tempLabel", "orderNumber" };
/** The Constant DOCUMENT_HISTORY. */
private static final String DOCUMENT_HISTORY = "Document History";
private static final String[] HIDE_COLUMNS = { "id", "partyShortCode", "personReferenceId",
"numberValue", "orderNumber", "tempLabel", "label", "docId", "roleDescription" };
private static final PageItemPropertyClickListener LISTENER = new PageItemPropertyClickListener(
Expand All @@ -67,7 +64,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Document History", "Historical Documents", "Explore the historical documents associated with the party.");
createPageHeader(panel, panelContent, "Document History " + viewRiksdagenParty.getPartyName(), "Historical Documents", "Explore the historical documents associated with the party.");

final DataContainer<ViewRiksdagenPoliticianDocument, String> politicianDocumentDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenPoliticianDocument.class);
Expand All @@ -78,7 +75,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
ViewRiksdagenPoliticianDocument_.madePublicDate),
MEMBER_DOCUMENT_HISTORY, COLUMN_ORDER, HIDE_COLUMNS, LISTENER, null, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.hack23.cia.model.internal.application.data.ministry.impl.ViewRiksdagenGovermentRoleMember_;
import com.hack23.cia.model.internal.application.data.party.impl.ViewRiksdagenParty;
import com.hack23.cia.service.api.DataContainer;
import com.hack23.cia.web.impl.ui.application.views.common.labelfactory.LabelFactory;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.PartyPageMode;
import com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews;
import com.hack23.cia.web.impl.ui.application.views.pageclicklistener.PageItemPropertyClickListener;
Expand Down Expand Up @@ -64,7 +63,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
final ViewRiksdagenParty viewRiksdagenParty = getItem(parameters);
getPartyMenuItemFactory().createPartyMenuBar(menuBar, pageId);

createPageHeader(panel, panelContent, "Government Roles", "Government Members", "Explore the roles and members of the government within the party.");
createPageHeader(panel, panelContent, "Government Roles " + viewRiksdagenParty.getPartyName(), "Government Members", "Explore the roles and members of the government within the party.");

final DataContainer<ViewRiksdagenGovermentRoleMember, String> govermentRoleMemberDataContainer = getApplicationManager()
.getDataContainer(ViewRiksdagenGovermentRoleMember.class);
Expand All @@ -76,7 +75,7 @@ public Layout createContent(final String parameters, final MenuBar menuBar, fina
GOVERNMENT_ROLES, COLUMN_ORDER, HIDE_COLUMNS,
new PageItemPropertyClickListener(UserViews.POLITICIAN_VIEW_NAME, PERSON_ID), null, null);

pageCompleted(parameters, panel, pageId, viewRiksdagenParty);
pageCompleted(parameters, panel, pageId);
return panelContent;

}
Expand Down
Loading

0 comments on commit 9744d9b

Please sign in to comment.