|
@@ -55,9 +55,7 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
|
accountTypeList,
|
|
|
reload
|
|
|
}) => {
|
|
|
- console.log(defaultFormData)
|
|
|
-
|
|
|
- const { institution, ...otherValues } = defaultFormData
|
|
|
+ const { institution, organizationalStructure, ...otherValues } = defaultFormData
|
|
|
const formRef = useRef<ProFormInstance>(null)
|
|
|
const { run: tryUpdateAccount } = useRequest(updateAccount, {
|
|
|
manual: true,
|
|
@@ -113,7 +111,11 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
|
createForm({
|
|
|
validateFirst: true,
|
|
|
readPretty: type === ModalType.PREVIEW,
|
|
|
- initialValues: { ...otherValues, institutionID: institution.ID },
|
|
|
+ initialValues: {
|
|
|
+ ...otherValues,
|
|
|
+ institutionID: institution.ID,
|
|
|
+ organizationalStructureID: organizationalStructure?.ID
|
|
|
+ },
|
|
|
effects(form) {
|
|
|
onFieldMount('password', field => {
|
|
|
type !== ModalType.ADD && field.setDisplay('none')
|