chore: Fix add and edit User
This commit is contained in:
@@ -44,8 +44,8 @@ export default function AddOrEditUserForm({ onAdd, initialData, onCancel }) {
|
||||
name: '',
|
||||
middleName: '',
|
||||
lastName: '',
|
||||
tenantId: '',
|
||||
roleId: '',
|
||||
tenantId: '6894f9ddfb7072bdfc881613',
|
||||
roleId: '68407642ec46a0e6fe1e8ec9',
|
||||
status: 'Active',
|
||||
companies: [],
|
||||
projects: [],
|
||||
@@ -91,6 +91,7 @@ export default function AddOrEditUserForm({ onAdd, initialData, onCancel }) {
|
||||
middleName: formData.middleName,
|
||||
lastName: formData.lastName,
|
||||
roleId: formData.roleId,
|
||||
tenantId: formData.tenantId,
|
||||
sendInvitation: !!formData.sendInvitation,
|
||||
};
|
||||
await api.createUser(payload);
|
||||
@@ -113,7 +114,7 @@ export default function AddOrEditUserForm({ onAdd, initialData, onCancel }) {
|
||||
margin="normal"
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
fullWidth
|
||||
label="Name"
|
||||
name="name"
|
||||
value={formData.name}
|
||||
@@ -143,6 +144,7 @@ export default function AddOrEditUserForm({ onAdd, initialData, onCancel }) {
|
||||
value={formData.tenantId}
|
||||
onChange={handleChange}
|
||||
margin="normal"
|
||||
disabled={!initialData}
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -151,24 +153,7 @@ export default function AddOrEditUserForm({ onAdd, initialData, onCancel }) {
|
||||
value={formData.roleId}
|
||||
onChange={handleChange}
|
||||
margin="normal"
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
label="Companies"
|
||||
name="companies"
|
||||
value={formData.companies.join(', ')}
|
||||
onChange={handleChange}
|
||||
margin="normal"
|
||||
helperText="Comma-separated list"
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
label="Projects"
|
||||
name="projects"
|
||||
value={formData.projects.join(', ')}
|
||||
onChange={handleChange}
|
||||
margin="normal"
|
||||
helperText="Comma-separated list"
|
||||
disabled={!initialData}
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
|
||||
@@ -21,7 +21,7 @@ const theme = createTheme({
|
||||
backgroundColor: '#f0eae3',
|
||||
},
|
||||
'&.Mui-selected': {
|
||||
backgroundColor: '#40120EFF',
|
||||
backgroundColor: '#d0b9a8',
|
||||
color: '#26201A',
|
||||
},
|
||||
'&.Mui-selected:hover': {
|
||||
@@ -31,7 +31,7 @@ const theme = createTheme({
|
||||
},
|
||||
cell: {
|
||||
'&:focus-within': {
|
||||
outline: '2px solid #40120EFF', // custom Fendi focus
|
||||
outline: '2px solid #d0b9a8', // custom Fendi focus
|
||||
outlineOffset: '-2px', // tighten the outline
|
||||
backgroundColor: '#f5f0eb', // optional subtle highlight
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user