Skip to content

Commit

Permalink
Merge pull request #2584 from techmatters/ff/save-inprogress-contacts
Browse files Browse the repository at this point in the history
Add a feature flag for Saving In Progress Contacts
  • Loading branch information
mythilytm authored Oct 31, 2024
2 parents 85568f2 + 7fd2c50 commit 6cba851
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,6 +49,8 @@ const ContactInProgressBanners: React.FC<ContactBannersProps> = ({ 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));
};
Expand Down Expand Up @@ -98,7 +101,7 @@ const ContactInProgressBanners: React.FC<ContactBannersProps> = ({ savedContact,
<BannerText>
<Template code="Contact-DraftStatus" />
</BannerText>
{canEditContact() && (
{enableInProgressContacts && canEditContact() && (
<BannerAction alignRight={true} onClick={handleSaveAndEnd}>
<SaveAndEndButton>
<Template code="BottomBar-SaveAndEnd" />
Expand Down
1 change: 1 addition & 0 deletions plugin-hrm-form/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ export type FeatureFlags = {
enable_post_survey: boolean; // Enables Post-Survey
enable_previous_contacts: boolean; // Enables Previous Contacts Yellow Banner
enable_region_resource_search: boolean; // Enables specifying a region as well as a province and / or city in Resource Search
enable_save_in_progress_contacts: boolean; // Enables Saving In Progress Contacts
enable_save_insights: boolean; // Enables Saving Aditional Data on Insights
enable_separate_timeline_view: boolean; // Enables a limited inline case timelinbe with a link to the full timeline
enable_sort_cases: boolean; // Enables Sorting at Case List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"enable_lex": true,
"enable_generalized_search": true,
"enable_post_survey": true,
"enable_save_in_progress_contacts": true,
"enable_save_insights": true,
"enable_teams_view_enhancements2": true,
"enable_voice_recordings": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"enable_offline_contact": true,
"enable_post_survey": false,
"enable_previous_contacts": true,
"enable_save_in_progress_contacts": false,
"enable_save_insights": true,
"enable_separate_timeline_view": true,
"enable_sort_cases": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"definitionVersion": "e2e-v1",
"feature_flags": {
"enable_contact_editing": false,
"enable_save_in_progress_contacts": false,
"enable_counselor_toolkits": false,
"enable_csam_report": true,
"enable_external_transcripts": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"feature_flags": {
"enable_canned_responses": false,
"enable_contact_editing": false
"enable_contact_editing": false,
},
"hrm_base_url": "https://hrm-production-eu.tl.techmatters.org"
}
Expand Down

0 comments on commit 6cba851

Please sign in to comment.