mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: add role name in edit & invite user dialog.
This commit is contained in:
@@ -11,7 +11,7 @@ import { FormattedMessage as T } from 'components';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import classNames from 'classnames';
|
||||
import { inputIntent } from 'utils';
|
||||
import { FieldRequiredHint } from 'components';
|
||||
import { ListSelect, FieldRequiredHint } from 'components';
|
||||
import { useUserFormContext } from './UserFormProvider';
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import { compose } from 'utils';
|
||||
@@ -88,6 +88,29 @@ function UserFormContent({
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
{/* ----------- Role name ----------- */}
|
||||
<FastField name={'role_name'}>
|
||||
{({ form, field: { value }, meta: { error, touched } }) => (
|
||||
<FormGroup
|
||||
label={<T id={'roles.label.role_name'} />}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
className={classNames('form-group--role_name', CLASSES.FILL)}
|
||||
intent={inputIntent({ error, touched })}
|
||||
>
|
||||
<ListSelect
|
||||
items={[]}
|
||||
// onItemSelect={(item) => {
|
||||
// form.setFieldValue('role_name', item.role_id);
|
||||
// }}
|
||||
selectedItem={value}
|
||||
selectedItemProp={'role_id '}
|
||||
// textProp={'role_name'}
|
||||
// labelProp={'role_id '}
|
||||
popoverProps={{ minimal: true }}
|
||||
/>
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</div>
|
||||
|
||||
<div className={CLASSES.DIALOG_FOOTER}>
|
||||
|
||||
Reference in New Issue
Block a user