feat(calendar): add Start date column to task list#995
Merged
Conversation
There was a problem hiding this comment.
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
taskDateasdd-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(''); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
taskDateasdd-MM-yyyy.taskDate(yyyy-MM-dd) so client-side sort is chronological; display is formatted via a smallformatStartDatehelper that splits/reorders the string (nonew Date(), so no timezone shift) and returns '' for empty/invalid.'Start date'i18n key (da: 'Start dato') — no duplication.Verification
formatStartDatecases:2026-06-09→09-06-2026, empty/undefined → '').🤖 Generated with Claude Code