diff --git a/src/app/core/models/org-settings.model.ts b/src/app/core/models/org-settings.model.ts index 7311fd7e68..5925956997 100644 --- a/src/app/core/models/org-settings.model.ts +++ b/src/app/core/models/org-settings.model.ts @@ -404,7 +404,6 @@ export interface OrgSettingsResponse { budget_settings?: CommonOrgSettings; custom_category_settings?: CommonOrgSettings; duplicate_detection_settings?: CommonOrgSettings; - duplicate_detection_v2_settings?: CommonOrgSettings; dynamic_form_settings?: CommonOrgSettings; hrms_integration_settings?: CommonOrgSettings; multi_org_settings?: CommonOrgSettings; @@ -521,7 +520,6 @@ export interface OrgSettings { settlements_excel_settings?: SettlementsExcelSettings; gmail_addon_settings?: CommonOrgSettings; duplicate_detection_settings?: CommonOrgSettings; - duplicate_detection_v2_settings?: CommonOrgSettings; custom_category_settings?: CommonOrgSettings; bulk_fyle_settings?: CommonOrgSettings; auto_reminder_settings?: CommonOrgSettings; diff --git a/src/app/core/services/org-settings.service.ts b/src/app/core/services/org-settings.service.ts index 71afd1766d..6725c4f854 100644 --- a/src/app/core/services/org-settings.service.ts +++ b/src/app/core/services/org-settings.service.ts @@ -133,8 +133,8 @@ export class OrgSettingsService { incoming.mileage_details && incoming.mileage_details.enable_individual_mileage_rates, }, commute_deduction_settings: { - allowed: incoming.commute_deduction_settings?.allowed, - enabled: incoming.commute_deduction_settings?.enabled, + allowed: incoming.commute_deduction_settings && incoming.commute_deduction_settings.allowed, + enabled: incoming.commute_deduction_settings && incoming.commute_deduction_settings.enabled, }, advances: { allowed: incoming.advances_settings && incoming.advances_settings.allowed, @@ -291,10 +291,6 @@ export class OrgSettingsService { allowed: incoming.duplicate_detection_settings && incoming.duplicate_detection_settings.allowed, enabled: incoming.duplicate_detection_settings && incoming.duplicate_detection_settings.enabled, }, - duplicate_detection_v2_settings: { - allowed: incoming.duplicate_detection_v2_settings && incoming.duplicate_detection_v2_settings.allowed, - enabled: incoming.duplicate_detection_v2_settings && incoming.duplicate_detection_v2_settings.enabled, - }, custom_category_settings: { allowed: incoming.custom_category_settings && incoming.custom_category_settings.allowed, enabled: incoming.custom_category_settings && incoming.custom_category_settings.enabled, @@ -462,8 +458,8 @@ export class OrgSettingsService { mileage_location_enabled: outgoing.mileage.location_mandatory, }, commute_deduction_settings: { - allowed: outgoing.commute_deduction_settings?.allowed, - enabled: outgoing.commute_deduction_settings?.enabled, + allowed: outgoing.commute_deduction_settings && outgoing.commute_deduction_settings.allowed, + enabled: outgoing.commute_deduction_settings && outgoing.commute_deduction_settings.enabled, }, multi_org_settings: { allowed: outgoing.org_creation.allowed, @@ -540,7 +536,6 @@ export class OrgSettingsService { transaction_field_configurations: outgoing.transaction_field_configurations, gmail_addon_settings: outgoing.gmail_addon_settings, duplicate_detection_settings: outgoing.duplicate_detection_settings, - duplicate_detection_v2_settings: outgoing.duplicate_detection_v2_settings, custom_category_settings: outgoing.custom_category_settings, org_bulk_fyle_settings: outgoing.bulk_fyle_settings, auto_reminder_settings: outgoing.auto_reminder_settings, diff --git a/src/app/core/test-data/org-settings.service.spec.data.ts b/src/app/core/test-data/org-settings.service.spec.data.ts index 32850a75ae..4f9b71b512 100644 --- a/src/app/core/test-data/org-settings.service.spec.data.ts +++ b/src/app/core/test-data/org-settings.service.spec.data.ts @@ -311,10 +311,6 @@ export const orgSettingsGetData: OrgSettings = { allowed: true, enabled: true, }, - duplicate_detection_v2_settings: { - allowed: true, - enabled: true, - }, custom_category_settings: { allowed: true, enabled: true, @@ -740,10 +736,6 @@ export const orgSettingsPostData: OrgSettingsResponse = { allowed: true, enabled: true, }, - duplicate_detection_v2_settings: { - allowed: true, - enabled: true, - }, custom_category_settings: { allowed: true, enabled: true,