Skip to content

Commit

Permalink
fix(company data): remove page notification (eclipse-tractusx#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Sep 6, 2024
1 parent b83b7d3 commit ac42d75
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## (unreleased) 2.2.0-RC3

- Company Data
- Remove page notification on download csv template action
- Confirm Modal
- Fix broken title and description section
- Company data
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ npm/npmjs/@babel/template/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@babel/traverse/7.24.1, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13926
npm/npmjs/@babel/types/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/3.4.0, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #16027
npm/npmjs/@catena-x/portal-shared-components/3.5.1, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #16079
npm/npmjs/@cspotcode/source-map-support/0.8.1, MIT, approved, clearlydefined
npm/npmjs/@date-io/core/3.0.0, MIT, approved, clearlydefined
npm/npmjs/@date-io/date-fns/3.0.0, MIT, approved, #14023
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^3.4.0",
"@catena-x/portal-shared-components": "^3.5.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@hookform/error-message": "^2.0.1",
Expand Down
1 change: 0 additions & 1 deletion src/components/overlays/CSVUploadOverlay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default function CSVUploadOverlay(): JSX.Element {
document.body.appendChild(a)
a.click()
a.remove()
CopySuccess(t('content.companyData.upload.downloadSuccess'))
})
}

Expand Down
20 changes: 18 additions & 2 deletions src/components/pages/CompanyData/components/CompanyAddressList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ import {
setSharingStateInfo,
} from 'features/companyData/slice'
import { statusColorMap } from 'utils/dataMapper'
import { show } from 'features/control/overlay'
import { OVERLAYS } from 'types/Constants'
import UploadIcon from '@mui/icons-material/Upload'
import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'

export const CompanyAddressList = ({
handleButtonClick,
Expand Down Expand Up @@ -186,12 +190,24 @@ export const CompanyAddressList = ({
setPage((i) => i + 1)
}}
hideFooterPagination={true}
buttons={[
{
title: t('content.companyData.table.buttonSite'),
click: () => {
handleSecondButtonClick()
},
icon: <AddCircleOutlineIcon />,
},
{
title: t('content.companyData.csvUploadBtn'),
click: () => dispatch(show(OVERLAYS.CSV_UPLOAD_OVERLAY)),
icon: <UploadIcon />,
},
]}
autoFocus={false}
onButtonClick={handleButtonClick}
rowsCount={inputs.length + outputs.length}
buttonLabel={t('content.companyData.table.buttonAddress')}
secondButtonLabel={t('content.companyData.table.buttonSite')}
onSecondButtonClick={handleSecondButtonClick}
toolbarVariant="premium"
searchPlaceholder={t('content.companyData.table.search')}
columnHeadersBackgroundColor={'#FFFFFF'}
Expand Down
15 changes: 0 additions & 15 deletions src/components/pages/CompanyData/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ import MyCompanyInfoComponent from '../Organization/MyCompanyInfoComponent'
import EditForm from './components/EditForm'
import { useDispatch } from 'react-redux'
import { setCompanyPageRefetch } from 'features/companyData/slice'
import { Button } from '@catena-x/portal-shared-components'
import { useTranslation } from 'react-i18next'
import { show } from 'features/control/overlay'
import { OVERLAYS } from 'types/Constants'

export default function CompanyData() {
const { t } = useTranslation()
const [showOverlay, setShowOverlay] = useState({
address: false,
site: false,
Expand All @@ -48,16 +43,6 @@ export default function CompanyData() {
<main className="organization-main">
<div className="organization-section">
<MyCompanyInfoComponent editable={false} />
<div>
<Button
sx={{ margin: '-30px auto 30px auto', display: 'block' }}
onClick={() => {
dispatch(show(OVERLAYS.CSV_UPLOAD_OVERLAY))
}}
>
{t('content.companyData.csvUploadBtn')}
</Button>
</div>
</div>
<CompanyAddressList
handleButtonClick={() => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@catena-x/portal-shared-components@^3.4.0":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.4.0.tgz#68f9b2c6d4a567b347cd008a113a3f5f7bf64a89"
integrity sha512-EYhOSvwuXZt1zXPPpCFfSe+6I8VghH8fClH80aud+x8UhMiZbBzOOn6kjAZKnpKH9qoyEX4TqpE4ZUYxnfagMA==
"@catena-x/portal-shared-components@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.5.1.tgz#d2caf4acf4c0197bca392054e0b9f8f1b451b704"
integrity sha512-xWAqM2FuTTBF3Koyjkvf1ZJi36DDwDuXin3nlkbB8hRwBKKV5fWLGQN+3bcwCoA6quNK/Juj7PQ2BYYqrQEDRw==
dependencies:
"@date-io/date-fns" "^3.0.0"
"@emotion/react" "^11.11.4"
Expand Down

0 comments on commit ac42d75

Please sign in to comment.