Skip to content

Commit

Permalink
fix filter
Browse files Browse the repository at this point in the history
  • Loading branch information
unakb committed May 10, 2024
1 parent 812d7c5 commit 13600f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ const getProsecutionUserCasesQueryFilter = (user: User): WhereOptions => {
[Op.or]: [
{ prosecutors_office_id: user.institution?.id },
{ shared_with_prosecutors_office_id: user.institution?.id },
[
{ indictment_reviewer_id: user.id },
{ indictment_review_decision: null },
],
{
[Op.and]: [
{ indictment_reviewer_id: user.id },
{ indictment_review_decision: null },
],
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ describe('getCasesQueryFilter', () => {
[Op.or]: [
{ prosecutors_office_id: 'Prosecutors Office Id' },
{ shared_with_prosecutors_office_id: 'Prosecutors Office Id' },
[
{ indictment_reviewer_id: 'Prosecutor Id' },
{ indictment_review_decision: null },
],
{
[Op.and]: [
{ indictment_reviewer_id: 'Prosecutor Id' },
{ indictment_review_decision: null },
],
},
],
},
{
Expand Down Expand Up @@ -121,10 +123,12 @@ describe('getCasesQueryFilter', () => {
[Op.or]: [
{ prosecutors_office_id: 'Prosecutors Office Id' },
{ shared_with_prosecutors_office_id: 'Prosecutors Office Id' },
[
{ indictment_reviewer_id: 'Prosecutor Id' },
{ indictment_review_decision: null },
],
{
[Op.and]: [
{ indictment_reviewer_id: 'Prosecutor Id' },
{ indictment_review_decision: null },
],
},
],
},
{
Expand Down

0 comments on commit 13600f5

Please sign in to comment.