|
@@ -143,8 +143,10 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
})
|
|
})
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (type === ModalType.ADD && institutionID) {
|
|
|
|
- form.setValues({ institutionID })
|
|
|
|
|
|
+ if (type === ModalType.ADD) {
|
|
|
|
+ const values = {}
|
|
|
|
+ if (institutionID) values.institutionID = institutionID
|
|
|
|
+ form.setValues(values)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
form.setSchemaByPath('accountType', {
|
|
form.setSchemaByPath('accountType', {
|
|
@@ -163,8 +165,10 @@ const StaffDrawer: React.FC<StaffModalProps> = ({
|
|
disabled: true
|
|
disabled: true
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
form.setSchemaByPath('organizationalStructureID', {
|
|
form.setSchemaByPath('organizationalStructureID', {
|
|
- disabled: hiddenOrganization
|
|
|
|
|
|
+ disabled: hiddenOrganization,
|
|
|
|
+ hidden: !institutionID
|
|
})
|
|
})
|
|
if (type === ModalType.UPDATE || type === ModalType.PREVIEW) {
|
|
if (type === ModalType.UPDATE || type === ModalType.PREVIEW) {
|
|
form.setSchemaByPath('password', {
|
|
form.setSchemaByPath('password', {
|