From 7b6072c6600b0bd6295c01aeb8706f77e307bace Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 15 May 2025 19:42:38 +0200 Subject: [PATCH] Fix ESLint issues --- .../src/dialogs/AttachMultipleInboxEntriesDialog.tsx | 8 ++++---- moneymgr_web/src/routes/InboxRoute.tsx | 8 ++++---- moneymgr_web/src/widgets/InboxEntryWidget.tsx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/moneymgr_web/src/dialogs/AttachMultipleInboxEntriesDialog.tsx b/moneymgr_web/src/dialogs/AttachMultipleInboxEntriesDialog.tsx index 3817587..29b6420 100644 --- a/moneymgr_web/src/dialogs/AttachMultipleInboxEntriesDialog.tsx +++ b/moneymgr_web/src/dialogs/AttachMultipleInboxEntriesDialog.tsx @@ -34,7 +34,7 @@ export function AttachMultipleInboxEntriesDialog(p: { {p.entries.map((entry, num) => { return ( -
+
+ onChange={(v) => { setMapping((m) => { const n = [...m]; n[num] = v; return n; - }) - } + }); + }} /> ) : ( <>No movement found diff --git a/moneymgr_web/src/routes/InboxRoute.tsx b/moneymgr_web/src/routes/InboxRoute.tsx index a73d7f7..ab15136 100644 --- a/moneymgr_web/src/routes/InboxRoute.tsx +++ b/moneymgr_web/src/routes/InboxRoute.tsx @@ -138,7 +138,7 @@ function InboxTable(p: { const [attaching, setAttaching] = React.useState(); // Request to attach entry to movement - const handleAttachClick = async (entry: InboxEntry) => { + const handleAttachClick = (entry: InboxEntry) => { setAttaching(entry); }; @@ -295,12 +295,12 @@ function InboxTable(p: { // Update movement MovementApi.Update({ ...movement, - file_id: entry?.file_id, + file_id: entry.file_id, }), // Update inbox entries InboxApi.Update({ - ...entry!, + ...entry, movement_id: movement.id, }), ]); @@ -437,7 +437,7 @@ function InboxTable(p: { icon={} label="Attach entry to movement" color="inherit" - onClick={() => handleAttachClick(params.row)} + onClick={() => { handleAttachClick(params.row); }} disabled={!!params.row.movement_id} /> , diff --git a/moneymgr_web/src/widgets/InboxEntryWidget.tsx b/moneymgr_web/src/widgets/InboxEntryWidget.tsx index 60c76ff..eec1f5f 100644 --- a/moneymgr_web/src/widgets/InboxEntryWidget.tsx +++ b/moneymgr_web/src/widgets/InboxEntryWidget.tsx @@ -23,7 +23,7 @@ export function InboxEntryWidget(p: { entry: InboxEntry }): React.ReactElement { {/* Icon */} {match(p.entry.amount) .when( - (v) => v === undefined || v === null, + (v) => v === undefined, () => ) .when(