Skip to content

Commit

Permalink
fix(service overview): remove multiple errors (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanya-bmw authored Feb 7, 2024
1 parent d453e17 commit 19a11d1
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 49 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## unreleased 1.8.0-RC4


- Service overview
- Add missing translations, fix duplicate error
- Service Release Process
- fixed conformity document deletion issue after uploading document

Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ npm/npmjs/@babel/traverse/7.23.3, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD
npm/npmjs/@babel/types/7.23.0, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #11521
npm/npmjs/@babel/types/7.23.3, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #11521
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/2.1.20, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@catena-x/portal-shared-components/2.1.22, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@csstools/normalize.css/12.0.0, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-cascade-layers/1.1.1, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-color-function/1.1.1, CC0-1.0 AND (MIT AND W3C-20150513) AND W3C-20150513 AND MIT, approved, #3022
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^2.1.20",
"@catena-x/portal-shared-components": "^2.1.22",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/error-message": "^2.0.1",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/locales/de/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,9 @@
"retryOverlay": {
"title": "Something went wrong",
"description": "The data could not get loaded, please try it again or go back to the previous page."
},
"error": {
"tryAgain": "Versuchen Sie es erneut",
"errorBar": "Etwas ist schief gelaufen. Versuchen Sie es erneut"
}
}
4 changes: 4 additions & 0 deletions src/assets/locales/en/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,9 @@
"retryOverlay": {
"title": "Something went wrong",
"description": "The data could not get loaded, please try it again or go back to the previous page."
},
"error": {
"tryAgain": "Try Again",
"errorBar": "Something went wrong. Try again"
}
}
2 changes: 0 additions & 2 deletions src/components/pages/AppOverviewNew/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export default function AppOverviewNew() {
const { t } = useTranslation()
const { data, refetch, isSuccess } = useFetchProvidedAppsQuery()

console.log('data', data)

return (
<main>
<PageHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,47 +238,51 @@ export default function ServiceListOverview() {
showButton={true}
/>
)}
{items && items.length > 0 && isSuccess ? (
<div className="desc-card">
<Cards
items={items}
columns={4}
buttonText="Details"
variant="minimal"
filledBackground={false}
imageSize={'small'}
imageLoader={fetchImageWithToken}
showAddNewCard={false}
newButtonText={t('serviceoverview.addbtn')}
onNewCardButton={onNewServiceCardClick}
onCardClick={(item: CardItems) => {
// TODO: workaround - fix CardItems type
const cardItem: CardItemsInterface = item
if (
cardItem.status === ProvidedServiceStatusEnum.PENDING ||
cardItem.status === ProvidedServiceStatusEnum.CREATED
) {
dispatch(setServiceId(item.id ?? ''))
navigate(`/${PAGES.SERVICERELEASEPROCESS}/form`)
} else {
navigate(`/${PAGES.SERVICE_DETAIL}/${item.id}`)
}
}}
subMenu={true}
submenuOptions={submenuOptions}
submenuClick={(sortMenu: string, id: string | undefined) => {
sortMenu === ServiceSubMenuItems.DEACTIVATE &&
navigate(`/${PAGES.SERVICEDEACTIVATE}/${id}`, {
state: items,
})
return undefined
}}
tooltipText={t('serviceoverview.submenuNotAvailable')}
/>
</div>
) : (
<NoItems />
)}
{isSuccess &&
(items && items.length > 0 ? (
<div className="desc-card">
<Cards
items={items}
columns={4}
buttonText="Details"
variant="minimal"
filledBackground={false}
imageSize={'small'}
imageLoader={fetchImageWithToken}
showAddNewCard={false}
newButtonText={t('serviceoverview.addbtn')}
onNewCardButton={onNewServiceCardClick}
onCardClick={(item: CardItems) => {
// TODO: workaround - fix CardItems type
const cardItem: CardItemsInterface = item
if (
cardItem.status === ProvidedServiceStatusEnum.PENDING ||
cardItem.status === ProvidedServiceStatusEnum.CREATED
) {
dispatch(setServiceId(item.id ?? ''))
navigate(`/${PAGES.SERVICERELEASEPROCESS}/form`)
} else {
navigate(`/${PAGES.SERVICE_DETAIL}/${item.id}`)
}
}}
subMenu={true}
submenuOptions={submenuOptions}
submenuClick={(
sortMenu: string,
id: string | undefined
) => {
sortMenu === ServiceSubMenuItems.DEACTIVATE &&
navigate(`/${PAGES.SERVICEDEACTIVATE}/${id}`, {
state: items,
})
return undefined
}}
tooltipText={t('serviceoverview.submenuNotAvailable')}
/>
</div>
) : (
<NoItems />
))}
</>
)}
</section>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1193,10 +1193,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@catena-x/portal-shared-components@^2.1.20":
version "2.1.20"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.1.20.tgz#cd8d39fbd1349f497e7abb6a4dc0819b5bd85336"
integrity sha512-lVilpGu40KC6L1Is8KbYPq4yXPcqPJCiQZVaBb1vh2PJVm4VYs8wdB9yDFNr0Hz+iMbw/1y3xYexFJKlzCSzTw==
"@catena-x/portal-shared-components@^2.1.22":
version "2.1.22"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.1.22.tgz#17d2bd7a111e52035c84a2025bf0a2dea79a09c7"
integrity sha512-G5MXCA+0sVXYie4Z1QKoNcVo3grE9Z/FyExv3vn1juLnzk9oIJ+2ugXJA5hKpVs+gCLFuXikzPgl0tP/Qjl31A==
dependencies:
"@mui/base" "^5.0.0-beta.3"
"@mui/system" "^5.13.2"
Expand Down

0 comments on commit 19a11d1

Please sign in to comment.