(squash) init

feat: filters, settings, backups

fix: ts compile errors

feat: new dashboard, webp previews and settings

feat: use webp for pdfs

feat: use webp

fix: analyze resets old data

fix: switch to corsproxy

fix: switch to free cors

fix: max upload limit

fix: currency conversion

feat: transaction export

fix: currency conversion

feat: refactor settings actions

feat: new loader

feat: README + LICENSE

doc: update readme

doc: update readme

doc: update readme

doc: update screenshots

ci: bump prisma
This commit is contained in:
Vasily Zubarev
2025-03-13 00:30:47 +01:00
commit 0b98a2c307
153 changed files with 17271 additions and 0 deletions

71
app/transactions/page.tsx Normal file
View File

@@ -0,0 +1,71 @@
import { ExportTransactionsDialog } from "@/components/export/transactions"
import { UploadButton } from "@/components/files/upload-button"
import { TransactionSearchAndFilters } from "@/components/transactions/filters"
import { TransactionList } from "@/components/transactions/list"
import { NewTransactionDialog } from "@/components/transactions/new"
import { Button } from "@/components/ui/button"
import { getCategories } from "@/data/categories"
import { getFields } from "@/data/fields"
import { getProjects } from "@/data/projects"
import { getTransactions, TransactionFilters } from "@/data/transactions"
import { Download, Plus, Upload } from "lucide-react"
import { Metadata } from "next"
export const metadata: Metadata = {
title: "Transactions",
description: "Manage your transactions",
}
export default async function TransactionsPage({ searchParams }: { searchParams: Promise<TransactionFilters> }) {
const filters = await searchParams
const transactions = await getTransactions(filters)
const categories = await getCategories()
const projects = await getProjects()
const fields = await getFields()
return (
<>
<header className="flex flex-wrap items-center justify-between gap-2 mb-8">
<h2 className="text-3xl font-bold tracking-tight">Transactions</h2>
<div className="flex gap-2">
<ExportTransactionsDialog filters={filters} fields={fields} categories={categories} projects={projects}>
<Button variant="outline">
<Download />
<span className="hidden md:block">Export</span>
</Button>
</ExportTransactionsDialog>
<NewTransactionDialog>
<Button>
<Plus /> <span className="hidden md:block">Add Transaction</span>
</Button>
</NewTransactionDialog>
</div>
</header>
<TransactionSearchAndFilters categories={categories} projects={projects} />
<main>
<TransactionList transactions={transactions} />
{transactions.length === 0 && (
<div className="flex flex-col items-center justify-center gap-2 h-full min-h-[400px]">
<p className="text-muted-foreground">
You don't seem to have any transactions yet. Let's start and create the first one!
</p>
<div className="flex flex-row gap-5 mt-8">
<UploadButton>
<Upload /> Analyze New Invoice
</UploadButton>
<NewTransactionDialog>
<Button variant="outline">
<Plus />
Add Manually
</Button>
</NewTransactionDialog>
</div>
</div>
)}
</main>
</>
)
}