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

feat(ontology): edit res class info (DSP-1209) #380

Merged
merged 8 commits into from Feb 16, 2021

Conversation

kilchenmann
Copy link
Contributor

resolves DSP-1209

@kilchenmann kilchenmann self-assigned this Feb 12, 2021
@kilchenmann kilchenmann added the enhancement New feature or request label Feb 12, 2021
Copy link
Collaborator

@mdelez mdelez left a 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>();
Copy link
Collaborator

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

Copy link
Contributor Author

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 🙈

Copy link
Contributor Author

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) => {
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved in 076e0a7

@kilchenmann kilchenmann merged commit 2debd03 into main Feb 16, 2021
@kilchenmann kilchenmann deleted the wip/dsp-1209-edit-res-class-info branch February 16, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants