diff --git a/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx b/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx index 1f3f3446..e4e07fe6 100644 --- a/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx +++ b/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx @@ -63,8 +63,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => { if (!tempValues['fav_icon']) { delete tempValues['fav_icon']; } - - // Preserve existing git config if not modified const existingGitConfig = appConfigurationData?.app?.extra_config?.git_config || {}; const extra_config = { git_config: { @@ -100,7 +98,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => { closeModal(); dispatch(toggleRerenderPage()); } else { - // Restore values in case of error tempValues.dev = extra_config?.git_config?.branch?.dev; tempValues.prod = extra_config?.git_config?.branch?.prod; tempValues.staging = extra_config?.git_config?.branch?.staging; @@ -112,59 +109,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => { makeApiCall(); }; - // let onSubmit = (values) => { - // let tempValues = values; - // if (!tempValues['logo']) { - // delete tempValues['logo']; - // } - - // if (!tempValues['fav_icon']) { - // delete tempValues['fav_icon']; - // } - // const extra_config = { - // git_config: { - // branch: { - // dev: tempValues.dev==''?null:tempValues.dev, - // prod: tempValues.prod==''?null:tempValues.prod, - // staging: tempValues.staging==''?null:tempValues.staging - // }, - // repo_url: tempValues.repo_url==''?null:tempValues.repo_url - // }, - // sync_packages: tempValues.sync_packages - // }; - - // delete tempValues.dev; - // delete tempValues.prod; - // delete tempValues.staging; - // delete tempValues.repo_url; - // delete tempValues.sync_packages; - - // tempValues.extra_config = JSON.stringify(extra_config); - - // let dynamicFormData = transformToFormData(tempValues); - - // const makeApiCall = async () => { - // const { response, success } = await triggerApi({ - // url: `/api/v1/apps/${appId}/`, - // type: 'PUT', - // loader: true, - // payload: dynamicFormData, - // }); - - // if (success && response) { - // closeModal(); - // dispatch(toggleRerenderPage()); - // }else{ - // tempValues.dev = extra_config?.git_config?.branch?.dev; - // tempValues.prod = extra_config?.git_config?.branch?.prod; - // tempValues.staging = extra_config?.git_config?.branch?.staging; - // tempValues.repo_url = extra_config?.git_config?.repo_url; - // tempValues.sync_packages = extra_config?.sync_packages; - // } - // }; - - // makeApiCall(); - // }; return (