feat: enhance transaction table interactions by preventing event propagation on button clicks and adding icons for reconciliation actions
This commit is contained in:
@@ -239,7 +239,7 @@ export function TransactionTable({
|
||||
{transaction.amount >= 0 ? "+" : ""}
|
||||
{formatCurrency(transaction.amount)}
|
||||
</td>
|
||||
<td className="p-3 text-center">
|
||||
<td className="p-3 text-center" onClick={(e) => e.stopPropagation()}>
|
||||
<button
|
||||
onClick={() => onToggleReconciled(transaction.id)}
|
||||
className="p-1 hover:bg-muted rounded"
|
||||
@@ -251,7 +251,7 @@ export function TransactionTable({
|
||||
)}
|
||||
</button>
|
||||
</td>
|
||||
<td className="p-3">
|
||||
<td className="p-3" onClick={(e) => e.stopPropagation()}>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
@@ -264,15 +264,29 @@ export function TransactionTable({
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem
|
||||
onClick={() => onToggleReconciled(transaction.id)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onToggleReconciled(transaction.id);
|
||||
}}
|
||||
>
|
||||
{transaction.isReconciled
|
||||
? "Dépointer"
|
||||
: "Pointer"}
|
||||
{transaction.isReconciled ? (
|
||||
<>
|
||||
<Circle className="w-4 h-4 mr-2" />
|
||||
Dépointer
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<CheckCircle2 className="w-4 h-4 mr-2" />
|
||||
Pointer
|
||||
</>
|
||||
)}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
onClick={() => onCreateRule(transaction)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onCreateRule(transaction);
|
||||
}}
|
||||
>
|
||||
<Wand2 className="w-4 h-4 mr-2" />
|
||||
Créer une règle
|
||||
|
||||
Reference in New Issue
Block a user