Skip to content

Commit

Permalink
filter out the team created surveys from the send surveys list
Browse files Browse the repository at this point in the history
  • Loading branch information
Mutugiii committed Feb 5, 2025
1 parent 6a1e591 commit 5d7221e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/surveys/surveys.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ export class SurveysComponent implements OnInit, AfterViewInit, OnDestroy {
this.submissionsService.getSubmissions(
findDocuments({ type: 'survey', 'parent._rev': survey._rev, 'parent._id': survey._id })
).subscribe((submissions: any[]) => {
const excludeIds = submissions.map((submission: any) => submission.user.membershipDoc?.teamId);
const submissionIds = submissions.map((submission: any) => submission.user.membershipDoc?.teamId);
const excludeIds = survey.teamId ? [ ...submissionIds, survey.teamId ] : submissionIds;
this.dialogRef = this.dialog.open(DialogsAddTableComponent, {
width: '80vw',
data: {
Expand Down

0 comments on commit 5d7221e

Please sign in to comment.