Skip to content

Commit

Permalink
fix(ui): Add missing filter-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tklein1801 committed Jan 22, 2024
1 parent 7c95566 commit 4b8d677
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/routes/Categories.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
import { SearchInput } from '@/components/Base/Search';
import { type ISelectionHandler } from '@/components/Base/Select';
import { HotkeyBadge } from '@/components/HotkeyBadge.component';
import { ToggleFilterDrawerButton } from '@/core/Filter';

interface ICategoriesHandler {
onSearch: (keyword: string) => void;
Expand Down Expand Up @@ -192,6 +193,8 @@ export const Categories = () => {
)}
tableActions={
<React.Fragment>
<ToggleFilterDrawerButton />

<SearchInput onSearch={handler.onSearch} />

<HotkeyBadge hotkey="a">
Expand Down
3 changes: 3 additions & 0 deletions src/routes/PaymentMethods.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { useEntityDrawer, CreateEntityDrawerState, useKeyPress } from '@/hooks';
import { useNavigate, useLocation } from 'react-router-dom';
import { type ISelectionHandler } from '@/components/Base/Select';
import { HotkeyBadge } from '@/components/HotkeyBadge.component';
import { ToggleFilterDrawerButton } from '@/core/Filter';

interface IPaymentMethodsHandler {
onSearch: (keyword: string) => void;
Expand Down Expand Up @@ -203,6 +204,8 @@ export const PaymentMethods = () => {
)}
tableActions={
<React.Fragment>
<ToggleFilterDrawerButton />

<SearchInput onSearch={handler.onSearch} />

<HotkeyBadge hotkey="a">
Expand Down
10 changes: 8 additions & 2 deletions src/routes/Subscriptions.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ import { AddRounded, DeleteRounded, EditRounded } from '@mui/icons-material';
import { Box, Checkbox, Grid, IconButton, TableCell, TableRow, Typography } from '@mui/material';
import { useSnackbarContext } from '@/core/Snackbar';
import { useAuthContext } from '@/core/Auth';
import { TSubscription, TTransaction, TUpdateSubscriptionPayload } from '@budgetbuddyde/types';
import {
type TSubscription,
type TTransaction,
type TUpdateSubscriptionPayload,
} from '@budgetbuddyde/types';
import { Table } from '@/components/Base/Table';
import { AppConfig } from '@/app.config';
import { DescriptionTableCellStyle } from '@/style/DescriptionTableCell.style';
import { DeleteDialog } from '@/components/DeleteDialog.component';
import { determineNextExecution, determineNextExecutionDate } from '@/utils';
import { CreateTransactionDrawer } from '@/core/Transaction';
import { filterSubscriptions } from '@/utils/filter.util';
import { useFilterStore } from '@/core/Filter';
import { ToggleFilterDrawerButton, useFilterStore } from '@/core/Filter';
import { CategoryChip } from '@/core/Category';
import { PaymentMethodChip } from '@/core/PaymentMethod';
import { type ISelectionHandler } from '@/components/Base/Select';
Expand Down Expand Up @@ -277,6 +281,8 @@ export const Subscriptions = () => {
)}
tableActions={
<React.Fragment>
<ToggleFilterDrawerButton />

<SearchInput onSearch={handler.onSearch} />

<HotkeyBadge hotkey="a">
Expand Down
6 changes: 4 additions & 2 deletions src/routes/Transactions.route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import {
useFetchTransactions,
} from '@/core/Transaction';
import { Checkbox, Grid, IconButton, TableCell, TableRow, Typography } from '@mui/material';
import { TTransaction } from '@budgetbuddyde/types';
import { type TTransaction } from '@budgetbuddyde/types';
import { DeleteDialog } from '@/components/DeleteDialog.component';
import { SearchInput } from '@/components/Base/Search';
import { AddRounded, DeleteRounded, EditRounded } from '@mui/icons-material';
import { Table } from '@/components/Base/Table';
import { AppConfig } from '@/app.config';
import { format } from 'date-fns';
import { DescriptionTableCellStyle } from '@/style/DescriptionTableCell.style';
import { useFilterStore } from '@/core/Filter';
import { ToggleFilterDrawerButton, useFilterStore } from '@/core/Filter';
import { filterTransactions } from '@/utils/filter.util';
import { CategoryChip } from '@/core/Category';
import { PaymentMethodChip } from '@/core/PaymentMethod';
Expand Down Expand Up @@ -202,6 +202,8 @@ export const Transactions = () => {
)}
tableActions={
<React.Fragment>
<ToggleFilterDrawerButton />

<SearchInput onSearch={handler.onSearch} />

<HotkeyBadge hotkey="A">
Expand Down

0 comments on commit 4b8d677

Please sign in to comment.