2024-10-18 13:41:04: merge [main:d8205506670c47e3bdeb93be305ae60c20d05809];
This commit is contained in:
1 parent
3ddbdbda6d
commit
d9543c4a24
1 file changed
+4
-3
@@ -61,7 +61,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
|
||||
const onSaveBtn: MenuProps['onClick'] = (e, upVersion = undefined) => {
|
||||
const isUnsafe = e.key === 'unsafe'
|
||||
handleSaveClick(upVersion, isUnsafe)
|
||||
handleSaveClick(upVersion, isUnsafe, false)
|
||||
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
setRadioValue(e.target.value)
|
||||
}
|
||||
|
||||
const handleSaveClick = (upVersion?: number, unsafe?: boolean) => {
|
||||
const handleSaveClick = (upVersion?: number, unsafe?: boolean, isGoBack?: boolean) => {
|
||||
let newData = {}
|
||||
const sentData =
|
||||
radioValue === formRadio
|
||||
@@ -102,6 +102,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
.unwrap()
|
||||
.then(({ id }) => {
|
||||
isNew && navigate(`/${moduleId}/configEditor/${id}`)
|
||||
isGoBack && navigate(`/modules/${moduleId}/configurations`)
|
||||
message.success('Конфигурация успешно сохранена')
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -174,7 +175,7 @@ const ConfigurationEditorPage: FC = () => {
|
||||
Текущая схема конфигурации
|
||||
</Button>
|
||||
<Dropdown.Button
|
||||
onClick={() => handleSaveClick()}
|
||||
onClick={() => handleSaveClick(undefined, undefined, true)}
|
||||
disabled={disableBtn}
|
||||
type="primary"
|
||||
className="configuration-editor-page__save-btn"
|
||||
|
||||
Reference in new issue
Block a user