Skip to content

feat(calendar): add Start date column to task list#995

Merged
renemadsen merged 1 commit into
stablefrom
feat/calendar-task-list-startdate
Jun 10, 2026
Merged

feat(calendar): add Start date column to task list#995
renemadsen merged 1 commit into
stablefrom
feat/calendar-task-list-startdate

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Summary

Adds a Start date ("Startdato") column to the "Opgaver og handlinger" calendar task list and to its CSV export. The data was already on each row (CalendarTaskResponseModel.TaskDate), so this is a frontend-only change — no backend/endpoint change.

Details

  • New sortable column in the table, placed before Gentagelse (mirrors the task-wizard ordering), displaying each row's taskDate as dd-MM-yyyy.
  • Column is bound to the raw taskDate (yyyy-MM-dd) so client-side sort is chronological; display is formatted via a small formatStartDate helper that splits/reorders the string (no new Date(), so no timezone shift) and returns '' for empty/invalid.
  • CSV export gains a matching "Start date" column in the same position (header + value indices verified aligned).
  • Reuses the existing 'Start date' i18n key (da: 'Start dato') — no duplication.

Verification

  • Frontend production build green.
  • Jest: 13 tests pass (incl. 2 new formatStartDate cases: 2026-06-0909-06-2026, empty/undefined → '').
  • Code-reviewed (spec + quality): no findings.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 10, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Start date column to the calendar task list (“Opgaver og handlinger”) and includes the same column/value in the CSV export, using the existing taskDate field (frontend-only change).

Changes:

  • Added a new sortable Start date column to the task list table, displaying taskDate as dd-MM-yyyy.
  • Extended the CSV export to include a Start date header and value in the same position as the table.
  • Added unit tests for the table’s start-date formatting helper.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-table/calendar-task-list-table.component.ts Adds start-date formatter and inserts the “Start date” column into the grid configuration.
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-table/calendar-task-list-table.component.spec.ts Adds unit tests for the new start-date formatting helper.
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-page/calendar-task-list-page.component.ts Adds “Start date” to CSV headers and exports formatted taskDate values.

Comment on lines +45 to +53
// Converts the row's `taskDate` ("yyyy-MM-dd") to "dd-MM-yyyy" by splitting
// and reordering (no `new Date()` parsing, which could shift across timezones).
formatStartDate(value: string): string {
if (!value) {
return '';
}
const [y, m, d] = value.split('-');
return d && m && y ? `${d}-${m}-${y}` : '';
}
Comment on lines +45 to +49
// Converts the row's `taskDate` ("yyyy-MM-dd") to "dd-MM-yyyy" by splitting
// and reordering (no `new Date()` parsing, which could shift across timezones).
formatStartDate(value: string): string {
if (!value) {
return '';
Comment on lines +128 to +131
it('returns empty string for empty or malformed input', () => {
expect(component.formatStartDate('')).toBe('');
expect(component.formatStartDate(undefined as unknown as string)).toBe('');
});
@renemadsen renemadsen merged commit 63c9206 into stable Jun 10, 2026
75 of 77 checks passed
@renemadsen renemadsen deleted the feat/calendar-task-list-startdate branch June 10, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants