This commit is contained in:
parent
180384ec7d
commit
da4e7053f3
|
@ -197,7 +197,7 @@ func (n *UndoneTaskOverdueNotification) ToMail() *notifications.Mail {
|
||||||
return notifications.NewMail().
|
return notifications.NewMail().
|
||||||
Subject(`Task "`+n.Task.Title+`" is overdue`).
|
Subject(`Task "`+n.Task.Title+`" is overdue`).
|
||||||
Greeting("Hi "+n.User.GetName()+",").
|
Greeting("Hi "+n.User.GetName()+",").
|
||||||
Line(`This is a friendly reminder of the task "`+n.Task.Title+`" which is overdue since `+n.Task.DueDate.Sub(time.Now()).String()+` and not yet done.`).
|
Line(`This is a friendly reminder of the task "`+n.Task.Title+`" which is overdue since `+time.Until(n.Task.DueDate).String()+` and not yet done.`).
|
||||||
Action("Open Task", config.ServiceFrontendurl.GetString()+"tasks/"+strconv.FormatInt(n.Task.ID, 10)).
|
Action("Open Task", config.ServiceFrontendurl.GetString()+"tasks/"+strconv.FormatInt(n.Task.ID, 10)).
|
||||||
Line("Have a nice day!")
|
Line("Have a nice day!")
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/db"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"code.vikunja.io/api/pkg/db"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetUndoneOverDueTasks(t *testing.T) {
|
func TestGetUndoneOverDueTasks(t *testing.T) {
|
||||||
|
|
|
@ -8570,6 +8570,10 @@ var doc = `{
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The new name of the current user.",
|
"description": "The new name of the current user.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"overdue_tasks_reminders_enabled": {
|
||||||
|
"description": "If enabled, the user will get an email for their overdue tasks each morning.",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -8553,6 +8553,10 @@
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The new name of the current user.",
|
"description": "The new name of the current user.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"overdue_tasks_reminders_enabled": {
|
||||||
|
"description": "If enabled, the user will get an email for their overdue tasks each morning.",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,8 +17,9 @@
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/config"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"code.vikunja.io/api/pkg/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetTimeWithoutNanoSeconds returns a time.Time without the nanoseconds.
|
// GetTimeWithoutNanoSeconds returns a time.Time without the nanoseconds.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user