refactor: reorganiza componentes compartilhados e caminhos do app

This commit is contained in:
Felipe Coutinho
2026-03-06 13:57:40 +00:00
parent f0497d5c5f
commit 069d0759c6
103 changed files with 225 additions and 622 deletions

View File

@@ -0,0 +1,23 @@
import { RiSecurePaymentLine } from "@remixicon/react";
import PageDescription from "@/components/shared/page-description";
export const metadata = {
title: "Análise de Parcelas | OpenMonetis",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section className="space-y-6 pt-4">
<PageDescription
icon={<RiSecurePaymentLine />}
title="Análise de Parcelas"
subtitle="Quanto você gastaria pagando suas despesas parceladas à vista?"
/>
{children}
</section>
);
}

View File

@@ -0,0 +1,14 @@
import { InstallmentAnalysisPage } from "@/components/dashboard/installment-analysis/installment-analysis-page";
import { getUser } from "@/lib/auth/server";
import { fetchInstallmentAnalysis } from "@/lib/dashboard/expenses/installment-analysis";
export default async function Page() {
const user = await getUser();
const data = await fetchInstallmentAnalysis(user.id);
return (
<main className="flex flex-col gap-4 pb-8">
<InstallmentAnalysisPage data={data} />
</main>
);
}

View File

@@ -1,5 +1,5 @@
import { RiStore2Line } from "@remixicon/react";
import PageDescription from "@/components/page-description";
import PageDescription from "@/components/shared/page-description";
export const metadata = {
title: "Top Estabelecimentos | OpenMonetis",

View File

@@ -1,14 +1,14 @@
import { EstablishmentsList } from "@/components/top-estabelecimentos/establishments-list";
import { HighlightsCards } from "@/components/top-estabelecimentos/highlights-cards";
import { PeriodFilterButtons } from "@/components/top-estabelecimentos/period-filter";
import { SummaryCards } from "@/components/top-estabelecimentos/summary-cards";
import { TopCategories } from "@/components/top-estabelecimentos/top-categories";
import { EstablishmentsList } from "@/components/relatorios/estabelecimentos/establishments-list";
import { HighlightsCards } from "@/components/relatorios/estabelecimentos/highlights-cards";
import { PeriodFilterButtons } from "@/components/relatorios/estabelecimentos/period-filter";
import { SummaryCards } from "@/components/relatorios/estabelecimentos/summary-cards";
import { TopCategories } from "@/components/relatorios/estabelecimentos/top-categories";
import { Card } from "@/components/ui/card";
import { getUser } from "@/lib/auth/server";
import {
fetchTopEstabelecimentosData,
type PeriodFilter,
} from "@/lib/top-estabelecimentos/fetch-data";
} from "@/lib/relatorios/estabelecimentos/fetch-data";
import { parsePeriodParam } from "@/lib/utils/period";
type PageSearchParams = Promise<Record<string, string | string[] | undefined>>;

View File

@@ -1,5 +1,5 @@
import { RiFileChartLine } from "@remixicon/react";
import PageDescription from "@/components/page-description";
import PageDescription from "@/components/shared/page-description";
export const metadata = {
title: "Tendências | OpenMonetis",

View File

@@ -1,4 +1,4 @@
import { CategoryReportSkeleton } from "@/components/skeletons/category-report-skeleton";
import { CategoryReportSkeleton } from "@/components/shared/skeletons/category-report-skeleton";
export default function Loading() {
return (

View File

@@ -1,5 +1,5 @@
import { RiBankCard2Line } from "@remixicon/react";
import PageDescription from "@/components/page-description";
import PageDescription from "@/components/shared/page-description";
export const metadata = {
title: "Uso de Cartões | OpenMonetis",