Add daily option to schedules (#900)

This commit is contained in:
biohzrddd
2023-04-16 12:33:47 +01:00
committed by GitHub
parent adb20868cc
commit df63c7e141
3 changed files with 15 additions and 0 deletions

View File

@@ -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' },

View File

@@ -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];

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [biohzrddd]
---
Add "Daily" option to scheduled transactions