1
0
mirror of https://github.com/go-vikunja/app synced 2024-06-06 12:39:51 +00:00

fixed 'add reminder' button

This commit is contained in:
benimautner 2022-04-22 00:21:49 +02:00
parent d9d6948ab2
commit 125c9794bd
2 changed files with 7 additions and 12 deletions

View File

@ -73,7 +73,7 @@ class Task {
'description': description,
'done': done ?? false,
'reminder_dates':
reminderDates?.map((date) => date?.toIso8601String())?.toList(),
reminderDates?.map((date) => date?.toUtc()?.toIso8601String())?.toList(),
'due_date': dueDate?.toUtc()?.toIso8601String(),
'start_date': startDate?.toUtc()?.toIso8601String(),
'end_date': endDate?.toUtc()?.toIso8601String(),
@ -82,7 +82,7 @@ class Task {
'labels': labels?.map((label) => label.toJSON())?.toList(),
'subtasks': subtasks?.map((subtask) => subtask.toJSON())?.toList(),
'created_by': createdBy?.toJSON(),
'updated': updated?.toIso8601String(),
'created': created?.toIso8601String(),
'updated': updated?.toUtc()?.toIso8601String(),
'created': created?.toUtc()?.toIso8601String(),
};
}

View File

@ -191,19 +191,14 @@ class _TaskEditPageState extends State<TaskEditPage> {
var currentIndex = _reminderDates.length - 1;
// FIXME: Why does putting this into a row fails?
setState(() => _reminderInputs.add(Row(
children: <Widget>[
setState(() => _reminderInputs.add(
VikunjaDateTimePicker(
label: 'Reminder',
onSaved: (reminder) =>
_reminderDates[currentIndex] = reminder,
initialValue: DateTime.now(),
),
GestureDetector(
onTap: () => print('tapped'),
child: Icon(Icons.close),
)
],
)));
));
}),
InputDecorator(
isEmpty: _priority == null,
@ -295,7 +290,7 @@ class _TaskEditPageState extends State<TaskEditPage> {
);
}
_saveTask(BuildContext context) async {
_saveTask(BuildContext context) async {
setState(() => _loading = true);
// Removes all reminders with no value set.