Skip to content

Commit

Permalink
feat: Add transaction type, select component, and income/expense calc…
Browse files Browse the repository at this point in the history
…ulation

This commit adds a new feature for transaction types, a select component, and updates to calculate income and expense for accounts.
  • Loading branch information
xDeFc0nx committed Jan 25, 2025
1 parent 36a0ae7 commit 6066177
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 149 deletions.
109 changes: 0 additions & 109 deletions client/README.md

This file was deleted.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-progress": "^1.1.1",
"@radix-ui/react-select": "^2.1.5",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-toast": "^1.2.4",
Expand Down
76 changes: 76 additions & 0 deletions client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion client/src/components/context/userData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ export interface Account {
ID: string;
UserID: string;
AccountID: string;
Income: number;
Expense: number;
AccountBalance: number;
Type: string;
}
export interface Transaction {
ID: string;
UserID: string;
AccountID: string;
Type: string;
Amount: number;
Description: string;
IsRecurring: boolean;
Expand Down Expand Up @@ -66,7 +69,6 @@ export const UserDataProvider = ({
if (socket && isReady) {
socket.send('getUser');
socket.send('getAccounts');

socket.onMessage((msg) => {
const response = JSON.parse(msg);

Expand Down
1 change: 0 additions & 1 deletion client/src/components/sidebar/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const data = {
url: '/app/transactions',
icon: CreditCard,
},

],
};

Expand Down
16 changes: 7 additions & 9 deletions client/src/components/sidebar/nav-main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
type LucideIcon,
} from 'lucide-react';
import { type LucideIcon } from 'lucide-react';
import {
Collapsible,
CollapsibleContent,
Expand Down Expand Up @@ -39,12 +37,12 @@ export function NavMain({
>
<SidebarMenuItem>
<CollapsibleTrigger asChild>
<Link to={item.url}>
<SidebarMenuButton tooltip={item.name}>
{item.icon && <item.icon />}
<span>{item.name}</span>
</SidebarMenuButton>
</Link>
<Link to={item.url}>
<SidebarMenuButton tooltip={item.name}>
{item.icon && <item.icon />}
<span>{item.name}</span>
</SidebarMenuButton>
</Link>
</CollapsibleTrigger>
</SidebarMenuItem>
</Collapsible>
Expand Down
Loading

0 comments on commit 6066177

Please sign in to comment.