-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enables display of detail modal with all objects within the list and correct edit entry functionality across all views
- Loading branch information
Sebastian Tilsch
committed
Jan 4, 2024
1 parent
36fab53
commit f085f67
Showing
12 changed files
with
92 additions
and
23 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { BASE_IRI } from "./index"; | ||
|
||
export const typeIRItoTypeName = (iri: string) => { | ||
return iri.substring(BASE_IRI.length, iri.length); | ||
return iri?.substring(BASE_IRI.length, iri.length); | ||
}; |
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
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
22 changes: 22 additions & 0 deletions
22
apps/exhibition-live/components/state/useTypeIRIFromEntity.ts
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { getClasses } from "../utils/crud"; | ||
import { useGlobalCRUDOptions } from "./useGlobalCRUDOptions"; | ||
import { defaultPrefix, defaultQueryBuilderOptions } from "../form/formConfigs"; | ||
|
||
export const useTypeIRIFromEntity = (entityIRI: string) => { | ||
const { crudOptions } = useGlobalCRUDOptions(); | ||
const selectFetch = crudOptions?.selectFetch; | ||
const { data: typeIRIs } = useQuery( | ||
["classes", entityIRI], | ||
async () => { | ||
return await getClasses(entityIRI, selectFetch, { | ||
queryBuildOptions: defaultQueryBuilderOptions, | ||
defaultPrefix: defaultPrefix, | ||
}); | ||
}, | ||
{ | ||
enabled: Boolean(entityIRI && selectFetch), | ||
}, | ||
); | ||
return typeIRIs; | ||
}; |
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