Skip to content

Votes modal is incomplete #2214

Description

@delexagon

Summary
In the file components/hearing/HearingSidebar.tsx, the vote modal does not take into account all available data when displaying votes.

Work Detail
Currently, the VotesModal method has several lines like

        <div className={`fw-bold`}>
          {committeeActions[0]?.Votes[0]?.Question}
        </div>
        <ModalLine />
        <div className={`fw-bold`}>
          {t("yes", { ns: "hearing" })} (
          {committeeActions[0]?.Votes[0]?.Vote[0]?.Favorable.length})
        </div>

The last two [0].[0] chaining leaves out a lot of information that we should be displaying. Most prominently, the last array represents votes which must be combined together; if this step is not completed, we are not displaying all of the electors for any vote. However, there are also multiple Questions each with their own votes, which should also be included in the modal.

Current State
The votes modal displays a subset of the information we possess properly.

Resources
Relevant file is VotesModel in components/hearing/HearingSidebar.tsx.
An example of a complete data display: https://malegislature.gov/Bills/194/H5279/CommitteeVote
Our Firebase information for this bill: https://console.firebase.google.com/project/digital-testimony-dev/firestore/databases/-default-/data/~2FgeneralCourts~2F194~2Fbills~2FH5279?hl=es-419
The hearing page for this bill is https://maple-dev.vercel.app/hearing/5633

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ready for DevelopmentAutomatically assigned to issues that are ready to be picked upbugSomething isn't workingfrontendFrontend development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions