mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
refactor: atualiza transacoes dashboard e relatorios
This commit is contained in:
@@ -111,7 +111,7 @@ export function CategoryReportSkeleton() {
|
||||
|
||||
/**
|
||||
* Skeleton para a tabela de relatórios de categorias
|
||||
* Mantém a estrutura de colunas: Categoria, Tipo, múltiplos períodos, Total
|
||||
* Mantém a estrutura de colunas: Category, Tipo, múltiplos períodos, Total
|
||||
*/
|
||||
function CategoryReportTableSkeleton() {
|
||||
// Simula 6 períodos (colunas)
|
||||
@@ -122,7 +122,7 @@ function CategoryReportTableSkeleton() {
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
{/* Categoria */}
|
||||
{/* Category */}
|
||||
<TableHead className="w-[280px] min-w-[280px]">
|
||||
<Skeleton className="h-4 w-20 rounded-2xl bg-foreground/10" />
|
||||
</TableHead>
|
||||
|
||||
@@ -24,8 +24,8 @@ export function TransactionsTableSkeleton() {
|
||||
<TableHead className="w-[120px]">Valor</TableHead>
|
||||
<TableHead className="w-[120px]">Condição</TableHead>
|
||||
<TableHead className="w-[120px]">Pagamento</TableHead>
|
||||
<TableHead className="w-[140px]">Pagador</TableHead>
|
||||
<TableHead className="w-[140px]">Categoria</TableHead>
|
||||
<TableHead className="w-[140px]">Payer</TableHead>
|
||||
<TableHead className="w-[140px]">Category</TableHead>
|
||||
<TableHead className="w-[140px]">Conta/Cartão</TableHead>
|
||||
<TableHead className="w-[80px]">Ações</TableHead>
|
||||
</TableRow>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type {
|
||||
AntecipacaoParcela,
|
||||
Categoria,
|
||||
Lancamento,
|
||||
Pagador,
|
||||
Category,
|
||||
InstallmentAnticipation,
|
||||
Payer,
|
||||
Transaction,
|
||||
} from "@/db/schema";
|
||||
|
||||
/**
|
||||
@@ -18,17 +18,17 @@ export type EligibleInstallment = {
|
||||
currentInstallment: number | null;
|
||||
installmentCount: number | null;
|
||||
paymentMethod: string;
|
||||
categoriaId: string | null;
|
||||
pagadorId: string | null;
|
||||
categoryId: string | null;
|
||||
payerId: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Antecipação com dados completos
|
||||
*/
|
||||
export type InstallmentAnticipationWithRelations = AntecipacaoParcela & {
|
||||
lancamento: Lancamento;
|
||||
pagador: Pagador | null;
|
||||
categoria: Categoria | null;
|
||||
export type InstallmentAnticipationWithRelations = InstallmentAnticipation & {
|
||||
transaction: Transaction;
|
||||
payer: Payer | null;
|
||||
category: Category | null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -39,8 +39,8 @@ export type CreateAnticipationInput = {
|
||||
installmentIds: string[];
|
||||
anticipationPeriod: string;
|
||||
discount?: number;
|
||||
pagadorId?: string;
|
||||
categoriaId?: string;
|
||||
payerId?: string;
|
||||
categoryId?: string;
|
||||
note?: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import type {
|
||||
LancamentoItem,
|
||||
SelectOption,
|
||||
TransactionItem,
|
||||
} from "@/features/transactions/components/types";
|
||||
|
||||
export type CalendarEvent =
|
||||
| {
|
||||
id: string;
|
||||
type: "lancamento";
|
||||
type: "transaction";
|
||||
date: string;
|
||||
lancamento: LancamentoItem;
|
||||
transaction: TransactionItem;
|
||||
}
|
||||
| {
|
||||
id: string;
|
||||
type: "boleto";
|
||||
date: string;
|
||||
lancamento: LancamentoItem;
|
||||
transaction: TransactionItem;
|
||||
}
|
||||
| {
|
||||
id: string;
|
||||
type: "cartao";
|
||||
type: "card";
|
||||
date: string;
|
||||
card: {
|
||||
id: string;
|
||||
@@ -47,12 +47,12 @@ export type CalendarDay = {
|
||||
};
|
||||
|
||||
export type CalendarFormOptions = {
|
||||
pagadorOptions: SelectOption[];
|
||||
splitPagadorOptions: SelectOption[];
|
||||
defaultPagadorId: string | null;
|
||||
contaOptions: SelectOption[];
|
||||
cartaoOptions: SelectOption[];
|
||||
categoriaOptions: SelectOption[];
|
||||
payerOptions: SelectOption[];
|
||||
splitPayerOptions: SelectOption[];
|
||||
defaultPayerId: string | null;
|
||||
accountOptions: SelectOption[];
|
||||
cardOptions: SelectOption[];
|
||||
categoryOptions: SelectOption[];
|
||||
estabelecimentos: string[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user