forked from git.gladyson/openmonetis
- Replace ESLint with Biome for linting and formatting - Configure Biome with tabs, double quotes, and organized imports - Move all SQL/Drizzle queries from page.tsx files to data.ts files - Create new data.ts files for: ajustes, dashboard, relatorios/categorias - Update existing data.ts files: extrato, fatura (add lancamentos queries) - Remove all drizzle-orm imports from page.tsx files - Update README.md with new tooling info Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
import type {
|
|
LancamentoItem,
|
|
SelectOption,
|
|
} from "@/components/lancamentos/types";
|
|
|
|
export type CalendarEventType = "lancamento" | "boleto" | "cartao";
|
|
|
|
export type CalendarEvent =
|
|
| {
|
|
id: string;
|
|
type: "lancamento";
|
|
date: string;
|
|
lancamento: LancamentoItem;
|
|
}
|
|
| {
|
|
id: string;
|
|
type: "boleto";
|
|
date: string;
|
|
lancamento: LancamentoItem;
|
|
}
|
|
| {
|
|
id: string;
|
|
type: "cartao";
|
|
date: string;
|
|
card: {
|
|
id: string;
|
|
name: string;
|
|
dueDay: string;
|
|
closingDay: string;
|
|
brand: string | null;
|
|
status: string;
|
|
logo: string | null;
|
|
totalDue: number | null;
|
|
};
|
|
};
|
|
|
|
export type CalendarPeriod = {
|
|
period: string;
|
|
monthName: string;
|
|
year: number;
|
|
};
|
|
|
|
export type CalendarDay = {
|
|
date: string;
|
|
label: string;
|
|
isCurrentMonth: boolean;
|
|
isToday: boolean;
|
|
events: CalendarEvent[];
|
|
};
|
|
|
|
export type CalendarFormOptions = {
|
|
pagadorOptions: SelectOption[];
|
|
splitPagadorOptions: SelectOption[];
|
|
defaultPagadorId: string | null;
|
|
contaOptions: SelectOption[];
|
|
cartaoOptions: SelectOption[];
|
|
categoriaOptions: SelectOption[];
|
|
estabelecimentos: string[];
|
|
};
|
|
|
|
export type CalendarData = {
|
|
events: CalendarEvent[];
|
|
formOptions: CalendarFormOptions;
|
|
};
|