tasks: add refresh mode toggle (completion date vs planned date)
Recurring tasks can now calculate next due date from either the completion time (default) or the planned due date, catching up if overdue.
This commit is contained in:
@@ -7,6 +7,7 @@ export interface ITask {
|
||||
assignees: string[];
|
||||
tags: string[];
|
||||
difficulty?: 'low' | 'medium' | 'high';
|
||||
refreshMode?: 'completion' | 'planned';
|
||||
isRecurring: boolean;
|
||||
frequency?: {
|
||||
type: 'daily' | 'weekly' | 'biweekly' | 'monthly' | 'custom';
|
||||
@@ -45,6 +46,11 @@ const TaskSchema = new mongoose.Schema(
|
||||
type: String,
|
||||
enum: ['low', 'medium', 'high']
|
||||
},
|
||||
refreshMode: {
|
||||
type: String,
|
||||
enum: ['completion', 'planned'],
|
||||
default: 'completion'
|
||||
},
|
||||
isRecurring: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
|
||||
Reference in New Issue
Block a user