diff --git a/app/client/src/enum/AccountCategory.ts b/app/client/src/enum/AccountCategory.ts
index b35f4ec..33c4cc2 100644
--- a/app/client/src/enum/AccountCategory.ts
+++ b/app/client/src/enum/AccountCategory.ts
@@ -1,5 +1,5 @@
export const accountCategory = {
- SAVING: "Savings",
+ SAVINGS: "Savings",
CHEQUING: "Chequing",
INVESTMENT: "Investment",
CREDIT_CARD:"Credit Card",
diff --git a/app/client/src/pages/ProjectionPage.tsx b/app/client/src/pages/ProjectionPage.tsx
index b520687..1a63e8e 100644
--- a/app/client/src/pages/ProjectionPage.tsx
+++ b/app/client/src/pages/ProjectionPage.tsx
@@ -24,7 +24,11 @@ import {
import ProjectionGraph from "@/components/ProjectionGraph";
import { TbGraph } from "react-icons/tb";
import NoItemState from "@/components/NoItemState";
-import { handleCurrencyChange, handleCurrencyBlur } from "@/utils/handleInput";
+import {
+ handleCurrencyChange,
+ handleCurrencyBlur,
+ handleNumberChange,
+} from "@/utils/handleInput";
import type {
projectionDebtRequest,
projectionSavingRequest,
@@ -106,7 +110,7 @@ function ProjectionPage({ session }: ProjectionProp) {
category: accountCategory.CREDIT_CARD,
remainingAmount: inputAmount,
minimumPayment: inputMinPay,
- interestRate: inputInterest / 100,
+ interestRate: inputInterest,
nextDueDate: nextDueDate,
period: inputPeriod,
};
@@ -163,7 +167,7 @@ function ProjectionPage({ session }: ProjectionProp) {
financial_account_id: selectedAccount,
balance: inputAmount,
monthly_deposit: inputMinPay,
- annual_interest_rate: inputInterest / 100,
+ annual_interest_rate: inputInterest,
time_frame: inputPeriod,
};
@@ -233,7 +237,7 @@ function ProjectionPage({ session }: ProjectionProp) {
if (savingRequest) {
//Assigns the fields to what the projection of the saving account used
setSelectedAccount(savingRequest.financial_account_id);
- setAmount(savingRequest.balance.toFixed(2));
+ setAmount((savingRequest.balance * 100).toFixed(2));
setInterest(savingRequest.annual_interest_rate.toString());
setMinPay(savingRequest.monthly_deposit.toFixed(2));
setPeriod(savingRequest.time_frame.toString());
@@ -270,36 +274,6 @@ function ProjectionPage({ session }: ProjectionProp) {
}
};
- //Handles on change of percentage
- const handleNumberChange = (
- event: React.ChangeEvent