- Fix issue where budget input for transportation and other categories were not saved correctly.
- Fix issue where total budget amount was calculated incorrectly.
- Fix issue where daily and weekly budgets were not displayed correctly.
The `useBudget` hook was being called outside of a `BudgetProvider`, leading to an error. This commit ensures that the `useBudget` hook is only called within the `BudgetProvider` context.
The BudgetContext.tsx file was throwing an error because it was trying to import `BudgetPeriod` from the wrong location. Changed the import path to correctly reference the `BudgetPeriod` type.
- Fix TS2353: Object literal may only specify known properties, and 'paymentMethod' does not exist in type 'Transaction'.
- Fix TS1205: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
- Fix TS2741: Property 'getPaymentMethodStats' is missing in type '{ transactions: Transaction[]; budgetData: BudgetData; categoryBudgets: Record<string, number>; selectedTab: BudgetPeriod; setSelectedTab: React.Dispatch<...>; ... 5 more ...; resetBudgetData: () => void; }' but required in type 'BudgetContextType'.
The `useBudget` hook was being called outside of the `BudgetProvider` context in the `Index` component. This commit ensures that the `Index` component and its children are wrapped with the `BudgetProvider` in `App.tsx` to resolve the error.
Adds a payment method selection (Credit Card, Cash) to the expense form and includes a line separator. Also requests to add a graph showing the proportion of credit card and cash usage in expense analytics, but this part is not implemented in this commit.
The type `Transaction` was missing the `localTimestamp` property, causing TypeScript errors in `downloadTransaction.ts` and `uploadTransaction.ts`. This commit adds the `localTimestamp` property to the `Transaction` interface to resolve these errors.
- Resolve Typescript isolatedModules error by using 'export type' when re-exporting types.
- Fix module ambiguity by explicitly re-exporting 'BudgetContextType'.
- Correct import paths for useAuth hook in transaction-related files.
Fixes an issue where entering a monthly budget resulted in incorrect daily, weekly, and monthly budget calculations, leading to incorrect display on the spending and analytics screens.
The settings page was reloading slowly after a data reset. This commit addresses the issue by preventing the unnecessary reload after the reset operation.
The application was displaying duplicate toast notifications due to events being triggered multiple times. This commit prevents duplicate notifications.
- Fixes an issue where toast notifications would not automatically dismiss.
- Addresses a problem where expense data was not displaying correctly on the transaction and analytics screens.
The budget was not being displayed correctly in the spending and analytics screens, as well as the weekly and monthly views on the home screen. This commit addresses these issues.
The object literals in createSampleTransactions function were specifying the 'notes' property, which does not exist in the Transaction type. This commit removes the 'notes' property from the object literals to resolve the TS2353 error.
Addresses the problem where budget data was not persisting across page transitions, causing budget and expense information to disappear from the expense page and only expense data to appear on the analytics page.
Addresses issues where budget and expense data were not displaying correctly on the summary cards, category bar graph, and transaction/analytics pages. Also fixes a bug where data was disappearing after input.
Refactors the `useBudgetState.ts` file into smaller, more manageable files to improve code organization and maintainability. No functionality is changed.
The data initialization logic was not properly clearing existing data, leading to incorrect budget values. This commit ensures that all relevant data is cleared upon initialization.