Skip to content

Commit 7cfe3e9

Browse files
committed
2024-11-22 - allow edit of ext-recip
1 parent 1de3da9 commit 7cfe3e9

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

web-ui/src/components/feedback_external_recipient_card/EditRecipientModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const EditRecipientModal = ({ open, onClose, profile, onChange, onSubmit }) => {
6262
<MenuItem value="Active">Active</MenuItem>
6363
<MenuItem value="Inactive">Inactive</MenuItem>
6464
</Select>
65-
<br/>
65+
<Box mt={2} />
6666
<Button onClick={onSubmit} variant="contained" color="primary">
6767
Save
6868
</Button>

web-ui/src/components/feedback_external_recipient_card/FeedbackExternalRecipientCard.jsx

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useContext } from 'react';
22
import { styled } from '@mui/material/styles';
33
import { AppContext } from '../../context/AppContext.jsx';
44
import { selectCsrfToken, selectProfileMap } from '../../context/selectors.js';
5-
import { Box, Card, CardHeader, CardContent, Container, Typography, IconButton, Tooltip, Button } from '@mui/material';
5+
import { Box, Card, CardHeader, CardContent, Container, Typography, IconButton, Tooltip, Button, Select, MenuItem } from '@mui/material';
66
import { green } from '@mui/material/colors';
77
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
88
import CloseIcon from '@mui/icons-material/Close';
@@ -133,9 +133,32 @@ const FeedbackExternalRecipientCard = ({
133133
{recipientProfile?.email}
134134
</a>
135135
<br />
136-
My Company: {recipientProfile?.companyName}
137-
<br />
136+
Company: {recipientProfile?.companyName}
138137
</Typography>
138+
<Select
139+
label="Status"
140+
name="inactive"
141+
value={recipientProfile?.inactive ? 'Inactive' : 'Active'}
142+
onChange={(e) => {
143+
e.stopPropagation();
144+
onEditHandle({ ...recipientProfile, inactive: e.target.value === 'Inactive' });
145+
}}
146+
fullWidth
147+
margin="normal"
148+
disabled={true}
149+
sx={{
150+
fontSize: '0.75rem',
151+
'& .MuiSelect-select': {
152+
padding: '4px 8px',
153+
},
154+
'& .MuiMenuItem-root': {
155+
fontSize: '0.75rem',
156+
},
157+
}}
158+
>
159+
<MenuItem value="Active">Active</MenuItem>
160+
<MenuItem value="Inactive">Inactive</MenuItem>
161+
</Select>
139162
<Button onClick={(e) => {
140163
e.stopPropagation();
141164
handleEditOpen();

0 commit comments

Comments
 (0)