Fix ESLint issues

This commit is contained in:
Pierre HUBERT 2025-05-15 19:42:38 +02:00
parent 0f6447155b
commit 7b6072c660
3 changed files with 9 additions and 9 deletions

View File

@ -34,7 +34,7 @@ export function AttachMultipleInboxEntriesDialog(p: {
<DialogContent>
{p.entries.map((entry, num) => {
return (
<div>
<div key={entry.id}>
<div
style={{
padding: "5px",
@ -53,13 +53,13 @@ export function AttachMultipleInboxEntriesDialog(p: {
<MovementSelect
list={p.movements[num]}
value={mapping[num]}
onChange={(v) =>
onChange={(v) => {
setMapping((m) => {
const n = [...m];
n[num] = v;
return n;
})
}
});
}}
/>
) : (
<>No movement found</>

View File

@ -138,7 +138,7 @@ function InboxTable(p: {
const [attaching, setAttaching] = React.useState<InboxEntry | undefined>();
// 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={<SearchIcon />}
label="Attach entry to movement"
color="inherit"
onClick={() => handleAttachClick(params.row)}
onClick={() => { handleAttachClick(params.row); }}
disabled={!!params.row.movement_id}
/>
</Tooltip>,

View File

@ -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,
() => <QuestionMarkIcon color="secondary" />
)
.when(