Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add a concept or edit a conceptscheme when there's only one provider #883

Closed
koenedaele opened this issue Jul 4, 2024 · 4 comments

Comments

@koenedaele
Copy link
Member

Steps to reproduce:

  • Install the empty scaffold
  • Go to admin
  • Two providers are present (AAT and TGN), and no editable conceptschemes
  • Add a new provider
  • It's impossible to select this conceptscheme because it's the only option.
  • Add a second provider
  • It's now possible to add concepts to both schemes because you can select the scheme
  • Delete a provider
  • It's no longer possible to edit a scheme or add concepts to it
@goessebr
Copy link
Contributor

goessebr commented Jul 8, 2024

domAttr.set(this.addConceptButton, 'disabled', false);
domAttr.set(this.importConceptButton, 'disabled', false);
domAttr.set(this.editSchemeButton, 'disabled', false);

The activation of the buttons is triggered by an onChange event on the conceptSchemeSelect dropdown list.

  • We could add a "Select scheme" option, allowing us to always trigger the event. In this case, the default "Select scheme" option should disable the buttons.
  • We could simply enable the buttons at all times since a working instance will always have a scheme eventually.
  • We could enable or disable the buttons on load. If concept schemes are present, the three buttons should be enabled. If no concept scheme is present, the buttons should be disabled.

Do you have a preference?

@koenedaele
Copy link
Member Author

I was going to say that he third option woud not work if I just added a first scheme (since it would have been loaded without schemes), but I believe that a new scheme isn't automatically added to the list anyway, so a page refresh is needed always? Correct?

@goessebr
Copy link
Contributor

goessebr commented Jul 9, 2024

Correct.

We also need to trigger a page reload or update the dropdown in the side menu after adding a provider or closing the provider addition pop-up for all options.

@koenedaele
Copy link
Member Author

I'm fine either way, as long as it works. Go for what's easiest for frontend devs.

I assume we'll be doing a full UI update one day anyway, we can always review it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants