Browse Source

Do not show apps create form when contributor. https://trello.com/c/xvVjUejj/104-vrw-aanmaken-mag-niet-als-contributer

master
Joshua Rubingh 5 months ago
parent
commit
072e9f4116
  1. 65
      pages/researchStudies/_studyId/apps/windows-vdi/index.vue

65
pages/researchStudies/_studyId/apps/windows-vdi/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<v-container>
<ui-rug-card-form :form="form">
<ui-rug-card-form :form="form" :use-actions="isAdmin">
<ui-rug-card-title>
{{ $t('page.researchStudies.studyId.index.title', {study_name: `${study.name} (${study.code})`}) }}
<!--
@ -41,38 +41,41 @@ @@ -41,38 +41,41 @@
</template>
</v-data-table>
<br /><br />
<h1>{{ $t('form.apps.header') }}</h1>
<template v-if="isAdmin">
<br /><br />
<h1>{{ $t('form.apps.header') }}</h1>
<v-select
id="formData.version"
v-model="formData.version"
:error-messages="form.getError('formData.version')"
:items="versions"
:item-text="
(row) => {
return `${row.os} ${row.name} (${row.memory}, ${row.disk})`
}
"
item-value="id"
:value="formData.version"
:label="$t('form.apps.version.label')"
></v-select>
<v-select
id="formData.version"
v-model="formData.version"
:error-messages="form.getError('formData.version')"
:items="versions"
:item-text="
(row) => {
return `${row.os} ${row.name} (${row.memory}, ${row.disk})`
}
"
item-value="id"
:value="formData.version"
:label="$t('form.apps.version.label')"
></v-select>
<v-select
id="formData.contributor"
v-model="formData.contributor"
:error-messages="form.getError('formData.contributor')"
:items="availableContributors"
:item-text="
(row) => {
return `${row.researcher.display_name} (${row.researcher.email_address})`
}
"
item-value="id"
:value="formData.contributor"
:label="$t('form.apps.contributor.label')"
></v-select>
</template>
<v-select
id="formData.contributor"
v-model="formData.contributor"
:error-messages="form.getError('formData.contributor')"
:items="availableContributors"
:item-text="
(row) => {
return `${row.researcher.display_name} (${row.researcher.email_address})`
}
"
item-value="id"
:value="formData.contributor"
:label="$t('form.apps.contributor.label')"
></v-select>
</v-card-text>
</ui-rug-card-form>
</v-container>

Loading…
Cancel
Save