From a40d5a26911cdb51c56a293abe5141eb30e8c0e7 Mon Sep 17 00:00:00 2001 From: mythilytm Date: Thu, 31 Oct 2024 12:13:05 -0400 Subject: [PATCH 1/2] Add feature flag for enable_save_in_progress_contacts --- .../src/components/contact/ContactInProgressBanners.tsx | 5 ++++- plugin-hrm-form/src/types/types.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/components/contact/ContactInProgressBanners.tsx b/plugin-hrm-form/src/components/contact/ContactInProgressBanners.tsx index 672515452..d90ce9420 100644 --- a/plugin-hrm-form/src/components/contact/ContactInProgressBanners.tsx +++ b/plugin-hrm-form/src/components/contact/ContactInProgressBanners.tsx @@ -34,6 +34,7 @@ import { checkTaskAssignment, completeTaskAssignment } from '../../services/Serv import { Contact, RouterTask } from '../../types/types'; import getCanEditInProgressContact from '../../permissions/canEditInProgressContact'; import { newFinalizeContactAsyncAction } from '../../states/contacts/saveContact'; +import { getAseloFeatureFlags } from '../../hrmConfig'; type ContactBannersProps = { savedContact: Contact; @@ -48,6 +49,8 @@ const ContactInProgressBanners: React.FC = ({ savedContact, const workerRoles = Manager.getInstance().workerClient.attributes.roles; const isDraft = !savedContact.finalizedAt; + const enableInProgressContacts = getAseloFeatureFlags().enable_save_in_progress_contacts; + const saveFinalizedContact = (task: RouterTask, contact: Contact) => { dispatch(newFinalizeContactAsyncAction(task, contact)); }; @@ -98,7 +101,7 @@ const ContactInProgressBanners: React.FC = ({ savedContact,