Skip to content

Commit

Permalink
Merge pull request #1294 from eclipse-tractusx/release/v2.3.0-RC2
Browse files Browse the repository at this point in the history
build(2.3.0-rc2): bump version and update docs
  • Loading branch information
evegufy authored Nov 5, 2024
2 parents 75a997f + 11269cf commit c1d260b
Show file tree
Hide file tree
Showing 18 changed files with 147 additions and 56 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

## Unreleased

## 2.3.0-RC2

### Bugfixes

- **Application Request**
- fixed documents not getting displayed [#1223](https://github.com/eclipse-tractusx/portal-frontend/pull/1223)
- **Use Case Participation**
- fixed columns alignment UI issue [#1247](https://github.com/eclipse-tractusx/portal-frontend/pull/1247)
- **App Overview Details**
- fixed displaying of conformity document in separate section and all other available documents in the documents section [#1235](https://github.com/eclipse-tractusx/portal-frontend/pull/1235)
- **App and Service Subscription Management** [#1246](https://github.com/eclipse-tractusx/portal-frontend/pull/1246)
- fixed showing of all available active apps/services in the filter section
- added heading in each section for the better user experience
- fixed showing of all subscriptions including inactive one in the list
- **App Overview**
- updated the regex for search validation for numeric and special characters [#1179] (https://github.com/eclipse-tractusx/portal-frontend/pull/1179)

## 2.3.0-RC1

### Change
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@catena-x/portal-frontend",
"version": "v2.3.0-RC1",
"version": "v2.3.0-RC2",
"description": "Catena-X Portal Frontend",
"author": "Catena-X Contributors",
"license": "Apache-2.0",
Expand Down
7 changes: 6 additions & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,12 @@
"message": "Das unten definierte technische Benutzerprofil zeigt die Benutzerberechtigung an, die dem technischen Benutzer, der im Rahmen der App-/Dienstaktivierung erstellt wurde, automatisch zugewiesen wird."
},
"pendingTooltip": "Application subscription is pending. The app provider is informed",
"subscribedTooltip": "Die App ist bereits von Ihrem Unternehmen abonniert."
"subscribedTooltip": "Die App ist bereits von Ihrem Unternehmen abonniert.",
"document": {
"noDocumentsAvailable": "No documents available",
"conformityDocument": "Conformity Document",
"conformityDocumentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
}
},
"apprelease": {
"headerTitle": "App Release Process",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/locales/de/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@
"url": "URL:",
"technicaluserType": "Assigned Permissions:",
"close": "Close"
}
},
"offersHeading": "Services Offered"
},
"adminBoard": {
"headerTitle": "Service request management",
Expand Down
7 changes: 6 additions & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,12 @@
"message": "The technical user profile defined below displays the user permission which the technical user created as part of the app/service activation gets automatically assigned."
},
"pendingTooltip": "Application subscription is pending. The app provider is informed",
"subscribedTooltip": "The app is already subscribed by your company"
"subscribedTooltip": "The app is already subscribed by your company",
"document": {
"noDocumentsAvailable": "No documents available",
"conformityDocument": "Conformity Document",
"conformityDocumentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
}
},
"apprelease": {
"headerTitle": "App Release Process",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/locales/en/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@
"url": "URL:",
"technicaluserType": "Assigned Permissions:",
"close": "Close"
}
},
"offersHeading": "Services Offered"
},
"adminBoard": {
"headerTitle": "Service request management",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ const CompanyDetailOverlay = ({
key: '',
value: (
<>
{company?.documents && company.documents.length > 0 ? (
{selectedCompany?.documents &&
selectedCompany.documents.length > 0 ? (
<>
{company.documents.map(
{selectedCompany.documents.map(
(contract: {
documentId: string
documentType: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import { type AppDetails, type Documents } from 'features/apps/types'
import { useFetchDocumentByIdMutation } from 'features/apps/apiSlice'
import { download } from 'utils/downloadUtils'
import '../../AppDetail.scss'
import { DocumentTypeId } from 'features/appManagement/apiSlice'
import {
type DocumentData,
DocumentTypeId,
} from 'features/appManagement/apiSlice'

export default function AppDetailDocuments({ item }: { item: AppDetails }) {
const { t } = useTranslation()
Expand All @@ -51,6 +54,35 @@ export default function AppDetailDocuments({ item }: { item: AppDetails }) {
}
return (
<div id="documents">
<div className="margin-h-40">
<Typography variant="h3">
{t('content.appdetail.document.conformityDocument')}
</Typography>
<Typography variant="body2" sx={{ mb: 3 }}>
{t('content.appdetail.document.conformityDocumentsDescription')}
</Typography>
{item?.documents?.[DocumentTypeId.CONFORMITY_APPROVAL_BUSINESS_APPS] ? (
item?.documents[DocumentTypeId.CONFORMITY_APPROVAL_BUSINESS_APPS].map(
(item: DocumentData) => (
<li key={item.documentId} className="document-list doc-list">
<ArticleOutlinedIcon sx={{ color: '#9c9c9c' }} />
<button
className="document-button-link"
onClick={() =>
handleDownloadClick(item.documentId, item.documentName)
}
>
{item.documentName}
</button>
</li>
)
)
) : (
<Typography variant="body2" className="not-available">
{t('content.appdetail.document.noDocumentsAvailable')}
</Typography>
)}
</div>
<div className="divider-height" />
<Typography variant="h3">
{t('content.appdetail.howtouse.heading')}
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/AppOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import { fetchImageWithToken } from 'services/ImageService'
import { setCurrentActiveStep } from 'features/appManagement/slice'
import { setAppId, setAppStatus } from 'features/appManagement/actions'
import NoItems from '../NoItems'
import { isValidAppOverviewSearch } from 'types/Patterns'

export default function AppOverview() {
const { t } = useTranslation()
Expand Down Expand Up @@ -222,8 +223,7 @@ export default function AppOverview() {

const doSearch = useCallback(
(expr: string) => {
const validateExpr = /^[ A-Za-z]*$/.test(expr)
if (!validateExpr) {
if (!isValidAppOverviewSearch(expr)) {
return
}
setSearchExpr(expr)
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/ServiceSubscription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default function ServiceSubscription() {
}}
doNotShowAutoSetup={true}
type={SubscriptionTypes.SERVICE_SUBSCRIPTION}
activeAppHeading={t('serviceSubscription.offersHeading')}
/>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
padding: 30px;
}
.useCase-list-main {
max-width: 850px;
max-width: 1200px;
width: 100%;
margin: 0 auto 50px;
.progress-main {
Expand Down Expand Up @@ -99,6 +99,9 @@
}
.credential-list {
list-style: none;
.MuiAccordionSummary-root {
padding: 0px 25px 0px 0px;
}
.credential-list-item {
width: 100%;
margin-bottom: 0;
Expand Down
6 changes: 4 additions & 2 deletions src/components/pages/UsecaseParticipation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function UsecaseParticipation() {
: 'N/A'}
</Typography>
</Trans>
{expiryDate.diff(todayDate, 'day') > 0 && (
{expiryDate.diff(todayDate, 'day') > 0 ? (
<Typography variant="body3" className="fifthSection">
<Chip
color="secondary"
Expand All @@ -135,6 +135,8 @@ export default function UsecaseParticipation() {
type="plain"
/>
</Typography>
) : (
<div className="fifthSection" />
)}
</div>
)
Expand Down Expand Up @@ -238,7 +240,7 @@ export default function UsecaseParticipation() {
<div
className="credential-list-item"
style={{
width: '82%',
width: '80%',
textAlign: 'center',
margin: '0 0 10px',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ export default function SubscriptionElements({
type,
refetch,
isSuccess,
subscriptionHeading,
}: {
subscriptions?: SubscriptionContent[]
type: string
refetch: () => void
isSuccess: boolean
subscriptionHeading: string
}) {
const theme = useTheme()
const { t } = useTranslation()
Expand Down Expand Up @@ -276,12 +278,14 @@ export default function SubscriptionElements({
return (
<div className="recommended-main">
{subscriptions?.length ? (
<ul className="subscription-list">
{subscriptions.map((subscriptionData) => {
return subscriptionData.companySubscriptionStatuses.map(
(subscription) =>
subscription.offerSubscriptionStatus !==
SubscriptionStatus.INACTIVE && (
<>
<Typography variant="h4" sx={{ marginBottom: '20px' }}>
{subscriptionHeading}
</Typography>
<ul className="subscription-list">
{subscriptions.map((subscriptionData) => {
return subscriptionData.companySubscriptionStatuses.map(
(subscription) => (
<li
key={subscription.subscriptionId}
className="subscription-list-item"
Expand Down Expand Up @@ -319,9 +323,10 @@ export default function SubscriptionElements({
</div>
</li>
)
)
})}
</ul>
)
})}
</ul>
</>
) : (
<div className="loading-progress">
<CircleProgress
Expand Down
64 changes: 31 additions & 33 deletions src/components/shared/templates/Subscription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ interface SubscriptionType {
currentSuccessType: (state: RootState) => boolean
loadMoreButtonText?: string
type?: string
activeAppHeading?: string
subscriptionHeading?: string
}

export default function Subscription({
Expand All @@ -277,6 +279,8 @@ export default function Subscription({
currentSuccessType,
loadMoreButtonText = 'Load More',
type = SubscriptionTypes.APP_SUBSCRIPTION,
activeAppHeading = 'Apps Offered',
subscriptionHeading = 'Subscriptions',
}: SubscriptionType) {
const dispatch = useDispatch()
const theme = useTheme()
Expand Down Expand Up @@ -323,23 +327,13 @@ export default function Subscription({
}, [data])

useEffect(() => {
if (data?.content && appFiltersData) {
const fillers: AppFiltersResponse[] = []
appFiltersData.forEach((item) => {
data.content.forEach((base: { offerId: string }) => {
if (base.offerId === item.id) {
fillers.push(item)
}
})
if (appFiltersData?.length) {
setState({
type: ActionKind.SET_APP_FILTERS,
payload: appFiltersData,
})
if (fillers?.length) {
setState({
type: ActionKind.SET_APP_FILTERS,
payload: fillers,
})
}
}
}, [appFiltersData, data])
}, [appFiltersData, type])

const setView = (e: React.MouseEvent<HTMLInputElement>) => {
let status = ''
Expand Down Expand Up @@ -552,24 +546,27 @@ export default function Subscription({
</div>
</div>
{appFilters && appFilters.length > 0 && (
<div className="appFilterSection">
{appFilters.map((app: AppFiltersResponse) => {
return (
<Typography
className={`appName ${
activeAppFilter === app.id ? 'activeFilter' : ''
}`}
variant="body3"
onClick={() => {
handleActiveAppFilter(app.id)
}}
key={app.id}
>
{app.name}
</Typography>
)
})}
</div>
<>
<Typography variant="h4">{activeAppHeading}</Typography>
<div className="appFilterSection">
{appFilters.map((app: AppFiltersResponse) => {
return (
<Typography
className={`appName ${
activeAppFilter === app.id ? 'activeFilter' : ''
}`}
variant="body3"
onClick={() => {
handleActiveAppFilter(app.id)
}}
key={app.id}
>
{app.name}
</Typography>
)
})}
</div>
</>
)}
{isFetching ? (
<div className="loading-progress">
Expand All @@ -588,6 +585,7 @@ export default function Subscription({
type={type}
refetch={refetch}
isSuccess={apiSuccess}
subscriptionHeading={subscriptionHeading}
/>
)}
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/features/admin/registration/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import type { PaginResult } from '@catena-x/portal-shared-components'
import { initialPaginResult, RequestState } from 'types/MainTypes'
import { type DocumentMapper } from '../applicationRequestApiSlice'

export const name = 'admin/registration'

Expand Down Expand Up @@ -63,6 +64,7 @@ export type CompanyDetail = {
uniqueIds?: Array<UniqueIdType>
countryAlpha2Code?: string
companyUser: Array<CompanyUserDetails>
documents: Array<DocumentMapper>
}

export type RegistrationRequestDocument = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const apiSlice = createApi({
},
}),
fetchServiceFilters: builder.query<ServiceFiltersResponse[], void>({
query: () => '/api/services/provided',
query: () => '/api/services/provided?statusId=Active',
}),
fetchServiceSubDetail: builder.query<
SubscriptionDetailResponse,
Expand Down
Loading

0 comments on commit c1d260b

Please sign in to comment.