-
Notifications
You must be signed in to change notification settings - Fork 9
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 #295 from siemens/feat/clearing_request_detail
feat(CR): Added fields in open clearing request detail page
- Loading branch information
Showing
23 changed files
with
129 additions
and
26 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
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
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
62 changes: 62 additions & 0 deletions
62
src/app/[locale]/requests/clearingRequest/detail/[id]/components/ClearingComments.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,62 @@ | ||
// Copyright (C) Siemens AG, 2024. 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 { ClearingRequestDetails } from '@/object-types' | ||
import styles from '@/app/[locale]/requests/requestDetail.module.css' | ||
import { signOut, useSession } from 'next-auth/react' | ||
|
||
|
||
export default function ClearingComments({ data }: { data: ClearingRequestDetails }) { | ||
const t = useTranslations('default') | ||
const { status } = useSession() | ||
|
||
const handleAddComment = () => { | ||
console.log('Test') | ||
} | ||
|
||
if (status === 'unauthenticated') { | ||
signOut() | ||
} else { | ||
return ( | ||
<> | ||
<table className={`table label-value-table ${styles['summary-table']}`}> | ||
<thead> | ||
<tr> | ||
<th colSpan={2}>{t('Comments')}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<th> | ||
<input className='form-control' | ||
type="text" | ||
placeholder={t('Enter Comment')} | ||
style={{height: '50px'}}/> | ||
</th> | ||
<tr> | ||
<button type='button' | ||
className='btn btn-accept mb-2 mx-3' | ||
onClick={handleAddComment} | ||
> | ||
{t('Add Comment')} | ||
</button> | ||
</tr> | ||
{data.comments.map((item) => ( | ||
<tr key={item.text}> | ||
<td>{item.text}</td> | ||
<td>{item.commentedBy}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</> | ||
)} | ||
} |
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
File renamed without changes.
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
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
Oops, something went wrong.