Skip to content

feat(dashboard): show site tags and time-settings icon strip on worker rows - #1672

Merged
renemadsen merged 1 commit into
stablefrom
feat/dashboard-row-tags-settings
Aug 6, 2026
Merged

feat(dashboard): show site tags and time-settings icon strip on worker rows#1672
renemadsen merged 1 commit into
stablefrom
feat/dashboard-row-tags-settings

Conversation

@renemadsen

Copy link
Copy Markdown
Member

What

Implements Option A of the approved design (mockup: variant A): the Dashboard's Navn column now shows, per worker row:

  • Tag chips — the site's SDK SiteTags (the same tags set in backend-configuration's "Rediger medarbejder" modal and used by this page's own Etiketter filter), rendered with the shared app-eform-tag component. Clicking a chip adds that tag to the Etiketter filter; the click does not open the edit dialog.
  • Settings icon strip — six fixed-order icons (pay rule set kr, mobile-registration mode clock/check/pencil, shifts-across-midnight moon, auto-break, 1m, extra shifts 3v), active vs dimmed, each with a full-text matTooltip (pay-rule tooltip shows the rule set's name). Fixed order makes the whole list auditable by scanning vertically.

Backend

plannings/index row DTO (TimePlanningPlanningModel) gains tags, payRuleSetId/payRuleSetName, and eight AssignedSite booleans — populated by two batched queries (PayRuleSets by id, SiteTags grouped per site; no N+1, dictionaries only read inside the per-site fan-out). Removed tags are excluded (both SiteTag and Tag workflow state), matching the sites page.

Tests

  • Integration (PlanningServiceMultiShiftTests, existing CI shard c — first tests to exercise the full Index() path): tags present/empty-not-null, pay-rule-set id+name resolved/null, settings booleans mirrored.
  • Playwright e2e (shard n, fully API-seeded): chip renders on the seeded row, icon active/off states match seeded settings, chip click reloads with tagIds containing the tag and opens no dialog.

i18n

Three new keys across all 26 locales, hand-translated (existing keys reused for all other tooltips).

Verified locally

Full-solution build clean; browser-verified against live data: chips + strip render (matching the two workers that have site tag 1), settings states match each worker's assigned-site config, chip click filters the list to the tagged workers and populates the Etiketter select.

Code-reviewed; review's critical finding (e2e originally authored for the unused Cypress tree) fixed by porting to Playwright shard n, plus seed-payload and translation fixes.

🤖 Generated with Claude Code

…r rows

The Navn column now surfaces what previously required opening each worker's
assigned-site dialog:

- tag chips (shared app-eform-tag; the same SDK SiteTags the Etiketter
  filter uses) — clicking a chip adds the tag to the Etiketter filter
- a fixed-order six-icon settings strip (pay rule set, mobile registration
  mode, shifts across midnight, auto break, 1-minute intervals, extra
  shifts) with full-text matTooltips; active vs dimmed states

Backend: plannings/index row DTO enriched with tags, pay-rule-set id+name
and eight AssignedSite booleans via two batched queries (no per-row
queries); removed tags excluded like the sites page does.

Tests: three Index() integration tests (tags, pay rule set, settings
booleans) in PlanningServiceMultiShiftTests (existing CI shard c) plus a
Playwright e2e in shard n (API-seeded: chip rendering, icon states,
chip-click filtering without opening the edit dialog).

i18n: three new keys (No pay rule set selected / Mobile time registration
disabled / Extra shifts) hand-translated across all 26 locales.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 10:38

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 dashboard row enrichment for the Time Planning “Navn” column by surfacing per-site tag chips and a fixed-order settings icon strip, backed by new DTO fields and batched backend lookups.

Changes:

  • Backend: enriches plannings/index rows with SDK site tags, pay rule set id/name, and assigned-site settings booleans using batched queries.
  • Frontend: renders tag chips (click-to-filter) and the settings icon strip with tooltips on each worker row.
  • Tests/i18n: adds integration + Playwright coverage and introduces 3 new translation keys across locales.

Reviewed changes

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

Show a summary per file
File Description
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/TimePlanningPlanningService/TimePlanningPlanningService.cs Batch-resolves tags and pay rule set names; adds new per-row fields to the Index DTO mapping.
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Planning/TimePlanningPlanningModel.cs Extends row DTO with tags, pay-rule-set fields, and assigned-site settings booleans.
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/TestBaseSetup.cs Adds helper contexts for BaseDbContext and “fresh-per-call” plugin DbContext creation.
eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/PlanningServiceMultiShiftTests.cs Adds integration tests exercising the full Index() path for tags/pay rules/settings booleans.
eform-client/src/app/plugins/modules/time-planning-pn/models/plannings/time-planning.model.ts Extends frontend planning row model with tags and settings/pay-rule-set fields.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.ts Emits tag-click events and adds tooltip helpers for the new icon strip.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.scss Adds styling for tag chip row and fixed-order settings icon strip.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.html Renders tag chips and the settings icon strip in the first column (admin + non-admin templates).
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-container/time-plannings-container.component.ts Handles tag chip click by updating Etiketter filter + reloading.
eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-container/time-plannings-container.component.html Wires tagSelected from table to container handler.
eform-client/playwright/e2e/plugins/time-planning-pn/n/dashboard-row-tags-settings.spec.ts Adds Playwright e2e coverage for chip render/filtering and icon on/off states.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/enUS.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/da.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/bgBG.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/csCZ.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/deDE.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/elGR.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/esES.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/etET.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/fiFI.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/frFR.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/hrHR.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/huHU.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/isIS.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/itIT.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ltLT.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/lvLV.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/nlNL.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/noNO.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/plPL.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptBR.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptPT.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/roRO.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/skSK.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/slSL.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/svSE.ts Adds new tooltip/label keys.
eform-client/src/app/plugins/modules/time-planning-pn/i18n/ukUA.ts Adds new tooltip/label keys.
Suppressed comments (2)

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.html:75

  • Clicks on the settings icon strip will bubble to the surrounding .first-column (click) handler and can open the assigned-site edit dialog unintentionally (especially when users click to read a tooltip).
          <div class="settings-strip">

eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Planning/TimePlanningPlanningModel.cs:67

  • PayRuleSetName is set to null when no pay rule set is selected (see Index()), but the DTO property is declared as non-nullable string. Mark it nullable to reflect actual API behavior.
    public string PayRuleSetName { get; set; }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div class="row-tags" *ngIf="row['tags']?.length" (click)="$event.stopPropagation()">
<app-eform-tag [tags]="row['tags']" (clickOnTag)="onTagClicked($event)"></app-eform-tag>
</div>
<div class="settings-strip">
// Batch-resolve SDK site tags for the listed sites (one query,
// same shape as the Etiketter filter query above), grouped per
// site MicrotingUid.
var siteMicrotingUids = assignedSites.Select(x => x.SiteId).ToList();
Comment on lines +72 to +83
<div class="row-tags" *ngIf="row['tags']?.length" (click)="$event.stopPropagation()">
<app-eform-tag [tags]="row['tags']" (clickOnTag)="onTagClicked($event)"></app-eform-tag>
</div>
<div class="settings-strip">
<span class="setting-ico txt" id="settingPayRule{{index}}"
[class.active]="row['payRuleSetId'] != null"
[class.off]="row['payRuleSetId'] == null"
[matTooltip]="row['payRuleSetName'] ? row['payRuleSetName'] : ('No pay rule set selected' | translate)">kr</span>
<span class="setting-ico" id="settingMobileReg{{index}}"
[class.active]="row['allowPersonalTimeRegistration']"
[class.off]="!row['allowPersonalTimeRegistration']"
[matTooltip]="getMobileRegTooltip(row)">
/// dashboard's Etiketter filter operates on. Empty list when the site
/// has no tags.
/// </summary>
public List<CommonDictionaryModel> Tags { get; set; }
Comment on lines +29 to +30
payRuleSetId: number | null;
payRuleSetName: string;
@renemadsen
renemadsen merged commit 7fe2c58 into stable Aug 6, 2026
77 of 78 checks passed
@renemadsen
renemadsen deleted the feat/dashboard-row-tags-settings branch August 6, 2026 11:08
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