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
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
VotesModalmethod has several lines likeThe 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
VotesModelincomponents/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