diff --git a/app/(dashboard)/relatorios/estabelecimentos/loading.tsx b/app/(dashboard)/relatorios/estabelecimentos/loading.tsx index ac15aa9..78728d1 100644 --- a/app/(dashboard)/relatorios/estabelecimentos/loading.tsx +++ b/app/(dashboard)/relatorios/estabelecimentos/loading.tsx @@ -3,7 +3,7 @@ import { Skeleton } from "@/components/ui/skeleton"; export default function Loading() { return ( -
+
diff --git a/components/anotacoes/note-card.tsx b/components/anotacoes/note-card.tsx index 351c00d..77ac5ec 100644 --- a/components/anotacoes/note-card.tsx +++ b/components/anotacoes/note-card.tsx @@ -4,7 +4,7 @@ import { RiArchiveLine, RiCheckLine, RiDeleteBin5Line, - RiEyeLine, + RiFileList2Line, RiInboxUnarchiveLine, RiPencilLine, } from "@remixicon/react"; @@ -60,7 +60,7 @@ export function NoteCard({ }, { label: "detalhes", - icon: , + icon: , onClick: onDetails, variant: "default" as const, }, @@ -115,7 +115,9 @@ export function NoteCard({
{task.text} diff --git a/components/anotacoes/note-details-dialog.tsx b/components/anotacoes/note-details-dialog.tsx index 54de84f..ba6b12f 100644 --- a/components/anotacoes/note-details-dialog.tsx +++ b/components/anotacoes/note-details-dialog.tsx @@ -72,11 +72,11 @@ export function NoteDetailsDialog({ {isTask ? ( -
+ {sortedTasks.map((task) => ( -
{task.text} - +
))} -
+ ) : (
{note.description} diff --git a/components/anotacoes/note-dialog.tsx b/components/anotacoes/note-dialog.tsx index edd44ef..10a8969 100644 --- a/components/anotacoes/note-dialog.tsx +++ b/components/anotacoes/note-dialog.tsx @@ -338,7 +338,7 @@ export function NoteDialog({
{sortedTasks.length > 0 && ( -
+
{sortedTasks.map((task) => (
e.preventDefault()} + onPointerDownOutside={(e) => e.preventDefault()} + onFocusOutside={(e) => e.preventDefault()} + onInteractOutside={(e) => e.preventDefault()} > void; + isResultView: boolean; }; export function CalculatorDisplay({ @@ -15,14 +17,27 @@ export function CalculatorDisplay({ resultText, copied, onCopy, + isResultView, }: CalculatorDisplayProps) { return ( -
- {history && ( -
{history}
- )} -
-
+
+
+ {history ?? ( + + 0 + 0 + + )} +
+
+
{expression}
{resultText && ( diff --git a/components/calculadora/calculator.tsx b/components/calculadora/calculator.tsx index 43027f7..ac0e4c5 100644 --- a/components/calculadora/calculator.tsx +++ b/components/calculadora/calculator.tsx @@ -64,6 +64,7 @@ export default function Calculator({ resultText={resultText} copied={copied} onCopy={copyToClipboard} + isResultView={Boolean(history)} /> {onSelectValue && ( diff --git a/components/cartoes/card-item.tsx b/components/cartoes/card-item.tsx index 0e97dbd..b16173b 100644 --- a/components/cartoes/card-item.tsx +++ b/components/cartoes/card-item.tsx @@ -3,7 +3,7 @@ import { RiChat3Line, RiDeleteBin5Line, - RiEyeLine, + RiFileList2Line, RiPencilLine, } from "@remixicon/react"; import Image from "next/image"; @@ -143,7 +143,7 @@ export function CardItem({ }, { label: "ver fatura", - icon: , + icon: , onClick: onInvoice, className: "text-primary", }, diff --git a/components/dashboard/boletos-widget.tsx b/components/dashboard/boletos-widget.tsx index aea2a48..09242e6 100644 --- a/components/dashboard/boletos-widget.tsx +++ b/components/dashboard/boletos-widget.tsx @@ -245,7 +245,7 @@ export function BoletosWidget({ boletos }: BoletosWidgetProps) { }} > { if (isProcessing) { event.preventDefault(); diff --git a/components/dashboard/dashboard-grid-editable.tsx b/components/dashboard/dashboard-grid-editable.tsx index f3158ba..9144858 100644 --- a/components/dashboard/dashboard-grid-editable.tsx +++ b/components/dashboard/dashboard-grid-editable.tsx @@ -16,8 +16,7 @@ import { sortableKeyboardCoordinates, } from "@dnd-kit/sortable"; import { - RiArrowDownLine, - RiArrowUpLine, + RiAddCircleLine, RiCheckLine, RiCloseLine, RiDragMove2Line, @@ -201,11 +200,11 @@ export function DashboardGridEditable({ {/* Toolbar */}
{!isEditing ? ( -
+
Ações rápidas -
+
- - Nova receita + } /> @@ -236,18 +242,30 @@ export function DashboardGridEditable({ defaultPeriod={period} defaultTransactionType="Despesa" trigger={ - } /> - - Nova anotação + } /> @@ -257,7 +275,7 @@ export function DashboardGridEditable({
)} -
+
{isEditing ? ( <> - +
)}
diff --git a/components/dashboard/installment-analysis/installment-group-card.tsx b/components/dashboard/installment-analysis/installment-group-card.tsx index 177e0ae..f17ae7a 100644 --- a/components/dashboard/installment-analysis/installment-group-card.tsx +++ b/components/dashboard/installment-analysis/installment-group-card.tsx @@ -80,7 +80,7 @@ export function InstallmentGroupCard({ {group.cartaoLogo && ( {group.cartaoName} )} diff --git a/components/dashboard/installment-analysis/types.ts b/components/dashboard/installment-analysis/types.ts index 51c0bb7..4f18f59 100644 --- a/components/dashboard/installment-analysis/types.ts +++ b/components/dashboard/installment-analysis/types.ts @@ -1,7 +1,6 @@ import type { InstallmentAnalysisData, InstallmentGroup, - PendingInvoice, } from "@/lib/dashboard/expenses/installment-analysis"; -export type { InstallmentAnalysisData, InstallmentGroup, PendingInvoice }; +export type { InstallmentAnalysisData, InstallmentGroup }; diff --git a/components/dashboard/invoices-widget.tsx b/components/dashboard/invoices-widget.tsx index cedfc72..22cee07 100644 --- a/components/dashboard/invoices-widget.tsx +++ b/components/dashboard/invoices-widget.tsx @@ -419,7 +419,7 @@ export function InvoicesWidget({ invoices }: InvoicesWidgetProps) { }} > { if (modalState === "processing") { event.preventDefault(); diff --git a/components/dashboard/notes-widget.tsx b/components/dashboard/notes-widget.tsx index 8e70ad2..f982e81 100644 --- a/components/dashboard/notes-widget.tsx +++ b/components/dashboard/notes-widget.tsx @@ -1,6 +1,6 @@ "use client"; -import { RiEyeLine, RiPencilLine, RiTodoLine } from "@remixicon/react"; +import { RiFileList2Line, RiPencilLine, RiTodoLine } from "@remixicon/react"; import { useCallback, useMemo, useState } from "react"; import { NoteDetailsDialog } from "@/components/anotacoes/note-details-dialog"; import { NoteDialog } from "@/components/anotacoes/note-dialog"; @@ -100,13 +100,10 @@ export function NotesWidget({ notes }: NotesWidgetProps) { {buildDisplayTitle(note.title)}

- + {getTasksSummary(note)} -

+

{DATE_FORMATTER.format(new Date(note.createdAt))}

@@ -131,7 +128,7 @@ export function NotesWidget({ notes }: NotesWidgetProps) { note.title, )}`} > - +
diff --git a/components/dashboard/widget-settings-dialog.tsx b/components/dashboard/widget-settings-dialog.tsx index 0d7a7dd..ad389a0 100644 --- a/components/dashboard/widget-settings-dialog.tsx +++ b/components/dashboard/widget-settings-dialog.tsx @@ -14,24 +14,31 @@ import { } from "@/components/ui/dialog"; import { Switch } from "@/components/ui/switch"; import { widgetsConfig } from "@/lib/dashboard/widgets/widgets-config"; +import { cn } from "@/lib/utils"; type WidgetSettingsDialogProps = { hiddenWidgets: string[]; onToggleWidget: (widgetId: string) => void; onReset: () => void; + triggerClassName?: string; }; export function WidgetSettingsDialog({ hiddenWidgets, onToggleWidget, onReset, + triggerClassName, }: WidgetSettingsDialogProps) { const [open, setOpen] = useState(false); return ( - diff --git a/components/lancamentos/dialogs/lancamento-details-dialog.tsx b/components/lancamentos/dialogs/lancamento-details-dialog.tsx index 027d10d..a6d3777 100644 --- a/components/lancamentos/dialogs/lancamento-details-dialog.tsx +++ b/components/lancamentos/dialogs/lancamento-details-dialog.tsx @@ -53,9 +53,9 @@ export function LancamentoDetailsDialog({ return ( - -
- + +
+
#{lancamento.id} diff --git a/components/lancamentos/table/lancamentos-filters.tsx b/components/lancamentos/table/lancamentos-filters.tsx index 70d7a2f..f57dd36 100644 --- a/components/lancamentos/table/lancamentos-filters.tsx +++ b/components/lancamentos/table/lancamentos-filters.tsx @@ -277,7 +277,7 @@ export function LancamentosFilters({
{exportButton && ( -
+
{exportButton}
)} @@ -291,13 +291,13 @@ export function LancamentosFilters({ diff --git a/components/lancamentos/table/lancamentos-table.tsx b/components/lancamentos/table/lancamentos-table.tsx index 21cffb6..a4ae2b5 100644 --- a/components/lancamentos/table/lancamentos-table.tsx +++ b/components/lancamentos/table/lancamentos-table.tsx @@ -6,8 +6,8 @@ import { RiChat1Line, RiCheckLine, RiDeleteBin5Line, - RiEyeLine, RiFileCopyLine, + RiFileList2Line, RiGroupLine, RiHistoryLine, RiMoreFill, @@ -31,8 +31,8 @@ import Image from "next/image"; import Link from "next/link"; import { useMemo, useState } from "react"; import { CategoryIcon } from "@/components/categorias/category-icon"; -import { EmptyState } from "@/components/empty-state"; import MoneyValues from "@/components/money-values"; +import { EmptyState } from "@/components/shared/empty-state"; import { TypeBadge } from "@/components/type-badge"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; @@ -588,7 +588,7 @@ const buildColumns = ({ handleViewDetails(row.original)} > - + Detalhes {row.original.userId === currentUserId && ( diff --git a/components/pagadores/pagador-card.tsx b/components/pagadores/pagador-card.tsx index a0b00d0..2d8524a 100644 --- a/components/pagadores/pagador-card.tsx +++ b/components/pagadores/pagador-card.tsx @@ -2,7 +2,7 @@ import { RiDeleteBin5Line, - RiEyeLine, + RiFileList2Line, RiMailSendLine, RiPencilLine, RiVerifiedBadgeFill, @@ -101,7 +101,7 @@ export function PagadorCard({ pagador, onEdit, onRemove }: PagadorCardProps) { href={`/pagadores/${pagador.id}`} className={`text-primary flex items-center gap-1 font-medium transition-opacity hover:opacity-80`} > - + detalhes diff --git a/components/relatorios/cartoes/card-category-breakdown.tsx b/components/relatorios/cartoes/card-category-breakdown.tsx index 818d7a4..fc037e2 100644 --- a/components/relatorios/cartoes/card-category-breakdown.tsx +++ b/components/relatorios/cartoes/card-category-breakdown.tsx @@ -36,7 +36,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) { const _totalAmount = data.reduce((acc, c) => acc + c.amount, 0); return ( - + @@ -44,7 +44,7 @@ export function CardCategoryBreakdown({ data }: CardCategoryBreakdownProps) { - +
{data.map((category, index) => (
{/* Progress bar */} -
+
diff --git a/components/relatorios/cartoes/card-top-expenses.tsx b/components/relatorios/cartoes/card-top-expenses.tsx index c2041fb..71045fd 100644 --- a/components/relatorios/cartoes/card-top-expenses.tsx +++ b/components/relatorios/cartoes/card-top-expenses.tsx @@ -38,14 +38,14 @@ export function CardTopExpenses({ data }: CardTopExpensesProps) { const maxAmount = Math.max(...data.map((e) => e.amount)); return ( - + Top 10 Gastos do Mês - +
{data.map((expense, index) => (
{expense.name} -
+
{expense.date} {expense.category && ( {expense.category} @@ -92,7 +92,7 @@ export function CardTopExpenses({ data }: CardTopExpensesProps) {
{/* Progress bar */} -
+
-
+
Histórico de Uso {/* Card logo and name */} -
+
{logoPath ? ( )} - + {card.name}
- + ) => { dragStart.current = null; - (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId); + if ((e.currentTarget as HTMLElement).hasPointerCapture(e.pointerId)) { + (e.currentTarget as HTMLElement).releasePointerCapture(e.pointerId); + } + }, []); + + const onPointerCancel = useCallback(() => { + dragStart.current = null; + }, []); + + const onLostPointerCapture = useCallback(() => { + dragStart.current = null; }, []); const resetPosition = useCallback(() => { offset.current = { x: 0, y: 0 }; if (contentRef.current) { - applyTranslate(contentRef.current, 0, 0); + applyPosition(contentRef.current, 0, 0); } }, []); @@ -75,6 +95,8 @@ export function useDraggableDialog() { onPointerDown, onPointerMove, onPointerUp, + onPointerCancel, + onLostPointerCapture, style: { touchAction: "none" as const, cursor: "grab" }, };