Skip to content

Commit

Permalink
Correct filters
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksftc committed Oct 30, 2024
1 parent daabe81 commit 4d5af62
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apps/frontend/src/components/xpress/XpressProposalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,12 @@ const XpressProposalTable = () => {
const {
callId,
instrumentFilter,
techniqueFilter,
proposalStatusId,
questionaryIds,
text,
questionFilter,
referenceNumbers,
dateFilter,
excludeProposalStatusIds,
} = proposalFilter;

const result: {
Expand All @@ -345,15 +346,15 @@ const XpressProposalTable = () => {
filter: {
callId: callId,
instrumentFilter: instrumentFilter,
techniqueFilter: techniqueFilter,
proposalStatusId: proposalStatusId,
questionaryIds: questionaryIds,
referenceNumbers: referenceNumbers,
questionFilter: questionFilter && {
...questionFilter,
value:
JSON.stringify({ value: questionFilter?.value }) ?? undefined,
}, // We wrap the value in JSON formatted string, because GraphQL can not handle UnionType input
text: text,
referenceNumbers: referenceNumbers,
dateFilter: dateFilter,
...(currentRole === UserRole.INSTRUMENT_SCIENTIST ||
currentRole === UserRole.INTERNAL_REVIEWER
? { excludeProposalStatusIds: excludeProposalStatusIds }
: {}),
},
searchText: searchParams.get('search'),
})
Expand Down

0 comments on commit 4d5af62

Please sign in to comment.