Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

The Actions column in report-table used inline button configuration instead of the established mat-menu pattern from property-worker-table reference implementation.

Changes

report-table.component.html

  • Replaced inline button configuration with cellTemplate binding
  • Added actionsTpl ng-template with mat-menu dropdown using more_vert icon
  • Three menu items: Edit Case, Download PDF, Delete Case

report-table.component.ts

  • Added queryParams @input and editCase @output
  • Added event handlers: onEditCase(), onDownloadPdf(), onDeleteCase()

report-container.component.ts

  • Removed inline buttons configuration from Actions column in all 4 tableHeaders (simplified from ~30 lines to 4 per instance)
  • Added onEditCase() method for navigation

report-container.component.html

  • Added queryParams input and editCase event bindings

Implementation

<ng-template #actionsTpl let-row let-i="index">
  <div class="report-actions" id="action-items-{{i}}">
    <button id="actionMenu-{{i}}" mat-icon-button [matMenuTriggerFor]="menu">
      <mat-icon>more_vert</mat-icon>
    </button>
    <mat-menu #menu="matMenu">
      <button mat-menu-item (click)="onEditCase(row)">
        <mat-icon>edit</mat-icon>
        <span>{{ 'Edit Case' | translate }}</span>
      </button>
      <!-- ... other actions -->
    </mat-menu>
  </div>
</ng-template>

Net: -53 lines, eliminated 4 duplicate configurations, consistent with property-worker-table pattern.

Original prompt

This section details on the original issue you should resolve

<issue_title>Change "Actions" to follow same style as reference pattern</issue_title>
<issue_description>Use https://github.com/microting/eform-backendconfiguration-plugin/tree/master/eform-client/src/app/plugins/modules/backend-configuration-pn/modules/property-workers/components/property-worker-table as implementation pattern to use.

The tables that needs to be refactored are these:
eform-client/src/app/plugins/modules/greate-belt-pn/components/report/report-page/report-table</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Change report table style to match reference pattern Refactor Actions column to use mat-menu dropdown pattern Nov 6, 2025
Copilot AI requested a review from renemadsen November 6, 2025 06:31
Copilot finished work on behalf of renemadsen November 6, 2025 06:31
@renemadsen renemadsen marked this pull request as ready for review November 6, 2025 11:35
@renemadsen renemadsen merged commit c7b807b into master Nov 6, 2025
5 of 7 checks passed
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.

Change "Actions" to follow same style as reference pattern

2 participants