-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(catalogue)!: convert catalogue ssr user interface to flat model.…
… BREAKING CHANGE (#4114) Convert catalogue to 'flat' model Resource types are 'flattened' to Collections with 'type'
- Loading branch information
Showing
130 changed files
with
28,152 additions
and
4,474 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# this file is added as an example file for setting env variables | ||
# rename this file to .env to use the values | ||
NUXT_PUBLIC_API_BASE=http://localhost:3000/ | ||
NUXT_PUBLIC_EMX2_THEME=umcg | ||
NUXT_PUBLIC_EMX2_LOGO=UMCGkort.woordbeeld | ||
NUXT_PUBLIC_SITE_TITLE="My Site Title" |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<script setup lang="ts"> | ||
import type { ICollection, IDefinitionListItem } from "~/interfaces/types"; | ||
import collectionGql from "~~/gql/collection"; | ||
const props = defineProps<{ | ||
id: string; | ||
}>(); | ||
const route = useRoute(); | ||
const query = moduleToString(collectionGql); | ||
let collection: ICollection = ref(); | ||
const { data: collectionData } = await useFetch( | ||
`/${route.params.schema}/graphql`, | ||
{ | ||
method: "POST", | ||
body: { | ||
query, | ||
variables: { | ||
id: props.id, | ||
}, | ||
}, | ||
} | ||
).catch((e) => console.log(e)); | ||
watch( | ||
collectionData, | ||
(data) => { | ||
collection = data?.data?.Collections[0]; | ||
}, | ||
{ | ||
deep: true, | ||
immediate: true, | ||
} | ||
); | ||
const items: IDefinitionListItem[] = []; | ||
if (collection?.website) { | ||
items.push({ | ||
label: "Website", | ||
type: "LINK", | ||
content: { label: collection.website, url: collection.website }, | ||
}); | ||
} | ||
if (collection?.numberOfParticipants) { | ||
items.push({ | ||
label: "Number of participants", | ||
content: collection?.numberOfParticipants, | ||
}); | ||
} | ||
if (collection?.numberOfParticipantsWithSamples) { | ||
items.push({ | ||
label: "Number of participants with samples", | ||
content: collection?.numberOfParticipantsWithSamples, | ||
}); | ||
} | ||
</script> | ||
|
||
<template> | ||
<ContentBlockModal | ||
:title="collection?.name" | ||
:description="collection?.description" | ||
v-if="collection" | ||
> | ||
<CatalogueItemList :items="items" :small="true" /> | ||
</ContentBlockModal> | ||
</template> |
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.