-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ssi credential): added filters #181
feat(ssi credential): added filters #181
Conversation
…-portal-frontend into feature/CPLP-3021/SSICredential
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few findings
|
||
const [getDocumentById] = useFetchNewDocumentByIdMutation() | ||
const [approveCredential] = useApproveCredentialMutation() | ||
const [declineCredential] = useDeclineCredentialMutation() | ||
|
||
const setView = (e: React.MouseEvent<HTMLInputElement>) => { | ||
const viewValue = e.currentTarget.value | ||
if (viewValue === FilterType.OPEN) setFilterValueAPI('PENDING') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create an enum for PENDING, ACTIVE and INACTIVE
} from 'features/certification/certificationApiSlice' | ||
import { download } from 'utils/downloadUtils' | ||
import { useFetchNewDocumentByIdMutation } from 'features/appManagement/apiSlice' | ||
import { error, success } from 'services/NotifyService' | ||
import { uniqueId } from 'lodash' | ||
import { SubscriptionStatus } from 'features/apps/apiSlice' | ||
import { setSearchInput } from 'features/appManagement/actions' | ||
import { useDispatch } from 'react-redux' | ||
|
||
export interface DummyData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use appropriate name
expr: searchExpr, | ||
}) | ||
} | ||
// eslint-disable-next-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any clarification for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls notice comments from other reviewers
}, [filterStatus, searchExpr]) | ||
|
||
const onValidate = (expr: string) => { | ||
const validateExpr = /^[ A-Za-z0-9]*$/.test(expr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never use a *
or +
in a regex because that means it can have unlimited length which is almost never what we want. Use meaningful lower and upper limits instead. For example if the text must have at least 1 but not more than 2000 characters: {1,2000}
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Added filters in SSI Credential
Why
User Friendly
Issue
n/a
Checklist
Please delete options that are not relevant.