Skip to content

fix(template): personal (my) pages render EntityStatus as a badge + fix stray Delete dialog#6268

Merged
delchev merged 1 commit into
masterfrom
fix/personal-templates-status-title-delete
Jul 12, 2026
Merged

fix(template): personal (my) pages render EntityStatus as a badge + fix stray Delete dialog#6268
delchev merged 1 commit into
masterfrom
fix/personal-templates-status-title-delete

Conversation

@delchev

@delchev delchev commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Two fixes to the Harmonia personal (my) templates, bringing them in line with the main form-view/document-view. Personal-templates only — no generator/backend change.

1. Status is now a badge, not a plain field

An EntityStatus relation (widgetType=DOCUMENT_STATUS) was rendered on the personal surface as an ordinary control / column:

  • the form showed it as an editable dropdown;
  • the list showed the raw FK id, right-aligned as a number (isNumberType).

Now it matches the main templates:

  • my-form-view excludes the status from the editable field loop and renders it as a read-only x-h-badge in the toolbar. my-form-page gained statusText() / statusVariant() (the same keyword→variant map as form-page), loads the status options, and String-coerces the FK on edit.
  • my-list-view / my-list-page render the status column as a badge with the resolved label (options loaded once), instead of the numeric FK id.

2. Stray "Delete?" dialog on the New page

The delete-confirmation dialog was a sibling of x-h-dialog-overlay (an empty overlay plus a detached x-h-dialog), so it was never hidden when closed — its "Delete?" body showed on the New page. It's now nested inside the overlay, matching the working main form-view.

Notes / scope

  • Velocity #if/#foreach/#end balanced; the status guard uses #if($statusProp != "") (the codebase idiom — an empty string is truthy in this Velocity config).
  • Two related items from the same report are follow-ups, not in this PR: the "New … for " title (needs a cross-layer feature — the identity entity's display field exposed to a /me endpoint; the identity entity is typically cross-module) and the Project-Timesheet empty-Name dropdown (needs live diagnosis of whether the label was computed).
  • Generation-time templates: picks up on the next app regen. Not yet driven end-to-end after a jar rebuild.

🤖 Generated with Claude Code

…ix the stray Delete dialog

Two fixes to the Harmonia personal (my) templates, bringing them in line with the main
form-view/document-view:

1. EntityStatus (widget DOCUMENT_STATUS) is now a read-only coloured badge, not a control:
   - my-form-view: the status is excluded from the editable field loop and shown as an
     x-h-badge in the toolbar (statusText()/statusVariant() added to my-form-page, which now
     also loads the status options and String-coerces the FK on edit).
   - my-list-view/my-list-page: the status column renders as a badge (statusVariant) with the
     resolved label, instead of the raw FK id right-aligned as a number.

2. The delete-confirmation dialog was a SIBLING of x-h-dialog-overlay (empty overlay + a
   detached x-h-dialog), so it was not hidden when closed - its "Delete?" body showed on the
   New page. Nest x-h-dialog inside x-h-dialog-overlay, matching the working main form-view.

Personal-templates only; no generator/backend change. Velocity blocks balanced; the status
guard uses `#if($statusProp != "")` like the main templates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@delchev delchev merged commit 16c7b37 into master Jul 12, 2026
10 checks passed
@delchev delchev deleted the fix/personal-templates-status-title-delete branch July 12, 2026 06:25
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.

1 participant