refactor(sidebar): reorganizar navegação e aplicar formatação Biome

- Simplifica estrutura da sidebar combinando seções "Visão Geral" e "Gestão Financeira"
- Renomeia itens de relatórios para maior clareza ("Tendências", "Uso de Cartões")
- Aplica correções de formatação do Biome (ordenação de imports, quebras de linha)
- Remove código comentado não utilizado
- Adiciona migração 0014 do Drizzle

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-01-29 13:16:39 +00:00
parent 120da3659b
commit df1d149e4a
43 changed files with 4446 additions and 2515 deletions

View File

@@ -1,5 +1,3 @@
import crypto from "node:crypto";
const JWT_SECRET =

View File

@@ -1,5 +1,3 @@
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import type { GoogleProfile } from "better-auth/social-providers";

View File

@@ -1,5 +1,3 @@
import { headers } from "next/headers";
import { redirect } from "next/navigation";
import { auth } from "@/lib/auth/config";

View File

@@ -1,5 +1,3 @@
import { eq } from "drizzle-orm";
import { categorias } from "@/db/schema";
import type { CategoryType } from "@/lib/categorias/constants";

View File

@@ -1,5 +1,3 @@
import { calculatePercentageChange } from "@/lib/utils/math";
import { safeToNumber } from "@/lib/utils/number";

View File

@@ -1,5 +1,3 @@
import type { SelectOption } from "@/components/lancamentos/types";
/**

View File

@@ -1,5 +1,3 @@
import type { LancamentoItem } from "@/components/lancamentos/types";
import { getTodayDateString } from "@/lib/utils/date";
import { derivePeriodFromDate } from "@/lib/utils/period";

View File

@@ -1,5 +1,3 @@
import { readdir } from "node:fs/promises";
import path from "node:path";

View File

@@ -1,5 +1,9 @@
import { and, eq } from "drizzle-orm";
import { pagadores, compartilhamentosPagador, user as usersTable } from "@/db/schema";
import {
compartilhamentosPagador,
pagadores,
user as usersTable,
} from "@/db/schema";
import { db } from "@/lib/db";
export type PagadorWithAccess = typeof pagadores.$inferSelect & {
@@ -24,7 +28,10 @@ export async function fetchPagadoresWithAccess(
ownerEmail: usersTable.email,
})
.from(compartilhamentosPagador)
.innerJoin(pagadores, eq(compartilhamentosPagador.pagadorId, pagadores.id))
.innerJoin(
pagadores,
eq(compartilhamentosPagador.pagadorId, pagadores.id),
)
.leftJoin(usersTable, eq(pagadores.userId, usersTable.id))
.where(eq(compartilhamentosPagador.sharedWithUserId, userId)),
]);

View File

@@ -1,5 +1,3 @@
import { DEFAULT_PAGADOR_AVATAR } from "./constants";
/**

View File

@@ -1,5 +1,3 @@
import { format } from "date-fns";
import { ptBR } from "date-fns/locale";
import { and, eq, inArray, isNull, or, sql } from "drizzle-orm";

View File

@@ -1,5 +1,3 @@
import { and, eq, inArray, isNull, or, sql } from "drizzle-orm";
import { categorias, lancamentos, pagadores } from "@/db/schema";
import { ACCOUNT_AUTO_INVOICE_NOTE_PREFIX } from "@/lib/accounts/constants";

View File

@@ -1,5 +1,3 @@
import { currencyFormatter } from "@/lib/lancamentos/formatting-helpers";
import { calculatePercentageChange } from "@/lib/utils/math";
import { buildPeriodRange, MONTH_NAMES, parsePeriod } from "@/lib/utils/period";

View File

@@ -1,5 +1,3 @@
import { z } from "zod";
export const inboxItemSchema = z.object({
@@ -10,7 +8,6 @@ export const inboxItemSchema = z.object({
notificationTimestamp: z.string().transform((val) => new Date(val)),
parsedName: z.string().optional(),
parsedAmount: z.coerce.number().optional(),
parsedTransactionType: z.enum(["Despesa", "Receita"]).optional(),
clientId: z.string().optional(), // ID local do app para rastreamento
});

View File

@@ -1,5 +1,3 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";