hyperledger-labs / business-partner-agent

The Business Partner Agent is a SSI wallet and controller based on aries cloud agent python.
https://labs.hyperledger.org/business-partner-agent/
Apache License 2.0
56 stars 49 forks source link

UI: Update schema default attribute #744

Closed etschelp closed 2 years ago

etschelp commented 2 years ago

A schemas default attribute determines how data related to the schema is labeled in the UI. Currently the UI only supports setting the default attribute when a schema is created, the default attribute is then marked with an *

Backend Endpoints:

PUT /api/admin/schema/{id} POST /api/admin/schema

{
  "defaultAttributeName": "something"
}

The following features are missing:

1. Option to update a schemas default attribute

Add the option to the following dialog:

Screenshot 2022-05-27 at 14 46 08

2. Option to set the default attribute when importing an json-ld schema

Probably another checkbox on the left hand side same as the attribute selector, but one that only allows a single selection.

Screenshot 2022-05-27 at 14 55 58

3. Option to set the default attribute when importing an Indy schema

This is a bit more tricky as there is a preview schema functionality needed to make this work (same as with json-ld), which involves backend work and changing the flow in the component.

Screenshot 2022-05-27 at 14 58 04
DritonGoxhufi commented 2 years ago

Option 1 is resolved in #773

Step 1: Open an existing schema and click on the edit-button image

Step 2: choose new default attribute via checkbox image

Step 3: save/update the state into the store image