Skip to content

Commit

Permalink
feat(technical integration): remove unused code (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw authored Aug 4, 2023
1 parent 8299bee commit 2b0204e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@
"roleDesc": "Role Description Details",
"technicalUser": {
"addOverlay": {
"service": "Dienst",
"service": "Technical User Role",
"serviceSubHeading": "Select one service roles:",
"username": "Username",
"description": "Beschreibung",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
"roleDesc": "Role Description Details",
"technicalUser": {
"addOverlay": {
"service": "Service",
"service": "Technical User Role",
"serviceSubHeading": "Select one service roles:",
"username": "Username",
"description": "Description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const TechnicalUserAddFormSelect = ({
<Controller
render={({ field: { onChange, value } }) => (
<Box className="technicalUserForm">
<InputLabel error={!!errors[name]} sx={{ marginBottom: '7px' }}>
<InputLabel
error={!!errors[name]}
sx={{ marginBottom: '7px', color: '#000' }}
>
{t('content.addUser.technicalUser.addOverlay.service')}
</InputLabel>
<Typography variant="caption3">
Expand Down Expand Up @@ -116,7 +119,10 @@ const TechnicalUserAddFormTextfield = ({
<Controller
render={({ field: { onChange, value } }) => (
<>
<InputLabel error={!!errors[name]} sx={{ marginBottom: '7px' }}>
<InputLabel
error={!!errors[name]}
sx={{ marginBottom: '7px', color: '#000' }}
>
{label}
</InputLabel>
<TextField
Expand Down
21 changes: 0 additions & 21 deletions src/components/overlays/AddTechnicalUser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
Typography,
} from '@catena-x/portal-shared-components'
import { Link } from 'react-router-dom'
import { Box } from '@mui/material'
import { useDispatch } from 'react-redux'
import { closeOverlay } from 'features/control/overlay'
import { useForm } from 'react-hook-form'
Expand All @@ -43,7 +42,6 @@ import { useState } from 'react'
import { updateData, UPDATES } from 'features/control/updates'
import { UserDetailCard } from 'components/shared/basic/UserDetailInfo/UserDetailCard'
import { ServerResponseOverlay } from '../ServerResponse'
import { useFetchOwnUserDetailsQuery } from 'features/admin/userApiSlice'
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'
import HelpOutlineIcon from '@mui/icons-material/HelpOutline'
import './TechnicalUserAddForm.scss'
Expand All @@ -56,7 +54,6 @@ export const AddTechnicalUser = () => {

const [addServiceAccount] = useAddServiceAccountMutation()
const [loading, setLoading] = useState<boolean>(false)
const { data } = useFetchOwnUserDetailsQuery()

const handleConfirm = async (formValues: DefaultFormFieldValuesType) => {
setLoading(true)
Expand All @@ -80,24 +77,6 @@ export const AddTechnicalUser = () => {
//openAddTechnicalUserResponseOverlay()
}

const userDetailsData = {
cardCategory: t('content.addUser.technicalUser.addOverlay.spocHeadline'),
cardContentItems: {
organizsationName: {
label: t('content.addUser.technicalUser.addOverlay.org'),
value: data ? data.company : '',
},
username: {
label: t('content.addUser.technicalUser.addOverlay.name'),
value: data ? `${data.firstName} ${data.lastName}` : '',
},
eMailAddress: {
label: t('content.addUser.technicalUser.addOverlay.email'),
value: data ? data.email : '',
},
},
}

const defaultFormFieldValues = {
TechnicalUserName: '',
TechnicalUserService: 'none',
Expand Down

0 comments on commit 2b0204e

Please sign in to comment.