-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from siemens/licenseClearing
feat(license_clearing): Add list view table for project license clearing
- Loading branch information
Showing
6 changed files
with
541 additions
and
8 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
57 changes: 57 additions & 0 deletions
57
src/app/[locale]/projects/detail/[id]/components/LicenseClearing.tsx
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,57 @@ | ||
// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project. | ||
|
||
// This program and the accompanying materials are made | ||
// available under the terms of the Eclipse Public License 2.0 | ||
// which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
|
||
// SPDX-License-Identifier: EPL-2.0 | ||
// License-Filename: LICENSE | ||
|
||
'use client' | ||
|
||
import { useTranslations } from 'next-intl' | ||
import { useState } from 'react' | ||
import { Nav, Tab } from 'react-bootstrap' | ||
import ListView from './ListView' | ||
|
||
export default function LicenseClearing({ | ||
projectId, | ||
projectName, | ||
projectVersion, | ||
}: { | ||
projectId: string | ||
projectName: string | ||
projectVersion: string | ||
}) { | ||
const t = useTranslations('default') | ||
const [key, setKey] = useState('tree-view') | ||
|
||
return ( | ||
<> | ||
<Tab.Container id='views-tab' activeKey={key} onSelect={(k) => setKey(k)}> | ||
<div className='row'> | ||
<div className='col ps-0'> | ||
<Nav variant='pills' className='d-inline-flex'> | ||
<Nav.Item> | ||
<Nav.Link eventKey='tree-view'> | ||
<span className='fw-medium'>{t('Tree View')}</span> | ||
</Nav.Link> | ||
</Nav.Item> | ||
<Nav.Item> | ||
<Nav.Link eventKey='list-view'> | ||
<span className='fw-medium'>{t('List View')}</span> | ||
</Nav.Link> | ||
</Nav.Item> | ||
</Nav> | ||
</div> | ||
</div> | ||
<Tab.Content className='mt-3'> | ||
<Tab.Pane eventKey='tree-view'></Tab.Pane> | ||
<Tab.Pane eventKey='list-view'> | ||
<ListView projectId={projectId} projectName={projectName} projectVersion={projectVersion} /> | ||
</Tab.Pane> | ||
</Tab.Content> | ||
</Tab.Container> | ||
</> | ||
) | ||
} |
Oops, something went wrong.