Skip to content

Commit

Permalink
fix(ssi credntial): fix filters
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw committed Aug 8, 2023
1 parent eede97c commit f9dbfc7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/pages/AdminCredential/AdminCredentialElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,21 @@ export default function AdminCredentialElements() {
const viewValue = e.currentTarget.value
if (viewValue === FilterType.OPEN)
setFilterValueAPI(SubscriptionStatus.PENDING)
if (viewValue === FilterType.CONFIRMED)
else if (viewValue === FilterType.CONFIRMED)
setFilterValueAPI(SubscriptionStatus.ACTIVE)
if (viewValue === FilterType.DECLINED)
else if (viewValue === FilterType.DECLINED)
setFilterValueAPI(SubscriptionStatus.INACTIVE)
else setFilterValueAPI('')
setFilterStatus(viewValue)
setGroup(viewValue)
setRefresh(Date.now())
}

useEffect(() => {
if (onValidate(searchExpr)) {
setFetchHookArgs({
filterType: filterValueAPI,
expr: searchExpr,
})
}
setFetchHookArgs({
filterType: filterValueAPI,
expr: searchExpr,
})
}, [filterStatus, searchExpr])

const onValidate = (expr: string) => {
Expand Down

0 comments on commit f9dbfc7

Please sign in to comment.