MauroDataMapper / mdm-ui

Web front-end for the Mauro Data Mapper
Apache License 2.0
7 stars 5 forks source link

Move Data Elements to another Data Class within the same model #869

Open pjmonks opened 5 months ago

pjmonks commented 5 months ago

Depends on

Description

There is a requirement from NHS England to be able to move Data Elements between Data Classes, so long as they are within the same Data Model (to not break existing links to data types etc).

Move Option

A new menu option called "Move..." should appear in the triple-dot menu for (only) a Data Element, here:

Image

This menu option should only appear if:

Move To Dialog

Selecting the menu item should open a new dialog. Inside, this is where the user selects an existing data class within the same data model. Ideally, this should exclude the current data class the data element sits under.

Once selected, the user should be able to click a primary action button e.g. "Move", or cancel/close the dialog to do nothing.

Update Data Element

Finally, the standard Data Element update endpoint should be invoked:

PUT /api/dataModels/{modelId}/dataClasses/{classId}/dataElements/{elementId}

{
    "dataClass": "{anotherClassId}"
}

For this request, no other properties need to be updated, just the dataClass parent UUID.

Once successful, the page should refresh to reflect the change and a confirmation toast message should appear.

Related

pjmonks commented 5 months ago

Now going to put this on hold. Technically this work is not in the statement of work agreed with NHS England and building this feature is taking up time - there may not even be a need for it depending on discussions of re-organising the dictionary structure in Mauro.

Parking for now, we may revisit the work and complete later.