-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(ontology): check if an ontology, a class or a property can be deleted (DSP-1750) #457
Conversation
test(ontology): enable all tests
daf3951
to
6c87033
Compare
@@ -52,7 +52,7 @@ | |||
<mat-icon>tune</mat-icon> | |||
</button> | |||
<span | |||
[matTooltip]="(resClasses.length > 0 ? 'The property can\'t be removed because it\'s in use' : 'Remove property from resource class')"> | |||
[matTooltip]="((resClasses.length > 0 || !propCanBeDeleted) ? 'The property can\'t be removed because it\'s in use' : 'Remove property from resource class')"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved in 5db5353
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is same with me. I am able to delete the property even if it says that This property can't be removed because it's in use
. I would suggest to disable the delete icon if the property / class can't be deleted.
I am also able to to delete classes. Can you give example in which case I can not delete the class?
@waychal and @mdelez Thanks for the report. Yes, there's something wrong with the logic. In this case the tooltip needs a different text, because here we want to remove (this is why I don't use the trash-bin icon) the property from the resource class; it's not deleting the property. This part has to be done in the properties section / |
I figured out what happened: I added the The "remove property from resource class" will be implemented / fixed in the next iteration... |
Thank you @mdelez |
resolves DSP-1700
is required for DSP-1623
In this PR I added the new DSP-API routes (DSP-1622) and DSP-JS methods (DSP-1673) to check if an ontology, a resource class or a property can be deleted or not.