Skip to content

Some fixes for the bulk edit / delete modals#989

Open
jamesrwelch wants to merge 1 commit intodevelopfrom
feature/bulk-delete-modals
Open

Some fixes for the bulk edit / delete modals#989
jamesrwelch wants to merge 1 commit intodevelopfrom
feature/bulk-delete-modals

Conversation

@jamesrwelch
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the bulk edit and bulk delete modals to improve their UI/behaviour and fix a data binding issue.

Changes:

  • Bulk edit modal: replace the plain <textarea> description field with the shared mdm-content-editor.
  • Bulk delete modal: adjust the table markup for imported/extended badges and rename the incoming selected-records payload field.
  • Bulk edit modal: update standalone component imports to reflect the new editor component usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/app/modals/bulk-edit-modal/bulk-edit-modal.component.ts Updates standalone imports to remove MatFormField/MatInput and include ContentEditorComponent.
src/app/modals/bulk-edit-modal/bulk-edit-modal.component.html Replaces the description <textarea> with <mdm-content-editor> bound to item.description.
src/app/modals/bulk-delete-modal/bulk-delete-modal.component.ts Changes how the modal reads the incoming selected records list (dataElementIdLstdataElementIdList).
src/app/modals/bulk-delete-modal/bulk-delete-modal.component.html Fixes table structure by moving imported/extended badges into a <td>.

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


getData = () => {
this.records = this.data.dataElementIdLst;
this.records = this.data.dataElementIdList;
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getData() now reads this.data.dataElementIdList, but several existing call sites still open this modal with dataElementIdLst (and some pass dataClassIdList). This will result in records being undefined/empty and the modal not showing/deleting the selected items. Consider supporting both keys here (e.g., prefer dataElementIdList but fall back to dataElementIdLst/dataClassIdList) or standardise the payload name across all callers in the same PR.

Suggested change
this.records = this.data.dataElementIdList;
const { dataElementIdList, dataElementIdLst, dataClassIdList } = this.data || {};
this.records = dataElementIdList ?? dataElementIdLst ?? dataClassIdList ?? [];

Copilot uses AI. Check for mistakes.
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