Skip to content
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

Conversation

nidhigarg-bmw
Copy link
Contributor

Description

Added filters in SSI Credential

Why

User Friendly

Issue

n/a

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@nidhigarg-bmw nidhigarg-bmw changed the base branch from dev to release/v1.6.0-RC5 August 1, 2023 13:35
Copy link
Contributor

@manojava-gk manojava-gk left a 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')
Copy link
Contributor

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 {
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any clarification for this?

Copy link
Contributor

@oyo oyo left a 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)
Copy link
Contributor

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}

@sonarcloud
Copy link

sonarcloud bot commented Aug 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@oyo oyo merged commit ee5b9d2 into eclipse-tractusx:release/v1.6.0-RC5 Aug 4, 2023
5 checks passed
@oyo oyo deleted the feature/CPLP-3021/SSICredential branch August 4, 2023 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants