Fix rule edit page crashing (#6175)

This commit is contained in:
Matiss Janis Aboltins
2025-11-19 18:03:51 +00:00
committed by GitHub
parent 6834f4d669
commit 38145975ec
5 changed files with 18 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -1093,7 +1093,7 @@ export function RuleEditor({
type: FIELD_TYPES.get(field),
field,
op: 'set',
value: null,
value: '',
options: { splitIndex },
inputKey: uuid(),
};

View File

@@ -4,7 +4,11 @@ import * as d from 'date-fns';
import { Locale } from 'date-fns';
import { t } from 'i18next';
import { type PayeeEntity, type ScheduleEntity } from 'loot-core/types/models';
import {
type PayeeEntity,
type RecurConfig,
type ScheduleEntity,
} from 'loot-core/types/models';
import { Condition } from '../server/rules';
@@ -96,7 +100,11 @@ function prettyDayName(day) {
return days[day];
}
export function getRecurringDescription(config, dateFormat, locale: Locale) {
export function getRecurringDescription(
config: RecurConfig,
dateFormat: string,
locale: Locale,
) {
const interval = config.interval || 1;
let endModeSuffix = '';

View File

@@ -13,7 +13,7 @@ export interface RecurConfig {
patterns?: RecurPattern[];
skipWeekend?: boolean;
start: string;
endMode: 'never' | 'after_n_occurrences' | 'on_date';
endMode?: 'never' | 'after_n_occurrences' | 'on_date';
endOccurrences?: number;
endDate?: string;
weekendSolveMode?: 'before' | 'after';

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---
Fix rule page crashing when many actions added