Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Look up correct MPs #9

Open
vteague opened this issue Sep 27, 2021 · 0 comments
Open

Look up correct MPs #9

vteague opened this issue Sep 27, 2021 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@vteague
Copy link
Member

vteague commented Sep 27, 2021

At the moment, even after choosing (random) electorates, it displays a hardcoded list of 'My MPs'.

  1. Delete the 'TestCurrentMPs' element from ReadingContext.cs: https://github.com/RightToAskOrg/righttoask-ui-mockup/blob/main/PassingData/ReadingContext.cs
  2. In IndividualParticipant.cs,
    https://github.com/RightToAskOrg/righttoask-ui-mockup/blob/main/PassingData/Models/IndividualParticipant.cs, add the corresponding MPs to the list MyMPs whenever something about the participant's electorates is updated - you'll see TODOs in the IndividualParticipant.cs file. This can be done by searching
    BackgroundElectorateAndMPData.AllMPs for those in which the chamber and electorate both match.

For example, if an IndividualParticipant's Vic Legislative Council electorate is updated to "Northern Metropolitan", we'll search through AllMPs for those matching both
ChamberSeatedIn = Vic_Legislative_Council
and
ElectorateRepresenting = "Northern Metropolitan"

  1. In SecondPage.xaml.cs https://github.com/RightToAskOrg/righttoask-ui-mockup/blob/main/PassingData/SecondPage.xaml.cs, lines 97 and 113, when we launch the page of 'myMPs', use your newly-correct IndividualParticipant.MyMPs list, instead of the Test default now there.

(Note: electorates are chosen randomly at the moment, unless the person specifies them, but that's a separate issue. Also note only Vic has the electorates loaded, so that's the only one that can work atm.)

@vteague vteague added Hacktoberfest help wanted Extra attention is needed labels Sep 27, 2021
vteague added a commit that referenced this issue Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant