From e31504d952e97129631bac9c2dce825e9df6d2be Mon Sep 17 00:00:00 2001 From: Seth Gillett Date: Sun, 29 Oct 2023 16:40:54 -0400 Subject: [PATCH 1/4] Added a suffix to recurring transaction date description to indicate when it will be pushed before or after the weekend --- packages/loot-core/src/shared/schedules.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/loot-core/src/shared/schedules.ts b/packages/loot-core/src/shared/schedules.ts index fd0dea98853..99279a72942 100644 --- a/packages/loot-core/src/shared/schedules.ts +++ b/packages/loot-core/src/shared/schedules.ts @@ -66,17 +66,19 @@ function prettyDayName(day) { export function getRecurringDescription(config) { let interval = config.interval || 1; + let weekendSolveSuffix = config.skipWeekend ? ` (${config.weekendSolveMode} weekend) ` : ''; + switch (config.frequency) { case 'daily': { let desc = 'Every '; desc += interval !== 1 ? `${interval} days` : 'day'; - return desc; + return desc + weekendSolveSuffix; } case 'weekly': { let desc = 'Every '; desc += interval !== 1 ? `${interval} weeks` : 'week'; desc += ' on ' + monthUtils.format(config.start, 'EEEE'); - return desc; + return desc + weekendSolveSuffix; } case 'monthly': { let desc = 'Every '; @@ -145,13 +147,13 @@ export function getRecurringDescription(config) { desc += ' on the ' + monthUtils.format(config.start, 'do'); } - return desc; + return desc + weekendSolveSuffix; } case 'yearly': { let desc = 'Every '; desc += interval !== 1 ? `${interval} years` : 'year'; desc += ' on ' + monthUtils.format(config.start, 'LLL do'); - return desc; + return desc + weekendSolveSuffix; } default: return 'Recurring error'; From c5de6dc8baeebf1c8f08dca9f0a62120b9ed1aa0 Mon Sep 17 00:00:00 2001 From: Seth Gillett Date: Sun, 29 Oct 2023 16:47:56 -0400 Subject: [PATCH 2/4] Release notes description --- upcoming-release-notes/1825.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 upcoming-release-notes/1825.md diff --git a/upcoming-release-notes/1825.md b/upcoming-release-notes/1825.md new file mode 100644 index 00000000000..4d7462a2bb6 --- /dev/null +++ b/upcoming-release-notes/1825.md @@ -0,0 +1,5 @@ +--- +category: Bugfix +authors: [sethgillett] +--- +Schedule creation modal notify user of weekend skip option From 1d27e61c1d579d93b7e7d58ce5d14d31bd383e82 Mon Sep 17 00:00:00 2001 From: Seth Gillett Date: Sun, 29 Oct 2023 16:53:42 -0400 Subject: [PATCH 3/4] Rename release notes file --- upcoming-release-notes/{1825.md => 1840.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename upcoming-release-notes/{1825.md => 1840.md} (100%) diff --git a/upcoming-release-notes/1825.md b/upcoming-release-notes/1840.md similarity index 100% rename from upcoming-release-notes/1825.md rename to upcoming-release-notes/1840.md From 1437d183d99814b2fc0cea38de4199658f4f892c Mon Sep 17 00:00:00 2001 From: Seth Gillett Date: Sun, 29 Oct 2023 17:08:46 -0400 Subject: [PATCH 4/4] Lint fix --- packages/loot-core/src/shared/schedules.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/loot-core/src/shared/schedules.ts b/packages/loot-core/src/shared/schedules.ts index 99279a72942..a6396b93b14 100644 --- a/packages/loot-core/src/shared/schedules.ts +++ b/packages/loot-core/src/shared/schedules.ts @@ -66,7 +66,9 @@ function prettyDayName(day) { export function getRecurringDescription(config) { let interval = config.interval || 1; - let weekendSolveSuffix = config.skipWeekend ? ` (${config.weekendSolveMode} weekend) ` : ''; + let weekendSolveSuffix = config.skipWeekend + ? ` (${config.weekendSolveMode} weekend) ` + : ''; switch (config.frequency) { case 'daily': {