Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/remove unused getCategoryName() from rule classes (#6688)

Trevin Chow10e185766af6
diff --git a/apps/api/src/models/rule.ts b/apps/api/src/models/rule.ts
index 622375b5b1..5603964c5a 100644
--- a/apps/api/src/models/rule.ts
+++ b/apps/api/src/models/rule.ts
@@ -70,8 +70,6 @@ export abstract class Rule<T extends RuleSettings> implements RuleInterface<T> {
public abstract evaluate(aRuleSettings: T): EvaluationResult;
- public abstract getCategoryName(): string;
-
public abstract getConfiguration(): Partial<
PortfolioReportRule['configuration']
>;
diff --git a/apps/api/src/models/rules/account-cluster-risk/current-investment.ts b/apps/api/src/models/rules/account-cluster-risk/current-investment.ts
index 0004d394e7..400a2506f6 100644
--- a/apps/api/src/models/rules/account-cluster-risk/current-investment.ts
+++ b/apps/api/src/models/rules/account-cluster-risk/current-investment.ts
@@ -98,13 +98,6 @@ export class AccountClusterRiskCurrentInvestment extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.accountClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/account-cluster-risk/single-account.ts b/apps/api/src/models/rules/account-cluster-risk/single-account.ts
index 9988ea3cc9..e4ee990648 100644
--- a/apps/api/src/models/rules/account-cluster-risk/single-account.ts
+++ b/apps/api/src/models/rules/account-cluster-risk/single-account.ts
@@ -57,13 +57,6 @@ export class AccountClusterRiskSingleAccount extends Rule<RuleSettings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.accountClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return undefined;
}
diff --git a/apps/api/src/models/rules/asset-class-cluster-risk/equity.ts b/apps/api/src/models/rules/asset-class-cluster-risk/equity.ts
index f70756e91d..372b0bb066 100644
--- a/apps/api/src/models/rules/asset-class-cluster-risk/equity.ts
+++ b/apps/api/src/models/rules/asset-class-cluster-risk/equity.ts
@@ -85,13 +85,6 @@ export class AssetClassClusterRiskEquity extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.assetClassClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/asset-class-cluster-risk/fixed-income.ts b/apps/api/src/models/rules/asset-class-cluster-risk/fixed-income.ts
index 3bd835e4d8..404b4cd323 100644
--- a/apps/api/src/models/rules/asset-class-cluster-risk/fixed-income.ts
+++ b/apps/api/src/models/rules/asset-class-cluster-risk/fixed-income.ts
@@ -85,13 +85,6 @@ export class AssetClassClusterRiskFixedIncome extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.assetClassClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts
index d3176582f1..83c72eeb87 100644
--- a/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts
+++ b/apps/api/src/models/rules/currency-cluster-risk/base-currency-current-investment.ts
@@ -82,13 +82,6 @@ export class CurrencyClusterRiskBaseCurrencyCurrentInvestment extends Rule<Setti
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.currencyClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return undefined;
}
diff --git a/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts b/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts
index c73160b527..e52a315043 100644
--- a/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts
+++ b/apps/api/src/models/rules/currency-cluster-risk/current-investment.ts
@@ -75,13 +75,6 @@ export class CurrencyClusterRiskCurrentInvestment extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.currencyClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/economic-market-cluster-risk/developed-markets.ts b/apps/api/src/models/rules/economic-market-cluster-risk/developed-markets.ts
index df9b78eef1..70f09f58cd 100644
--- a/apps/api/src/models/rules/economic-market-cluster-risk/developed-markets.ts
+++ b/apps/api/src/models/rules/economic-market-cluster-risk/developed-markets.ts
@@ -76,13 +76,6 @@ export class EconomicMarketClusterRiskDevelopedMarkets extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.economicMarketClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/economic-market-cluster-risk/emerging-markets.ts b/apps/api/src/models/rules/economic-market-cluster-risk/emerging-markets.ts
index 4583dc50ab..120c3f6a2c 100644
--- a/apps/api/src/models/rules/economic-market-cluster-risk/emerging-markets.ts
+++ b/apps/api/src/models/rules/economic-market-cluster-risk/emerging-markets.ts
@@ -76,13 +76,6 @@ export class EconomicMarketClusterRiskEmergingMarkets extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.economicMarketClusterRisk.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/emergency-fund/emergency-fund-setup.ts b/apps/api/src/models/rules/emergency-fund/emergency-fund-setup.ts
index b956263f81..fcbd99d54f 100644
--- a/apps/api/src/models/rules/emergency-fund/emergency-fund-setup.ts
+++ b/apps/api/src/models/rules/emergency-fund/emergency-fund-setup.ts
@@ -40,13 +40,6 @@ export class EmergencyFundSetup extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.emergencyFund.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return undefined;
}
diff --git a/apps/api/src/models/rules/fees/fee-ratio-total-investment-volume.ts b/apps/api/src/models/rules/fees/fee-ratio-total-investment-volume.ts
index 07bf5fa2c6..23f9076e85 100644
--- a/apps/api/src/models/rules/fees/fee-ratio-total-investment-volume.ts
+++ b/apps/api/src/models/rules/fees/fee-ratio-total-investment-volume.ts
@@ -56,13 +56,6 @@ export class FeeRatioTotalInvestmentVolume extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.fees.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/liquidity/buying-power.ts b/apps/api/src/models/rules/liquidity/buying-power.ts
index 541750d7ee..7e8b96143e 100644
--- a/apps/api/src/models/rules/liquidity/buying-power.ts
+++ b/apps/api/src/models/rules/liquidity/buying-power.ts
@@ -63,13 +63,6 @@ export class BuyingPower extends Rule<Settings> {
};
}
- public getCategoryName() {
- return this.i18nService.getTranslation({
- id: 'rule.liquidity.category',
- languageCode: this.getLanguageCode()
- });
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts b/apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts
index 1242df759d..4723389b02 100644
--- a/apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts
+++ b/apps/api/src/models/rules/regional-market-cluster-risk/asia-pacific.ts
@@ -70,10 +70,6 @@ export class RegionalMarketClusterRiskAsiaPacific extends Rule<Settings> {
};
}
- public getCategoryName() {
- return 'Regional Market Cluster Risk'; // TODO: Replace hardcoded text with i18n translation
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts b/apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts
index 8486d843bb..d4695406ae 100644
--- a/apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts
+++ b/apps/api/src/models/rules/regional-market-cluster-risk/emerging-markets.ts
@@ -72,10 +72,6 @@ export class RegionalMarketClusterRiskEmergingMarkets extends Rule<Settings> {
};
}
- public getCategoryName() {
- return 'Regional Market Cluster Risk'; // TODO: Replace hardcoded text with i18n translation
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts b/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts
index 459848db43..c5cb4d134d 100644
--- a/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts
+++ b/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts
@@ -70,10 +70,6 @@ export class RegionalMarketClusterRiskEurope extends Rule<Settings> {
};
}
- public getCategoryName() {
- return 'Regional Market Cluster Risk'; // TODO: Replace hardcoded text with i18n translation
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/japan.ts b/apps/api/src/models/rules/regional-market-cluster-risk/japan.ts
index d9c1cff6b6..fc9ab92eec 100644
--- a/apps/api/src/models/rules/regional-market-cluster-risk/japan.ts
+++ b/apps/api/src/models/rules/regional-market-cluster-risk/japan.ts
@@ -70,10 +70,6 @@ export class RegionalMarketClusterRiskJapan extends Rule<Settings> {
};
}
- public getCategoryName() {
- return 'Regional Market Cluster Risk'; // TODO: Replace hardcoded text with i18n translation
- }
-
public getConfiguration() {
return {
threshold: {
diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts b/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts
index 6180a2cc5f..8bd3fb0cf1 100644
--- a/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts
+++ b/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts
@@ -70,10 +70,6 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule<Settings> {
};
}
- public getCategoryName() {
- return 'Regional Market Cluster Risk'; // TODO: Replace hardcoded text with i18n translation
- }
-
public getConfiguration() {
return {
threshold: {