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): edit res class info (DSP-1209) #380
Conversation
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.
Looks pretty good! ResourceClassForm
could use a little clean up to remove unused parameters and add a missing semicolon on line 438. Also you don't appear to set this.loading
to false in the SubmitData
method if the user is not in edit mode.
if (this.showResourceClassForm) { | ||
// edit mode: res class info (label and comment) | ||
// label | ||
const onto4Label = new UpdateOntology<UpdateResourceClassLabel>(); |
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.
I'm not sure I understand this variable name 😅 same with onto4comment
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.
I can change it. I think I copied from the js-lib example 🙈
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's the UpdateOntology
object. And we need an UpdateOntology
object for the label
and one for the comment
. So, it's an ontology for label (onto4label
) and an ontology for comment (onto4comment
)
onto4Comment.lastModificationDate = this.lastModificationDate; | ||
|
||
this._dspApiConnection.v2.onto.updateResourceClass(onto4Comment).subscribe( | ||
(classResponse: ResourceClassDefinitionWithAllLanguages) => { |
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.
classResponse is shadowed here but it's not a big issue
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 076e0a7
resolves DSP-1209