-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* --Added Ims Org ID in the credential card * --Added test case for the Ims Org ID & Removed Duplicate file
- Loading branch information
1 parent
8dcbc9e
commit 46c3b8b
Showing
9 changed files
with
99 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 64 additions & 14 deletions
78
packages/gatsby-theme-aio/src/components/GetCredential/Card/CardClientDetails.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,79 @@ | ||
import React from 'react' | ||
import React, { useContext } from 'react'; | ||
import { css } from "@emotion/react"; | ||
import { CardAPIKey } from './CardAPIKey'; | ||
import { CardClientId } from './CardClientId'; | ||
import { CardAllowedOrigins } from './CardAllowedOrigins'; | ||
import { CardClientSecret } from './CardClientSecret'; | ||
import { CardOrganizationName } from './CardOrganizationName'; | ||
import { CardScopes } from './CardScopes'; | ||
import { CardImsOrgID } from './CardImsOrgID'; | ||
import GetCredentialContext from '../GetCredentialContext'; | ||
|
||
const CardClientDetails = ({ clientDetails, clientIdDetails, clientSecretDetails, organizationDetails, scopesDetails, apiKeyDetails, allowedOriginsDetails, organizationName, allowedOrigins, response }) => { | ||
const CardClientDetails = ({ | ||
clientDetails, | ||
clientIdDetails, | ||
clientSecretDetails, | ||
organizationDetails, | ||
scopesDetails, | ||
apiKeyDetails, | ||
allowedOriginsDetails, | ||
organizationName, | ||
allowedOrigins, | ||
response, | ||
imsOrgID, | ||
}) => { | ||
|
||
const { selectedOrganization } = useContext(GetCredentialContext); | ||
|
||
return ( | ||
<div css={css` | ||
display : flex; | ||
flex-direction : column; | ||
gap: 32px; | ||
`}> | ||
<div | ||
css={css` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
`}> | ||
<h4 className="spectrum-Heading spectrum-Heading--sizeS">{clientDetails?.heading}</h4> | ||
{apiKeyDetails && <CardAPIKey cardClientDetails={clientDetails} cardAPIKey={apiKeyDetails} apiKey={response?.['apiKey']} />} | ||
{clientIdDetails && <CardClientId cardClientDetails={clientDetails} cardClientId={clientIdDetails} clientId={response?.['apiKey']} />} | ||
{allowedOrigins && <CardAllowedOrigins cardClientDetails={clientDetails} cardAllowedOrigins={allowedOrigins} allowedOrigins={allowedOriginsDetails} />} | ||
{clientSecretDetails && <CardClientSecret cardClientDetails={clientDetails} cardClientSecret={clientSecretDetails} response={response} />} | ||
{organizationDetails && <CardOrganizationName cardClientDetails={clientDetails} cardOrganizationName={organizationDetails} organization={organizationName?.name} />} | ||
{apiKeyDetails && ( | ||
<CardAPIKey | ||
cardClientDetails={clientDetails} | ||
cardAPIKey={apiKeyDetails} | ||
apiKey={response?.['apiKey']} | ||
/> | ||
)} | ||
{clientIdDetails && ( | ||
<CardClientId | ||
cardClientDetails={clientDetails} | ||
cardClientId={clientIdDetails} | ||
clientId={response?.['apiKey']} | ||
/> | ||
)} | ||
{allowedOrigins && ( | ||
<CardAllowedOrigins | ||
cardClientDetails={clientDetails} | ||
cardAllowedOrigins={allowedOrigins} | ||
allowedOrigins={allowedOriginsDetails} | ||
/> | ||
)} | ||
{clientSecretDetails && ( | ||
<CardClientSecret | ||
cardClientDetails={clientDetails} | ||
cardClientSecret={clientSecretDetails} | ||
response={response} | ||
/> | ||
)} | ||
{organizationDetails && ( | ||
<CardOrganizationName | ||
cardClientDetails={clientDetails} | ||
cardOrganizationName={organizationDetails} | ||
organization={organizationName?.name} | ||
/> | ||
)} | ||
{scopesDetails && <CardScopes cardClientDetails={clientDetails} cardScopes={scopesDetails} />} | ||
{imsOrgID && ( | ||
<CardImsOrgID cardClientDetails={clientDetails} cardImsOrgID={imsOrgID} imsOrgId={selectedOrganization?.code} /> | ||
)} | ||
</div> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export { CardClientDetails }; |
8 changes: 8 additions & 0 deletions
8
packages/gatsby-theme-aio/src/components/GetCredential/Card/CardImsOrgID.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import ShowCard from './ShowCard'; | ||
|
||
const CardImsOrgID = ({ cardImsOrgID, imsOrgId }) => { | ||
return <ShowCard heading={cardImsOrgID?.heading} value={imsOrgId} />; | ||
}; | ||
|
||
export { CardImsOrgID }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters