Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeY0846 committed Oct 12, 2024
1 parent 15c9445 commit a355828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,14 @@ describe('QuestionSubmissionFormComponent', () => {
expect(component.filterRecipientsBySearchText('', recipients)).toStrictEqual(recipients);
expect(component.filterRecipientsBySearchText(' ', recipients)).toStrictEqual(recipients);
expect(component.filterRecipientsBySearchText('Lucy', recipients)).toStrictEqual([doubleLucy, lucy]);
expect(component.filterRecipientsBySearchText('s', recipients)).toStrictEqual([sally, snoopy, linus, benny, charlieDavis, francis]);
expect(component.filterRecipientsBySearchText('s', recipients))
.toStrictEqual([sally, snoopy, linus, benny, charlieDavis, francis]);
expect(component.filterRecipientsBySearchText('Brow', recipients)).toStrictEqual([charlie, sally]);
expect(component.filterRecipientsBySearchText('van pel', recipients)).toStrictEqual([lucy, linus]);
expect(component.filterRecipientsBySearchText('van Pelt', recipients)).toStrictEqual([lucy, linus]);
expect(component.filterRecipientsBySearchText('cy', recipients)).toStrictEqual([doubleLucy, lucy]);
expect(component.filterRecipientsBySearchText('char', recipients)).toStrictEqual([charlie, benny, charlieDavis]);
expect(component.filterRecipientsBySearchText('char', recipients))
.toStrictEqual([charlie, benny, charlieDavis]);
expect(component.filterRecipientsBySearchText('is', recipients)).toStrictEqual([charlieDavis, francis]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ export class QuestionSubmissionFormComponent implements DoCheck {
if (searchName.includes(' ')) {
return recipients.filter((s) => s.recipientName.toLowerCase().includes(searchName));
}

return recipients.filter((r) => r.recipientName.split(' ').some((s) => s.toLowerCase().includes(searchName)));
}

Expand Down Expand Up @@ -380,7 +379,7 @@ export class QuestionSubmissionFormComponent implements DoCheck {
* Triggers the changes of the recipient selection
*/
triggerRecipientIdentifierChange(index: number, data: any): void {
this.searchNameTexts[index] = "";
this.searchNameTexts[index] = '';
this.triggerRecipientSubmissionFormChange(index, 'recipientIdentifier', data);
}

Expand Down

0 comments on commit a355828

Please sign in to comment.