diff --git a/src/components/OrgFile/components/Header/index.js b/src/components/OrgFile/components/Header/index.js index 418afd48..05476b82 100644 --- a/src/components/OrgFile/components/Header/index.js +++ b/src/components/OrgFile/components/Header/index.js @@ -361,6 +361,19 @@ ${header.get('rawDescription')}`; headerDeadlineMap.get('year') : ''; + const today = new Date(); + const headerDate = + headerDeadlineMap !== undefined + ? new Date( + headerDeadlineMap.get('year'), + headerDeadlineMap.get('month'), + headerDeadlineMap.get('day') + ) + : today; + + const headerSecondsToDue = + new Date(headerDate).setHours(0, 0, 0, 0) - new Date(today).setHours(0, 0, 0, 0); + const { dragStartX, currentDragX, @@ -517,7 +530,11 @@ ${header.get('rawDescription')}`; // Spacing between 'clock display' and 'deadline // display' overlays (showClockDisplay && showDeadlineDisplay ? ' ' : '') + - (showDeadlineDisplay && headerDeadline !== undefined ? headerDeadline : '') + (showDeadlineDisplay && headerDeadline !== undefined + ? (headerSecondsToDue < 0 ? '**' : '') + + headerDeadline + + (headerSecondsToDue < 0 ? '**' : '') + : '') } /> diff --git a/src/components/OrgFile/components/TitleLine/.index.js.swp b/src/components/OrgFile/components/TitleLine/.index.js.swp deleted file mode 100644 index 5c35d756..00000000 Binary files a/src/components/OrgFile/components/TitleLine/.index.js.swp and /dev/null differ diff --git a/src/components/OrgFile/components/TitleLine/stylesheet.css b/src/components/OrgFile/components/TitleLine/stylesheet.css index 2e255dca..081525d1 100644 --- a/src/components/OrgFile/components/TitleLine/stylesheet.css +++ b/src/components/OrgFile/components/TitleLine/stylesheet.css @@ -57,3 +57,8 @@ display: flex; justify-content: space-between; } + +.title-line-overdue { + color: var(--red); +} +