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:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import crypto from "node:crypto";
|
||||
|
||||
const JWT_SECRET =
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import type { GoogleProfile } from "better-auth/social-providers";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { headers } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
import { auth } from "@/lib/auth/config";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { eq } from "drizzle-orm";
|
||||
import { categorias } from "@/db/schema";
|
||||
import type { CategoryType } from "@/lib/categorias/constants";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { calculatePercentageChange } from "@/lib/utils/math";
|
||||
import { safeToNumber } from "@/lib/utils/number";
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import type { SelectOption } from "@/components/lancamentos/types";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import type { LancamentoItem } from "@/components/lancamentos/types";
|
||||
import { getTodayDateString } from "@/lib/utils/date";
|
||||
import { derivePeriodFromDate } from "@/lib/utils/period";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { readdir } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
|
||||
|
||||
@@ -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)),
|
||||
]);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { DEFAULT_PAGADOR_AVATAR } from "./constants";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user