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

release(1.6.0-RC6): merge release into main #211

Merged
merged 37 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
db0d0c7
feat(card responsive): made card responsive in usermanagemtn (#171)
nidhigarg-bmw Jul 26, 2023
fdf184c
bugfix(config): change app management page role (#169)
manojava-gk Jul 26, 2023
f1075ce
feat(ssi credential): add status for pending state only (#168)
nidhigarg-bmw Jul 26, 2023
a455745
updates(connector): update content and help link (#162)
manojava-gk Jul 26, 2023
c00dd12
"chore(version): increase shated component version" (#173)
nidhigarg-bmw Jul 31, 2023
3d1040f
update(content): overlay (#174)
manojava-gk Jul 31, 2023
4658e8a
release: bump version for v1.6.0-RC4 (#176)
Phil91 Jul 31, 2023
cb5620a
bugfix(admin credentials): added roles for admin credential (#177)
nidhigarg-bmw Jul 31, 2023
d544827
release: update changelog for v1.6.0-RC4
Phil91 Jul 31, 2023
f876ecc
fix(admin credential): role change (#180)
nidhigarg-bmw Aug 3, 2023
666a0d6
fix(certificate): error message (#172)
nidhigarg-bmw Aug 3, 2023
14edcde
updates(notification): add credential approval, credential reject and…
manojava-gk Aug 3, 2023
ce4aa7d
fix(description): fixed page break issue when api response don't have…
lavanya-bmw Aug 3, 2023
f901264
update(app and service release): updated color for asterik (#185)
lavanya-bmw Aug 3, 2023
8b741a3
bugfix(notification): fix go to use case link issue (#186)
manojava-gk Aug 3, 2023
1070a8d
feat(technical integration): ui enhancement (#189)
nidhigarg-bmw Aug 3, 2023
4bbcea9
update(style): updated UI (#161)
lavanya-bmw Aug 4, 2023
ee5b9d2
feat(ssi credential): added filters (#181)
nidhigarg-bmw Aug 4, 2023
999760a
bugfix(connectors): do not allow confirm without customer link (#187)
manojava-gk Aug 4, 2023
8299bee
fix(app activation): overlay fix (#191)
nidhigarg-bmw Aug 4, 2023
2b0204e
feat(technical integration): remove unused code (#190)
nidhigarg-bmw Aug 4, 2023
18447d9
fix(app marketplace): transaltion and image loading fix (#192)
nidhigarg-bmw Aug 4, 2023
c07e39d
feat(technical user): add hyphen if no description (#193)
nidhigarg-bmw Aug 7, 2023
7187394
fix(app release process): fixed console errors (#194)
lavanya-bmw Aug 7, 2023
eede97c
release: update changelog for v1.6.0-RC5 (#195)
Phil91 Aug 7, 2023
cef72f7
fix(card): card clickable bug (#199)
nidhigarg-bmw Aug 9, 2023
bbc465c
fix(ssi credntial): fix filters (#200)
nidhigarg-bmw Aug 9, 2023
c992cba
bugfix(service card): do not allow to erase (#201)
manojava-gk Aug 9, 2023
53dc7f5
feat(service account): add lang support in api call (#202)
nidhigarg-bmw Aug 9, 2023
2471836
fix(service detail): ui fixe (#204)
nidhigarg-bmw Aug 9, 2023
37d9a80
fix(sonar bugs): fix sonar bugs (#205)
nidhigarg-bmw Aug 10, 2023
cf6fbb1
bugfix(deps): fix dependabot findings (#207)
oyo Aug 10, 2023
9f6de9b
chore: change locale files (#206)
jjeroch Aug 11, 2023
4ef467a
release(1.6.0-RC6): update changelog
evegufy Aug 11, 2023
1c87686
release(1.6.0-RC6): bump version
evegufy Aug 11, 2023
505dfd8
Merge branch 'release/v1.6.0-RC6' into merge-v1.6.0-RC6-in-main
evegufy Aug 11, 2023
241aea3
chore: update dependencies file
evegufy Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"react/display-name": 0,
"react/jsx-key": 0,
"react/no-children-prop": 0,
"react/no-deprecated": 0,
"react/no-unescaped-entities": 0,
"spaced-comment": 0
}
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 1.6.0-RC6

### Change

- Service Account creation - added multiLangugae support when fetching the role description from BE

### Technical Support

- Sonar findings fixed (Code smells and bugs)
- Dependabot findings fixed (Upgrading dependencies to the latest versions)

### Bugfix

- Application card favorite button click (separation from the rest of the card where the click results into opening the app card)
- Admin Credential Board - views/filter function fixed
- Service Release Form - fixed erase of entered data on deleting uploaded image
- Service Detail - header UI fix of rendering issues

## 1.6.0-RC5

### Change
Expand Down
11 changes: 5 additions & 6 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ npm/npmjs/-/eslint-config-prettier/8.8.0, MIT, approved, #7543
npm/npmjs/-/eslint-config-react-app/7.0.1, MIT, approved, clearlydefined
npm/npmjs/-/eslint-config-standard-with-typescript/35.0.0, MIT, approved, #9133
npm/npmjs/-/eslint-config-standard/17.0.0, MIT, approved, clearlydefined
npm/npmjs/-/eslint-import-resolver-node/0.3.7, MIT, approved, clearlydefined
npm/npmjs/-/eslint-import-resolver-node/0.3.7, MIT, approved, #9923
npm/npmjs/-/eslint-module-utils/2.8.0, MIT, approved, #8209
npm/npmjs/-/eslint-plugin-es/4.1.0, MIT, approved, #5026
npm/npmjs/-/eslint-plugin-flowtype/8.0.3, BSD-3-Clause, approved, #2958
Expand All @@ -257,7 +257,7 @@ npm/npmjs/-/eslint-plugin-react-hooks/4.6.0, MIT, approved, clearlydefined
npm/npmjs/-/eslint-plugin-react/7.32.2, MIT, approved, #7035
npm/npmjs/-/eslint-plugin-testing-library/5.11.0, MIT, approved, clearlydefined
npm/npmjs/-/eslint-scope/5.1.1, BSD-2-Clause, approved, clearlydefined
npm/npmjs/-/eslint-scope/7.2.0, BSD-2-Clause, approved, clearlydefined
npm/npmjs/-/eslint-scope/7.2.0, BSD-2-Clause, approved, #9916
npm/npmjs/-/eslint-utils/2.1.0, MIT, approved, #2498
npm/npmjs/-/eslint-utils/3.0.0, MIT, approved, #2431
npm/npmjs/-/eslint-visitor-keys/1.3.0, Apache-2.0, approved, #2501
Expand Down Expand Up @@ -576,7 +576,6 @@ npm/npmjs/-/normalize-path/3.0.0, MIT, approved, clearlydefined
npm/npmjs/-/normalize-range/0.1.2, MIT, approved, clearlydefined
npm/npmjs/-/normalize-url/6.1.0, MIT, approved, clearlydefined
npm/npmjs/-/npm-run-path/4.0.1, MIT, approved, clearlydefined
npm/npmjs/-/nth-check/1.0.2, BSD-2-Clause, approved, CQ22629
npm/npmjs/-/nth-check/2.1.1, BSD-2-Clause, approved, clearlydefined
npm/npmjs/-/nwsapi/2.2.5, MIT, approved, #7909
npm/npmjs/-/object-assign/4.1.1, MIT, approved, clearlydefined
Expand Down Expand Up @@ -1115,7 +1114,7 @@ npm/npmjs/@babel/plugin-transform-unicode-property-regex/7.22.5, MIT AND (BSD-2-
npm/npmjs/@babel/plugin-transform-unicode-regex/7.22.5, MIT, approved, #8929
npm/npmjs/@babel/plugin-transform-unicode-sets-regex/7.22.5, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #8755
npm/npmjs/@babel/preset-env/7.22.5, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #8748
npm/npmjs/@babel/preset-modules/0.1.5, MIT, approved, clearlydefined
npm/npmjs/@babel/preset-modules/0.1.5, MIT, approved, #9932
npm/npmjs/@babel/preset-react/7.22.5, MIT, approved, #8987
npm/npmjs/@babel/preset-typescript/7.22.5, MIT, approved, #9074
npm/npmjs/@babel/regjsgen/0.8.0, MIT, approved, #7149
Expand All @@ -1124,7 +1123,7 @@ npm/npmjs/@babel/template/7.22.5, MIT, approved, #9017
npm/npmjs/@babel/traverse/7.22.5, MIT, approved, #8954
npm/npmjs/@babel/types/7.22.5, MIT, approved, #8967
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/2.0.14, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187
npm/npmjs/@catena-x/portal-shared-components/2.0.18, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187
npm/npmjs/@csstools/normalize.css/12.0.0, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-cascade-layers/1.1.1, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-color-function/1.1.1, CC0-1.0 AND (MIT AND W3C-20150513) AND W3C-20150513 AND MIT, approved, #3022
Expand Down Expand Up @@ -1194,7 +1193,7 @@ npm/npmjs/@jridgewell/set-array/1.1.2, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/source-map/0.3.3, MIT, approved, #9304
npm/npmjs/@jridgewell/sourcemap-codec/1.4.14, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/sourcemap-codec/1.4.15, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/trace-mapping/0.3.18, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/trace-mapping/0.3.18, MIT, approved, #9904
npm/npmjs/@leichtgewicht/ip-codec/2.0.4, MIT, approved, clearlydefined
npm/npmjs/@mui/base/5.0.0-beta.4, MIT, approved, #2992
npm/npmjs/@mui/core-downloads-tracker/5.13.4, MIT, approved, #8983
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-frontend",
"version": "v1.6.0-RC5",
"version": "v1.6.0-RC6",
"description": "Catena-X Portal Frontend",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand All @@ -26,7 +26,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^2.0.14",
"@catena-x/portal-shared-components": "^2.0.18",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/error-message": "^2.0.1",
Expand Down Expand Up @@ -87,13 +87,16 @@
"react-scripts": "5.0.1",
"typescript": "5.0.4"
},
"resolutions": {
"**/nth-check": "^2.1.1"
},
"scripts": {
"prepare": "husky install",
"build:sources": "zip -r portal-frontend.zip src package.json yarn.lock -x '*.stories.*' -x '*.test.*' -x '*.css' -x '*.scss' -x '*.svg' -x '*.jpg' -x '*.png' -x '*.webp' -x '*.ttf'",
"pretty": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,sass,scss,xml,md}\"",
"lint": "yarn run eslint \"./src/**/*.{ts,tsx}\"",
"start": "PORT=3001 BROWSER=none GENERATE_SOURCEMAP=false react-scripts start",
"build": "react-scripts build",
"build": "GENERATE_SOURCEMAP=false react-scripts build",
"test": "react-scripts test",
"test:ci": "CI=true react-scripts test",
"build:docker": "if [ -d \"./build\" ]; then yarn build:docker:prebuilt; else yarn build:docker:full; fi",
Expand Down
14 changes: 7 additions & 7 deletions src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -977,10 +977,10 @@
},
"appPage": {
"headerTitle": "App Details",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .",
"longDescriptionEN": "Long Description - EN",
"longDescriptionDE": "Long Description - DE",
"images": "Images",
"headerDescription": "Füllen Sie die Seite mit den App-Details aus. Auf dem Marktplatz werden die folgenden zusätzlichen Informationen für Kunden öffentlich verfügbar sein, um einen erweiterten Überblick über die von Ihrer Anwendung unterstützten Funktionen sowie notwendige Details zu Sicherheit, Architektur usw. zu erhalten.",
"longDescriptionEN": "Detailierte Beschreibung - EN",
"longDescriptionDE": "Detailierte Beschreibung - DE",
"images": "Bilder",
"note": "Note:",
"maxThreeImages": "Max.3 Images",
"uploadDataPrerequisits": "Upload “Data Prerequisits”",
Expand Down Expand Up @@ -1008,16 +1008,16 @@
},
"technicalIntegration": {
"headerTitle": "Technical Integration",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .",
"headerDescription": "Integrieren Sie Ihre App mit dem catena-x-Datenraum. Für die Integration müssen Sie die von der Anwendung unterstützten Rollen sowie das erforderliche technische Benutzerprofil hochladen, das zum Ausführen Ihrer Anwendung im Netzwerk erforderlich ist. Bitte beachten Sie: In diesem Schritt legen Sie nur den Rahmen der Authentifizierung fest – es werden keine Benutzer erstellt. Wenn Sie Unterstützung benötigen, können Sie gerne die Schaltfläche „Hilfe“ oder die beigefügte Vorlage verwenden.",
"step1Header": "1. User Role Upload",
"step1HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,",
"step1HeaderDescription": "Laden Sie Ihre Anwendungsrollen hoch, die Benutzeridentitäten zugewiesen werden können, um auf die Anwendung zugreifen zu können.",
"clientID": "Client ID",
"URL": "URL",
"pleaseEnterValidURL": "Please enter a valid URL",
"URLPlaceholder": "http://www.loremipsum.de",
"clientCreated": "Client created",
"step2Header": "2. Technical User Setup",
"step2HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,",
"step2HeaderDescription": "Richten Sie das technische Profil eines technischen Benutzer-/Dienstkontos mit den erforderlichen Berechtigungen ein, um die Anwendung im Datenraum ausführen zu können.",
"uploadRolesDescription": "Upload all app roles by using the available upload template (csv) file added attached",
"rolesPreview": "Preview of Roles uploaded",
"uploadAppRolesButton": "Upload App Roles",
Expand Down
12 changes: 6 additions & 6 deletions src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@
},
"appPage": {
"headerTitle": "App Details",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .",
"headerDescription": "Fill out your app details page. On the marketplace the following added information will be public available for customers to get a extended view of your application supported functions as well as necessary details regarding security, architecture, etc.",
"longDescriptionEN": "Long Description (en)",
"longDescriptionDE": "Long Description (de)",
"images": "Images",
Expand All @@ -950,8 +950,8 @@
"uploadAppContract": "Upload “App Contract”",
"providerDetails": "Provider Details",
"providerHomePage": "Provider Homepage",
"providerContactEmail": "Customer Contact E-Mail",
"providerPhoneContact": "Provider Phone Contact",
"providerContactEmail": "Contact (E-Mail)",
"providerPhoneContact": "Contac (Phone Number)",
"providerPhoneContactPlaceholder": "Following formats are supported: +xx (xxx) xxxxxxxxxx; +xx xxxxxxxxxx and +xxxxxxxxxxxx",
"pleaseEnterValidHomePageURL": "Please enter a valid url - eg: https://catena-x.net",
"pleaseEnterValidEmail": "Please enter a valid Customer Contact E-Mail",
Expand All @@ -970,16 +970,16 @@
},
"technicalIntegration": {
"headerTitle": "Technical Integration",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .",
"headerDescription": "Integrate your app with the catena-x dataspace. For the integration you need to upload the application supported roles as well as the necessary technical user profile which is needed to run your application inside the network. Please note: in this step you are only setting the frame of the authentication - no users are going to get created. If you need any support feel free to use the 'Help' button or the attached template.",
"step1Header": "1. User Role Upload",
"step1HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,",
"step1HeaderDescription": "Upload your application roles which can get assigned to user identities to be able to access the application.",
"clientID": "Client ID",
"URL": "URL",
"pleaseEnterValidURL": "Please enter a valid URL",
"URLPlaceholder": "http://www.loremipsum.de",
"clientCreated": "Client created",
"step2Header": "2. Technical User Setup",
"step2HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,",
"step2HeaderDescription": "Setup the technical profile of a technical user/service account of needed permissions to be able to run the application inside the dataspace.",
"uploadRolesDescription": "Upload all app roles by using the available upload template (csv) file added attached",
"rolesPreview": "Preview of Roles uploaded",
"uploadAppRolesButton": "Upload App Roles",
Expand Down
8 changes: 4 additions & 4 deletions src/assets/locales/en/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
},
"technicalIntegration": {
"headerTitle": "Technical Integration",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .",
"technicalUserSetupMandatory": "Please select atleast one technical user setup",
"headerDescription": "Setup the technical profile of a technical user/service account of needed permissions to be able to run the application inside the dataspace. Select minimum one permission, the selected permission(s) will be stored as service technical user profile and used to create technical users for subscription activations.",
"technicalUserSetupMandatory": "Please select at least one technical user permission for the service tech user profile",
"technicalUserProfileError": "Error while updating technical user profiles"
},
"step4": {
"headerTitle": "Validate & Publish",
"headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard ",
"headerDescription": "Below you can find a summary of all your service registration inputs as well as the look of the marketplace service card and detail page. Please check your entered data carefully before sending the service for release. We will validate your service registration shortly after the service submission.",
"appDetails": "Service Details",
"documents": "Documents",
"providerInformation": "Provider Information",
Expand Down Expand Up @@ -104,7 +104,7 @@
"overview": "My services overview"
},
"defaultValues": {
"conformityDocumentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"conformityDocumentsDescription": "To publish your service on the marketplace, a number of Catena-X specific agreements need to get signed by you. Please have a look at the mentioned agreements and agree to them via the checklist approval.",
"documentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
},
"serviceoverview": {
Expand Down
23 changes: 7 additions & 16 deletions src/components/pages/AdminBoardDetail/BoardContentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import {
Expand All @@ -39,20 +38,6 @@ import BoardTechnicalUserSetup from './components/BoardTechnicalUserSetup'
export default function BoardContentDetails({ item }: { item: AppDetails }) {
const { t } = useTranslation()
const navigate = useNavigate()
const [images, setImages] = useState<any>()

useEffect(() => {
if (item) {
const newPromies = CommonService.fetchLeadPictures(item.images, item.id)
Promise.all(newPromies)
.then((result) => {
setImages(result.flat())
})
.catch((err) => {
console.log(err)
})
}
}, [item])

return (
item && (
Expand All @@ -79,7 +64,13 @@ export default function BoardContentDetails({ item }: { item: AppDetails }) {
</div>
))}
</div>
{images && <ImageGallery gallery={images} modalWidth="900" />}
<ImageGallery
gallery={CommonService.imagesAndAppidToImageType(
item.images,
item.id
)}
modalWidth="900"
/>
<div className="divider-height" />
<BoardPrivacy item={item} />
<div className="divider-height" />
Expand Down
19 changes: 8 additions & 11 deletions src/components/pages/AdminCredential/AdminCredentialElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export default function AdminCredentialElements() {
const [refresh, setRefresh] = useState<number>(0)
const [group, setGroup] = useState<string>(FilterType.ALL)
const [searchExpr, setSearchExpr] = useState<string>('')
const [filterStatus, setFilterStatus] = useState<string>()
const [filterValueAPI, setFilterValueAPI] = useState<string>('')
const [fetchHookArgs, setFetchHookArgs] = useState({})

Expand All @@ -69,23 +68,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)
setFilterStatus(viewValue)
else setFilterValueAPI('')
setGroup(viewValue)
setRefresh(Date.now())
}

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

const onValidate = (expr: string) => {
const validateExpr = /^[ A-Za-z0-9]{1,1000}$/.test(expr)
Expand Down
Loading