Skip to content

Commit

Permalink
fix:duplicate-detection-v2 settings cleanup (#2796)
Browse files Browse the repository at this point in the history
* fix:duplicate-detection-v2 cleanup

* minor

* minor

* minor

* minor

---------

Co-authored-by: sowmya <sowmya@sowmyas-MacBook-Air.local>
  • Loading branch information
SowmyaFyle and sowmya authored Mar 4, 2024
1 parent c2422ff commit 7d4ed97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
2 changes: 0 additions & 2 deletions src/app/core/models/org-settings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 4 additions & 9 deletions src/app/core/services/org-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 0 additions & 8 deletions src/app/core/test-data/org-settings.service.spec.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7d4ed97

Please sign in to comment.