From 5584b77cf5e4256f08b3bf1c0e96ff1bb4d57ba7 Mon Sep 17 00:00:00 2001 From: chriscalhoun1974 <68459950+chriscalhoun1974@users.noreply.github.com> Date: Sun, 25 Sep 2022 17:52:21 -0400 Subject: [PATCH] Updated the Manual Processing detail form to not be submitted until the form is dirty. --- .../ManualProcessingDetail.tsx | 191 +++++++++--------- 1 file changed, 96 insertions(+), 95 deletions(-) diff --git a/clients/ops/admin-ui/src/features/subject-request/manual-processing/ManualProcessingDetail.tsx b/clients/ops/admin-ui/src/features/subject-request/manual-processing/ManualProcessingDetail.tsx index f92b36262..c8dd69f75 100644 --- a/clients/ops/admin-ui/src/features/subject-request/manual-processing/ManualProcessingDetail.tsx +++ b/clients/ops/admin-ui/src/features/subject-request/manual-processing/ManualProcessingDetail.tsx @@ -21,7 +21,6 @@ import { import { Field, Form, Formik } from "formik"; import { PatchUploadManualWebhookDataRequest } from "privacy-requests/types"; import React, { useRef } from "react"; -import { shallowEqual } from "react-redux"; import * as Yup from "yup"; import { ManualInputData } from "./types"; @@ -44,8 +43,6 @@ const ManualProcessingDetail: React.FC = ({ // eslint-disable-next-line @typescript-eslint/no-unused-vars const handleSubmit = async (values: any, _actions: any) => { - const hasChanged = !shallowEqual(data.fields, values); - if (!hasChanged) return; const params: PatchUploadManualWebhookDataRequest = { connection_key: data.connection_key, privacy_request_id: data.privacy_request_id, @@ -83,100 +80,104 @@ const ManualProcessingDetail: React.FC = ({ Begin manual input )} - - - - - - - {connectorName} - - - - PII Requirements - - - - Please complete the following PII fields that have been - collected for the selected subject. - - - - - -
- - {Object.entries(data.fields).map(([key], index) => ( - - - {({ field }: { field: any }) => ( - - ) => ( + + + + + + + {connectorName} + + + + PII Requirements + + + + Please complete the following PII fields that have been + collected for the selected subject. + + + + + + + {Object.entries(data.fields).map(([key], index) => ( + + + {({ field }: { field: any }) => ( + - {key} - - - - )} - - - ))} - -
-
-
- - - - - - -
-
+ + {key} + + + + )} + + + ))} + + + + + + + + + + + + )} + ); };