-
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(resource-instance): add subclass creation support (DEV-553) #686
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4ad0ebd
feat(new-resource-instance-form): add support for creating subclasses…
mdelez 3822316
Merge branch 'main' into wip/dev-553-new-entry-subclasses
mdelez 8889b7d
refactor: rename ontoIri to currentOntoIri to fix tests
mdelez 8819156
test(link-value): fix link value tests
mdelez 3a4f134
chore(config): add ls-test-server config
mdelez a038e4a
Merge branch 'main' into wip/dev-553-new-entry-subclasses
mdelez d592123
Merge branch 'main' into wip/dev-553-new-entry-subclasses
mdelez 1da64f2
Merge branch 'main' into wip/dev-553-new-entry-subclasses
mdelez a61671a
chore(cleanup): remove console logs
mdelez 0222dd1
chore(link-value): add colon to clarify label
mdelez 16a1963
Merge branch 'main' into wip/dev-553-new-entry-subclasses
mdelez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ export class CreateLinkResourceComponent implements OnInit { | |
@Input() parentResource: ReadResource; | ||
@Input() propDef: string; | ||
@Input() resourceClassDef: string; | ||
@Input() currentOntoIri: string; | ||
|
||
@Output() closeDialog: EventEmitter<any> = new EventEmitter<any>(); | ||
|
||
|
@@ -49,6 +50,9 @@ export class CreateLinkResourceComponent implements OnInit { | |
) { } | ||
|
||
ngOnInit(): void { | ||
// console.log('parentResource: ', this.parentResource); | ||
// console.log('propDef: ', this.propDef); | ||
// console.log('resourceClassDef: ', this.resourceClassDef); | ||
this.propertiesForm = this._fb.group({}); | ||
|
||
this._dspApiConnection.v2.ontologyCache.getResourceClassDefinition(this.resourceClassDef).subscribe( | ||
|
@@ -82,6 +86,7 @@ export class CreateLinkResourceComponent implements OnInit { | |
} | ||
|
||
onSubmit() { | ||
console.log('clicked'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should also be removed. |
||
if (this.propertiesForm.valid) { | ||
const createResource = new CreateResource(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,8 @@ export class DisplayEditComponent implements OnInit { | |
|
||
user: ReadUser; | ||
|
||
ontoIri: string; | ||
|
||
constructor( | ||
@Inject(DspApiConnectionToken) private _dspApiConnection: KnoraApiConnection, | ||
private _valueOperationEventService: ValueOperationEventService, | ||
|
@@ -128,7 +130,7 @@ export class DisplayEditComponent implements OnInit { | |
} | ||
|
||
ngOnInit() { | ||
|
||
this.ontoIri = this.parentResource.type.split('#')[0]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice solution 👍 |
||
this.mode = 'read'; | ||
this.dateDisplayOptions = 'all'; | ||
this.showDateLabels = true; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we remove these commented lines?