From 3715caf62863939e9aa97a1070adffa4bce66115 Mon Sep 17 00:00:00 2001 From: adhiraj23zelthy Date: Thu, 24 Oct 2024 17:11:07 +0530 Subject: [PATCH] feat: fe sync packages --- .../UpdateAppDetailsForm.jsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx b/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx index 0a7be87f..ae3e46c1 100644 --- a/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx +++ b/frontend/src/pages/appConfiguration/components/Modals/UpdateAppDetailsModal/UpdateAppDetailsForm.jsx @@ -9,6 +9,7 @@ import InputFieldArray from '../../../../../components/Form/InputFieldArray'; import SelectField from '../../../../../components/Form/SelectField'; import SubmitButton from '../../../../../components/Form/SubmitButton'; import TextareaField from '../../../../../components/Form/TextareaField'; +import CheckboxField from '../../../../../components/Form/CheckboxField'; import useApi from '../../../../../hooks/useApi'; import { transformToFormData } from '../../../../../utils/form'; @@ -34,7 +35,8 @@ const UpdateAppDetailsForm = ({ closeModal }) => { repo_url: appConfigurationData?.app?.extra_config?.git_config?.repo_url ?? '', dev: appConfigurationData?.app?.extra_config?.git_config?.branch?.dev ?? '', prod: appConfigurationData?.app?.extra_config?.git_config?.branch?.prod ?? '', - staging: appConfigurationData?.app?.extra_config?.git_config?.branch?.staging ?? '' + staging: appConfigurationData?.app?.extra_config?.git_config?.branch?.staging ?? '', + sync_packages: appConfigurationData?.app?.extra_config?.sync_packages ?? true }; let validationSchema = Yup.object({ @@ -49,6 +51,7 @@ const UpdateAppDetailsForm = ({ closeModal }) => { dev: Yup.string(), prod: Yup.string(), staging: Yup.string(), + sync_packages: Yup.boolean() }); let onSubmit = (values) => { @@ -68,13 +71,15 @@ const UpdateAppDetailsForm = ({ closeModal }) => { 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); @@ -237,6 +242,17 @@ const UpdateAppDetailsForm = ({ closeModal }) => { onChange={formik.handleChange} formik={formik} /> +