Skip to content

Commit

Permalink
Merge branch 'main' into fix/1045-align-semantic-of-app-admin-board
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmargi12 committed Aug 29, 2024
2 parents da81c29 + af14873 commit 6831c7b
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 26 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@

- **IDP management**
- Fixed statusTag color in status coloumn [#978](https://github.com/eclipse-tractusx/portal-frontend/pull/978)
- **Connector Management**
- Updated SD document download API to fix downloading SD document issue [#1038](https://github.com/eclipse-tractusx/portal-frontend/pull/1038)
- **Service Release Process**
- Fixed back button navigation to service management instead of navigating to home page[#1038](https://github.com/eclipse-tractusx/portal-frontend/pull/1038)
- **Application Requests**
- Fixed 'activeTab' conditions to load data for Tab-2(Registration Process) [#1050](https://github.com/eclipse-tractusx/portal-frontend/pull/1050)

### Feature

- Customer Detail Data Overlay
- implement new UI design for customer detail data overlay

### Change

- **Technical User Management**
- Removed 'Inactive' filter in technical user management [#1046](https://github.com/eclipse-tractusx/portal-frontend/pull/1046)

## 2.2.0-RC1

### Change
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/de/notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"appmanagementboard": "App Management Board öffnen",
"servicemanagementboard": "Service Management Board öffnen",
"appOverview": "Get there",
"appsubscription": "Get there",
"appSubscription": "Get there",
"appAdminBoard": "Get there",
"technicaluser": "Get there",
"companyRolesServiceProvider": "Get there",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en/notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"appmanagementboard": "Get there",
"servicemanagementboard": "Get there",
"appOverview": "Get there",
"appsubscription": "Get there",
"appSubscription": "Get there",
"appAdminBoard": "Get there",
"technicaluser": "Get there",
"companyRolesServiceProvider": "Get there",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ const CompanyDetailOverlay = ({
) : (
<DialogContent
sx={{
padding: '30px 110px 56px 110px',
padding: activeTab === 0 ? '30px 110px 56px 110px' : '0px 120px',
width: '100%',
marginBottom: activeTab ? 5 : 0,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function RegistrationRequests() {
setSelectedRequest(params.row)
dispatch(fetchCompanyDetail(params.row.applicationId))
setOverlayOpen(true)
setSelectedActiveTab(params.field === TableField.DETAIL ? 0 : 1)
setSelectedActiveTab(params.field === TableField.DETAIL ? 0 : 2)
}
}

Expand Down
15 changes: 6 additions & 9 deletions src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ import {
useDeleteConnectorMutation,
useUpdateConnectorUrlMutation,
useFetchConnectorDetailsQuery,
useFetchSdDocumentMutation,
} from 'features/connector/connectorApiSlice'
import { Box, Divider, Grid } from '@mui/material'
import ArticleOutlinedIcon from '@mui/icons-material/ArticleOutlined'
import { useEffect, useState } from 'react'
import { error, success } from 'services/NotifyService'
import EditIcon from '@mui/icons-material/Edit'
import Patterns from 'types/Patterns'
import { useFetchDocumentMutation } from 'features/serviceManagement/apiSlice'
import { download } from 'utils/downloadUtils'
import UserService from 'services/UserService'
import { ROLES } from 'types/Constants'
Expand All @@ -59,7 +59,7 @@ const ConnectorDetailsOverlay = ({
overlayData,
}: DeleteConfirmationOverlayProps) => {
const { t } = useTranslation()
const [fetchDocumentById] = useFetchDocumentMutation()
const [fetchSDDocument] = useFetchSdDocumentMutation()
const {
data: fetchConnectorDetails,
isFetching,
Expand Down Expand Up @@ -135,10 +135,7 @@ const ConnectorDetailsOverlay = ({
const handleDownloadFn = async (documentId: string, documentName: string) => {
if (fetchConnectorDetails?.id) {
try {
const response = await fetchDocumentById({
appId: fetchConnectorDetails.id,
documentId,
}).unwrap()
const response = await fetchSDDocument(documentId).unwrap()

const fileType = response.headers.get('content-type')
const file = response.data
Expand Down Expand Up @@ -600,8 +597,8 @@ const ConnectorDetailsOverlay = ({
null ? (
t('content.edcconnector.details.noDocumentAvailable')
) : (
<>
<ArticleOutlinedIcon sx={{ color: '#9c9c9c' }} />
<Box sx={{ display: 'flex' }}>
<ArticleOutlinedIcon sx={{ color: '#9c9c9c', mr: 1 }} />
<button
className="document-button-link"
onClick={() =>
Expand All @@ -616,7 +613,7 @@ const ConnectorDetailsOverlay = ({
'content.edcconnector.details.selfDescriptionDocument'
)}
</button>
</>
</Box>
)}
</Typography>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ export const TechnicalUserTable = () => {
buttonValue: ServiceAccountStatusFilter.ACTIVE,
onButtonClick: setView,
},
{
buttonText: t('content.usermanagement.technicalUser.tabs.inactive'),
buttonValue: ServiceAccountStatusFilter.INACTIVE,
onButtonClick: setView,
},
{
buttonText: t('content.usermanagement.technicalUser.tabs.managed'),
buttonValue: ServiceAccountStatusFilter.MANAGED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import { ButtonLabelTypes } from '..'
import RetryOverlay from '../components/RetryOverlay'
import { success, error } from 'services/NotifyService'
import { DocumentTypeId } from 'features/appManagement/apiSlice'
import { PAGES } from 'types/Constants'

type FormDataType = {
title: string
Expand Down Expand Up @@ -520,7 +521,7 @@ export default function OfferCard() {
setServiceCardSnackbar(false)
}}
onBackIconClick={() => {
navigate('/home')
navigate(`/${PAGES.SERVICE_MANAGEMENT}`)
}}
// Add an ESLint exception until there is a solution
// eslint-disable-next-line
Expand Down
7 changes: 0 additions & 7 deletions src/features/admin/serviceApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export interface ServiceAccountsResponseType {

export enum ServiceAccountStatusFilter {
ACTIVE = 'ACTIVE',
INACTIVE = 'INACTIVE',
MANAGED = 'MANAGED',
OWNED = 'OWNED',
}
Expand Down Expand Up @@ -152,12 +151,6 @@ export const apiSlice = createApi({
fetchArgs.args.statusFilter === ServiceAccountStatusFilter.ACTIVE
) {
return `${url}&clientId=${fetchArgs.args!.expr}`
} else if (
!isFetchArgs &&
fetchArgs.args.statusFilter &&
fetchArgs.args.statusFilter === ServiceAccountStatusFilter.INACTIVE
) {
return `${url}&filterForInactive=true`
} else if (
!isFetchArgs &&
fetchArgs.args.statusFilter &&
Expand Down
10 changes: 10 additions & 0 deletions src/features/connector/connectorApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ export const apiSlice = createApi({
body: data.body,
}),
}),
fetchSdDocument: builder.mutation({
query: (documentId) => ({
url: `/api/administration/documents/selfDescription/${documentId}`,
responseHandler: async (response) => ({
headers: response.headers,
data: await response.blob(),
}),
}),
}),
}),
})

Expand All @@ -186,4 +195,5 @@ export const {
useFetchOfferSubscriptionsQuery,
useFetchDecentralIdentityUrlsQuery,
useUpdateConnectorUrlMutation,
useFetchSdDocumentMutation,
} = apiSlice

0 comments on commit 6831c7b

Please sign in to comment.