mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
refactor: atualiza transacoes dashboard e relatorios
This commit is contained in:
@@ -24,7 +24,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) {
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="flex items-center gap-1.5 text-base">
|
||||
<RiPieChartLine className="size-4 text-primary" />
|
||||
Gastos por Categoria
|
||||
Gastos por Category
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
@@ -45,7 +45,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) {
|
||||
<CardHeader className="pb-3">
|
||||
<CardTitle className="flex items-center gap-1.5 text-base">
|
||||
<RiPieChartLine className="size-4 text-primary" />
|
||||
Gastos por Categoria
|
||||
Gastos por Category
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ export function CategoryReportChart({ data }: CategoryReportChartProps) {
|
||||
<Card className="pt-0">
|
||||
<CardHeader className="flex items-center gap-2 space-y-0 border-b py-5 sm:flex-row">
|
||||
<div className="grid flex-1 gap-1">
|
||||
<CardTitle>Evolução por Categoria</CardTitle>
|
||||
<CardTitle>Evolução por Category</CardTitle>
|
||||
<CardDescription>{periodLabel}</CardDescription>
|
||||
</div>
|
||||
<Select value={limit} onValueChange={setLimit}>
|
||||
|
||||
@@ -54,7 +54,7 @@ export function CategoryReportExport({
|
||||
|
||||
// Build CSV content
|
||||
const headers = [
|
||||
"Categoria",
|
||||
"Category",
|
||||
...data.periods.map(formatPeriodLabel),
|
||||
"Total",
|
||||
];
|
||||
@@ -129,7 +129,7 @@ export function CategoryReportExport({
|
||||
|
||||
// Build data array
|
||||
const headers = [
|
||||
"Categoria",
|
||||
"Category",
|
||||
...data.periods.map(formatPeriodLabel),
|
||||
"Total",
|
||||
];
|
||||
@@ -175,7 +175,7 @@ export function CategoryReportExport({
|
||||
|
||||
// Set column widths
|
||||
ws["!cols"] = [
|
||||
{ wch: 20 }, // Categoria
|
||||
{ wch: 20 }, // Category
|
||||
...data.periods.map(() => ({ wch: 15 })), // Periods
|
||||
{ wch: 15 }, // Total
|
||||
];
|
||||
@@ -249,7 +249,7 @@ export function CategoryReportExport({
|
||||
|
||||
// Build table data
|
||||
const headers = [
|
||||
["Categoria", ...data.periods.map(formatPeriodLabel), "Total"],
|
||||
["Category", ...data.periods.map(formatPeriodLabel), "Total"],
|
||||
];
|
||||
const body: string[][] = [];
|
||||
|
||||
@@ -310,7 +310,7 @@ export function CategoryReportExport({
|
||||
fontStyle: "bold",
|
||||
},
|
||||
columnStyles: {
|
||||
0: { cellWidth: 35 }, // Categoria column wider
|
||||
0: { cellWidth: 35 }, // Category column wider
|
||||
},
|
||||
didParseCell: (cellData) => {
|
||||
// Style totals row
|
||||
|
||||
@@ -129,7 +129,7 @@ export function CategoryReportFilters({
|
||||
|
||||
const selectedText =
|
||||
selectedCategories.length === 0
|
||||
? "Categoria"
|
||||
? "Category"
|
||||
: selectedCategories.length === categories.length
|
||||
? "Todas"
|
||||
: selectedCategories.length === 1
|
||||
|
||||
@@ -65,7 +65,7 @@ export function CategoryTable({
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className="w-[240px] min-w-[240px] font-bold">
|
||||
Categoria
|
||||
Category
|
||||
</TableHead>
|
||||
{periods.map((period) => (
|
||||
<TableHead
|
||||
|
||||
Reference in New Issue
Block a user