diff --git a/apps/exhibition-live/components/layout/main-layout/menu/menuLists.ts b/apps/exhibition-live/components/layout/main-layout/menu/menuLists.ts index 11adf6e4..1f70e259 100644 --- a/apps/exhibition-live/components/layout/main-layout/menu/menuLists.ts +++ b/apps/exhibition-live/components/layout/main-layout/menu/menuLists.ts @@ -5,13 +5,19 @@ import { } from "@mui/icons-material"; import { JSONSchema7 } from "json-schema"; -import { MenuGroup } from "./types"; +import { MenuGroup, MenuItem } from "./types"; import { TFunction } from "i18next"; import { Permission } from "@slub/edb-core-types"; const icons = { IconFaceId, IconPaint, IconDots }; const topLevel = ["Exhibition", "Person"]; +const disabledTypes = [ + "InvolvedPerson", + "InvolvedCorporation", + "ExponatsAndPersons", + "ExponatsAndCorporations", +]; const lists: ( schema: JSONSchema7, @@ -31,17 +37,34 @@ const lists: ( url: `/list/${key}`, typeName: key, })),*/ - children: Object.entries( - exhibitionSchema.definitions || exhibitionSchema["$defs"] || {}, - ) - .filter(([key]) => !topLevel.includes(key)) - .map(([key, value]) => ({ - id: `list_${key}`, - title: t(key), - type: "item", - typeName: key, - readOnly: !getPermission(key).edit, - })), + children: [ + ...topLevel.map( + (key) => + ({ + id: `list_${key}`, + title: t(key), + type: "item", + typeName: key, + readOnly: !getPermission(key).edit, + }) as MenuItem, + ), + ...Object.entries( + exhibitionSchema.definitions || exhibitionSchema["$defs"] || {}, + ) + .filter( + ([key]) => !topLevel.includes(key) && disabledTypes.indexOf(key) === -1, + ) + .map( + ([key, value]) => + ({ + id: `list_${key}`, + title: t(key), + type: "item", + typeName: key, + readOnly: !getPermission(key).edit, + }) as MenuItem, + ), + ], }); export default lists; diff --git a/apps/exhibition-live/public/locales/de/translation.json b/apps/exhibition-live/public/locales/de/translation.json index 78dc4358..84446f6b 100644 --- a/apps/exhibition-live/public/locales/de/translation.json +++ b/apps/exhibition-live/public/locales/de/translation.json @@ -13,6 +13,7 @@ "export": "Export", "list": "auflisten", "List": "Liste", + "Tag": "Schlagwort", "exhibition database": "Ausstellungsdatenbank", "create new": "{{item}} neu anlegen", "Exhibition": "Ausstellung", @@ -38,6 +39,7 @@ "ExhibitionExponat": "Exponat", "ExhibitionExponat_plural": "Exponate", "ExhibitionSeries": "Ausstellungsreihe", + "ResourceType": "Art der Ressource", "ExhibitionSeries_plural": "Ausstellungsreihen", "GeographicLocation": "Geographische Position", "GeographicLocation_plural": "Geographische Positionen", diff --git a/apps/exhibition-live/public/locales/en/translation.json b/apps/exhibition-live/public/locales/en/translation.json index 191732b8..ff966bcf 100644 --- a/apps/exhibition-live/public/locales/en/translation.json +++ b/apps/exhibition-live/public/locales/en/translation.json @@ -13,6 +13,7 @@ "export": "export", "list": "list", "List": "list", + "Tag": "Tag", "exhibition database": "Exhibition Database", "create new": "create new {{item}}", "Exhibition": "Exhibition", @@ -38,6 +39,7 @@ "ExhibitionExponat": "exhibition exponat", "ExhibitionExponat_plural": "exhibition exponats", "ExhibitionSeries": "exhibition series", + "ResourceType": "resource type", "ExhibitionSeries_plural": "exhibition series", "GeographicLocation": "geographic location", "GeographicLocation_plural": "geographic locations", diff --git a/apps/exhibition-live/vite/App.tsx b/apps/exhibition-live/vite/App.tsx index 899aa336..02c60edf 100644 --- a/apps/exhibition-live/vite/App.tsx +++ b/apps/exhibition-live/vite/App.tsx @@ -1,7 +1,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { AdbProvider, store } from "@slub/edb-state-hooks"; import { Provider } from "react-redux"; -import { envToSparqlEndpoint } from "../components/config/envToSparqlEndpoint"; import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; import "dayjs/locale/de"; import "dayjs/locale/en"; @@ -16,6 +15,7 @@ import { LocalizationProvider } from "@mui/x-date-pickers"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import SemanticJsonForm from "../components/form/SemanticJsonForm"; import { exhibitionConfig } from "../components/config/exhibitionAppConfig"; +import { envToSparqlEndpoint } from "@slub/edb-ui-utils"; export const queryClient = new QueryClient();