feat(calendar): Opgaver og handlinger — calendar task list page#994
Merged
Conversation
…ination Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add navigation entry for the new calendar task list page at /plugins/backend-configuration-pn/calendar-task-list (Position=3), and shift all sibling positions >=3 up by one to maintain ordering.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… badges, swatch) Surfaces eformId + itemPlanningTagId on CalendarTaskModel so the table can resolve the eForm label and Overskrift from the option lists. Board swatch, Ja/Nej badges and the clickable task-name link use mtx-grid cellTemplate refs (matching task-wizard-table); plain columns use formatter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Loads option lists (properties, planning tags, eForm templates; boards + workers per single selected property), calls getTasksIndex and maps rows via mapResponseToCalendarTask (same as the week grid). Row link opens the calendar's TaskCreateEditModalComponent via MatDialog + dialogConfigHelper with the full row as data.task; reloads on save-close. CSV is built client-side with BOM, ';' separator and the humanized Gentagelse string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lazy route 'calendar-task-list' registered next to 'calendar' with AuthGuard. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new “Opgaver og handlinger / Tasks and actions” task-list page to the BackendConfiguration calendar feature set. The change introduces a backend index endpoint that returns one row per recurrence series (no occurrence expansion) and a new Angular lazy module that lists, filters, sorts, paginates (client-side), exports CSV, and opens the existing calendar edit modal for a selected row.
Changes:
- Backend: add
POST /api/backend-configuration-pn/calendar/tasks/indexwith new filter/sort request models and service method to list calendar task series. - Frontend: add a new lazy-loaded calendar task-list module (filters + table + page) with CSV export and modal reuse.
- Refactor: extract shared task-mapping helpers so week-grid and task-list derive repeat-rule identically.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationCalendarService/IBackendConfigurationCalendarService.cs | Adds the new Index service contract for task-list indexing. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationCalendarService/BackendConfigurationCalendarService.cs | Implements Index query/filters, enriches rows (boards/tags/workers), applies name filter and sorting. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Calendar/CalendarTaskListPaginationModel.cs | New backend pagination/sort model (parity with other list endpoints). |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Calendar/CalendarTaskListFiltrationModel.cs | New backend filtration model for the task-list endpoint. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Calendar/CalendarTaskIndexRequestModel.cs | New backend request wrapper (filters + pagination) for /tasks/index. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/EformBackendConfigurationPlugin.cs | Adds a new navigation menu entry for the task-list page and adjusts positions. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Controllers/CalendarController.cs | Adds the POST calendar/tasks/index controller action. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/CalendarTaskListIndexTest.cs | Adds focused integration coverage for Index status filtering. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/services/backend-configuration-pn-calendar.service.ts | Adds a typed client method for calling the new /calendar/tasks/index endpoint. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/services/calendar-task.mapper.ts | Introduces shared DTO→model mapping helpers (mapRepeatType, mapResponseToCalendarTask). |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/components/calendar-container/calendar-container.component.ts | Reuses the extracted mapping helper instead of duplicating repeat-rule logic. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/calendar.module.ts | Re-exports the create/edit modal so sibling modules can open it without redeclaring. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/index.ts | Barrel exports for new task-list components. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-table/calendar-task-list-table.component.ts | New table component (columns, formatting, repeat text, edit event). |
| 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 | Jest coverage for table helpers and edit-event emission. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-table/calendar-task-list-table.component.scss | Styling for swatches, link/button, and yes/no badges. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-table/calendar-task-list-table.component.html | Renders the grid with templates for board/title/status/compliance cells. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-page/calendar-task-list-page.component.ts | New page container: loads option lists, calls index endpoint, opens modal, exports CSV. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-page/calendar-task-list-page.component.spec.ts | Jest coverage for init loading, filter reload, and modal open behavior. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-page/calendar-task-list-page.component.scss | Page header layout styling. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-page/calendar-task-list-page.component.html | Page layout: header + filters + table. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-filters/calendar-task-list-filters.component.ts | New filter-bar component (debounced search, property-dependent option handling). |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-filters/calendar-task-list-filters.component.scss | Responsive grid layout for the filter bar. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/components/calendar-task-list-filters/calendar-task-list-filters.component.html | Filter UI (property/eform/board/assignee/status/compliance/tags/search). |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/calendar-task-list.routing.ts | Adds route configuration for the new lazy module. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/calendar-task-list.module.ts | Declares the new task-list module and imports required dependencies. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar-task-list/calendar-task-list-repeat.util.ts | Shared repeat-label formatting helper (table + CSV). |
| eform-client/src/app/plugins/modules/backend-configuration-pn/models/calendar/calendar-task.model.ts | Extends calendar task model + adds request model interfaces for /tasks/index. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/enUS.ts | Adds English translations for new page strings. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/i18n/da.ts | Adds Danish translations for new page strings. |
| eform-client/src/app/plugins/modules/backend-configuration-pn/backend-configuration-pn.routing.ts | Registers the new lazy route calendar-task-list. |
Comment on lines
+37
to
+39
| boardColor(task: CalendarTaskModel): string { | ||
| return task.color || this.board(task.boardId)?.color || 'transparent'; | ||
| } |
Comment on lines
+19
to
+21
| <ng-template #titleTpl let-row> | ||
| <a class="ctl-link" (click)="onEdit(row)">{{ row.title }}</a> | ||
| </ng-template> |
Comment on lines
+100
to
+102
| // Request models for the calendar "task list" page (POST /calendar/tasks/index). | ||
| // Mirrors the backend CalendarTaskListRequestModel: a filter block + pagination. | ||
| export interface CalendarTaskListFiltrationModel { |
Comment on lines
+113
to
+116
| export interface CalendarTaskListPaginationModel { | ||
| sort: string; | ||
| isSortDsc: boolean; | ||
| } |
Comment on lines
+135
to
+140
| loadTasks() { | ||
| this.calendarService.getTasksIndex({ | ||
| filters: this.currentFilters, | ||
| pagination: {sort: 'Id', isSortDsc: false}, | ||
| }).subscribe(res => { | ||
| if (res && res.success) { |
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 new "Opgaver og handlinger" page to the BackendConfiguration plugin — the tabular counterpart to the calendar (
/plugins/backend-configuration-pn/calendar). It lists calendar tasks (one row per series) with a filter bar, sortable columns, client-side pagination, and CSV export, and reuses the calendar's existingTaskCreateEditModalComponentfor editing (row-click → edit modal). It is distinct from the legacy task-wizard (which is built on the old item-planning system); this is backed by the calendar's task model.Route:
/plugins/backend-configuration-pn/calendar-task-list. New endpoint:POST api/backend-configuration-pn/calendar/tasks/index.Design spec & implementation plan:
docs/superpowers/specs/2026-06-09-calendar-task-list-design.mdanddocs/superpowers/plans/2026-06-09-calendar-task-list.md(in the flutter-eform repo).Backend
IndexonBackendConfigurationCalendarService(+ interface) queryingAreaRulePlanning(one row per series, no occurrence expansion), mirroring the task-wizard Index pattern. Returns the existingCalendarTaskResponseModel.CalendarConfiguration), eForm, assignee, tags, active, compliance, free-text. Sort viaQueryHelper.AddSortToQuery; pagination is client-side (documented on the model, matching the task-wizard reference).POST calendar/tasks/indexcontroller action.GetNavigationMenu(EN "Tasks and actions" / DA "Opgaver og handlinger").Frontend
modules/calendar-task-list/(filters + table + page components).CalendarRepeatService(reconstructMetaFromTask+formatCustomRepeatLabel) — identical wording to the recurrence picker (e.g. "Ugentligt hver mandag", "Månedligt på den 2. torsdag", "Gentages ikke").;, humanized Gentagelse).mapResponseToCalendarTask, and option-list services; extracted a sharedformatRepeatTexthelper.Verification
dotnet buildgreen; integration test passes (real MariaDB).The host syncs plugin menu items into
MenuItemsonly on plugin install/enable, not on every startup. On an already-seeded DB, the new "Opgaver og handlinger" entry will not appear in the left nav until the plugin is re-enabled / the menu is re-seeded. The page is reachable by route in the meantime. The menu code itself follows the exact task-wizard entry pattern.🤖 Generated with Claude Code