@@ -124,10 +124,11 @@ async function refreshInviteList(collector) {
124124
125125 // get all invites
126126 const invites = await collector . getInvites ( ) ; // Todo add a "filter by" maybe only list "Pending" invites
127- const pendingInvites = invites . filter ( i => i . status === 'Pending' ) ;
127+ console . log ( '## refreshInviteList invites ' , invites ) ;
128+ const pendingInvites = invites . filter ( i => i . status === 'pending' ) ;
128129 pendingInvites . sort ( ( a , b ) => b . dateCreation - a . dateCreation ) ; // sort by creation date reverse
129130
130- console . log ( '## refreshInviteList current ' , pendingInvites ) ;
131+ console . log ( '## refreshInviteList pending ' , pendingInvites ) ;
131132
132133 for ( const invite of pendingInvites ) {
133134 const row = table . insertRow ( - 1 ) ;
@@ -179,11 +180,11 @@ async function setPatientList(collector) {
179180
180181 // get all invites
181182 const invites = await collector . getInvites ( ) ;
182- const pendingInvites = invites . filter ( i => i . status !== 'Pending ') ;
183- pendingInvites . sort ( ( a , b ) => b . dateCreation - a . dateCreation ) ; // sort by creation date reverse
183+ const activeInvites = invites . filter ( i => i . status === 'active ') ;
184+ activeInvites . sort ( ( a , b ) => b . dateCreation - a . dateCreation ) ; // sort by creation date reverse
184185
185186 // fetch patient data
186- const patientPromises = invites . map ( ( invite ) =>
187+ const patientPromises = activeInvites . map ( ( invite ) =>
187188 drLib . getPatientDetails ( invite , itemDefs )
188189 ) ;
189190 const patientsResults = await Promise . all ( patientPromises ) ;
0 commit comments