forked from git.gladyson/openmonetis
- Create inbox page with pending items management: - InboxCard: displays notification summary with parsed data - InboxDetailsDialog: view full notification details - ProcessDialog: convert notification to transaction (lancamento) - Add server actions for inbox operations: - getInboxItems: fetch pending inbox items - processInboxItem: create lancamento from inbox item - discardInboxItem: discard unwanted notifications - Add navigation link to sidebar under 'Gestão Financeira' - Add revalidation config for inbox-related paths
31 lines
752 B
TypeScript
31 lines
752 B
TypeScript
import { InboxPage } from "@/components/caixa-de-entrada/inbox-page";
|
|
import { getUserId } from "@/lib/auth/server";
|
|
import {
|
|
fetchInboxItems,
|
|
fetchCategoriasForSelect,
|
|
fetchContasForSelect,
|
|
fetchCartoesForSelect,
|
|
} from "./data";
|
|
|
|
export default async function Page() {
|
|
const userId = await getUserId();
|
|
|
|
const [items, categorias, contas, cartoes] = await Promise.all([
|
|
fetchInboxItems(userId, "pending"),
|
|
fetchCategoriasForSelect(userId),
|
|
fetchContasForSelect(userId),
|
|
fetchCartoesForSelect(userId),
|
|
]);
|
|
|
|
return (
|
|
<main className="flex flex-col items-start gap-6">
|
|
<InboxPage
|
|
items={items}
|
|
categorias={categorias}
|
|
contas={contas}
|
|
cartoes={cartoes}
|
|
/>
|
|
</main>
|
|
);
|
|
}
|