Skip to content

Commit

Permalink
feat(wallet): create company wallet page (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Jan 26, 2024
1 parent f6a3ebf commit bdd6d3a
Show file tree
Hide file tree
Showing 16 changed files with 956 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
- Others
- action button in multiple overlays got renamed from "Cancel" to "Close" wherever the user can not cancel but close the overlay only
- Introduction Page "Conformity Body" new content defined
- Company Wallet
- Show Active wallet info along with other wallet types
- Mobile version. Hamburger menu
- Show hamburger based on the browser resolution/width

Expand Down
18 changes: 17 additions & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"certificate-credential": "Config - Certificates",
"about": "About",
"dataspace": "Data Space",
"admin-credential": "Certification Mgmt"
"admin-credential": "Certification Mgmt",
"companyWallet": "Company Wallet"
},
"overlays": {
"invite": "Neuen Geschäftspartner einladen",
Expand Down Expand Up @@ -1676,6 +1677,21 @@
},
"noData": "Derzeit bestehen keine Zertifikate für das Unternehmen. Sie können mit dem Hochladen eines Zertifikats beginnen, indem Sie oben auf die Schaltfläche „Zertifikat hochladen“ klicken."
},
"companyWallet": {
"heading": "Mein Firmen-Wallet",
"description": "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.",
"activate": "Connected",
"activateDescription": "Sie haben Ihr Catena-X-Wallet aktiviert.",
"inactive": "Nicht verbunden",
"inactiveDescription": "Sie haben Ihr Catena-X-Wallet nicht aktiviert.",
"subnavigation": {
"title": "Wallet-Operationen :",
"button1": "Fordern Sie neue Use-Case-Anmeldeinformationen an",
"button2": "Fordern Sie einen neuen Firmenausweis an",
"button3": "Erfahren Sie mehr über VCs (in Kürze verfügbar)"
},
"expiry": "Ablauf: "
},
"standardLibraryTable": {
"version": "Version",
"capabilities": "Capabilities",
Expand Down
18 changes: 17 additions & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"certificate-credential": "Config - Certificates",
"about": "About",
"dataspace": "Data Space",
"admin-credential": "Certification Mgmt"
"admin-credential": "Certification Mgmt",
"companyWallet": "Company Wallet"
},
"overlays": {
"invite": "Invite new Business Partner",
Expand Down Expand Up @@ -1640,6 +1641,21 @@
"declinedMessage": "Credential Request Declined successfully.",
"errorMessage": "Something went wrong!"
},
"companyWallet": {
"heading": "My Company Wallet",
"description": "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.",
"activate": "Connected",
"activateDescription": "You have activated your Catena-X wallet.",
"inactive": "Not Connected",
"inactiveDescription": "You have not activated your Catena-X wallet.",
"subnavigation": {
"title": "Wallet operations :",
"button1": "Request new Use Case Credential",
"button2": "Request new Company Credential",
"button3": "Get more details of VCs (coming soon)"
},
"expiry": "Expiry: "
},
"standardLibraryTable": {
"version": "Version",
"capabilities": "Capabilities",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/********************************************************************************
* Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { useTranslation } from 'react-i18next'
import { Typography, Button } from '@catena-x/portal-shared-components'
import './CompanyWallet.scss'
import EastIcon from '@mui/icons-material/East'
import { useNavigate } from 'react-router'

export default function ComapnyWalletSubNavigationHeader(): JSX.Element {
const { t } = useTranslation()
const navigate = useNavigate()

const links = [
{
title: t('content.companyWallet.subnavigation.button1'),
link: '/usecase-participation',
},
{
title: t('content.companyWallet.subnavigation.button2'),
link: '/company-role',
},
{
title: t('content.companyWallet.subnavigation.button3'),
link: '',
},
]

return (
<div className="subnavigation">
<div className="title">
<Typography
variant="h6"
sx={{
fontSize: '18px',
}}
>
{t('content.companyWallet.subnavigation.title')}
</Typography>
</div>
{links.map((nav) => (
<Button
key={nav.title}
onClick={() => {
if (nav.link !== '') navigate(nav.link)
}}
color="secondary"
variant="text"
size="medium"
sx={{
fontSize: '16px',
}}
>
<EastIcon sx={{ marginRight: '16px', fontSize: '15px' }} />
{nav.title}
</Button>
))}
</div>
)
}
Loading

0 comments on commit bdd6d3a

Please sign in to comment.