diff --git a/packages/frinx-gamma/src/components/forms/customer-location-form.tsx b/packages/frinx-gamma/src/components/forms/customer-location-form.tsx index b27df57f2..60091d72f 100644 --- a/packages/frinx-gamma/src/components/forms/customer-location-form.tsx +++ b/packages/frinx-gamma/src/components/forms/customer-location-form.tsx @@ -22,7 +22,7 @@ type Props = { }; const CustomerLocationForm: VoidFunctionComponent = ({ location, buttonText, onSubmit, onCancel }) => { - const { values, errors, dirty, handleChange, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, handleChange, handleSubmit } = useFormik({ initialValues: { ...location, }, @@ -71,6 +71,7 @@ const CustomerLocationForm: VoidFunctionComponent = ({ location, buttonTe + diff --git a/packages/frinx-gamma/src/components/forms/evc-attachment-form.tsx b/packages/frinx-gamma/src/components/forms/evc-attachment-form.tsx index 60ed00028..fa77472e0 100644 --- a/packages/frinx-gamma/src/components/forms/evc-attachment-form.tsx +++ b/packages/frinx-gamma/src/components/forms/evc-attachment-form.tsx @@ -33,7 +33,7 @@ function getQosProfilesItems(profiles: string[]): Item[] { } const EvcAttachmentForm: VoidFunctionComponent = ({ qosProfiles, evcAttachment, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, handleChange, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, handleChange, handleSubmit } = useFormik({ initialValues: { ...evcAttachment, }, @@ -127,6 +127,7 @@ const EvcAttachmentForm: VoidFunctionComponent = ({ qosProfiles, evcAttac + diff --git a/packages/frinx-gamma/src/components/forms/site-network-access-form.tsx b/packages/frinx-gamma/src/components/forms/site-network-access-form.tsx index 4900d3ec5..96b923991 100644 --- a/packages/frinx-gamma/src/components/forms/site-network-access-form.tsx +++ b/packages/frinx-gamma/src/components/forms/site-network-access-form.tsx @@ -94,7 +94,7 @@ const SiteNetAccessForm: FC = ({ onCancel, }) => { const [siteState, setSiteState] = useState(site); - const { values, errors, dirty, setFieldValue, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, handleSubmit } = useFormik({ initialValues: { ...selectedNetworkAccess, }, @@ -465,6 +465,7 @@ const SiteNetAccessForm: FC = ({ + diff --git a/packages/frinx-gamma/src/components/forms/vpn-bearer-form.tsx b/packages/frinx-gamma/src/components/forms/vpn-bearer-form.tsx index c732da887..9f1058e96 100644 --- a/packages/frinx-gamma/src/components/forms/vpn-bearer-form.tsx +++ b/packages/frinx-gamma/src/components/forms/vpn-bearer-form.tsx @@ -42,7 +42,7 @@ type Props = { }; const VpnBearerForm: VoidFunctionComponent = ({ mode, nodes, carriers, bearer, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, handleChange, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, handleChange, handleSubmit } = useFormik({ initialValues: { ...bearer, }, @@ -136,6 +136,7 @@ const VpnBearerForm: VoidFunctionComponent = ({ mode, nodes, carriers, be + diff --git a/packages/frinx-gamma/src/components/forms/vpn-carrier-form.tsx b/packages/frinx-gamma/src/components/forms/vpn-carrier-form.tsx index bcfe1bc9e..17635c17f 100644 --- a/packages/frinx-gamma/src/components/forms/vpn-carrier-form.tsx +++ b/packages/frinx-gamma/src/components/forms/vpn-carrier-form.tsx @@ -40,7 +40,7 @@ const getCarrierItems = (carriers: VpnCarrier[]): Item[] => { }; const CarrierForm: FC = ({ carrier, carriers, onDelete, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, setValues, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, setValues, handleSubmit } = useFormik({ initialValues: { ...carrier, }, @@ -118,6 +118,7 @@ const CarrierForm: FC = ({ carrier, carriers, onDelete, onSubmit, onCance + diff --git a/packages/frinx-gamma/src/components/forms/vpn-node-form.tsx b/packages/frinx-gamma/src/components/forms/vpn-node-form.tsx index 0c2eb2215..80d2bf972 100644 --- a/packages/frinx-gamma/src/components/forms/vpn-node-form.tsx +++ b/packages/frinx-gamma/src/components/forms/vpn-node-form.tsx @@ -41,7 +41,7 @@ const getNodeItems = (carriers: VpnNode[]): Item[] => { }; const NodeForm: FC = ({ node, nodes, onDelete, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, setValues, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, setValues, handleSubmit } = useFormik({ initialValues: { ...node, }, @@ -132,6 +132,7 @@ const NodeForm: FC = ({ node, nodes, onDelete, onSubmit, onCancel }) => { + diff --git a/packages/frinx-gamma/src/components/forms/vpn-service-form.tsx b/packages/frinx-gamma/src/components/forms/vpn-service-form.tsx index d6b4758e1..01746b014 100644 --- a/packages/frinx-gamma/src/components/forms/vpn-service-form.tsx +++ b/packages/frinx-gamma/src/components/forms/vpn-service-form.tsx @@ -57,7 +57,7 @@ const ServiceSchema = yup.object().shape({ }); const VpnServiceForm: FC = ({ extranetVpns, service, services, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, handleSubmit, setValues } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, handleSubmit, setValues } = useFormik({ initialValues: { ...service, }, @@ -266,6 +266,7 @@ const VpnServiceForm: FC = ({ extranetVpns, service, services, onSubmit, + diff --git a/packages/frinx-gamma/src/components/forms/vpn-site-form.tsx b/packages/frinx-gamma/src/components/forms/vpn-site-form.tsx index 787a5b992..6ff531a40 100644 --- a/packages/frinx-gamma/src/components/forms/vpn-site-form.tsx +++ b/packages/frinx-gamma/src/components/forms/vpn-site-form.tsx @@ -34,7 +34,7 @@ type Props = { }; const VpnSiteForm: FC = ({ site, qosProfiles, onSubmit, onCancel }) => { - const { values, errors, dirty, setFieldValue, handleSubmit } = useFormik({ + const { values, errors, dirty, resetForm, setFieldValue, handleSubmit } = useFormik({ initialValues: { ...site, }, @@ -121,6 +121,7 @@ const VpnSiteForm: FC = ({ site, qosProfiles, onSubmit, onCancel }) => { + diff --git a/packages/frinx-gamma/src/components/poll-workflow-id/poll-worfklow-id.tsx b/packages/frinx-gamma/src/components/poll-workflow-id/poll-worfklow-id.tsx index 7900b75de..661679b5a 100644 --- a/packages/frinx-gamma/src/components/poll-workflow-id/poll-worfklow-id.tsx +++ b/packages/frinx-gamma/src/components/poll-workflow-id/poll-worfklow-id.tsx @@ -1,4 +1,5 @@ -import { useEffect, VoidFunctionComponent } from 'react'; +import React, { useEffect, VoidFunctionComponent } from 'react'; +import { Flex } from '@chakra-ui/react'; import { useAsyncGenerator } from '../commit-status-modal/commit-status-modal.helpers'; type Props = { @@ -30,7 +31,7 @@ const WorkflowId: VoidFunctionComponent = ({ workflowId, onFinish }) => { } }, [execPayload, onFinish]); - return null; + return Loading...; }; export default WorkflowId;