@@ -76,9 +76,11 @@ export default {
7676 Vue .set (this .pageData , key, value); 
7777 } 
7878 } 
79-  const  items  =  result .items .filter (i  =>  i .disqualified  ===  null ).sort ((a , b ) =>  { 
80-  return  a .numVotes  <  b .numVotes  ?  1  :  - 1 ; 
81-  }); 
79+  const  items  =  result .items  
80+  .filter (i  =>  i .disqualified  ===  null ) 
81+  .sort ((a , b ) =>  { 
82+  return  a .numVotes  <  b .numVotes  ?  1  :  - 1 ; 
83+  }); 
8284 this .$emit (" input" items .length ); 
8385 items .splice (3 , items .length  -  3 ); 
8486 Vue .set (this .pageData , " items"  
@@ -89,6 +91,38 @@ export default {
8991 async  loadPage () { 
9092 this .requestCount ++ ; 
9193
94+  //  for testing 
95+  if  (this .$route .path  ===  " /testing/vote"  
96+  Vue .set (this .pageData , " items"  
97+  { 
98+  display:  " TedW"  
99+  firstName:  " Ted"  
100+  id:  12345 , 
101+  lastName:  " Smith"  
102+  numVotes:  48 , 
103+  text:  " Not sure what goes here?"  
104+  username:  " Ted456"  
105+  value:  " This must be where the code goes."  
106+  initials:  " TW"  
107+  }, 
108+  { 
109+  display:  " something"  
110+  firstName:  " Blahblahblah"  
111+  id:  123453 , 
112+  lastName:  " Smith"  
113+  numVotes:  45 , 
114+  text:  " Not sure what goes here?"  
115+  username:  " MyUserName"  
116+  value:  " Code stuff"  
117+  initials:  " TW"  
118+  } 
119+  ]); 
120+ 
121+  this .requestCount -- ; 
122+  return ; 
123+  } 
124+  //  end for testing 
125+ 
92126 const  results  =  await  voting .getBallot (this .pageData .page , this .per ); 
93127 await  this .setResult (results); 
94128
0 commit comments