fix(task wizard): creating new task

This commit is contained in:
kolaente 2022-09-21 22:18:35 +02:00
parent d950aae3a5
commit 169f95af33
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 3 additions and 3 deletions

View file

@ -51,8 +51,8 @@ export default class TaskService extends AbstractService<ITask> {
model.startDate = parseDate(model.startDate) model.startDate = parseDate(model.startDate)
model.endDate = parseDate(model.endDate) model.endDate = parseDate(model.endDate)
model.doneAt = parseDate(model.doneAt) model.doneAt = parseDate(model.doneAt)
model.created = formatISO(new Date(model.created)) model.created = +(model.created) ? parseDate(model.created) : null
model.updated = formatISO(new Date(model.updated)) model.updated = +(model.updated) ? parseDate(model.updated) : null
// remove all nulls, these would create empty reminders // remove all nulls, these would create empty reminders
for (const index in model.reminderDates) { for (const index in model.reminderDates) {

View file

@ -83,7 +83,7 @@ async function create() {
newTask.value.listId = props.listId newTask.value.listId = props.listId
newTask.value.title = parsedTask.value.text newTask.value.title = parsedTask.value.text
const assignees = await findAssignees(parsedTask.value.assignees) const assignees = await findAssignees(parsedTask.value.assignees)
const dueDate = parsedTask.value.date !== null ? formatISO(parsedTask.date) : null const dueDate = parsedTask.value.date !== null ? formatISO(parsedTask.value.date) : null
const finalTask = new TaskModel({ const finalTask = new TaskModel({
...newTask.value, ...newTask.value,