Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/overlays/AddAppUserRoles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
import { Box } from '@mui/material'
import { useState } from 'react'

export default function AddAppUserRoles() {
export default function AddAppUserRoles({
subscriptionId,
}: {
subscriptionId: string
}) {

Check warning on line 56 in src/components/overlays/AddAppUserRoles/index.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=eclipse-tractusx_portal-frontend&issues=AZq6OQVZA9spYGtXB82q&open=AZq6OQVZA9spYGtXB82q&pullRequest=1675
const { t } = useTranslation()
const dispatch = useDispatch()
const { appId } = useParams()
Expand All @@ -66,6 +70,7 @@
const data: UserRoleRequest = {
appId,
companyUserId: user,
subscriptionId,
body: roles,
}
dispatch(setRolesToAdd([]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export default function CompanyCertificateDetails({
show(
OVERLAYS.COMPANY_CERTIFICATE_CONFIRM_DELETE,
id,
'',
selected.companyCertificateType
)
)
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 @@ -237,9 +237,9 @@ export default function AppOverview() {

const showOverlay = (item: AppInfo) => {
if (item.status === 'created') {
dispatch(show(OVERLAYS.APP_OVERVIEW_CONFIRM, item.id, item.name))
dispatch(show(OVERLAYS.APP_OVERVIEW_CONFIRM, item.id, '', item.name))
} else if (item.status === 'in_review') {
dispatch(show(OVERLAYS.APP_DETAILS_OVERLAY, item.id, item.name))
dispatch(show(OVERLAYS.APP_DETAILS_OVERLAY, item.id, '', item.name))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export const AppUserDetailsTable = ({
<UserList
sectionTitle={'content.usermanagement.appUserDetails.subheadline'}
addButtonLabel={'content.usermanagement.appUserDetails.table.add'}
addButtonClick={() => dispatch(show(OVERLAYS.ADD_APP_USER_ROLES, appId))}
addButtonClick={() =>
dispatch(show(OVERLAYS.ADD_APP_USER_ROLES, appId, subscriptionId))
}
addButtonDisabled={
!roles ||
roles.length === 0 ||
Expand Down
4 changes: 3 additions & 1 deletion src/components/pages/MyAccount/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export default function MyAccount() {
const dispatch = useDispatch()

const handleDeleteUser = () =>
dispatch(show(OVERLAYS.CONFIRM_USER_ACTION, data?.companyUserId, 'ownUser'))
dispatch(
show(OVERLAYS.CONFIRM_USER_ACTION, data?.companyUserId, '', 'ownUser')
)

return (
<main className="my-account">
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/UserDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export default function UserDetail() {
const { data } = useFetchUserDetailsQuery(userId ?? '')

const handleSuspendUser = () =>
dispatch(show(OVERLAYS.CONFIRM_USER_ACTION, userId, 'suspend'))
dispatch(show(OVERLAYS.CONFIRM_USER_ACTION, userId, '', 'suspend'))

const handleDeleteUser = () =>
dispatch(show(OVERLAYS.CONFIRM_USER_ACTION, userId, 'user'))
dispatch(show(OVERLAYS.CONFIRM_USER_ACTION, userId, '', 'user'))

const handleResetPasswordForUser = () =>
data &&
Expand Down
2 changes: 1 addition & 1 deletion src/services/AccessService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const getOverlay = (overlay: OverlayState) => {
case OVERLAYS.DELETE_TECH_USER:
return <DeleteTechnicalUser id={overlay.id} />
case OVERLAYS.ADD_APP_USER_ROLES:
return <AddAppUserRoles />
return <AddAppUserRoles subscriptionId={overlay.subscriptionId} />
case OVERLAYS.EDIT_APP_USER_ROLES:
return (
<EditAppUserRoles
Expand Down
Loading