refactor: reorganiza componentes compartilhados e caminhos do app
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { RiSettings2Line } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Ajustes | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiTodoLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Anotações | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiCalendarEventLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Calendário | OpenMonetis",
|
||||
|
||||
@@ -9,9 +9,9 @@ import {
|
||||
lancamentos,
|
||||
pagadores,
|
||||
} from "@/db/schema";
|
||||
import { buildInvoicePaymentNote } from "@/lib/accounts/constants";
|
||||
import { revalidateForEntity } from "@/lib/actions/helpers";
|
||||
import { getUser } from "@/lib/auth/server";
|
||||
import { buildInvoicePaymentNote } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import {
|
||||
INVOICE_PAYMENT_STATUS,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { and, desc, eq, type SQL, sum } from "drizzle-orm";
|
||||
import { cartoes, faturas, lancamentos } from "@/db/schema";
|
||||
import { buildInvoicePaymentNote } from "@/lib/accounts/constants";
|
||||
import { buildInvoicePaymentNote } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import {
|
||||
INVOICE_PAYMENT_STATUS,
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
FilterSkeleton,
|
||||
InvoiceSummaryCardSkeleton,
|
||||
TransactionsTableSkeleton,
|
||||
} from "@/components/skeletons";
|
||||
} from "@/components/shared/skeletons";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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: "Cartões | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiPriceTag3Line } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Categorias | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiHistoryLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Cartões | OpenMonetis",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { and, desc, eq, lt, type SQL, sql } from "drizzle-orm";
|
||||
import { contas, lancamentos, pagadores } from "@/db/schema";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/accounts/constants";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/lib/pagadores/constants";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
AccountStatementCardSkeleton,
|
||||
FilterSkeleton,
|
||||
TransactionsTableSkeleton,
|
||||
} from "@/components/skeletons";
|
||||
} from "@/components/shared/skeletons";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
import { and, eq } from "drizzle-orm";
|
||||
import { z } from "zod";
|
||||
import { categorias, contas, lancamentos, pagadores } from "@/db/schema";
|
||||
import {
|
||||
INITIAL_BALANCE_CATEGORY_NAME,
|
||||
INITIAL_BALANCE_CONDITION,
|
||||
INITIAL_BALANCE_NOTE,
|
||||
INITIAL_BALANCE_PAYMENT_METHOD,
|
||||
INITIAL_BALANCE_TRANSACTION_TYPE,
|
||||
} from "@/lib/accounts/constants";
|
||||
import {
|
||||
type ActionResult,
|
||||
handleActionError,
|
||||
revalidateForEntity,
|
||||
} from "@/lib/actions/helpers";
|
||||
import { getUser } from "@/lib/auth/server";
|
||||
import {
|
||||
INITIAL_BALANCE_CATEGORY_NAME,
|
||||
INITIAL_BALANCE_CONDITION,
|
||||
INITIAL_BALANCE_NOTE,
|
||||
INITIAL_BALANCE_PAYMENT_METHOD,
|
||||
INITIAL_BALANCE_TRANSACTION_TYPE,
|
||||
} from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/lib/pagadores/constants";
|
||||
import { noteSchema, uuidSchema } from "@/lib/schemas/common";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { and, eq, ilike, not, sql } from "drizzle-orm";
|
||||
import { contas, lancamentos, pagadores } from "@/db/schema";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/accounts/constants";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import { loadLogoOptions } from "@/lib/logo/options";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/lib/pagadores/constants";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiBankLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Contas | OpenMonetis",
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { DashboardGridSkeleton } from "@/components/skeletons";
|
||||
import { DashboardGridSkeleton } from "@/components/shared/skeletons";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
/**
|
||||
* Loading state para a página do dashboard
|
||||
* Estrutura: Welcome Banner → Month Picker → Section Cards → Widget Grid
|
||||
*/
|
||||
export default function DashboardLoading() {
|
||||
return (
|
||||
<main className="flex flex-col gap-4">
|
||||
|
||||
@@ -16,8 +16,8 @@ import {
|
||||
orcamentos,
|
||||
pagadores,
|
||||
} from "@/db/schema";
|
||||
import { ACCOUNT_AUTO_INVOICE_NOTE_PREFIX } from "@/lib/accounts/constants";
|
||||
import { getUser } from "@/lib/auth/server";
|
||||
import { ACCOUNT_AUTO_INVOICE_NOTE_PREFIX } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/lib/pagadores/constants";
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiSparklingLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Insights | OpenMonetis",
|
||||
|
||||
@@ -10,15 +10,15 @@ import {
|
||||
lancamentos,
|
||||
pagadores,
|
||||
} from "@/db/schema";
|
||||
import { handleActionError, revalidateForEntity } from "@/lib/actions/helpers";
|
||||
import type { ActionResult } from "@/lib/actions/types";
|
||||
import { getUser } from "@/lib/auth/server";
|
||||
import {
|
||||
INITIAL_BALANCE_CONDITION,
|
||||
INITIAL_BALANCE_NOTE,
|
||||
INITIAL_BALANCE_PAYMENT_METHOD,
|
||||
INITIAL_BALANCE_TRANSACTION_TYPE,
|
||||
} from "@/lib/accounts/constants";
|
||||
import { handleActionError, revalidateForEntity } from "@/lib/actions/helpers";
|
||||
import type { ActionResult } from "@/lib/actions/types";
|
||||
import { getUser } from "@/lib/auth/server";
|
||||
} from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import {
|
||||
LANCAMENTO_CONDITIONS,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
lancamentos,
|
||||
pagadores,
|
||||
} from "@/db/schema";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/accounts/constants";
|
||||
import { INITIAL_BALANCE_NOTE } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
|
||||
export async function fetchLancamentos(filters: SQL[]) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiArrowLeftRightLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Lançamentos | OpenMonetis",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
FilterSkeleton,
|
||||
TransactionsTableSkeleton,
|
||||
} from "@/components/skeletons";
|
||||
} from "@/components/shared/skeletons";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FontProvider } from "@/components/font-provider";
|
||||
import { AppNavbar } from "@/components/navbar/app-navbar";
|
||||
import { AppNavbar } from "@/components/navigation/navbar/app-navbar";
|
||||
import { PrivacyProvider } from "@/components/privacy-provider";
|
||||
import { getUserSession } from "@/lib/auth/server";
|
||||
import { fetchDashboardNotifications } from "@/lib/dashboard/notifications";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
orcamentos,
|
||||
pagadores,
|
||||
} from "@/db/schema";
|
||||
import { ACCOUNT_AUTO_INVOICE_NOTE_PREFIX } from "@/lib/accounts/constants";
|
||||
import { ACCOUNT_AUTO_INVOICE_NOTE_PREFIX } from "@/lib/contas/constants";
|
||||
import { db } from "@/lib/db";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/lib/pagadores/constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiBarChart2Line } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Orçamentos | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiGroupLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Pagadores | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiAtLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Pré-Lançamentos | OpenMonetis",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RiSecurePaymentLine } from "@remixicon/react";
|
||||
import PageDescription from "@/components/page-description";
|
||||
import PageDescription from "@/components/shared/page-description";
|
||||
|
||||
export const metadata = {
|
||||
title: "Análise de Parcelas | OpenMonetis",
|
||||
@@ -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",
|
||||
|
||||
@@ -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>>;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user