mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 17:47:00 -05:00
Fix lint errors
This commit is contained in:
@@ -232,8 +232,8 @@ export function ManageRules({ isModal, payeeId }: ManageRulesProps) {
|
||||
|
||||
const { mutate: deleteRule } = useDeleteRuleMutation();
|
||||
|
||||
async function onDeleteRule(id: string) {
|
||||
await deleteRule(
|
||||
function onDeleteRule(id: string) {
|
||||
deleteRule(
|
||||
{ id },
|
||||
{
|
||||
onSuccess: () => {
|
||||
|
||||
@@ -616,7 +616,10 @@ export function FilterEditor<T extends RuleConditionEntity>({
|
||||
dispatch={dispatch}
|
||||
onApply={cond => {
|
||||
// @ts-expect-error - fix me
|
||||
cond = unparse({ ...cond, type: FIELD_TYPES.get(cond.field) });
|
||||
cond = unparseConditions({
|
||||
...cond,
|
||||
type: FIELD_TYPES.get(cond.field),
|
||||
});
|
||||
|
||||
if (cond.type === 'date' && cond.options) {
|
||||
if (
|
||||
|
||||
@@ -128,7 +128,7 @@ export function MobileRulesPage() {
|
||||
},
|
||||
);
|
||||
},
|
||||
[dispatch, showUndoNotification, t, refetchRules],
|
||||
[deleteRule, showUndoNotification, t, refetchRules],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -735,7 +735,7 @@ const TransactionEditInner = memo<TransactionEditInnerProps>(
|
||||
}
|
||||
: unserializedTransaction;
|
||||
|
||||
await createSingleTimeScheduleFromTransaction(
|
||||
createSingleTimeScheduleFromTransaction(
|
||||
{
|
||||
transaction: transactionForSchedule,
|
||||
},
|
||||
@@ -789,6 +789,7 @@ const TransactionEditInner = memo<TransactionEditInnerProps>(
|
||||
unserializedTransactions,
|
||||
upcomingLength,
|
||||
t,
|
||||
createSingleTimeScheduleFromTransaction,
|
||||
]);
|
||||
|
||||
const onUpdateInner = useCallback(
|
||||
@@ -1475,7 +1476,7 @@ function TransactionEditUnconnected({
|
||||
);
|
||||
setTransactions(newTransactions);
|
||||
},
|
||||
[dateFormat, transactions],
|
||||
[dateFormat, transactions, runRulesAsync],
|
||||
);
|
||||
|
||||
const onSave = useCallback(
|
||||
|
||||
@@ -79,7 +79,7 @@ export function MergeUnusedPayeesModal({
|
||||
|
||||
return ruleId;
|
||||
},
|
||||
[shouldCreateRule, isEditingRule, payees],
|
||||
[shouldCreateRule, isEditingRule, payees, addPayeeRenameRuleAsync],
|
||||
);
|
||||
|
||||
const onMergeAndCreateRule = useCallback(
|
||||
|
||||
@@ -292,7 +292,12 @@ export function TransactionList({
|
||||
await saveDiff({ added: newTransactions }, isLearnCategoriesEnabled);
|
||||
onRefetch();
|
||||
},
|
||||
[isLearnCategoriesEnabled, onRefetch, promptToConvertToSchedule],
|
||||
[
|
||||
isLearnCategoriesEnabled,
|
||||
onRefetch,
|
||||
promptToConvertToSchedule,
|
||||
createSingleTimeScheduleFromTransaction,
|
||||
],
|
||||
);
|
||||
|
||||
const onSave = useCallback(
|
||||
@@ -348,7 +353,13 @@ export function TransactionList({
|
||||
|
||||
await saveTransaction();
|
||||
},
|
||||
[isLearnCategoriesEnabled, onChange, onRefetch, promptToConvertToSchedule],
|
||||
[
|
||||
isLearnCategoriesEnabled,
|
||||
onChange,
|
||||
onRefetch,
|
||||
promptToConvertToSchedule,
|
||||
createSingleTimeScheduleFromTransaction,
|
||||
],
|
||||
);
|
||||
|
||||
const onAddSplit = useCallback(
|
||||
@@ -436,7 +447,7 @@ export function TransactionList({
|
||||
}
|
||||
return newTransaction;
|
||||
},
|
||||
[dispatch],
|
||||
[dispatch, runRulesAsync],
|
||||
);
|
||||
|
||||
const onManagePayees = useCallback(
|
||||
|
||||
@@ -140,7 +140,13 @@ export function usePreviewTransactions({
|
||||
return () => {
|
||||
isUnmounted = true;
|
||||
};
|
||||
}, [scheduleTransactions, schedules, statuses, upcomingLength]);
|
||||
}, [
|
||||
scheduleTransactions,
|
||||
schedules,
|
||||
statuses,
|
||||
upcomingLength,
|
||||
runRulesAsync,
|
||||
]);
|
||||
|
||||
const returnError = error || scheduleQueryError;
|
||||
return {
|
||||
|
||||
@@ -379,7 +379,7 @@ export function useCreateSingleTimeScheduleFromTransaction() {
|
||||
const ruleId = schedules?.data?.[0]?.rule;
|
||||
|
||||
if (ruleId) {
|
||||
const rule = await allRules.find(r => r.id === ruleId);
|
||||
const rule = allRules.find(r => r.id === ruleId);
|
||||
|
||||
if (rule) {
|
||||
const linkScheduleActions = rule.actions.filter(
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as d from 'date-fns';
|
||||
import deepEqual from 'deep-equal';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { type WithRequired } from 'loot-core/types/util';
|
||||
import type { WithRequired } from 'loot-core/types/util';
|
||||
|
||||
import { captureBreadcrumb } from '../../platform/exceptions';
|
||||
import * as connection from '../../platform/server/connection';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
category: Features
|
||||
category: Maintenance
|
||||
authors: [joel-jeremy]
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user