From 186490d17c07cc83bed87ae2f6f3af728705547d Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Fri, 13 Dec 2024 09:02:54 -0700 Subject: [PATCH 1/2] dont show participants with null site ids --- src/api/services/participantsService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/services/participantsService.ts b/src/api/services/participantsService.ts index 999b3db1..f086dd27 100644 --- a/src/api/services/participantsService.ts +++ b/src/api/services/participantsService.ts @@ -76,7 +76,9 @@ export const getAttachedSiteIDs = async (): Promise => { }; export const getAllParticipants = async (): Promise => { - return Participant.query().withGraphFetched('[apiRoles, approver, types, users]'); + return Participant.query() + .whereNotNull('siteId') + .withGraphFetched('[apiRoles, approver, types, users]'); }; export const getParticipantsBySiteIds = async (siteIds: number[]) => { From ee889ea13692c23bef80c79f0450de99bc09853b Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Fri, 13 Dec 2024 09:20:10 -0700 Subject: [PATCH 2/2] date approved change --- src/api/services/participantsService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/services/participantsService.ts b/src/api/services/participantsService.ts index f086dd27..b5fd19b3 100644 --- a/src/api/services/participantsService.ts +++ b/src/api/services/participantsService.ts @@ -77,7 +77,7 @@ export const getAttachedSiteIDs = async (): Promise => { export const getAllParticipants = async (): Promise => { return Participant.query() - .whereNotNull('siteId') + .whereNotNull('dateApproved') .withGraphFetched('[apiRoles, approver, types, users]'); };