mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -05:00
Add daily option to schedules (#900)
This commit is contained in:
@@ -17,6 +17,7 @@ import DateSelect from './DateSelect';
|
||||
const MAX_DAY_OF_WEEK_INTERVAL = 5;
|
||||
|
||||
const FREQUENCY_OPTIONS = [
|
||||
{ id: 'daily', name: 'Days' },
|
||||
{ id: 'weekly', name: 'Weeks' },
|
||||
{ id: 'monthly', name: 'Months' },
|
||||
{ id: 'yearly', name: 'Years' },
|
||||
|
||||
@@ -65,6 +65,11 @@ export function getRecurringDescription(config) {
|
||||
let interval = config.interval || 1;
|
||||
|
||||
switch (config.frequency) {
|
||||
case 'daily': {
|
||||
let desc = 'Every ';
|
||||
desc += interval !== 1 ? `${interval} days` : 'day';
|
||||
return desc;
|
||||
}
|
||||
case 'weekly': {
|
||||
let desc = 'Every ';
|
||||
desc += interval !== 1 ? `${interval} weeks` : 'week';
|
||||
@@ -172,6 +177,9 @@ export function recurConfigToRSchedule(config) {
|
||||
let abbrevDay = name => name.slice(0, 2).toUpperCase();
|
||||
|
||||
switch (config.frequency) {
|
||||
case 'daily':
|
||||
// Nothing to do
|
||||
return [base];
|
||||
case 'weekly':
|
||||
// Nothing to do
|
||||
return [base];
|
||||
|
||||
6
upcoming-release-notes/900.md
Normal file
6
upcoming-release-notes/900.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Enhancements
|
||||
authors: [biohzrddd]
|
||||
---
|
||||
|
||||
Add "Daily" option to scheduled transactions
|
||||
Reference in New Issue
Block a user