Always start with current date
This commit is contained in:
parent
c234999ccc
commit
6815dbd684
@ -5,7 +5,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from PySide2 import QtCore, QtGui, QtWidgets
|
from PySide2 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime, date
|
||||||
|
|
||||||
from fime.data import Tasks, Report
|
from fime.data import Tasks, Report
|
||||||
from fime.util import get_screen_height, get_icon, EditStartedDetector
|
from fime.util import get_screen_height, get_icon, EditStartedDetector
|
||||||
@ -98,6 +98,7 @@ class ReportDialog(QtWidgets.QDialog):
|
|||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
def showEvent(self, _):
|
def showEvent(self, _):
|
||||||
|
self._report.date = date.today()
|
||||||
self.update_title()
|
self.update_title()
|
||||||
self.refresh_table()
|
self.refresh_table()
|
||||||
self.update_prev_next()
|
self.update_prev_next()
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from datetime import date
|
||||||
from functools import reduce, partial
|
from functools import reduce, partial
|
||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
@ -178,6 +179,7 @@ class WorklogDialog(QtWidgets.QDialog):
|
|||||||
def showEvent(self, _):
|
def showEvent(self, _):
|
||||||
# reinitialize to purge caches
|
# reinitialize to purge caches
|
||||||
self.rest = WorklogRest(self.config)
|
self.rest = WorklogRest(self.config)
|
||||||
|
self._worklog.date = date.today()
|
||||||
self.update_all()
|
self.update_all()
|
||||||
self.upload_button.setEnabled(False)
|
self.upload_button.setEnabled(False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user