Skip to content

Commit

Permalink
Merge branch 'master' into fix/4341
Browse files Browse the repository at this point in the history
  • Loading branch information
mswertz authored Oct 14, 2024
2 parents a1c8531 + 4958f7f commit 7777a43
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
15 changes: 6 additions & 9 deletions apps/nuxt3-ssr/components/SideNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@ function setSideMenuStyle(hash: string) {
>
<div v-if="title || image" class="mb-6 font-display text-heading-4xl">
<NuxtLink
:to="{ ...route, hash: headerTarget }"
tag="img"
v-if="image"
:src="image"
/>
<NuxtLink
:to="{ ...route, hash: headerTarget }"
tag="h2"
v-else
if="title"
>{{ title }}</NuxtLink
:src="image"
>
<img :src="image" :alt="title" />
</NuxtLink>
<NuxtLink v-else :to="{ ...route, hash: headerTarget }">
{{ title }}
</NuxtLink>
</div>
<ul>
<li v-for="item in items">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ const query = gql`
name
}
website
logo {
url
}
}
}
}
Expand Down Expand Up @@ -425,13 +428,13 @@ let accessConditionsItems = computed(() => {
content: resource.value.dataUseConditions,
});
}
if (resource.value.dataAccessFee) {
if (resource.value.dataAccessFee !== undefined) {
items.push({
label: "Data access fee",
content: resource.value.dataAccessFee,
});
}
if (resource.value.releaseType) {
if (resource.value.releaseType !== undefined) {
items.push({
label: "Release type",
type: "ONTOLOGY" as DefinitionListItemType,
Expand All @@ -444,7 +447,7 @@ let accessConditionsItems = computed(() => {
content: resource.value.releaseDescription,
});
}
if (resource.value.prelinked) {
if (resource.value.prelinked !== undefined) {
items.push({
label: "Prelinked",
content: resource.value.prelinked,
Expand Down
8 changes: 8 additions & 0 deletions docs/molgenis/use_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ expression itself is shown. Otherwise, the return value of the expression will b
| `/^([a-z]+)$/.test(name)` | Application of validation rule failed: /^([a-z]+)$/.test(name) |
| `if(!/^([a-z]+)$/.test(name))'name should contain only lowercase letters'` | Application of validation rule failed: name should contain only lowercase letters |

Special attention needs to be paid when validating if a field is empty or not (as filled in fields that get emptied are different from never filled in fields).
While [required](#required) should be used to ensure a field itself is filled, when creating expressions (that include other fields), use the following:

| validation | functioning |
|--------------------------|-----------------------------------|
| `columnName?.length > 0` | Field 'columnName' must be filled |
| `!(columnName?.length)` | Field 'columnName' must be empty |

Visible expressions must return a value that is not false or undefined, otherwise the column stays hidden in the user interface. In the event that javascript
throws an exception, this is shown in user interface/error message. For example:

Expand Down

0 comments on commit 7777a43

Please sign in to comment.