fix(template): personal (my) pages render EntityStatus as a badge + fix stray Delete dialog#6268
Merged
Merged
Conversation
…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>
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.
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
EntityStatusrelation (widgetType=DOCUMENT_STATUS) was rendered on the personal surface as an ordinary control / column:isNumberType).Now it matches the main templates:
my-form-viewexcludes the status from the editable field loop and renders it as a read-onlyx-h-badgein the toolbar.my-form-pagegainedstatusText()/statusVariant()(the same keyword→variant map asform-page), loads the status options, and String-coerces the FK on edit.my-list-view/my-list-pagerender 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 detachedx-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 mainform-view.Notes / scope
#if/#foreach/#endbalanced; the status guard uses#if($statusProp != "")(the codebase idiom — an empty string is truthy in this Velocity config)./meendpoint; the identity entity is typically cross-module) and the Project-Timesheet empty-Namedropdown (needs live diagnosis of whether the label was computed).🤖 Generated with Claude Code