Skip to content
Snippets Groups Projects
Unverified Commit df63c7e1 authored by biohzrddd's avatar biohzrddd Committed by GitHub
Browse files

Add daily option to schedules (#900)

parent adb20868
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
---
category: Enhancements
authors: [biohzrddd]
---
Add "Daily" option to scheduled transactions
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment